[SGVLUG] ejecting a usb memory stick before unmounting

Michael Proctor-Smith mproctor13 at gmail.com
Sat Feb 18 18:58:48 PST 2006


On 2/18/06, Robert <mrflash818 at geophile.net> wrote:
> Greetings,
>
> How does a person "eject" a USB memory stick in debian prior to removing it.
>
> I wrote two scripts for mounting/unmounting:
>
> mountUSB:
> sudo mount /dev/sda1 /mnt/usb
>
> umountUSB:
> sudo umount /mnt/usb
>
> And they both work. But I notice that my USB memory stick stays powered up
> even though mount shows it is unmounted.
>
> What can I add to my umountUSB script so that the USB memory stick will
> power off?

I don't think you need to power it off USB is designed to be plugged
in and out while powered on. As long as it is unmounted there should
be no problem with the file system.

If you really want to power the device down you need to look into
power management calls designed for saving power on laptops. The usb
memory stick would have to support those calls(which I suspect it will
not).


More information about the SGVLUG mailing list