Bug 168198 - lvremove / lvchange impossible with multipath due to lock of /dev/mapper/control
Summary: lvremove / lvchange impossible with multipath due to lock of /dev/mapper/control
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: lvm2
Version: 4.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Alasdair Kergon
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-09-13 13:52 UTC by Jérôme Walter
Modified: 2007-11-30 22:07 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-10-04 13:20:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jérôme Walter 2005-09-13 13:52:40 UTC
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 13:53:41 UTC
Note this is RHEL4u2-beta

Comment 2 Alasdair Kergon 2005-09-16 19:57:01 UTC
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 20:00:30 UTC
and fuser /dev/mapper/mstest-test--appli--fmtb
control is not relevant

Comment 4 Jérôme Walter 2005-10-04 07:36:45 UTC
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 13:20:50 UTC
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.