LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   How To Power Off USB Flash Disk? (https://www.linuxquestions.org/questions/linux-hardware-18/how-to-power-off-usb-flash-disk-195692/)

wpyh 06-20-2004 02:16 PM

How To Power Off USB Flash Disk?
 
Dear all,

I have a usb flash disk, and it has a nice LED indicating power and/or activity. The weird thing is that, whenever I use it on my friend's machine with Windows XP, after doing the "Safely remove hardware..." thingy, the LED goes out, indicating that the disk is powered off.

But when I use it on my own computer, I don't know how to power it off -- There is no "Safely remove hardware..." since I am not using Windows :P I only know that everytime I mount it I have to unmount it again before taking it off or I risk data loss. But is there a way to turn it off? Sure would be nice ;)

Electro 06-20-2004 04:49 PM

Easy. Login as su, root, or sudo. Then sync. Next umount it. Then take it out. Though you should use the sync in the option argument of mount. For example

mount -t vfat -o sync /dev/sda1 /dev/usbdisk

That way you do not have to worry about data loss. It will write directly to the USB flash disk.

fluppi 06-20-2004 04:52 PM

My USB Flach Stick allways blink too.
After unmount, the data are safe, I think the automounter, usb scanner or whatever is running checks for new devices and so blinks the led.

Maybe it stop blinking after you stop all these deamons ?

wpyh 06-20-2004 10:35 PM

No, I don't think I need the sync option since I always practice unmounting and then waiting for the prompt to come back (or the device to stop working, whichever is later) before I remove the device.

For fluppi, yes, it actually goes off when I removed the usb-ohci module ;) (after removing the usb-storage module, that is). I know it is safe to remove it, but it just feels a bit weird -- removing a powered-on device :P I know I always do that with my zip drive too, but with the disk ejected in that case.

But if I remove the usb-ohci module, then literally usb is not accessible. Is there any way to just switch the power off to just one usb device, then switching it on again after the device has been removed? (Like the Windows behaviour)


All times are GMT -5. The time now is 07:02 PM.