]> sourceware.org Git - lvm2.git/commit
pvs: fix missing PVs when VG is removed
authorDavid Teigland <teigland@redhat.com>
Fri, 23 Oct 2015 20:09:20 +0000 (15:09 -0500)
committerDavid Teigland <teigland@redhat.com>
Mon, 26 Oct 2015 21:07:12 +0000 (16:07 -0500)
commit6624833839645cbe75af073fd1dd9ab8c78e0d03
tree4ea2fef36dc6dd4cbf8870ec2277a1f2f911268b
parentb29593378f41f6dd401fb9582fba1a100f33dbbb
pvs: fix missing PVs when VG is removed

PVs could be missing from the 'pvs' output if
their VG was removed at the same time that the
'pvs' command was run.  To fix this:

1. If a VG is not found when processed, don't
silently skip the PVs in it, as is done when
the "skip" variable is set.

2. Repeat the VG search if some PVs are not
found on the first search through all VGs.
The second search uses a specific list of
PVs that were missed the first time.

testing:
/dev/sdb is a PV
/dev/sdd is a PV
/dev/sdg is not a PV

each test begins with:
vgcreate test /dev/sdb /dev/sdd

variations to test:
vgremove -f test & pvs
vgremove -f test & pvs -a
vgremove -f test & pvs /dev/sdb /dev/sdd
vgremove -f test & pvs /dev/sdg
vgremove -f test & pvs /dev/sdb /dev/sdg

The pvs command should always display /dev/sdb
and /dev/sdd, either as a part of VG test or not.

The pvs command should always print an error
indicating that /dev/sdg could not be found.
tools/toollib.c
This page took 0.0376 seconds and 5 git commands to generate.