Bug 168198 - lvremove / lvchange impossible with multipath due to lock of /dev/mapper/control
lvremove / lvchange impossible with multipath due to lock of /dev/mapper/control
Status: CLOSED WORKSFORME
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: lvm2 (Show other bugs)
4.0
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Alasdair Kergon
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-09-13 09:52 EDT by Jérôme Walter
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-10-04 09:20:50 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Jérôme Walter 2005-09-13 09:52:40 EDT
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]
Comment 1 Jérôme Walter 2005-09-13 09:53:41 EDT
Note this is RHEL4u2-beta
Comment 2 Alasdair Kergon 2005-09-16 15:57:01 EDT
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.
Comment 3 Alasdair Kergon 2005-09-16 16:00:30 EDT
and fuser /dev/mapper/mstest-test--appli--fmtb
control is not relevant
Comment 4 Jérôme Walter 2005-10-04 03:36:45 EDT
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.
Comment 5 Alasdair Kergon 2005-10-04 09:20:50 EDT
OK.  But if it happens again, please run the diagnostics mentioned above and reopen.

Note You need to log in before you can comment on or make changes to this bug.