Date: Thu, 19 Oct 2006 20:10:31 +0200 From: Pav Lucistnik <pav@FreeBSD.org> To: freebsd-rc@FreeBSD.org Subject: fsck talk Message-ID: <1161281431.56486.13.camel@ikaros.oook.cz>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
I was poking around /etc/rc.d/fsck today, and I figured out a few
interesting things.
Think three large partitions, for example:
/dev/aacd0s1e /a
/dev/aacd1s1e /b
/dev/aacd2s1e /c
Now, disable background fsck and enable -y flag in rc.conf:
background_fsck="NO"
fsck_y_enable="YES"
Now imagine a power failure. On reboot, fsck -p manages to mark /a
and /b clean, but fails on /c.
Next, fsck -y is executed, which goes over /a again, then over /b and
then finally over /c.
Two problems here:
1) fsck -y does not skip filesystems already cleaned in preen run,
because fsck_ffs only skips clean filesystems in preen mode.
2) fsck -y runs forever, because fsck does execute the jobs in parallel
only in preen mode.
Proposed solutions to problem 1:
- change the behaviour of fsck_ffs when executed on clean filesystem,
like this:
fsck -y /a
to skip it with message 'already clean'. There is a -f flag for
people who really want to do a fsck.
- add a new flag to fsck_ffs that will skip clean filesystems in
non-preen mode
Plus
- when user sets fsck_y_enable, we can just skip the preen run entirely,
under the condition that one of the above was implemented. That's
another speedup.
Proposed solutions to problem 2:
- change fsck to parallelize jobs in non-preen mode by default
- add a flag to fsck to parallelize jobs in non-preen mode
Comments?
--
Pav Lucistnik <pav@oook.cz>
<pav@FreeBSD.org>
The hottest spot in the solar system is neither Mercury, Venus,
nor St. Louis in the summer.
-- WUSTL Press Release
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (FreeBSD)
iD8DBQBFN7+XntdYP8FOsoIRAoTFAJ0Rns+SqOB4EWvaPhwPRGNJzAHuUgCgmlYH
JV3O6vweEI790Gji+kF5gOE=
=Rd3i
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1161281431.56486.13.camel>
