From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6 Description of problem: After having created several volumes on a multipathed* device, i cannot remove them due to "Can't remove open logical volume "test-appli-fmtb"". Having "strace"d the command, i can see the following: # strace lvremove /dev/mstest/test-appli-fmtb [...] stat("/dev/mapper/control", {st_mode=S_IFCHR|0600, st_rdev=makedev(10, 63), ...}) = 0 open("/dev/mapper/control", O_RDWR) = 22 ioctl(22, DM_VERSION, 0x6ad7f0) = 0 ioctl(22, DM_DEV_STATUS, 0x6ad7f0) = 0 write(2, " ", 2 ) = 2 write(2, "Can\'t remove open logical volume"..., 50Can't remove open logical volume "test-appli-fmtb") = 50 [...] # fuser /dev/mapper/control /dev/mapper/control: 7577 # ps auxwww | grep 7577 root 7577 0.0 0.0 11992 2880 pts/1 SLl 11:51 0:00 /sbin/multipathd Version-Release number of selected component (if applicable): lvm2-2.01.14-1.0.RHEL4 - device-mapper-multipath-0.4.5-5.2.RHEL4 How reproducible: Always Steps to Reproduce: 1. Setup vg and lv on a multipathed device 2. lvremove Actual Results: Having a message telling device is opened. #lvremove mstest/test-appli-fmtb Found duplicate PV UuyQLW8HKbZyx7FcErZNPKb26a8Cn2Go: using /dev/dm-16 not /dev/dm-0 Found duplicate PV HAmnK5TdygakIw1BfnhXq1juE8eT0lth: using /dev/dm-17 not /dev/dm-10 Can't remove open logical volume "test-appli-fmtb" Expected Results: Removal OK Additional info: Note about multipathed device: The Physical device used is a LUN created on an EMC² CX700 array accessible through 2 FC Qlogic qla2340 HBAs (4 paths). # multipath -ll mstest-lun2 (36006016062101500e279f1e3ed13da11) [size=300 GB][features="1 queue_if_no_path"][hwhandler="1 emc"] \_ round-robin 0 [active] \_ 1:0:0:1 sdc 8:32 [ready ][active] \_ round-robin 0 [enabled] \_ 1:0:1:1 sde 8:64 [ready ][active] \_ round-robin 0 [enabled] \_ 2:0:0:1 sdg 8:96 [ready ][active] \_ round-robin 0 [enabled] \_ 2:0:1:1 sdi 8:128 [ready ][active] mstest-lun1 (36006016062101500da9fbdcdd20fda11) [size=200 GB][features="1 queue_if_no_path"][hwhandler="1 emc"] \_ round-robin 0 [active] \_ 1:0:0:0 sdb 8:16 [ready ][active] \_ round-robin 0 [enabled] \_ 1:0:1:0 sdd 8:48 [ready ][active] \_ round-robin 0 [enabled] \_ 2:0:0:0 sdf 8:80 [ready ][active] \_ round-robin 0 [enabled] \_ 2:0:1:0 sdh 8:112 [ready ][active]
Note this is RHEL4u2-beta
Can't remove open logical volume "test-appli-fmtb" usually means something is mounted on it. Use 'dmsetup info -c' and cat /proc/mounts to check the status.
and fuser /dev/mapper/mstest-test--appli--fmtb control is not relevant
Nothing was mounted on it, the volume was just created and mkfs done. Unfortunately, the server has been reinstalled for production use, so the problem cannot be reproduced. Feel free to close.
OK. But if it happens again, please run the diagnostics mentioned above and reopen.