Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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 :-)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.