Unmounting, safely removing an external hard drive

I’ve already searched this forum and the web beyond, and I’ve found conflicting answers to this question:

What’s the deal with unmounting vs. “safely removing” an external hard drive now?

I have a Seagate OneTouch 5 TB external hard drive. I formatted it as ext-3/ext-4 through GNOME. When I plug it in (via USB-A) to my laptop, it shows up mounted in GNOME Files, no problem. Next to it, there’s an eject icon which says “Unmount” when I hover over it. After pressing that, I sometimes (not all the time) also have a “Safely remove” option when I right-click on it. “Safely remove” makes the drive power off and disappear from GNOME Files. None of this is consistent with the GNOME documentation found here: Safely remove an external drive

So what’s the right answer? I’ve also seen various terminal commands recommended, as well as using GNOME Disks (to “Power off this disk,” I guess). I’m open that if necessary. The contents of this external hard drive are very important to me.

The gnome files app (nautilus) has the drive partitions shown in the left column. If one clicks on the
just to the right of the partition name there it will unmount and eject the device so that unplugging it is totally safe.

It is true that one should always unmount a device before disconnecting it. This is to ensure that all data has been properly written and saved so there are no open files when it is unplugged.

In the past tools were not as detail oriented as today, but now one may use the eject button in nautilus, use the eject command on the command line, or use gnome disks to disconnect an external device, and all are smart enough to flush any remaining write commands then properly disconnect the device from the system so it may be safely unplugged.

In general, when I remove a device in a hot-unplug way, it might damage the device or the host due to sudden disconnection in the BUS electrically . Even there is no unrecoverable damage, it might also disrupt other devices in the same BUS .

If the device is a storage device, then we need to ensure all the pending changes are written to the filesystem before it is disconnected, otherwise the system will lost data, leave the filesystem in non-consistant state, and even corrupt the filesystem .

The physical unplug action can be viewed in 3 states:

  • Operational (unmount the file system, the drive mount point is gone, but the device still there, mountable)
  • Electrical (power off the device, so device is not detectable)\
  • Physically removed

The safe remove is becoming more and more important, as the port itself is becoming multi-purpose. And USB port can be USB, PCIe, Thunderbolt. It can be complicated.

Knowing how to remove your device in safe way will allow more smooth operation, and prolong the life of your devices, and your system.

As you described, sometimes the right-click menu when clicking a removable drive in GNOME Files is somewhat inconsistent with what you’d expect. Some combination of filesystem, media type, and encrypted-or-not seems to cause issues with what exactly gets displayed in the menu, with options appearing with different names or seemingly multiple options for the same thing.

Either way, pressing the unmounting button should be good enough. It’ll write out anything that needs to get written before unmounting the drive and locking it if the drive is encrypted.

1 Like