master - pvmove: clean exit on failed pvmove restart
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=bbcc120e5a2c78...
Commit: bbcc120e5a2c781dc372c4d7329a262247f68f98
Parent: 229e0752f1651463c21e65d8f9641ff9d1c26dfd
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Mon Sep 23 19:46:28 2013 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Mon Sep 23 19:46:28 2013 +0100
pvmove: clean exit on failed pvmove restart
At present, before the pvmove command can be used to restart pvmove
polling, the LVs concerned need to be activated e.g. with lvchange -ay.
---
WHATS_NEW | 1 +
tools/polldaemon.c | 7 ++++++-
2 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index ff0303a..8c1a343 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.103 -
======================================
+ Exit cleanly with message when pvmove cannot restart because LV is inactive.
Version 2.02.102 - 23rd September 2013
======================================
diff --git a/tools/polldaemon.c b/tools/polldaemon.c
index 0b00e93..7eeea2c 100644
--- a/tools/polldaemon.c
+++ b/tools/polldaemon.c
@@ -201,7 +201,12 @@ static int _poll_vg(struct cmd_context *cmd, const char *vgname,
continue;
/* FIXME Need to do the activation from _set_up_pvmove here
- * if it's not running and we're not aborting */
+ * if it's not running and we're not aborting. */
+ if (!lv_is_active(lv)) {
+ log_print_unless_silent("%s: Skipping inactive LV. Try lvchange or vgchange.", name);
+ continue;
+ }
+
if (_check_lv_status(cmd, vg, lv, name, parms, &finished) &&
!finished)
parms->outstanding_count++;
10 years, 7 months
master - cmdline: Accept PE ranges as start+length.
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=194d2479f76f4d...
Commit: 194d2479f76f4d06b8476418211273ee46974cef
Parent: b2535d0c971afc665a268cbe55b6d23262e21e2b
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Mon Sep 23 19:55:50 2013 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Mon Sep 23 19:55:50 2013 +0100
cmdline: Accept PE ranges as start+length.
---
WHATS_NEW | 1 +
man/pvmove.8.in | 7 +++++++
tools/toollib.c | 11 ++++++++++-
3 files changed, 18 insertions(+), 1 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 8c1a343..4ffbe4f 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.103 -
======================================
+ Support start+length notation with command line PE ranges.
Exit cleanly with message when pvmove cannot restart because LV is inactive.
Version 2.02.102 - 23rd September 2013
diff --git a/man/pvmove.8.in b/man/pvmove.8.in
index 79ccf1c..c77dcbc 100644
--- a/man/pvmove.8.in
+++ b/man/pvmove.8.in
@@ -123,6 +123,13 @@ inclusive on /dev/sdb1 - like this:
.sp
.B pvmove /dev/sdb1:1000-1999
.P
+A range can also be specified as start+length, so
+.sp
+.B pvmove /dev/sdb1:1000+1000
+.P
+also refers to 1000 Physical Extents starting from Physical Extent number 1000.
+(Counting starts from 0, so this refers to the 1001st to the 2000th inclusive.)
+.P
To move a range of Physical Extents to a specific location (which must have
sufficent free extents) use the form:
.sp
diff --git a/tools/toollib.c b/tools/toollib.c
index 83789df..099e82b 100644
--- a/tools/toollib.c
+++ b/tools/toollib.c
@@ -1081,7 +1081,7 @@ static int _parse_pes(struct dm_pool *mem, char *c, struct dm_list *pe_ranges,
const char *pvname, uint32_t size)
{
char *endptr;
- uint32_t start, end;
+ uint32_t start, end, len;
/* Default to whole PV */
if (!c) {
@@ -1121,7 +1121,16 @@ static int _parse_pes(struct dm_pool *mem, char *c, struct dm_list *pe_ranges,
goto error;
c = endptr;
}
+ } else if (*c == '+') { /* Length? */
+ c++;
+ if (isdigit(*c)) {
+ if (!xstrtouint32(c, &endptr, 10, &len))
+ goto error;
+ c = endptr;
+ end = start + (len ? (len - 1) : 0);
+ }
}
+
if (*c && *c != ':')
goto error;
10 years, 7 months
master - pvmove: clean exit on failed pvmove restart
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=b2535d0c971afc...
Commit: b2535d0c971afc665a268cbe55b6d23262e21e2b
Parent: 229e0752f1651463c21e65d8f9641ff9d1c26dfd
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Mon Sep 23 19:53:18 2013 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Mon Sep 23 19:53:18 2013 +0100
pvmove: clean exit on failed pvmove restart
At present, before the pvmove command can be used to restart pvmove
polling, the LVs concerned need to be activated e.g. with lvchange
-ay.
---
WHATS_NEW | 1 +
tools/polldaemon.c | 7 ++++++-
2 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index ff0303a..8c1a343 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.103 -
======================================
+ Exit cleanly with message when pvmove cannot restart because LV is inactive.
Version 2.02.102 - 23rd September 2013
======================================
diff --git a/tools/polldaemon.c b/tools/polldaemon.c
index 0b00e93..7eeea2c 100644
--- a/tools/polldaemon.c
+++ b/tools/polldaemon.c
@@ -201,7 +201,12 @@ static int _poll_vg(struct cmd_context *cmd, const char *vgname,
continue;
/* FIXME Need to do the activation from _set_up_pvmove here
- * if it's not running and we're not aborting */
+ * if it's not running and we're not aborting. */
+ if (!lv_is_active(lv)) {
+ log_print_unless_silent("%s: Skipping inactive LV. Try lvchange or vgchange.", name);
+ continue;
+ }
+
if (_check_lv_status(cmd, vg, lv, name, parms, &finished) &&
!finished)
parms->outstanding_count++;
10 years, 7 months
master - post-release
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=229e0752f16514...
Commit: 229e0752f1651463c21e65d8f9641ff9d1c26dfd
Parent: c8057aec36a3d00789b59e06a9ed9eeee7151ded
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Mon Sep 23 15:55:11 2013 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Mon Sep 23 15:55:11 2013 +0100
post-release
---
VERSION | 2 +-
VERSION_DM | 2 +-
WHATS_NEW | 3 +++
WHATS_NEW_DM | 3 +++
4 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/VERSION b/VERSION
index 7f751a2..d1e7c0e 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.02.102(2)-git (2013-09-23)
+2.02.103(2)-git (2013-09-23)
diff --git a/VERSION_DM b/VERSION_DM
index 461c775..6c755b8 100644
--- a/VERSION_DM
+++ b/VERSION_DM
@@ -1 +1 @@
-1.02.81-git (2013-09-23)
+1.02.82-git (2013-09-23)
diff --git a/WHATS_NEW b/WHATS_NEW
index 2263fac..ff0303a 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,3 +1,6 @@
+Version 2.02.103 -
+======================================
+
Version 2.02.102 - 23rd September 2013
======================================
Fix missing build dependency for scripts subdir in Makefile.
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index f209c09..e0ad76c 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,3 +1,6 @@
+Version 1.02.82 -
+=====================================
+
Version 1.02.81 - 23rd September 2013
=====================================
Tidy dmeventd fifo initialisation.
10 years, 7 months
master - release 2.02.102
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=c8057aec36a3d0...
Commit: c8057aec36a3d00789b59e06a9ed9eeee7151ded
Parent: 431eda63cc0ebff7c62dacb313cabcffbda6573a
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Mon Sep 23 15:43:37 2013 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Mon Sep 23 15:43:37 2013 +0100
release 2.02.102
18 files changed, 137 insertions(+), 203 deletions(-)
---
VERSION | 2 +-
VERSION_DM | 2 +-
WHATS_NEW | 2 +-
WHATS_NEW_DM | 4 ++++
lib/format_text/archiver.c | 4 +++-
5 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/VERSION b/VERSION
index 8c1db53..7f751a2 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.02.101(2)-git (2013-09-20)
+2.02.102(2)-git (2013-09-23)
diff --git a/VERSION_DM b/VERSION_DM
index 10b2320..461c775 100644
--- a/VERSION_DM
+++ b/VERSION_DM
@@ -1 +1 @@
-1.02.80-git (2013-09-20)
+1.02.81-git (2013-09-23)
diff --git a/WHATS_NEW b/WHATS_NEW
index a3744dc..2263fac 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,4 +1,4 @@
-Version 2.02.102
+Version 2.02.102 - 23rd September 2013
======================================
Fix missing build dependency for scripts subdir in Makefile.
Extend lv_info() for more efficient lv_is_active_locally() check.
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index 176234c..f209c09 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,3 +1,7 @@
+Version 1.02.81 - 23rd September 2013
+=====================================
+ Tidy dmeventd fifo initialisation.
+
Version 1.02.80 - 20th September 2013
=====================================
Detect invalid sector supplied to 'dmsetup message'.
diff --git a/lib/format_text/archiver.c b/lib/format_text/archiver.c
index e3e7777..f41bffc 100644
--- a/lib/format_text/archiver.c
+++ b/lib/format_text/archiver.c
@@ -354,7 +354,9 @@ int backup_restore_vg(struct cmd_context *cmd, struct volume_group *vg, int drop
if (drop_lvmetad && lvmetad_active()) {
struct volume_group *vg_lvmetad = lvmetad_vg_lookup(cmd, vg->name, NULL);
if (vg_lvmetad) {
- lvmetad_vg_remove(vg_lvmetad);
+ /* FIXME Cope with failure to update lvmetad */
+ if (!lvmetad_vg_remove(vg_lvmetad))
+ stack;
release_vg(vg_lvmetad);
}
}
10 years, 7 months
master - clvmd: Fix node up/down handing in corosync module
by Christine Caulfield
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=431eda63cc0ebf...
Commit: 431eda63cc0ebff7c62dacb313cabcffbda6573a
Parent: 9658032cba4f6a2350bb35d5133a436bad84fec2
Author: Christine Caulfield <ccaulfie(a)redhat.com>
AuthorDate: Mon Sep 23 13:23:00 2013 +0100
Committer: Christine Caulfield <ccaulfie(a)redhat.com>
CommitterDate: Mon Sep 23 13:23:00 2013 +0100
clvmd: Fix node up/down handing in corosync module
The corosync cluster interface for clvmd did not correctly
deal with node up/down events so that when a node was removed
from the cluster clvmd would prevent remote operations
from happening, as it thought the node was up but not
running clvmd.
This patch fixes that code by simplifying the case to node
being up or down - which was the original intention
and is supported by pacemaker and CPG in the higher layers.
Signed-off-by: Christine Caulfield <ccaulfie(a)redhat.com>
---
WHATS_NEW | 1 +
daemons/clvmd/clvmd-corosync.c | 31 ++++---------------------------
2 files changed, 5 insertions(+), 27 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 983e582..a3744dc 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -2,6 +2,7 @@ Version 2.02.102
======================================
Fix missing build dependency for scripts subdir in Makefile.
Extend lv_info() for more efficient lv_is_active_locally() check.
+ Fix node up/down handling in clvmd corosync module.
Version 2.02.101 - 20th September 2013
======================================
diff --git a/daemons/clvmd/clvmd-corosync.c b/daemons/clvmd/clvmd-corosync.c
index d85ec1e..9092c8a 100644
--- a/daemons/clvmd/clvmd-corosync.c
+++ b/daemons/clvmd/clvmd-corosync.c
@@ -89,7 +89,7 @@ quorum_callbacks_t quorum_callbacks = {
struct node_info
{
- enum {NODE_UNKNOWN, NODE_DOWN, NODE_UP, NODE_CLVMD} state;
+ enum {NODE_DOWN, NODE_CLVMD} state;
int nodeid;
};
@@ -255,26 +255,6 @@ static void corosync_cpg_confchg_callback(cpg_handle_t handle,
ninfo->state = NODE_DOWN;
}
- for (i=0; i<member_list_entries; i++) {
- if (member_list[i].nodeid == 0) continue;
- ninfo = dm_hash_lookup_binary(node_hash,
- (char *)&member_list[i].nodeid,
- COROSYNC_CSID_LEN);
- if (!ninfo) {
- ninfo = malloc(sizeof(struct node_info));
- if (!ninfo) {
- break;
- }
- else {
- ninfo->nodeid = member_list[i].nodeid;
- dm_hash_insert_binary(node_hash,
- (char *)&ninfo->nodeid,
- COROSYNC_CSID_LEN, ninfo);
- }
- }
- ninfo->state = NODE_CLVMD;
- }
-
num_nodes = member_list_entries;
}
@@ -440,7 +420,6 @@ static int _cluster_do_node_callback(struct local_client *master_client,
{
struct dm_hash_node *hn;
struct node_info *ninfo;
- int somedown = 0;
dm_hash_iterate(hn, node_hash)
{
@@ -452,12 +431,10 @@ static int _cluster_do_node_callback(struct local_client *master_client,
DEBUGLOG("down_callback. node %d, state = %d\n", ninfo->nodeid,
ninfo->state);
- if (ninfo->state != NODE_DOWN)
- callback(master_client, csid, ninfo->state == NODE_CLVMD);
- if (ninfo->state != NODE_CLVMD)
- somedown = -1;
+ if (ninfo->state == NODE_CLVMD)
+ callback(master_client, csid, 1);
}
- return somedown;
+ return 0;
}
/* Real locking */
10 years, 7 months
master - tests: drop extra loop
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=9658032cba4f6a...
Commit: 9658032cba4f6a2350bb35d5133a436bad84fec2
Parent: 151f4ba64e5b7384ccb6ec7e603d05ba38dc561c
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Sep 19 14:04:18 2013 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Sep 23 12:14:21 2013 +0200
tests: drop extra loop
Loop was added as a result of unworking singlenode locking, since
this should be now fixed - remove this workaround.
---
test/shell/snapshot-merge.sh | 7 -------
1 files changed, 0 insertions(+), 7 deletions(-)
diff --git a/test/shell/snapshot-merge.sh b/test/shell/snapshot-merge.sh
index 0713934..8760e53 100644
--- a/test/shell/snapshot-merge.sh
+++ b/test/shell/snapshot-merge.sh
@@ -78,13 +78,6 @@ dm_table $vg-$lv1 | grep " snapshot-merge " || dm_table $vg-$lv1 | grep " linear
# may test stopping an active merge
lvremove -f $vg/$lv1
-# wait a while if the merge and remove is still not finished
-# since it may still keep $lv1 in vg being present
-for i in 1 2 3 4 ; do
- lvs $vg/$lv1 2>/dev/null || break;
- sleep .2
-done
-
# "onactivate merge" test
# -- deactivate/remove after disallowed merge attempt, tests
# to make sure preload of origin's metadata is _not_ performed
10 years, 7 months
master - tests: drop pointeless test
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=151f4ba64e5b73...
Commit: 151f4ba64e5b7384ccb6ec7e603d05ba38dc561c
Parent: ec66ff818cd670228bd299fa51f8867fe7e50a3e
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Sep 19 14:03:39 2013 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Sep 23 12:14:21 2013 +0200
tests: drop pointeless test
Writing directly to thin-pool and reading it is not a good idea.
---
test/shell/pvmove-thin-segtypes.sh | 16 ----------------
1 files changed, 0 insertions(+), 16 deletions(-)
diff --git a/test/shell/pvmove-thin-segtypes.sh b/test/shell/pvmove-thin-segtypes.sh
index fe07288..fb29fe3 100644
--- a/test/shell/pvmove-thin-segtypes.sh
+++ b/test/shell/pvmove-thin-segtypes.sh
@@ -30,22 +30,6 @@ vgcreate -c n -s 128k $vg $(cat DEVICES)
# 3) Move only the second LV by name
-# Testing pvmove of thin-pool LV
-lvcreate -l 2 -n ${lv1}_foo $vg "$dev1"
-lvcreate -T $vg/$lv1 -l 4 "$dev1"
-check lv_tree_on $vg ${lv1}_foo "$dev1"
-check lv_tree_on $vg $lv1 "$dev1"
-aux mkdev_md5sum $vg $lv1
-pvmove "$dev1" "$dev5"
-check lv_tree_on $vg ${lv1}_foo "$dev5"
-check lv_tree_on $vg $lv1 "$dev5"
-check dev_md5sum $vg $lv1
-pvmove -n $lv1 "$dev5" "$dev4"
-check lv_tree_on $vg $lv1 "$dev4"
-check lv_tree_on $vg ${lv1}_foo "$dev5"
-check dev_md5sum $vg $lv1
-lvremove -ff $vg
-
# Testing pvmove of thin LV
lvcreate -l 2 -n ${lv1}_foo $vg "$dev1"
lvcreate -T $vg/${lv1}_pool -l 4 -V 8 -n $lv1 "$dev1"
10 years, 7 months
master - tests: fix typo VEROSE->VERBOSE in Makefile.in
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=ec66ff818cd670...
Commit: ec66ff818cd670228bd299fa51f8867fe7e50a3e
Parent: ced563e3a729f3440cf69c4ed1f290d474fbd791
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Sep 19 14:03:03 2013 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Sep 23 12:14:21 2013 +0200
tests: fix typo VEROSE->VERBOSE in Makefile.in
---
test/Makefile.in | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/Makefile.in b/test/Makefile.in
index b663e7a..1b9789f 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -70,7 +70,7 @@ help:
@echo " VERBOSE Verbose output (1), timing (2)."
check: .tests-stamp
- VERBOSE=$(VEROSE) \
+ VERBOSE=$(VERBOSE) \
cluster_LVM_TEST_LOCKING=3 \
lvmetad_LVM_TEST_LVMETAD=1 \
./lib/harness $(patsubst %,normal:%,$(RUN_BASE)) \
@@ -78,7 +78,7 @@ check: .tests-stamp
$(patsubst %,lvmetad:%,$(RUN_BASE))
check_full: .tests-stamp
- VERBOSE=$(VEROSE) \
+ VERBOSE=$(VERBOSE) \
cluster_LVM_TEST_LOCKING=3 \
scluster_LVM_TEST_LOCKING=3 \
lvmetad_LVM_TEST_LVMETAD=1 \
10 years, 7 months
master - tests: hide expected error message
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=ced563e3a729f3...
Commit: ced563e3a729f3440cf69c4ed1f290d474fbd791
Parent: ebf66ac316da27399308d8cd553988c78f7ea150
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Sep 18 10:48:51 2013 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Sep 23 12:14:20 2013 +0200
tests: hide expected error message
---
test/lib/aux.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/test/lib/aux.sh b/test/lib/aux.sh
index 7939949..d27d263 100644
--- a/test/lib/aux.sh
+++ b/test/lib/aux.sh
@@ -380,7 +380,7 @@ disable_dev() {
maj=$(($(stat --printf=0x%t "$dev")))
min=$(($(stat --printf=0x%T "$dev")))
echo "Disabling device $dev ($maj:$min)"
- dmsetup remove -f "$dev" || true
+ dmsetup remove -f "$dev" 2>/dev/null || true
notify_lvmetad --major "$maj" --minor "$min"
done
finish_udev_transaction
10 years, 7 months