31

How I can safely remove a USB external drive?

Ubuntu 12.10 does not come with this option, only to "Unmount" the disk, but not "Eject".

enter image description here

I have tried both USB sticks and with my external hard drive.

Takkat
  • 140,996
  • 54
  • 308
  • 426
gabeweb
  • 533
  • 2
  • 5
  • 10
  • 2
    You only need to unmount usb flash drives, but for actually spinning down external hard disks using udisks, see http://askubuntu.com/questions/56270/. –  Oct 21 '12 at 11:37
  • 3
    Thanks dude, but I don't want to use the command-line for a simple action that was enabled in older versions Ubuntu and disappeared in the new. This is frustrating. – gabeweb Oct 21 '12 at 17:14
  • I am running gnome shell, and when I go to the notification area, I can "Eject" my USB stuff. I don't know what this answer is worth to you, but I just wanted to say, it seems possible. – Dr_Bunsen Nov 02 '12 at 14:34
  • See closely related [What is the difference between “Unmount”, “Eject”, “Safely Remove Drive” and the eject icon?](https://askubuntu.com/q/5845) – sondra.kinsey Apr 03 '19 at 18:57

10 Answers10

13

To safely remove i.e. disconnect an external USB drive you need to manually unmount all of its partitions (represented by 'drive icons'):

either in Unity Launcher

enter image description here

or in Nautilus

enter image description here

In the example above: to remove my Hitachi external USB drive I have to unmount all of the partitions on the said drive. To make things easier when formatting my drive I named (labelled) all of its partitions so that the names (labels) begin with 'HIT'.

For further reading please refer to the bug report (the lack of either "Safely remove" or "Eject" is a bug in Ubuntu 12.10):

https://bugs.launchpad.net/ubuntu/+source/udisks2/+bug/1067876

Don't forget to mark 'This bug affects me' in the upper portion of the page.

Bucic
  • 4,024
  • 5
  • 29
  • 42
6

There seems to be a bug report about the missing option.

@k-k-patel Even if "eject" and "safely remove" are virtually the same for external hard drives, none of the two are available. Only "unmount" is offered.

@hari @isoma No "unmount" and "eject/safely remove" are not the same and even for an external hard drive "eject/safely remove" is not subsumed by "unmount". For instance, consider a drive with two partitions. If the "user" unmounts one of them, the other one will remain mounted, and, as a result, if the user unplugs the drive, they face a data loss on the second partition. On the other hand, if the user "ejects/safely removes" the first partition, both will get unmounted.

Abdallah
  • 235
  • 1
  • 2
  • 7
4

Gnome Disks Utility has an option to Power off a disk.

You can first unmount the partitions as suggested in other answers or using the Gnome Disks Utility as I explained below.

  1. access gnome-disk-utility searching for 'Disks' on Gnome Applications Menu or typing gnome-disks on a terminal.
  2. Select the disk in the left list
  3. Unmount the partitions clicking on each of them and clicking on the Stop button for each of them.
  4. click on the Power Off button located on the window top bar. Gnome Disks Utility screen
1
  1. If external drive was connected when I turned on my PC - I have "Unmount".
  2. If external drive was connected after I turned on my PC - I have "Safely remove drive".

For the first case I used "Unmount" in Nautilus and "Power Off" in Disks application.

EnverOsmanov
  • 193
  • 1
  • 1
  • 8
1

My toy project can help on this problem:

https://github.com/fenrrir/bdin

This is a appindicator for ubuntu that uses udisks for detach device

1

I found a way to do this in Nautilus, in Ubuntu 12.04, using Gnome desktop (not Unity). There was no "unmount" in the right-click menu. But, there was an icon to the right of the name of the USB hard drive. I clicked it and it did the unmount, and after that 1) "Mount" was in the menu and 2) "Safely remove" worked fine.

ElHombre55
  • 95
  • 1
  • 12
0

'Eject' works same as safely remove

KK Patel
  • 18,693
  • 14
  • 57
  • 79
  • 8
    @k-k-patel No, in external hard drive don't shows that option: [link](http://minus.com/loBVtICz6EreS) Only 'open' and 'unmount'. – gabeweb Oct 21 '12 at 06:51
0

Unmount and eject are the same. If you need to check it, Open Terminal after eject/Unmount the drive and type this command : mount You wont be able to see the device if it's unmounted

Hari
  • 143
  • 1
  • 11
0

“Eject” is for drives with removable media, like a DVD drive. An external hard drive does not have any eject mechanism.

“Unmount” is the correct operation to use before you unplug the drive.

isoma
  • 11
  • 1
0

You can always unmount in a save way using the console, that said the "safe remove of a device" is under the hood nothing else but un-mounting all mounted partitions of a device.

sudo -s -- 'sync; umount <mounted-folder>'

ortang
  • 2,103
  • 14
  • 13