From owner-freebsd-questions@FreeBSD.ORG Wed Jun 15 22:25:35 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 2B91F106566B for ; Wed, 15 Jun 2011 22:25:35 +0000 (UTC) (envelope-from btillman99@yahoo.com) Received: from nm26-vm0.bullet.mail.ac4.yahoo.com (nm26-vm0.bullet.mail.ac4.yahoo.com [98.139.52.242]) by mx1.freebsd.org (Postfix) with SMTP id C26758FC16 for ; Wed, 15 Jun 2011 22:25:34 +0000 (UTC) Received: from [98.139.52.194] by nm26.bullet.mail.ac4.yahoo.com with NNFMP; 15 Jun 2011 22:25:34 -0000 Received: from [98.139.52.132] by tm7.bullet.mail.ac4.yahoo.com with NNFMP; 15 Jun 2011 22:25:34 -0000 Received: from [127.0.0.1] by omp1015.mail.ac4.yahoo.com with NNFMP; 15 Jun 2011 22:25:34 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 54387.23083.bm@omp1015.mail.ac4.yahoo.com Received: (qmail 41910 invoked by uid 60001); 15 Jun 2011 22:25:33 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1308176733; bh=Hy/CLhRnJUInuGn5JB6S8WhNebIT2NczUZduNfhehjw=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=elm9U5FZn1kZikwGY61CH98hs1f1mDZ96CgwGqAKa0Oveyn0wLdiqLezsKLLxNBf17bnvCNAVKl3geNXXTmsQyuEuVU0bxUzpDYOxCceIDrdRfCGF2A4CYl9gccihH2a2iust7DZrrbFBYfly/iRs2CvpEa+EOK9eOd+4R/W75w= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=WpCOQAnf9bkLDpRsQJhL/vYMJt8mVgujloItLP4gVtXfb2cYe8YDpHi78C1meCHPeZOzfpJ8b4RfygkMqtC/C13UYxhkK20S+pl1HO8Xy0g25Ne4zeLQcDo5t9nQv5zVJ0Sd1isgJhXsuibyzHTplFZRv4+h20pNPQxWPS1xrlg=; Message-ID: <273612.22162.qm@web36506.mail.mud.yahoo.com> X-YMail-OSG: TdU6xUQVM1kSXAwLwS4RzD9RZTxxbL8pogvPsaLcXyQFj1S klCji7wdsR64UvGrzBE3ZsNim2JgxnmNiPNy7k08vhtloh1Ktb1Mj5mGbdAh zIsmpLcoOsOmyS8rhlHh7OPHw3pbSCyxGeghpac3XYy.T9XrDw1zeCdl4o88 73cufFLL2Qz9LSu4N7s2fEry7mVCIeMFIWp69foN9mccGyiUYvfyIDGiA_9n H2WvE0nZyvBpQhf7dU0TAbiftoMPfgvafKhJPuVLipp3xFaSI1L_MB1qvNM_ DCFpv6AIdaBAc_isDn_WUL1mckh_kEBRYQNY6wp_71HuERexS13k4sasbPew emDw_.ajRIyAPGza2YKBQYeG8bGRW9tMcY1R_aFtmz4DYfF.JI_k.Ghw- Received: from [76.108.201.66] by web36506.mail.mud.yahoo.com via HTTP; Wed, 15 Jun 2011 15:25:33 PDT X-Mailer: YahooMailRC/570 YahooMailWebService/0.8.111.304355 References: <20110615195027.GA1196@thought.org> Date: Wed, 15 Jun 2011 15:25:33 -0700 (PDT) From: Bill Tillman To: Chuck Swiger , Gary Kline In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 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: Wed, 15 Jun 2011 22:25:35 -0000 =0A=0A=0A=0A=0A________________________________=0AFrom: Chuck Swiger =0ATo: Gary Kline =0ACc: FreeBSD Mailing List= =0ASent: Wed, June 15, 2011 4:04:23 PM=0ASu= bject: Re: how do i fsck my server?=0A=0AOn Jun 15, 2011, at 12:50 PM, Gary= Kline wrote:=0A> can anybody clue me in on why fsck on my server [yes, of = course as root]=0A> seem to refuse to WRITE?=0A=0ABad sectors on the hard d= rive are a somewhat common cause of this.=0A=0A>=A0 we had a power out loca= lly and i caught my UPS at=0A> the last second.=A0 i powered off my server = to save the battery, etc, and =0A> a few minutes ago when i ran =0A> =0A> #= fsck -y /var=0A> =0A> there were unresolved inconsistancies that fsck was = not allowed to resolve.=0A=0AWas /var mounted already?=A0 You shouldn't be = running fsck on a live filesystem; =0Aboot single user or from a FreeBSD CD= , and run fsck that way.=0A=0A> i tried to boot single use but the server (= Dell 530) panicked.=A0 so finally,=0A> after deliberately crashing the box = three times, fsck_ufs ran.=A0 i was able to=0A> ping outside.=A0 =0A> =0A> = is there any way of scripting fsck *every* time i reboot this box?=A0 i jus= t=0A> want to make abs certain that the filesystems are clean.=A0 ---didn't= fscking=0A> used to be easier?=0A=0AYou can set fsck_y_enable=3D"YES" in /= etc/rc.conf, but it shouldn't be necessary.=A0 =0AThe system can figure out= for itself whether it shutdown cleanly or whether a =0Afsck is necessary.= =0A=0ARegards,=0A-- =0A-Chuck=0A=0A________________________________________= _______=0Afreebsd-questions@freebsd.org mailing list=0Ahttp://lists.freebsd= .org/mailman/listinfo/freebsd-questions=0ATo unsubscribe, send any mail to = "freebsd-questions-unsubscribe@freebsd.org"=0A=0A=0AI hate to be a pain her= e but this answer completely misses something very =0Aimportant about a reb= oot after a crash with FreeBSD. =0A=0A=0A"The system can figure out for its= elf whether it shutdown cleanly or whether =0Afsck is necessary."=0A=0AWith= no disrespect meant, this is like telling someone that in case of a fire = =0Ait's not a good idea to use the elevators. The correct reply to this IMH= O should =0Ahave been "HELL YES, your server will check for a clean exit on= every reboot. It =0Awill count to 60 seconds and then if the last shutdown= was not clean it will =0Astart running fsck all by itself and this will ti= e up your system's resources =0Afor quite a while depending on the size of = your hard drive(s). And this time can =0Abe quite lengthy. I have two 750 G= B hard drives in my server and it crashed a =0Acouple of times in the recen= t past. It made running almost anything on it slow =0Aas can be while the f= sck process run automatically cleaned up the mess. And it =0Atakes the bett= er part of an hour for this process to complete.