Date: Wed, 15 Jun 2011 15:25:33 -0700 (PDT) From: Bill Tillman <btillman99@yahoo.com> To: Chuck Swiger <cswiger@mac.com>, Gary Kline <kline@thought.org> Cc: FreeBSD Mailing List <freebsd-questions@FreeBSD.ORG> Subject: Re: how do i fsck my server? Message-ID: <273612.22162.qm@web36506.mail.mud.yahoo.com> In-Reply-To: <E72360F6-9DC3-4D6A-BD3E-E23D0E7E79E1@mac.com> References: <20110615195027.GA1196@thought.org> <E72360F6-9DC3-4D6A-BD3E-E23D0E7E79E1@mac.com>
next in thread | previous in thread | raw e-mail | index | archive | help
=0A=0A=0A=0A=0A________________________________=0AFrom: Chuck Swiger <cswig= er@mac.com>=0ATo: Gary Kline <kline@thought.org>=0ACc: FreeBSD Mailing List= <freebsd-questions@FreeBSD.ORG>=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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?273612.22162.qm>