Description of problem: Deleting the mirror lv should cause the mirror log to also be deleted (as it usually does), however sometimes it does not. It then needs to be deleted by hand before another mirror can be created. How reproducible: seldom
If it happens again, record the exact state of the system: dmsetup info -c, lvs -va, the command you just ran which didn't work correctly, and supply the relevant metadata backup and archive files (eg. create tarball of /etc/lvm). Also check the kernel message log for errors.
Here we have the mirror in all it's glory: [root@link-12 ~]# lvscan ACTIVE '/dev/coreyvg/mirror' [28.00 MB] inherit ACTIVE '/dev/coreyvg/mirror_mlog' [4.00 MB] inherit ACTIVE '/dev/coreyvg/mirror_mimage_0' [28.00 MB] inherit ACTIVE '/dev/coreyvg/mirror_mimage_1' [28.00 MB] inherit ACTIVE '/dev/gfs/gfs' [270.00 GB] inherit Here we delete the mirror (supposedly): [root@link-12 ~]# lvremove /dev/coreyvg/mirror Do you really want to remove active logical volume "mirror"? [y/n]: y Logical volume "mirror" successfully removed [root@link-12 ~]# dmsetup info -c Name Maj Min Stat Open Targ Event UUID gfs-gfs 253 0 L--w 0 1 0 C1h3cK7NMqlKqx47YoyzrkcusKa7aqn7p91NAyW6waa2lMsGjm5JSlFkAa5auxey coreyvg-mirror_mimage_1 253 3 L--w 0 1 0 7jvLT7v2vpVgq7PlLrBcubcvB1xsMHwi537Ksx0T8zyO7swGqE0Xp2CawOAYiFW1 coreyvg-mirror_mimage_0 253 2 L--w 0 1 0 7jvLT7v2vpVgq7PlLrBcubcvB1xsMHwiIqdBG9WM4OMKJdKeb2fWtfnU0BB3AQBS coreyvg-mirror_mlog 253 1 L--w 0 1 0 7jvLT7v2vpVgq7PlLrBcubcvB1xsMHwiMJrw9SWMFNbGgvh90GRbtmxkUgOkt3Qi [root@link-12 ~]# lvs -va Finding all logical volumes LV VG #Seg Attr LSize Maj Min KMaj KMin Origin Snap% Move Copy% Log LV UUID gfs gfs 1 -wi-a- 270.00G -1 -1 253 0 p91NAy-W6wa-a2lM-sGjm-5JSl-FkAa-5auxey Looks like the mirror stuff is all gone: [root@link-12 ~]# lvscan ACTIVE '/dev/gfs/gfs' [270.00 GB] inherit A new mirror attempt fails: [root@link-12 ~]# lvcreate -m 1 -n mirror -L 500M coreyvg /dev/coreyvg/mirror_mlog: not found: device not zeroed Aborting. Failed to wipe mirror log. Remove new LV and retry. Is this the log left over from the previous mirror? [root@link-12 ~]# lvscan ACTIVE '/dev/coreyvg/mirror_mlog' [4.00 MB] inherit ACTIVE '/dev/gfs/gfs' [270.00 GB] inherit
continuation from last comment... I attempt to delete the left over vol again: [root@link-12 lvm]# lvremove /dev/coreyvg/mirror_mlog Do you really want to remove active logical volume "mirror_mlog"? [y/n]: y Logical volume "mirror_mlog" successfully removed Now the creation works: [root@link-12 lvm]# lvcreate -m 1 -n mirror -L 500M coreyvg Logical volume "mirror" created This is very reproducable (almost everytime)
Here dmsetup shows that the (GFS-mirror) mirror vols which I deleted are still there: [root@link-08 ~]# lvscan ACTIVE '/dev/VolGroup00/LogVol00' [52.81 GB] inherit ACTIVE '/dev/VolGroup00/LogVol01' [1.94 GB] inherit ACTIVE '/dev/link08/mirror' [75.00 GB] inherit ACTIVE '/dev/link08/mirror_mlog' [4.00 MB] inherit ACTIVE '/dev/link08/mirror_mimage_0' [75.00 GB] inherit ACTIVE '/dev/link08/mirror_mimage_1' [75.00 GB] inherit root@link-08 redhat]# dmsetup table link08-mirror_mimage_1: 0 157286400 linear 8:17 384 link08-mirror_mimage_0: 0 157286400 linear 8:1 384 GFS-mirror_mlog: 0 8192 linear 8:65 384 link08-mirror_mlog: 0 8192 linear 8:33 384 GFS-mirror_mimage_1: 0 20971520 linear 8:17 384 GFS-mirror_mimage_0: 0 20971520 linear 8:1 384 VolGroup00-LogVol01: 0 4063232 linear 3:6 110756224 VolGroup00-LogVol00: 0 110755840 linear 3:6 384 link08-mirror: 0 157286400 mirror disk 2 253:5 1024 2 253:6 0 253:7 0
Can you still reproduce this or can we close it?
I'll reopen if I see this again.