From owner-freebsd-current@FreeBSD.ORG Sat May 15 21:08:33 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E887A16A4CE for ; Sat, 15 May 2004 21:08:32 -0700 (PDT) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 04EE843D2D for ; Sat, 15 May 2004 21:08:32 -0700 (PDT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (IDENT:brdavis@localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.12.10/8.12.10) with ESMTP id i4G48Ss0017954; Sat, 15 May 2004 21:08:28 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.12.10/8.12.3/Submit) id i4G48StO017951; Sat, 15 May 2004 21:08:28 -0700 Date: Sat, 15 May 2004 21:08:28 -0700 From: Brooks Davis To: "Marc G. Fournier" Message-ID: <20040516040828.GA17266@Odin.AC.HMC.Edu> References: <20040515220258.H920@ganymede.hub.org> <20040515233728.Q30269@ganymede.hub.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="bp/iNruPH9dso1Pn" Content-Disposition: inline In-Reply-To: <20040515233728.Q30269@ganymede.hub.org> User-Agent: Mutt/1.5.4i cc: freebsd-current@freebsd.org cc: Michael Hamburg Subject: Re: fsck in -current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 May 2004 04:08:33 -0000 --bp/iNruPH9dso1Pn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, May 15, 2004 at 11:41:41PM -0300, Marc G. Fournier wrote: > On Sat, 15 May 2004, Michael Hamburg wrote: >=20 > > On May 15, 2004, at 9:08 PM, Marc G. Fournier wrote: > > > > > > > > I'm seriously considering putting 5.x onto my next server, to take > > > advantage of, if nothing else, the reduction in the GIANT LOCK relian= ce > > > ... one "concern" I have is how fsck works in 5.x ... > > > > > > Right now, on 4.x, I have an fsck running that has been going for ~3h= rs > > > now: > > > > > > # date; ps aux | grep fsck > > > Sat May 15 22:04:00 ADT 2004 > > > root 40 99.0 4.5 185756 185796 p0 R+ 6:55PM 164:01.60 fsck -y > > > /dev/da0s1h > > > > > > and is in Phase 4 ... > > > > > > In 5.x, if I'm not mistaken, fsck's are backgrounded on reboot, so th= at > > > the system comes up faster ... but: > > > > > > a. wouldn't that slow down the fsck itself, since all the processes on > > > the > > > machine would be using CPU/memory? > > > > Yes. You can probably renice it or something, though, and it wouldn't > > take that much longer. > > > > Furthermore, if I recall correctly, it doesn't check as much after a > > crash when soft-updates are enabled. See below. > > > > > b. how long could fsck run in the background safely ... like, if I > > > rebooted a machine, fsck backgrounded and then all the processes > > > started up, is there a risk involved? > > > > > > > No, fsck should be able to run in the background indefinitely with > > basically no risk, so long as you have free space on your disk. The > > way that the latest fsck works is that it snapshots the drive, and then > > checks the snapshot; the only type of error that it's expecting to find > > is files which have been deleted but whose space has not been > > reclaimed. This space can be recovered without confusing running > > processes. >=20 > 'k ... fsck just started spewing messages to the screen, which is nice > cause now I know its actually doing something: >=20 > ZERO LENGTH DIR I=3D5159669 OWNER=3Droot MODE=3D40755 > SIZE=3D0 MTIME=3DMay 10 17:32 2004 > CLEAR? yes >=20 > now, the ZERO LENGTH DIR is a result of using unionfs ... but would that > cause any issues with the snapshotting? like, how much 'free space' would > you need, and what happens ifyou don't have enough? :( Very little. The snapshot just marks things so when they are modified later, a copy is made. Unless you are very short on space or you have a lot of turnover before the fsck finishes this isn't likely to be an issue. Basicly, you can't recover the space from any deletions until the fsck completes and modified files take up space as though they were new, but that's it. As long as you can accept that overhead, bgfsck should be OK. Of course, if you don't want it, you can always disable bgfsck in /etc/rc.conf with background_fsck=3D"NO". -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --bp/iNruPH9dso1Pn Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFApuk7XY6L6fI4GtQRAhL8AKDO+u2ThplOB9n9VQYvPQixiMmloQCeLqfY gIlPixdzIbVZ/7KDqX2eGMo= =AgZh -----END PGP SIGNATURE----- --bp/iNruPH9dso1Pn--