Problems unmounting/fssyncking extern UFS filesystem

Peter Jeremy peterjeremy at
Mon Nov 27 11:58:28 PST 2006

I realise the original posting was related to amd(8) and NFS is not a
normal filesystem but in the interest of trying to stamp out this myth...

On Mon, 2006-Nov-27 08:41:19 -0800, Kevin Oberman wrote:
>The traditional mantra was
>That mantra is about 25 years old, so its validity on modern hardware is
>questionable, but the need for a delay is very real.

For any modern Un*x, it is totally unnecessary.  All current Un*x
filesystems will automatically flush all buffers as part of the
unmount process - specifically, any FS with a 'CLEAN' flag can
be guaranteed to do so.

> I would suggest something like: sync && sleep 5

In the specific case of softupdates, this is not adequate to flush all
outstanding writes.  The sync will flush one level of dependencies but
can still leave outstanding writes.  'sleep 5' may or may not be
adequate, depending on the amount of dirty cached data.

As an experiment, I suggest creating or deleting a FS tree on an
otherwise idle system and looking at the 'dirtybuf' value reported by
'systat -v 1'.  See how many sync's and how long it takes to get it to
blank (0).

Peter Jeremy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url :

More information about the freebsd-stable mailing list