From owner-freebsd-rc@FreeBSD.ORG Wed Oct 25 04:08:08 2006 Return-Path: X-Original-To: freebsd-rc@FreeBSD.ORG Delivered-To: freebsd-rc@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 14F4416A40F; Wed, 25 Oct 2006 04:08:08 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [210.51.165.229]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6E32B43D5A; Wed, 25 Oct 2006 04:08:07 +0000 (GMT) (envelope-from delphij@delphij.net) Received: from localhost (tarsier.geekcn.org [210.51.165.229]) by tarsier.geekcn.org (Postfix) with ESMTP id 3CF05EB0CA4; Wed, 25 Oct 2006 12:08:02 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([210.51.165.229]) by localhost (mail.geekcn.org [210.51.165.229]) (amavisd-new, port 10024) with ESMTP id mODtZpbRtfN5; Wed, 25 Oct 2006 12:07:58 +0800 (CST) Received: from [10.217.12.47] (sina152-194.staff.sina.com.cn [61.135.152.194]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTP id A94CFEB0A25; Wed, 25 Oct 2006 12:07:55 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:organization:user-agent:mime-version:to:cc: subject:references:in-reply-to:x-enigmail-version:content-type; b=bCD2la1pYofCo55SSXuAUMEvJVeQB94VlEOPSXEAOSVDySjAE3OY1SZh+OYnpH3Dq APGYk1eyyPY9Qf2Erw1JQ== Message-ID: <453EE2F8.7030702@delphij.net> Date: Wed, 25 Oct 2006 12:07:20 +0800 From: LI Xin Organization: The FreeBSD Project User-Agent: Thunderbird 1.5.0.7 (Macintosh/20060909) MIME-Version: 1.0 To: pav@FreeBSD.ORG References: <1161281431.56486.13.camel@ikaros.oook.cz> In-Reply-To: <1161281431.56486.13.camel@ikaros.oook.cz> X-Enigmail-Version: 0.94.1.0 Content-Type: multipart/signed; micalg=pgp-ripemd160; protocol="application/pgp-signature"; boundary="------------enig6105699395174A35F93B38CE" Cc: freebsd-rc@FreeBSD.ORG Subject: Re: fsck talk X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Oct 2006 04:08:08 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig6105699395174A35F93B38CE Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Pav Lucistnik wrote: > I was poking around /etc/rc.d/fsck today, and I figured out a few > interesting things. >=20 > Think three large partitions, for example: > /dev/aacd0s1e /a > /dev/aacd1s1e /b > /dev/aacd2s1e /c >=20 > Now, disable background fsck and enable -y flag in rc.conf: > background_fsck=3D"NO" > fsck_y_enable=3D"YES" >=20 > Now imagine a power failure. On reboot, fsck -p manages to mark /a > and /b clean, but fails on /c. >=20 > Next, fsck -y is executed, which goes over /a again, then over /b and > then finally over /c. >=20 > Two problems here: >=20 > 1) fsck -y does not skip filesystems already cleaned in preen run, > because fsck_ffs only skips clean filesystems in preen mode. >=20 > 2) fsck -y runs forever, because fsck does execute the jobs in parallel= > only in preen mode. >=20 > Proposed solutions to problem 1: >=20 > - change the behaviour of fsck_ffs when executed on clean filesystem, > like this: >=20 > fsck -y /a >=20 > 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 I think it is reasonable not to check clean file system, since -f means "force", by not specifying the option, it's supposed that clean file systems are not being checked, so I vote for the first proposed solution.= > Plus >=20 > - 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. >=20 > Proposed solutions to problem 2: >=20 > - change fsck to parallelize jobs in non-preen mode by default > - add a flag to fsck to parallelize jobs in non-preen mode For very large volumes it can be very nasty to do parallelized check, because one volume can cost a lot of memory, which can in turn cause fsck to fail. Of course, I think a flag to parallelize the check would be a nice feature and users can optionally enable it through a rc.conf kn= ob. Cheers, --=20 Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! --------------enig6105699395174A35F93B38CE Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFPuL4OfuToMruuMARA6z8AJ4yFnmFXUhxTw3qgJjycr2xohHb8ACgjYRR DQ2cTdnxJBiqC1Gi1NqeSc0= =J4VS -----END PGP SIGNATURE----- --------------enig6105699395174A35F93B38CE--