The following reply was made to PR misc/147685; it has been noted by GNATS.
From: Garrett Cooper <yanef...@gmail.com> To: Alex Keda <ad...@lissyara.su> Cc: freebsd-gnats-sub...@freebsd.org Subject: Re: misc/147685: new feature for /etc/rc.d/fsck Date: Tue, 8 Jun 2010 03:58:31 -0700 On Tue, Jun 8, 2010 at 3:48 AM, Alex Keda <ad...@lissyara.su> wrote: > >>Number: =A0 =A0 =A0 =A0 147685 >>Category: =A0 =A0 =A0 misc >>Synopsis: =A0 =A0 =A0 new feature for /etc/rc.d/fsck >>Confidential: =A0 no >>Severity: =A0 =A0 =A0 non-critical >>Priority: =A0 =A0 =A0 low >>Responsible: =A0 =A0freebsd-bugs >>State: =A0 =A0 =A0 =A0 =A0open >>Quarter: >>Keywords: >>Date-Required: >>Class: =A0 =A0 =A0 =A0 =A0update >>Submitter-Id: =A0 current-users >>Arrival-Date: =A0 Tue Jun 08 10:50:01 UTC 2010 >>Closed-Date: >>Last-Modified: >>Originator: =A0 =A0 Alex Keda >>Release: =A0 =A0 =A0 =A09.0-CURRENT >>Organization: > USSR >>Environment: > FreeBSD lissyara.moskb.local 9.0-CURRENT FreeBSD 9.0-CURRENT #0 r208900: = Tue Jun =A08 08:46:18 MSD 2010 =A0 =A0 r...@lissyara.moskb.local:/usr/obj/u= sr/src/sys/GENERIC =A0amd64 >>Description: > We have many servers located in datacenters. These difficult physical acc= ess. After several years of work, unexpected reboot (power problems, panic,= ....) on the file system with errors. Not all file system may check and fi= x remotely - /, / usr can not unmount at work. > > This patch allows you to schedule a scan file systems at boot time, befor= e they are mounted. >>How-To-Repeat: > >>Fix: > see attached patch > > Patch attached with submission follows: > > --- /tmp/fsck.orig =A0 =A0 =A02010-06-08 14:17:59.000000000 +0400 > +++ /etc/rc.d/fsck =A0 =A0 =A02010-06-08 14:18:24.000000000 +0400 > @@ -27,7 +27,16 @@ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if checkyesno background_fsck; then > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0fsck -F -p > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0else > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 fsck -p > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if checkyesno force_fsck; t= hen > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 echo "Force= fsck enabled" > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 for filesys= tem in ${force_fsck_list} > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 do > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 echo "Force check $filesystem" > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 fsck -y $filesystem > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 done > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 else > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 fsck -p > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 fi > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0fi > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0case $? in > --- /tmp/rc.conf =A0 =A0 =A0 =A02010-06-08 14:36:52.000000000 +0400 > +++ /etc/defaults/rc.conf =A0 =A0 =A0 2010-06-08 14:38:55.000000000 +0400 > @@ -87,6 +87,9 @@ > =A0fsck_y_flags=3D"" =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0# Additional flags fo= r fsck -y > =A0background_fsck=3D"YES" =A0# Attempt to run fsck in the background whe= re possible. > =A0background_fsck_delay=3D"60" # Time to wait (seconds) before starting = the fsck. > +force_fsck=3D"NO" =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0# force check filesyste= ms on startup > +force_fsck_list=3D"" =A0 =A0 # list file systems for force check on star= tup > +#force_fsck_list=3D"/ /usr /var" > =A0netfs_types=3D"nfs:NFS nfs4:NFS4 smbfs:SMB portalfs:PORTAL nwfs:NWFS" = # Net filesystems. > =A0extra_netfs_types=3D"NO" # List of network extra filesystem types for = delayed > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0# mount at startup (or NO)= . Alex, Have you tried fsck_y_enable ? fsck_y_enable (bool) If set to ``YES'', fsck(8) will be run with the -y flag if the initial preen of the file systems fails. Thanks, -Garrett _______________________________________________ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"