From nobody@FreeBSD.org  Sat Mar 16 17:57:48 2002
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id 4F41B37B405
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 16 Mar 2002 17:57:48 -0800 (PST)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.6/8.11.6) id g2H1vms18924;
	Sat, 16 Mar 2002 17:57:48 -0800 (PST)
	(envelope-from nobody)
Message-Id: <200203170157.g2H1vms18924@freefall.freebsd.org>
Date: Sat, 16 Mar 2002 17:57:48 -0800 (PST)
From: Roy Hooper <rhooper@toybox.ca>
To: freebsd-gnats-submit@FreeBSD.org
Subject: /etc/rc has no way to force fsck -y at next boot, corrupt filesystems with soft updates required manual intervention
X-Send-Pr-Version: www-1.0

>Number:         35992
>Category:       misc
>Synopsis:       /etc/rc has no way to force fsck -y at next boot, corrupt filesystems with soft updates required manual intervention
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    cjc
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          wish
>Submitter-Id:   current-users
>Arrival-Date:   Sat Mar 16 18:00:04 PST 2002
>Closed-Date:    Sun Mar 31 08:39:15 PST 2002
>Last-Modified:  Sun Mar 31 08:39:15 PST 2002
>Originator:     Roy Hooper
>Release:        4.5-RELEASE
>Organization:
>Environment:
FreeBSD plumber.cyberus.ca 4.5-RELEASE FreeBSD 4.5-RELEASE #0: Mon Jan 28 14:31:56 GMT 2002     murray@builder.freebsdmall.com:/usr/src/sys/compile/GENERIC  i386

>Description:
/etc/rc performs fsck -p then only fsck -y if fsck_y_enable="YES"

