From owner-freebsd-questions@FreeBSD.ORG Sun Jun 19 23:40:38 2011 Return-Path: Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA068106566C for ; Sun, 19 Jun 2011 23:40:38 +0000 (UTC) (envelope-from kline@thought.org) Received: from thought.org (plato.thought.org [209.180.213.209]) by mx1.freebsd.org (Postfix) with ESMTP id 87C668FC1C for ; Sun, 19 Jun 2011 23:40:35 +0000 (UTC) Received: by thought.org (Postfix, from userid 1001) id 63DEDE819AA; Fri, 17 Jun 2011 22:31:00 -0700 (PDT) Date: Fri, 17 Jun 2011 22:31:00 -0700 From: Gary Kline To: Chuck Swiger Message-ID: <20110618053100.GA16059@thought.org> References: <20110615195027.GA1196@thought.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Thought Unlimited. Public service Unix since 1986. Of_Interest: With 24++ years of service to the Unix community. User-Agent: Mutt/1.5.21 (2010-09-15) Cc: FreeBSD Mailing List Subject: Re: how do i fsck my server? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Jun 2011 23:40:38 -0000 On Wed, Jun 15, 2011 at 01:04:23PM -0700, Chuck Swiger wrote: > Date: Wed, 15 Jun 2011 13:04:23 -0700 > From: Chuck Swiger > Subject: Re: how do i fsck my server? > To: Gary Kline > Cc: FreeBSD Mailing List > X-Mailer: Apple Mail (2.1084) > > On Jun 15, 2011, at 12:50 PM, Gary Kline wrote: > > can anybody clue me in on why fsck on my server [yes, of course as root] > > seem to refuse to WRITE? > > Bad sectors on the hard drive are a somewhat common cause of this. > > > we had a power out locally and i caught my UPS at > > the last second. i powered off my server to save the battery, etc, and > > a few minutes ago when i ran > > > > # fsck -y /var > > > > there were unresolved inconsistancies that fsck was not allowed to resolve. > > Was /var mounted already? You shouldn't be running fsck on a live filesystem; boot single user or from a FreeBSD CD, and run fsck that way. right. i booted into single-user and fsck still gave me the NO WRITE response; then i did a # shutdown now to get a # prompt in single-user and got the same NO WRITE. Only it did fix the errors. dunno... strange. > > > i tried to boot single use but the server (Dell 530) panicked. so finally, > > after deliberately crashing the box three times, fsck_ufs ran. i was able to > > ping outside. > > > > is there any way of scripting fsck *every* time i reboot this box? i just > > want to make abs certain that the filesystems are clean. ---didn't fscking > > used to be easier? > > You can set fsck_y_enable="YES" in /etc/rc.conf, but it shouldn't be necessary. The system can figure out for itself whether it shutdown cleanly or whether a fsck is necessary. > i 'll try that, thanks. gary > Regards, > -- > -Chuck > -- Gary Kline kline@thought.org http://www.thought.org Public Service Unix Journey Toward the Dawn, E-Book: http://www.thought.org The 8.51a release of Jottings: http://jottings.thought.org