Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Nov 2006 05:37:58 +1100
From:      Peter Jeremy <peterjeremy@optushome.com.au>
To:        Kevin Oberman <oberman@es.net>
Cc:        ohartman@mail.zedat.fu-berlin.de, freebsd-stable@freebsd.org
Subject:   Re: Problems unmounting/fssyncking extern UFS filesystem
Message-ID:  <20061127183758.GC865@turion.vk2pj.dyndns.org>
In-Reply-To: <20061127164119.E63DB45054@ptavv.es.net>
References:  <200611271353.kARDr6tN034491@lurza.secnetix.de> <20061127164119.E63DB45054@ptavv.es.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--EuxKj2iCbKjpUGkD
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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
>sync
>sync
>sync
=2E..
>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).

--=20
Peter Jeremy

--EuxKj2iCbKjpUGkD
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (FreeBSD)

iD8DBQFFazCG/opHv/APuIcRAnxpAJ9lVYONYg3gHXO9cF7d3XrjD/M2LgCeJNtM
5csH82Vai+876pP+VFnyq+M=
=SGwy
-----END PGP SIGNATURE-----

--EuxKj2iCbKjpUGkD--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061127183758.GC865>