with softupdates, I managed to end up with a corrupt filesytem (in /usr/lib of all places!) causing the following kinds of error messages:
Mar 13 01:17:16 plumber /kernel: dscheck(#ad/0x20006): negative b_blkno -300154849
/usr/lib/compat/aout/libalias.so.2.4: Bad file descriptor

>How-To-Repeat:
Actually corrupt your FFS filesystem with softupdates (somehow).  I think the combination of multiple hard poweroffs during compiles should do the trick.
>Fix:
The solution was to force a fsck -y at boot time by modifying /etc/rc so that I could remotely reboot the machine.
Adding the ability to touch a temporary file such as /force-fsck-y would be very useful for remote maintenance.
>Release-Note:
>Audit-Trail:

From: "Crist J. Clark" <cjc@FreeBSD.ORG>
To: Roy Hooper <rhooper@toybox.ca>
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: misc/35992: /etc/rc has no way to force fsck -y at next boot, corrupt filesystems with soft updates required manual intervention
Date: Sat, 16 Mar 2002 20:49:14 -0800

 On Sat, Mar 16, 2002 at 05:57:48PM -0800, Roy Hooper wrote:
 [snip]
 
 > >Fix:
 > The solution was to force a fsck -y at boot time by modifying /etc/rc so that I could remotely reboot the machine.
 > Adding the ability to touch a temporary file such as /force-fsck-y would be very useful for remote maintenance.
 
 I'm confused. What does,
 
   # touch /force-fsck-y
 
 Do for you that,
 
   # echo 'fsck_y_enable="YES"' >> /etc/rc.conf
 
 Doesn't?
 -- 
 Crist J. Clark                     |     cjclark@alum.mit.edu
                                    |     cjclark@jhu.edu
 http://people.freebsd.org/~cjc/    |     cjc@freebsd.org

From: "Roy Hooper" <rhooper@toybox.ca>
To: "Crist J. Clark" <cjc@FreeBSD.ORG>
Cc: <freebsd-gnats-submit@FreeBSD.ORG>
Subject: Re: misc/35992: /etc/rc has no way to force fsck -y at next boot, corrupt filesystems with soft updates required manual intervention
Date: Sun, 17 Mar 2002 01:17:29 -0500

 fsck_y_enable="YES" might not trigger fsck-y at the next reboot as it relies
 on fsck -p to make it's decision.  In my case, it wasn't triggering fsck -y
 ever at reboot beacuse it thought the filesystem was clean when it was not.
 
 Roy
 --
 Roy Hooper
 Project Manager & Senior UNIX Consultant
 Decisive Technologies Inc.
 
 
 ----- Original Message -----
 From: "Crist J. Clark" <cjc@FreeBSD.ORG>
 To: "Roy Hooper" <rhooper@toybox.ca>
 Cc: <freebsd-gnats-submit@FreeBSD.ORG>
 Sent: Saturday, March 16, 2002 11:49 PM
 Subject: Re: misc/35992: /etc/rc has no way to force fsck -y at next boot,
 corrupt filesystems with soft updates required manual intervention
 
 
 > On Sat, Mar 16, 2002 at 05:57:48PM -0800, Roy Hooper wrote:
 > [snip]
 >
 > > >Fix:
 > > The solution was to force a fsck -y at boot time by modifying /etc/rc so
 that I could remotely reboot the machine.
 > > Adding the ability to touch a temporary file such as /force-fsck-y would
 be very useful for remote maintenance.
 >
 > I'm confused. What does,
 >
 >   # touch /force-fsck-y
 >
 > Do for you that,
 >
 >   # echo 'fsck_y_enable="YES"' >> /etc/rc.conf
 >
 > Doesn't?
 > --
 > Crist J. Clark                     |     cjclark@alum.mit.edu
 >                                    |     cjclark@jhu.edu
 > http://people.freebsd.org/~cjc/    |     cjc@freebsd.org
 >
 
 

From: "Crist J. Clark" <crist.clark@attbi.com>
To: Roy Hooper <rhooper@toybox.ca>
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: misc/35992: /etc/rc has no way to force fsck -y at next boot, corrupt filesystems with soft updates required manual intervention
Date: Sat, 16 Mar 2002 22:34:31 -0800

 On Sun, Mar 17, 2002 at 01:17:29AM -0500, Roy Hooper wrote:
 > fsck_y_enable="YES" might not trigger fsck-y at the next reboot as it relies
 > on fsck -p to make it's decision.  In my case, it wasn't triggering fsck -y
 > ever at reboot beacuse it thought the filesystem was clean when it was not.
 
   # echo 'fsck -y' >> /etc/rc.early
 
 -- 
 Crist J. Clark                     |     cjclark@alum.mit.edu
                                    |     cjclark@jhu.edu
 http://people.freebsd.org/~cjc/    |     cjc@freebsd.org

From: "Roy Hooper" <rhooper@toybox.ca>
To: <cjclark@alum.mit.edu>
Cc: <freebsd-gnats-submit@FreeBSD.ORG>
Subject: Re: misc/35992: /etc/rc has no way to force fsck -y at next boot, corrupt filesystems with soft updates required manual intervention
Date: Sun, 17 Mar 2002 01:39:03 -0500

 Cool, sounds like a Handbook entry to me
 
 Roy
 
 --
 Roy Hooper
 Project Manager & Senior UNIX Consultant
 Decisive Technologies Inc.
 
 ----- Original Message -----
 From: "Crist J. Clark" <crist.clark@attbi.com>
 To: "Roy Hooper" <rhooper@toybox.ca>
 Cc: <freebsd-gnats-submit@FreeBSD.ORG>
 Sent: Sunday, March 17, 2002 1:34 AM
 Subject: Re: misc/35992: /etc/rc has no way to force fsck -y at next boot,
 corrupt filesystems with soft updates required manual intervention
 
 
 > On Sun, Mar 17, 2002 at 01:17:29AM -0500, Roy Hooper wrote:
 > > fsck_y_enable="YES" might not trigger fsck-y at the next reboot as it
 relies
 > > on fsck -p to make it's decision.  In my case, it wasn't triggering
 fsck -y
 > > ever at reboot beacuse it thought the filesystem was clean when it was
 not.
 >
 >   # echo 'fsck -y' >> /etc/rc.early
 >
 > --
 > Crist J. Clark                     |     cjclark@alum.mit.edu
 >                                    |     cjclark@jhu.edu
 > http://people.freebsd.org/~cjc/    |     cjc@freebsd.org
 >
 
 

From: "Crist J. Clark" <crist.clark@attbi.com>
To: Roy Hooper <rhooper@toybox.ca>
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: misc/35992: /etc/rc has no way to force fsck -y at next boot, corrupt filesystems with soft updates required manual intervention
Date: Sat, 16 Mar 2002 23:26:15 -0800

 On Sun, Mar 17, 2002 at 01:39:03AM -0500, Roy Hooper wrote:
 > Cool, sounds like a Handbook entry to me
 
 rc.early probably should just be documented in rc(5).
 -- 
 Crist J. Clark                     |     cjclark@alum.mit.edu
                                    |     cjclark@jhu.edu
 http://people.freebsd.org/~cjc/    |     cjc@freebsd.org
State-Changed-From-To: open->analyzed 
State-Changed-By: cjc 
State-Changed-When: Sun Mar 17 01:34:42 PST 2002 
State-Changed-Why:  
Added documentation for the rc.early(8) script to -CURRENT. 


Responsible-Changed-From-To: freebsd-bugs->cjc 
Responsible-Changed-By: cjc 
Responsible-Changed-When: Sun Mar 17 01:34:42 PST 2002 
Responsible-Changed-Why:  
I'll MFC to -STABLE in a few days. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=35992 
State-Changed-From-To: analyzed->closed 
State-Changed-By: cjc 
State-Changed-When: Sun Mar 31 08:36:37 PST 2002 
State-Changed-Why:  
The documentation mentioned in the audit trail was MFCed. As for 
possible fsck(8) problems, there was insufficient information to 
determine if there was a problem and what it might be. Sumbitter can 
submit a new PR if there are problems in the future. Thanks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=35992 
>Unformatted:
