How to safely eject usb hardrive - udisks returns "detach failed: .."
3
votes
2
answers
2660
views
I have a USB external hard drive with several partitions, and I cannot spin down the hard drive to get it to eject. Any suggestions? I unmounted all partitions through Nautilus, but the drive is still spinning. Nautilus does not seem to have other options besides
unmount
in Ubuntu 13.10.
After ensuring that no drives are mounted, I tried the udisks
to detach the drive, but I get the following error:
[lucas@lucas-ThinkPad-W520]~$ mount | grep ^'/dev'
/dev/sda5 on / type ext4 (rw,errors=remount-ro)
[lucas@lucas-ThinkPad-W520]~$ udisks --detach /dev/sdb
Detach failed: One or more partitions are busy on /dev/sdb
[lucas@lucas-ThinkPad-W520]~$
How can other partitions be busy if mount | grep ^'/dev'
does not return any of my /dev/sdb
partitions? Is there an easy way to detach my external hard drive? A simple solution would be nice...
I am using Ubuntu 13.10 and my external hard drive is a backup my internal hard drive, setup via Clonezilla.
**UPDATE**
I tried lsof
, results below:
[lucas@lucas-ThinkPad-W520]~$ lsof /dev/sdb
sdb sdb1 sdb2 sdb3 sdb4 sdb5 sdb6
[lucas@lucas-ThinkPad-W520]~$ lsof /dev/sdb
[lucas@lucas-ThinkPad-W520]~$ lsof /dev/sdb1
[lucas@lucas-ThinkPad-W520]~$ lsof /dev/sdb2
[lucas@lucas-ThinkPad-W520]~$ lsof /dev/sdb3
[lucas@lucas-ThinkPad-W520]~$ lsof /dev/sdb4
[lucas@lucas-ThinkPad-W520]~$ lsof /dev/sdb5
[lucas@lucas-ThinkPad-W520]~$ lsof /dev/sdb6
[lucas@lucas-ThinkPad-W520]~$
Asked by modulitos
(3275 rep)
Apr 30, 2014, 03:50 AM
Last activity: Mar 29, 2017, 11:25 PM
Last activity: Mar 29, 2017, 11:25 PM