SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have just started to use a Western digital USB external hard drive on my Slackware 12.1 box.
It mounts as expected when powered up and plugged in.
My main concern is a 'safe-removal' of the drive.
If I right-click on the drive in KDE the drive is definitely unmounted as confirmed by disappearance from 'etc/mtab', but the drive does not spin-down. Same result if I issue 'umount /dev/sda1' from terminal window.
I feel uneasy about pulling out and disconnecting the drive whist it still spins. I can of course spin it down by issuing 'hdparm -y /dev/sda1'
what is the best / correct way to unmount and remove these drives?.
I've got an external WD USB drive and it spins down if you remove the usb cable,
or if you just wait for a few minutes after it's been unmounted and idle.
I usually do the former and it hasn't caused any problems to date.
I've got an external WD USB drive and it spins down if you remove the usb cable,
or if you just wait for a few minutes after it's been unmounted and idle.
I usually do the former and it hasn't caused any problems to date.
Yes, I too noticed that it powered-down when removing the USB cable, but it certainly wasn't such a 'quite' power-down as when I issued the 'hdparm
-y /dev/xxx' command to put it in 'Standby'. It is causing an 'emergency' head-park?.
I just wonder if something extra is needed to get the same kind of unmounting that one gets with Windows XP 'safely remove hardware'
I have a similar issue, which is probably related. When using a USB stick on Windows and doing "safely remove the device" from the windows menu, the LED on the USB stick switches off - so I know it's definitely dismounted. However, in Linux, when I umount a USB stick the LED stays on. Now I'm sure it's safely dismounting, but I'm curious why it doesn't get switched off.
I have a similar issue, which is probably related. When using a USB stick on Windows and doing "safely remove the device" from the windows menu, the LED on the USB stick switches off - so I know it's definitely dismounted. However, in Linux, when I unmount a USB stick the LED stays on. Now I'm sure it's safely dismounting, but I'm curious why it doesn't get switched off.
Yes, I see this same thing with my USB Flash Drive.
I've got into the habit now of running 'mount' after 'safely removing' on Linux just to make sure it really is not still mounted.
I can obviously continue to issue the 'hdparm -y' command to manually spin-down my USB HDD drive, but I just wondered if there is a more elegant way of doing it in Slackware.
You might try using the eject command instead of umount. But, many drives will not 'disconnect' (I mean where the light goes out and drive becomes inactive) in an orderly fashion the way they do under windows.
You might try using the eject command instead of umount. But, many drives will not 'disconnect' (I mean where the light goes out and drive becomes inactive) in an orderly fashion the way they do under windows.
Great, the eject command worked! The LED switched off properly. I just need to change my alias to this instead. Thanks.
This should work for your flash drives as well, Toods.
"This should work for your flash drives as well" -what I meant is that not all drives will do this -some wil, but others won't(which do disconnect under windows). The USB kernel drivers are still in flux -maybe someday they'll get it right and keep it that way.
Several useful suggestions made in this thread. Many thanks.
An interesting observation I made:
I can 'right-click' on my mounted corsair USB pen drive and it is unmounted and the entry disappears from the KDE 'storage Media directory'. When I try the same with the WD external USB drive, it is certainly unmounted (disappears from mtab) but the icon remains in the KDE 'storage Media directory'. Moreover, if I click the mouse on the icon it re-mounts.
Anyone know why these two USB mass-storage devices should be treated differently in this way?,
On the subject of quietly disconnecting my WD USB drive, I found the most 'comforting' and quiet way is to first 'unmount' in KDE then run the following bash script:
Is it not true that when you "safely remove hardware" in windos you cannot get the drive back until you unplug and replug??
If I am right (and I might be wrong since i have not used such operating system for a long time), then in the case of the umount command, it does not power down because it expects that you will mount it back again (either through gui double click or mount command) without you having to take the usb out and in??
If you want to be extra safe, you could run 'sync' before unmounting or ejecting. Both umount and eject should do this, but it doesn't hurt anything to do it manually. If you have ever noticed that it takes a while for umount to finish, it is because it is running sync before unmounting. And, eject runs the umount command before doing an 'eject'. If you have run sync and allowed it to finish flushing the write buffer, you should be able to simply unplug the device without harming it -but I wouldn't do that on purpose. The device would still show to be mounted even when physically removed.
The difference in the way different drives react to the commands has to do with the nature of the device. Real hard drives may not register as removable devices, whereas FLASh devices usually will. Also, if you are using a card-reader, insert and remove eventy are not sent to the driver and the same may happen if using an extra hub between the device and the computers' USB port.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.