0

I have to disconnect SAN connected thru FibreChannel to Ubuntu. How can i do this?

root@fs2:/# umount /srv/media
umount: /srv/media: device is busy.
        (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))
root@fs2:/# fuser /srv/media
root@fs2:/# fuser /dev/mapper/media

Multipath output:

root@fs2:/# multipath -v2 -l
media (360060160c8101f00d25370be50a6df11) dm-0 DGC     ,RAID 5        
[size=2.8T][features=1 queue_if_no_path][hwhandler=1 emc]
\_ round-robin 0 [prio=0][active]
 \_ 3:0:0:0 sda 8:0   [active][undef]
\_ round-robin 0 [prio=0][enabled]
 \_ 2:0:0:0 sdb 8:16  [active][undef]

Multipath config:

root@fs2:/# cat /etc/multipath.conf 
multipaths {
  multipath {
    wwid                    360060160c8101f00c0f618c25c9edf11
    alias                   web
    path_grouping_policy    multibus
    path_checker            directio
    path_selector           "round-robin 0"
    failback                manual
    rr_weight               priorities
    no_path_retry           5
    rr_min_io               100
  }

  multipath {
    wwid                    360060160c8101f00d25370be50a6df11
    alias                   media
    path_grouping_policy    multibus
    path_checker            directio
    path_selector           "round-robin 0"
    failback                manual
    rr_weight               priorities
    no_path_retry           5
    rr_min_io               100
  }
}

How can i disable this device and unmount it permanently from the system?

MadBoy
  • 3,703
  • 13
  • 61
  • 93

1 Answers1

1

I've found device being using in /etc/exports for sharing to nfs clients. After running exportfs -rv, removing device from smbd.conf (restarting samba) and removing device from /etc/fstab i was able to unmount device umount /srv/media.

I've also did:

root@fs2:/# multipath -ll
media (360060160c8101f00d25370be50a6df11) dm-0 DGC     ,RAID 5        
[size=2.8T][features=1 queue_if_no_path][hwhandler=1 emc]
\_ round-robin 0 [prio=1][active]
 \_ 3:0:0:0 sda 8:0   [active][ready]
\_ round-robin 0 [prio=0][enabled]
 \_ 2:0:0:0 sdb 8:16  [active][ready]
root@fs2:/# multipath -F
root@fs2:/# multipath -ll

Finally (where sda and sdb are taken from multipath):

root@fs2:/# echo 1 > /sys/block/sda/device/delete
root@fs2:/# echo 1 > /sys/block/sdb/device/delete

Which brings these messages in dmesg:

[9847487.812391] sd 3:0:0:0: emc: Detached
[9847491.460307] sd 2:0:0:0: emc: Detached

Which seems to finally dismount device. Hope someone finds this useful :-)

MadBoy
  • 3,703
  • 13
  • 61
  • 93