On 10/20/05, Randall R Schulz
Adam,
On Thursday 20 October 2005 14:49, adamvaz@earthlink.net wrote:
Hello from Adam in NYC w SUSE 10.
As long as you dont have active file access, like a browser looking a subdirectory of the usb drive or a xterm sitting doing the same, you just do sync: sync: sync: and unmount. If there is complaining, then you just boobooed.
Let's not propagate or encourage superstitious behavior, OK?
Syncing twice in a row is redundant. Syncing before unmounting is redundant. The kernel / FS code will carefully flush all modified internal structures and pending write buffers to the device before the sync(2) system call returns. The only reason to sync before shutting down is because the root file system cannot be unmounted.
For those of us that work in UNIX environments in addition to Linux it is safest to do the double sync. i.e In general it takes 2 syncs to ensure data is flushed, but with Linux it is safe to do only one. As to what gaureentees umount makes I don't know. I suspect that too is Linux/UNIX specific. I will probably continue my superstitious behaviour of calling sync before I disconnect a hot swappable drive. Greg -- Greg Freemyer The Norcross Group Forensics for the 21st Century