safely remove USB hard drive

Patrick O'Callaghan pocallaghan at gmail.com
Wed Apr 23 17:16:02 UTC 2008


On Wed, 2008-04-23 at 16:51 +0000, g wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Tom Diehl wrote:
> >> see 'man sync'.
> > 
> > How is that better then simply umounting the thing?
> 
> from man sync;
> 
> 'sync - flush file system buffers'
> 
> in his post;
> 
> } I've been using eject /media/* but that only happens to work because nothing
> } else is mounted there.
> 
> therefore, he is either at command line or is in a terminal.
> 
> by 'simply umounting the thing', he is not flushing buffers.

What? This goes contrary to everything I've seen in Unix and Linux for
over 30 years. Umount definitely flushes buffers in the same way sync
does, at the filesystem level.

The point about "safely remove" is to shut down drivers and engage in
whatever device protocol is needed so the device itself realizes it's
being removed.

poc




More information about the users mailing list