master - lvm1: Fail vg_write graciously when devices are missing.
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=b3bdd410927a3d9b1b17de94a05b1621a79bdb31 Commit: b3bdd410927a3d9b1b17de94a05b1621a79bdb31 Parent: 60443d6a5d17c9f3ba935263a5e14a8548aab509 Author: Petr Rockai <[email protected]> AuthorDate: Sun Jun 8 21:52:54 2014 +0200 Committer: Petr Rockai <[email protected]> CommitterDate: Sun Jun 8 21:57:18 2014 +0200
lvm1: Fail vg_write graciously when devices are missing.
--- lib/format1/disk-rep.c | 3 +++ test/shell/lvmetad-lvm1.sh | 9 +++++++++ 2 files changed, 12 insertions(+), 0 deletions(-)
lib/format1/disk-rep.c +3 -0
@@ -727,6 +727,9 @@ static int _write_all_pvd(const struct format_type *fmt, struct disk_list *data, {int r; +if (!data->dev) + return_0; +if (!dev_open (data->dev)) return_0;
test/shell/lvmetad-lvm1.sh +9 -0
@@ -20,3 +20,12 @@ vgcreate --metadatatype 1 $vg1 "$dev1" should vgscan --cache vgs | should grep $vg1 pvs | should grep "$dev1" + +# check for RHBZ 1080189 -- SEGV in lvremove/vgremove +pvcreate -ff -y --metadatatype 1 "$dev1" "$dev2" +vgcreate --metadatatype 1 $vg1 "$dev1" "$dev2" +lvcreate -l1 $vg1 +pvremove -ff -y $dev2 +vgchange -an $vg1 +not lvremove $vg1 +not vgremove $vg1