safely remove USB hard drive
Tom Diehl
tdiehl at rogueind.com
Wed Apr 23 20:40:44 UTC 2008
On Wed, 23 Apr 2008, Bill Crawford wrote:
> On 23/04/2008, Tom Diehl <tdiehl at rogueind.com> wrote:
>
>> How is that better then simply umounting the thing?
>
> Makes sure all data has been written to the device.
Part of the process of unmounting any filesystem is to flush the
buffers and once that happens umount it. If you do a sync or as is
traditional, "sync;sync;sync" something could still keep the file system
busy. If you choose to umount it and something is still using it the
umount command will give the user an error. Now you know you need to
do something else to be safe.
> However, what you want is "eject" or, in konqueror, right click and
> "safely remove". I believe that calls "eject" behind the scenes. Using
> that will actually do the right thing, e.g. my 'phone says "USB
> connection .. ended .. may now safely unplug.." etc.
Agreed, but that assumes you have something to right click on. :-)
On my system if I type eject on a command line I get the cd/dvd drive to
eject. I suspect this is adjustable but I have never bothered.
On looking at the man page for eject I see "eject sda4". So I guess that would
actually be the best command to make a removable device safe to remove.
Regards,
--
Tom Diehl tdiehl at rogueind.com Spamtrap address mtd123 at rogueind.com
More information about the users
mailing list