Mount/Unmount USB External Hard Disk in Linux

I use a Seagate FreeAgent Go (160 GB) USB External HD for backups.

Is it safe to remove the external HD by clicking on ‘Unmount’ in the Nautilus side pane ?
After clicking ‘Unmount’, the orange light on the ext HD still glows, so I was wondering if it is safe to remove it with the ‘Unmount’ menu cmd, with the orange light still on - or will this result in data loss ?
(So far no problems with this type of unmounting with the light still on, but this HD is new & I have used it only a couple of times)

i saw this exact same question yesterday somewhere…please visit that
thread and find you answer waiting for your return…

here are good answers:

http://www.linuxforums.org/forum/peripherals-hardware/151926-mount-unmount-seagate-freeagent-external-hard-disk-linux.html

and, on usenet, comp.os.linux.hardware, thread titled Mount/Unmount
USB “External Hard Disk in Linux” started yesterday by
jaylinux53@gmail.com has three good answers…

and,
http://www.google.com/linux?q=safe+to+remove+the+external+HD+by+clicking+on+‘Unmount’


goldie
Give a hacker a fish and you feed him for a day.
Teach man and you feed him for a lifetime.

Note: Accuracy, completeness, legality, or usefulness of this posting
may be illusive.

  • zmdmw52

once the device disappears from Nautilus (or the Gnome desktop) you are safe.

Uwe

Device shows ‘unmount’ status in Nautilus, but the light is in the HD is still on. Hence the question.
Is it safe to remove the ext HD even with the light still on (since there may be data corruption) ?

On 08/24/2009 zmdmw52 wrote:
> Device shows ‘unmount’ status in Nautilus, but the light is in the HD
> is still on. Hence the question. Is it safe to remove the ext HD even
> with the light still on (since there may be data corruption) ?

Can you see the devices when you issue a “mount” on the console? If not, you can unplug it. Are you sure the “unmount” in Nautilus is a status, not a command?

Uwe

‘Unmount’ is a menu item that appears on right-clicking after inserting the USB drive. The image of the menu is at <ImageBam](ImageBam)

df result when the drive is mounted is:

Disk still mounted
user@LinuxUbuntu:~$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sdb4 21038476 7874612 12095140 40% /
tmpfs 1030384 0 1030384 0% /lib/init/rw
varrun 1030384 316 1030068 1% /var/run
varlock 1030384 0 1030384 0% /var/lock
udev 1030384 364 1030020 1% /dev
tmpfs 1030384 112 1030272 1% /dev/shm
lrm 1030384 2192 1028192 1% /lib/modules/2.6.28-15-generic/volatile
/dev/sdb1 37081256 8856900 26340736 26% /home
/dev/sda6 232372160 111454660 120917500 48% /media/Windows_N
/dev/sda5 204804620 111434816 93369804 55% /media/Windows_M
/dev/sdc8 52540548 5191264 47349284 10% /media/Windows_H
/dev/sdc7 52492352 30039096 22453256 58% /media/Windows_G
/dev/sdc6 52492352 7222748 45269604 14% /media/Windows_F
/dev/sdc5 52492352 5134052 47358300 10% /media/Windows_E
/dev/sdc1 34178252 29201512 4976740 86% /media/Windows_C
/dev/sda1 51194624 14481248 36713376 29% /media/Windows_L
/dev/sdb8 20603540 7497756 12059156 39% /media/SUSE_Rt
/dev/sdb5 51936664 266860 49031532 1% /media/SUSE_Hm
/dev/sdb6 44836580 4833584 37725384 12% /media/Storage_1
/dev/sdb7 103477880 35107144 63114272 36% /media/Storage_2
/dev/sr0 655876 655876 0 100% /media/cdrom0
/dev/sdd1 983008 963760 19248 99% /media/US_MOD_1GB
After clicking on ‘Unmount’ option in the menu, the USB disk is no more in the Nautilus side-pane and the df cmd also shows it is not there; but the indicator light is till on. In view of this, I was concerned about data loss because of removing the USB disk while the indicator light is still on.


