Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 Jun 2000 16:10:03 -0700 (PDT)
From:      Chris Dillon <cdillon@wolves.k12.mo.us>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: conf/19001: Delayed fsck + mount of insignificant filesystems.
Message-ID:  <200006042310.QAA01685@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR conf/19001; it has been noted by GNATS.

From: Chris Dillon <cdillon@wolves.k12.mo.us>
To: Poul-Henning Kamp <phk@critter.freebsd.dk>
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




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