mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
lvm1: Fail vg_write graciously when devices are missing.
This commit is contained in:
parent
60443d6a5d
commit
b3bdd41092
@ -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;
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user