From owner-freebsd-rc@FreeBSD.ORG Thu Oct 19 18:11:36 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 DB0F016A4C2 for ; Thu, 19 Oct 2006 18:11:36 +0000 (UTC) (envelope-from pav@FreeBSD.org) Received: from hood.oook.cz (hood.oook.cz [195.250.137.134]) by mx1.FreeBSD.org (Postfix) with ESMTP id B37DF43D7D for ; Thu, 19 Oct 2006 18:10:34 +0000 (GMT) (envelope-from pav@FreeBSD.org) Received: from ikaros.oook.cz (localhost [127.0.0.1]) by hood.oook.cz (8.13.8/8.13.8) with ESMTP id k9JIAWnu059041 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 19 Oct 2006 20:10:32 +0200 (CEST) (envelope-from pav@FreeBSD.org) Received: (from pav@localhost) by ikaros.oook.cz (8.13.8/8.13.8/Submit) id k9JIAWg2059040 for freebsd-rc@FreeBSD.org; Thu, 19 Oct 2006 20:10:32 +0200 (CEST) (envelope-from pav@FreeBSD.org) X-Authentication-Warning: ikaros.oook.cz: pav set sender to pav@FreeBSD.org using -f From: Pav Lucistnik To: freebsd-rc@FreeBSD.org Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-ohOmE06V6bqnoixaTj42" Date: Thu, 19 Oct 2006 20:10:31 +0200 Message-Id: <1161281431.56486.13.camel@ikaros.oook.cz> Mime-Version: 1.0 X-Mailer: Evolution 2.8.1 FreeBSD GNOME Team Port Cc: Subject: fsck talk X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pav@FreeBSD.org 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: Thu, 19 Oct 2006 18:11:37 -0000 --=-ohOmE06V6bqnoixaTj42 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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=3D"NO" fsck_y_enable=3D"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? --=20 Pav Lucistnik The hottest spot in the solar system is neither Mercury, Venus, nor St. Louis in the summer. -- WUSTL Press Release --=-ohOmE06V6bqnoixaTj42 Content-Type: application/pgp-signature; name=signature.asc Content-Description: Toto je =?UTF-8?Q?digit=C3=A1ln=C4=9B?= =?ISO-8859-1?Q?_podepsan=E1?= =?UTF-8?Q?_=C4=8D=C3=A1st?= =?ISO-8859-1?Q?_zpr=E1vy?= -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQBFN7+XntdYP8FOsoIRAoTFAJ0Rns+SqOB4EWvaPhwPRGNJzAHuUgCgmlYH JV3O6vweEI790Gji+kF5gOE= =Rd3i -----END PGP SIGNATURE----- --=-ohOmE06V6bqnoixaTj42--