After removing disk through Nautlius menu -
jaymist@LinuxUbuntu:~$ df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sdb4             21038476   7874604  12095148  40% /
tmpfs                  1030384         0   1030384   0% /lib/init/rw
varrun                 1030384       316   1030068   1% /var/run
varlock                1030384         0   1030384   0% /var/lock
udev                   1030384       364   1030020   1% /dev
tmpfs                  1030384       112   1030272   1% /dev/shm
lrm                    1030384      2192   1028192   1% /lib/modules/2.6.28-15-generic/volatile
/dev/sdb1             37081256   8856900  26340736  26% /home
/dev/sda6            232372160 111454660 120917500  48% /media/Windows_N
/dev/sda5            204804620 111434816  93369804  55% /media/Windows_M
/dev/sdc8             52540548   5191264  47349284  10% /media/Windows_H
/dev/sdc7             52492352  30039096  22453256  58% /media/Windows_G
/dev/sdc6             52492352   7222748  45269604  14% /media/Windows_F
/dev/sdc5             52492352   5134052  47358300  10% /media/Windows_E
/dev/sdc1             34178252  29201512   4976740  86% /media/Windows_C
/dev/sda1             51194624  14481248  36713376  29% /media/Windows_L
/dev/sdb8             20603540   7497756  12059156  39% /media/SUSE_Rt
/dev/sdb5             51936664    266860  49031532   1% /media/SUSE_Hm
/dev/sdb6             44836580   4833584  37725384  12% /media/Storage_1
/dev/sdb7            103477880  36056864  62164552  37% /media/Storage_2
/dev/sr0                655876    655876         0 100% /media/cdrom0

I would wait until the light on the HDD goes off. It shows there’s still activity, and since the HDD has no operating system itself, the activity must be caused by your running OS.

Must say I’ve managed to have quite some unimportant data loss when unplugging a USB device too soon. Disks and sticks

according to an answer this poster got (but apparently didn’t read, or
believe) in a Linux nntp group: when Windows shuts down a USB drive,
it turns off the power to that drive…which turns off that steady,
orange “power on” light…

when Linux unmounts the drive it (no surprise) unmounts the drive, only…

since mount knows how to mount and unmount, but not turn power on or
off, it does nothing with the power flowing to the enclosure…so, the
light stays on…

but, the disk IS unmounted, and there is NO activity if you can’t
see it as mounted when you follow Uwe’s very clear instructions posted
on the 24th…

if the original poster is afraid to unhook the USB with the light on,
i’d suggest he shut the machine fully down, and then unplug it
(though, according to the answer he got in usenet, he doesn’t need to
do anything other than CHECK it is unmounted from the command line,
and unplug)


goldie

The problem I face with unmounting the ext HD is as mentioned by ‘goldie’, i.e. in Linux after unmounting the HD, the indicator light still glows (unlike in Windows, which unmounts + powers-off the HD).
IVO this, I was little bit worried about possibility of bad sectors developing in the HD, since one of the main causes of developing bad sectors in a Hard Disk is voltage fluctuation; and an improper spin-down may lead to voltage fluctuation & (maybe) bad sectors.

Hence, was looking for a utility or method to unmount + spin-down the Hard Drive safely, in Linux. Presently, I am using the external HD in Windows only to transfer the saved backups to the ext hard disk.

PS:
The Googlegroups/Usenet post - http://groups.google.com/group/comp.os.linux.hardware/browse_thread/thread/28c9ab63f9c45cf5?hl=en, referred to earlier has a couple of useful suggestions (but none work for spinning down/powering-off the drive; only for unmounting it).
A lot of the posts are junk / unnecessary & irrelevant philosophical diversions.

> The Googlegroups/Usenet post - http://tinyurl.com/np9g5t, referred to
> earlier has a couple of useful suggestions (but none work for spinning
> down/powering-off the drive; only for unmounting it).

Unix (and later Linux) was very SAFELY unmounting and spinning down
hard drives before Windows ever ‘innovated’ turning off the power
source light of a USB device via software…

do this, and it IS safe:

  1. unmount

  2. CHECK that it unmounted (you’ve been told how, more than once)
    NOTE: in Linux, once unmounted there is NO seek/write head activity
    which might cause problems if power is removed

  3. therefore, “spin down” ANY way you wish

  • unplug USB connector from computer
  • turn off computer
  • remove external power source from the UBS case


goldie

  • zmdmw52,

what goldie said. If the disk is unmounted, you’re okay regarding data. “Spinning down” is overrated, you can just pull the plug, it is a mechanical problem.

Uwe