From owner-freebsd-bugs Sun Jun 4 16:10: 7 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 1498737BC42 for ; Sun, 4 Jun 2000 16:10:04 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id QAA01685; Sun, 4 Jun 2000 16:10:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Date: Sun, 4 Jun 2000 16:10:03 -0700 (PDT) Message-Id: <200006042310.QAA01685@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Chris Dillon Subject: Re: conf/19001: Delayed fsck + mount of insignificant filesystems. Reply-To: Chris Dillon Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR conf/19001; it has been noted by GNATS. From: Chris Dillon To: Poul-Henning Kamp Cc: FreeBSD-gnats-submit@FreeBSD.ORG Subject: Re: conf/19001: Delayed fsck + mount of insignificant filesystems. Date: Sun, 4 Jun 2000 17:59:32 -0500 (CDT) On Sun, 4 Jun 2000, Poul-Henning Kamp wrote: > >Description: > > Many of the machines I administer have large but relatively > inconsequential filesystems. > > It would be nice if they could be marked in /etc/fstab for > "later fsck + mount" so that a lengthy fsck of these > filesysetms does not hold up the rest of the boot process. I agree, this would be very helpful, especially if said system also performed other important functions that would otherwise take much longer to resume if these large filesystems had to be fsck'd first. This of course will become moot once our filesystems no longer need to be fsck'd. > If a small script were provided, along with a freeform string > tag in /etc/fstab, one could fsck/mount the squid cache partitions > right before squid is started with: > /etc/rc.mount squid > and news partitions right before inn with > /etc/rc.mount news I think this could be done with absolutely no changes to the fstab format or any of the existing utilities. You could simply add the 'noauto' option and a pass number of 0 to keep them from being fsck'd and mounted at boot time, and then add a comment to the end of the line tagging them so that a script could fsck and mount them later. /dev/da0s1g /cache.0 ufs rw,noatime,noauto 0 0 #squid /dev/da1s1g /cache.1 ufs rw,noatime,noauto 0 0 #squid /dev/da2s1g /cache.2 ufs rw,noatime,noauto 0 0 #squid And the script could look something like this: #!/bin/sh for arg in $*; do filesystems=`grep "#${arg}" /etc/fstab | awk -F ' ' '{ print $2; }' | xargs echo` for filesystem in $filesystems; do fsck -p $filesystem && mount $filesystem done I'm sure it could be done more elegantly, but I whipped that up quickly. > Further to this it should be possible to specify a "not important" > flag so that if the fsck/mount doesn't succeed we just continue > without the filesystem, rather than drop into single-user. This would be accomplished with what I have above, since 'noauto' assumes as much. You could add a way to log a fsck or mount failure in the script via logger(1) or something like that. -- Chris Dillon - cdillon@wolves.k12.mo.us - cdillon@inter-linc.net FreeBSD: The fastest and most stable server OS on the planet. For Intel x86 and Alpha architectures. ( http://www.freebsd.org ) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message