Hi<br><br>I wish to remove some mpath devices (which are in fact SAN storage)  from my server.<br><br>Previously LVM objects was built on top of these devices, but these have been removed via lvremove + vgremove + pvremove. lvs/vgs/pvs list nothing related to the underlying mpath devices.<br>
<br>I then commented out the relevant entries in /etc/multipath.conf and tried:<br><br>$ multipath -F<br>sossan4: map in use<br>ecfs1: map in use<br>sossan5: map in use<br><br>(sossan4/5 should now be removable, ecfs1 is still in use)<br>
<br>Also<br><br># multipath -ll<br>sossan4 (3600a0b800048ead00000070c4b2a66ee) dm-2 SUN,CSM200_R<br>[size=6.4T][features=1 queue_if_no_path][hwhandler=1 rdac][rw]<br>\_ round-robin 0 [prio=3][active]<br> \_ 1:0:0:0 sdb 8:16  [active][ready]<br>
\_ round-robin 0 [prio=0][enabled]<br> \_ 2:0:0:0 sde 8:64  [active][ghost]<br>ecfs1 (3600d0230ffffffff02bd6d4c3b1a8900) dm-3 IFT,A16F-R2431<br>[size=6.4T][features=1 queue_if_no_path][hwhandler=0][rw]<br>\_ round-robin 0 [prio=1][active]<br>
 \_ 1:0:1:0 sdc 8:32  [active][ready]<br>\_ round-robin 0 [prio=1][enabled]<br> \_ 2:0:1:0 sdf 8:80  [active][ready]<br>sossan5 (3600a0b800048eac2000008c34b2a6961) dm-4 SUN,CSM200_R<br>[size=6.4T][features=1 queue_if_no_path][hwhandler=1 rdac][rw]<br>
\_ round-robin 0 [prio=3][active]<br> \_ 1:0:2:0 sdd 8:48  [active][ready]<br>\_ round-robin 0 [prio=0][enabled]<br> \_ 2:0:2:0 sdg 8:96  [active][ghost]<br># dmsetup remove sossan4<br>device-mapper: remove ioctl failed: Device or resource busy<br>
Command failed<br># dmsetup remove sossan5<br>device-mapper: remove ioctl failed: Device or resource busy<br>Command failed<br># dmsetup info sossan4<br>Name:              sossan4<br>State:             ACTIVE<br>Read Ahead:        256<br>
Tables present:    LIVE<br>Open count:        8<br>Event number:      5<br>Major, minor:      253, 2<br>Number of targets: 1<br>UUID: mpath-3600a0b800048ead00000070c4b2a66ee<br># dmsetup info sossan5<br>Name:              sossan5<br>
State:             ACTIVE<br>Read Ahead:        256<br>Tables present:    LIVE<br>Open count:        8<br>Event number:      3<br>Major, minor:      253, 4<br>Number of targets: 1<br>UUID: mpath-3600a0b800048eac2000008c34b2a6961<br>
<br>Note the "Open Count" is 8 and not 0 !? How do i find out what is keeping these resources busy?<br><br>I am pretty sure a reboot would fix this, maybe even a brute force removal of the underlying sdX devices, but as this is a production system I would rather find the "right way"?<br>
<br>Versions:<br><br># uname -a<br>Linux otsvm02 2.6.18-164.el5xen #1 SMP Tue Aug 18 15:59:52 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux<br># cat /etc/redhat-release <br>Red Hat Enterprise Linux Server release 5.4 (Tikanga)<br>
# rpm -q device-mapper<br>device-mapper-1.02.32-1.el5<br># dmsetup version<br>Library version:   1.02.32 (2009-05-21)<br>Driver version:    4.11.5<br><br>Ideas?<br><br>Thanks,<br>Kevin<br><br><br><br><br>