[clug] Disconnecting USB drives cleanly

Michael Still mikal at stillhq.com
Mon Mar 8 00:51:58 GMT 2004


Michael James wrote:
> When a usb drive is plugged in; a kernel driver grabs it
>  and presents it to the system as scsi device  /dev/sda1
> 
> With the appropriate line in /etc/fstab
> /dev/sda1       /media/thumb    auto    rw,noauto,user,sync     0 0
>  any user can say "mount /media/thumb" and use it.
> 
> Ejecting it with "umount /media/thumb"
>  should get it synced and safe to unplug.
> 
> But back at the kernel level there is great consternation
>  about a scsi drive going missing.
> Fills /var/log/messages with alarming warnings.
> 
> Any way to tell the driver to let go gracefully?
> Especially if it would put the flashing light out
>  so you could see when it was safe to unplug it.

Eject the drive as well using the "eject" command.

Cheers,
Mikal

-- 

Michael Still (mikal at stillhq.com) | "All my life I've had one dream,
http://www.stillhq.com            |  to achieve my many goals"
UTC + 11                          |    -- Homer Simpson


More information about the linux mailing list