Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there any way to safely remove any external disk connected via eSATA? Disks make an ugly noise when unplugged, even if there are no mounted partitions... I found somewhere this little command:

sdparm --flexible --command=stop /dev/sdb &>/dev/null

It seems to shutdown the disk. But just when it powers off, it starts working again... Any clue?

share|improve this question
The problem is present also on USB disks as well. My "solution" is timing. Click "Eject" and the moment I hear the drive spinning down, I detach the cable. Not a nice solution, but there's no ugly noise like that. – To Do Jan 3 '13 at 10:31
I try doing that using this command.. I think "Eject" does the same.. But I can't find it anywhere (that's a Nautilus context-menu option, right?) – Padlite Jan 4 '13 at 2:29
Actually there used to be an "Eject" option. Now there's only "Unmount". Actually "Eject" was intended for media that can be ejected (CD/DVD). Unmount saves any data which is waiting to be written but does not power off the device, unfortunately. – To Do Jan 4 '13 at 9:05
up vote 3 down vote accepted

Try echo 1 > /sys/block/<disk>/device/delete. You'll need to be root to do this.

On my system, this powers off the eSATA disk and deallocates its block device. The disk stays powered off and I can disconnect it at my leisure.

Note: make sure you have unmounted any filesystems first to prevent data loss!

share|improve this answer

Your Answer


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.