Description of problem: While cleaning up a mirror volume during lvm_config test cases, the mirror log was not removed and pvremove failed. Version-Release number of selected component (if applicable): lvm2-2.02.06-6.0.RHEL4 device-mapper-1.02.07-4.0.RHEL4 How reproducible: Unsure Actual results: [lvm_single_config] cleaning up LVs if need be on tank-01... [lvm_single_config] removing lv /dev/mirror_1_5049/mirror_1_50490 on node tank-01 [lvm_single_config] [lvm_single_config] cleaning up VGs if need be on tank-01... [lvm_single_config] deactivating vg mirror_1_5049 on node tank-01 [lvm_single_config] removing vg mirror_1_5049 on node tank-01 [lvm_single_config] [lvm_single_config] cleaning up PVs if need be on tank-01... [lvm_single_config] removing pv /dev/sda1 on node tank-01 [lvm_single_config] removing pv /dev/sdb1 on node tank-01 [lvm_single_config] Can't open /dev/sdb1 exclusively. Mounted filesystem? [lvm_single_config] Device '/dev/sdc1' has been left open. [lvm_single_config] Device '/dev/sdc1' has been left open. [lvm_single_config] Device '/dev/sdd1' has been left open. [lvm_single_config] Device '/dev/sdd1' has been left open. # dmsetup ls mirror_1_5049-mirror_1_50490_mlog (253, 2) VolGroup00-LogVol01 (253, 1) VolGroup00-LogVol00 (253, 0) Expected results: the mirror log should be removed when the lv is removed. Additional info: lvm_config random seed was 13846
I just learned that the random seed isn't going to help at all to recreate this. Here are the two vol_config files that were used in the run. [nstraz@try 07.lvm_single_config]$ cat vol_config_file.1 <volconfig name="random vol config"> <vol name="mirror_1_5049" vm="lvm" type="mirror" legs="1"/> </volconfig> [nstraz@try 07.lvm_single_config]$ cat vol_config_file.2 <volconfig name="random vol config"> <vol name="mirror_1_9274" vm="lvm" type="mirror" legs="1"/> </volconfig>
I was able to reproduce this again on another node.
I believe this has been fixed. See bug 203739, which I think is a duplicate of this bug. (There is also a useful test script there for this sort of thing.)
I haven't hit this in the latest set of trees.