+++ This bug was initially created as a clone of Bug #225487 +++ RHEL5 clone, this bugzilla covers new dmeventd functionality and bugfixes for RHEL5.1 Description of problem: While running lvm_config on the latest trees I hit a case where the underlying device mapper devices are not removed when a mirror volume is removed. Version-Release number of selected component (if applicable): lvm2-2.02.16-3.el5 kernel-2.6.18-1.2961.el5 device-mapper-1.02.13-1.el5 How reproducible: 100% Steps to Reproduce: 1. lvm_config -o host 2. 3. Actual results: Full test output attached. cleaning up LVs if need be on morph-01... deactivating and then removing lv /dev/linear_2_602/linear_2_6020 on node morph-01 cleaning up VGs if need be on morph-01... deactivating vg linear_2_602 on node morph-01 removing vg linear_2_602 on node morph-01 cleaning up PVs if need be on morph-01... removing pv /dev/sda1 on node morph-01 Can't open /dev/sda1 exclusively - not removing. Mounted filesystem? couldn't remove pv /dev/sda1 on morph-01 [root@morph-01 ~]# pvs PV VG Fmt Attr PSize PFree /dev/sda1 lvm2 -- 118.71G 118.71G /dev/sda2 lvm2 -- 118.71G 118.71G /dev/sdb1 lvm2 -- 118.71G 118.71G /dev/sdb2 lvm2 -- 118.71G 118.71G /dev/sdc1 lvm2 -- 118.71G 118.71G /dev/sdc2 lvm2 -- 118.71G 118.71G [root@morph-01 ~]# vgs [root@morph-01 ~]# lvs [root@morph-01 ~]# dmsetup ls linear_2_602-linear_2_6020_mlog (253, 2) VolGroup00-LogVol01 (253, 1) linear_2_602-linear_2_6020_mimage_1 (253, 4) VolGroup00-LogVol00 (253, 0) linear_2_602-linear_2_6020_mimage_0 (253, 3) Expected results: All device mapper devices related to the mirror should be removed. -- Additional comment from nstraz on 2007-01-09 11:28 EST -- I'm hitting another case in mirror_sanity where LVM gets confused wrt DM devices. Here it thinks the mirror log is a volume. [root@morph-01 ~]# pvs PV VG Fmt Attr PSize PFree /dev/sda1 mirror_sanity lvm2 a- 79.14G 79.14G /dev/sda2 mirror_sanity lvm2 a- 79.14G 79.14G /dev/sda3 mirror_sanity lvm2 a- 79.14G 79.14G /dev/sdb1 mirror_sanity lvm2 a- 79.14G 79.14G /dev/sdb2 mirror_sanity lvm2 a- 79.14G 79.14G /dev/sdb3 mirror_sanity lvm2 a- 79.14G 79.14G /dev/sdc1 mirror_sanity lvm2 a- 79.14G 79.13G /dev/sdc2 mirror_sanity lvm2 a- 79.14G 79.14G /dev/sdc3 mirror_sanity lvm2 a- 79.14G 79.14G [root@morph-01 ~]# vgs VG #PV #LV #SN Attr VSize VFree mirror_sanity 9 1 0 wz--n- 712.23G 712.23G [root@morph-01 ~]# lvs LV VG Attr LSize Origin Snap% Move Log Copy% mirror_log_convert_mlog mirror_sanity -wi-a- 4.00M [root@morph-01 ~]# dmsetup ls mirror_sanity-copy_percent1_mimage_0 (253, 3) mirror_sanity-mirror_log_convert_mlog (253, 5) mirror_sanity-copy_percent1_mlog (253, 2) mirror_sanity-mirror_log_convert_mimage_1 (253, 7) VolGroup00-LogVol01 (253, 1) mirror_sanity-mirror_log_convert_mimage_0 (253, 6) VolGroup00-LogVol00 (253, 0) mirror_sanity-copy_percent1_mimage_1 (253, 4) [root@morph-01 ~]# lvdisplay --- Logical volume --- LV Name /dev/mirror_sanity/mirror_log_convert_mlog VG Name mirror_sanity LV UUID yzo3iF-1WP2-pGnw-hTiS-71Kq-VEYT-E0dINX LV Write Access read/write LV Status available # open 0 LV Size 4.00 MB Current LE 1 Segments 1 Allocation inherit Read ahead sectors 0 Block device 253:5 -- Additional comment from agk on 2007-01-30 16:41 EST -- Essential fix for mirroring. -- Additional comment from cmarthal on 2007-05-09 11:53 EST -- This bug was verified as fixed in rhel4 device-mapper-1.02.17-3.0.1.el4.
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release.
*** Bug 221860 has been marked as a duplicate of this bug. ***
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2007-0514.html