Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Oct 2000 16:22:53 -0700
From:      Kirk McKusick <mckusick@mckusick.com>
To:        Dag-Erling Smorgrav <des@thinksec.com>
Cc:        arch@FreeBSD.ORG
Subject:   Re: Ideas concerning fsck 
Message-ID:  <200010222322.QAA06345@beastie.mckusick.com>
In-Reply-To: Your message of "22 Oct 2000 01:42:50 %2B0200." <xzpsnpprcat.fsf@des.thinksec.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
	From: Dag-Erling Smorgrav <des@thinksec.com>
	Date: 22 Oct 2000 01:42:50 +0200

	What do people think about dispensing with the Pass# argument in fstab
	and instead using the following algorithm for 'fsck -p':

	  1) if the device does not begin with a slash, assume this is a
	     pseudo-filesystem, and skip this entry.

	  2) if the mountpoint is "none", skip this entry.

	  3) if the fs type is known, run the appropriate command (which can
	     be null, e.g. for cd9660), and skip to the next entry.

	  4) if the fs type is unknown, but fsck_${fstype} exists, run it and
	     skip to the next entry.

	  5) print a big fat "Unknown file system type" warning and skip to
	     the next entry.

	As for which order to fsck file systems in, do / first, and everything
	else in parallell afterwards (possibly with additional logic to try to
	identify file systems that are on the same device and fsck them
	sequentially to avoid thrashing)

	I'm willing to write the code if people think it's a good idea.

	DES
	-- 
	Dag-Erling Smørgrav - des@thinksec.com

The current suggested use of the pass # is to set the root filesystem
to pass 1, and everything else that you want checked with pass 2. Fsck
has a heuristic to decide which filesystems are on the same drive and
will run them serially (see fsck/preen.c); filesystems on different
spindles will be run in parallel. Running the root separately and by
itself comes from the days when it was necessary to reboot after fixing
errors on the root. As that is no longer necessary, this is no longer
strictly necessary. It remains just so that you have the best chance
of fixing your root filesystem before starting other things that may
fail due to memory limitations or I/O errors. When the root is small,
the extra delay is minimal. With folks starting to use a single monster
root filesystem, the cost may not be acceptable.

Having given this introduction to the current scheme, I do not see a
major win to getting rid of the pass numbers. There are times that I
do not want a filesystem checked - one that I normally mount read-only
or noauto (I'll check it if I want to mount it), or one on which I am
running with soft updates (I do not yet recommend this practise, but
someone has to be the test subject :-). The system install script
knows how to set up the pass numbers, so a novice does not need to
know anything about them. My general take is that things are fine as
they are. However, not to be one to stand in the face of progress, I
would consider it an acceptable to add some new sentinal (say pass -1)
to say that your proposed new heuristic should be used.

	Kirk McKusick


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




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