Red Hat Bugzilla – Bug 582251
lvconvert fails with inactive LVs
Last modified: 2011-02-09 17:10:40 EST
Retest all the cases of lvconvert (especially those when LVs are initially inactive), fix them to behave sensibly, and add buildbot tests.
# lvconvert -m+1 vg3/lvol0 /dev/loop0
Insufficient suitable allocatable extents for logical volume : 3 more required
Unable to allocate extents for mirror(s).
ABORTING: Failed to remove temporary mirror layer lvol0_mimagetmp_2.
Manual cleanup with vgcfgrestore and dmsetup may be required.
A second lvconvert -m+1 while one is incomplete creates an incorrect tree of devices (i.e. data corruption).
And also should check for the need for exclusive locking (like pvmove does).
See also bug 581611 - an example of data loss occurring in the field.
Created attachment 407680 [details]
Disallow a second up-convert while one is happening
Fix described in comment 4 is now checked in.
For lvconvert mirrors, there are 4 states to care about:
LV doesn't exist (0 legs)
linear LV (1 leg)
2-way mirrored LV (2 legs)
mirrored LV with more than 2 legs (many legs)
(3 legs can represent the "many" class)
Then we need to test all the combinations of transitions between those states.
0->1, 0->2, 0->many, 1->2, 1-> many, 2->many
and the inverses, many->2, many->1 etc.
for each transition, it must be tested with inactive LV as well as with active LV
and with all relevant combinations of PVs listed on the cmdline (e.g. when reducing, no PVs, primary, non-primary, sufficient listed, insufficient listed)
and test with 'in sync' and 'not in sync' where relevant
missed many->many off that list
The following was added to the test suite, it should cover all permutations of linear and -way mirrors - including all permutations of log types for those transitions.
+for i in $(seq 0 4); do
+ for j in $(seq 0 4); do
+ for k in core disk mirrored; do
+ for l in core disk mirrored; do
+ test_convert $i $k $j $l
We are still missing the ability in the testsuite to specify specific devices to be used during conversion - including partial specification for down-converts. Additionally, verification of device placement is also missing.
QA has tests now that should cover all these cases. Cloning this bug for rhel5.6 inclusion.
This bug appears to have been reported against 'rawhide' during the Fedora 14 development cycle.
Changing version to '14'.
More information and reason for this action is here: