Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Feb 2004 08:33:22 -0800
From:      "Sean Noonan" <noonans@watkinscontracting.com>
To:        <freebsd-questions@freebsd.org>
Subject:   Re: Please help - URGENT - disk/fsck problems!--SOLVED!
Message-ID:  <015f01c3f706$1a515c70$6764a8c0@watkinscontracting.com>
In-Reply-To: <000001c3f4d9$5fdcc3d0$6706a8c0@FLOYD>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format...

------------=_1077208408-21153-155
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

> I'm in need of urgent help.  I have a production 4.9-RELEASE
> server.  I track STABLE, last cvsup/make world was about two
> months ago.  After powering on after an extended power outage
> (was given advanced notice by electric company and I shut the
> server down before the outage occurred), the server hung with
> disk problems and suggested I run fsck.  I ran fsck and came
> up with thousands of errors.  I re-ran fsck and came up with
> less.  I repeated this process for what seems like a hundred
> times.  No matter what I do, though, I still have errors that
> fsck seems unable to repair.  HELP!!

Well, seeing as that I didn't get a single response to my URGENT plea for
help, and noting that necessity is the mother of all invention, I managed to
solve this problem myself (48 hours after the fact with users screaming at
me for 6 of them).  I'm repling to my own post in the hopes it'll be
archived and help some poor SOB like myself should they encounter the same
problem.  I don't know if it was the *right* way to solve the problem, or
even if there were alternative ways.  This method did work, though.  It
resulted in some data loss, but I was illing to live with that since I have
good tape backups to restore from.  Here's how I fixed my problem.

After RTFM on fsck (man fsck) for the 4,341st time, I noticed under the "see
also" section a utility called fsdb, the FFS debugging/editing tool.  While
messing with inodes and such as always scared the hell out of me, I figured
I had nothing to loose at this point.  I went back to my fsck output and
noted that certain errors seemed to never go away, like this one:

INCORRECT BLOCK COUNT I=447212 (5280 should be 4064)

I assumed that the "I" above was an Inode number.

I fired up fsdb with the disk slice in question as a paramenter, like this:

fsdb /dev/da0s1g

This gave me a "fsdb >" prompt.

>From there I issued the command:

clri i-number (e.g., clri 447212).

This apparently nukes the Inode number given to it.

I did this for all the Inode numbers that continually re-appeared after
numerous fsck's.

I typed "quit" (or was it "exit"?) to leave fsdb and then re-ran fsck.

Problem sovled.  Restored from tape (love AMANDA!) and I was good-to-go!

Hopes this helps somebody...

Thanks,

--Sean Noonan


*****************************************************************************************************************************

No employee or agent is authorized to conclude any binding agreement on behalf of Watkins Contracting, L.P., with another 
party by email without express written confirmation by an Officer of the company.  In addition, any views or opinions 
presented in this email are solely those of the author and do not necessarily represent those of Watkins Contracting, L.P.  
Employees of Watkins Contracting, L.P., are expressly required not to make defamatory statements and not to infringe or 
authorize any infringement of copyright or any other legal right by email communications.  Any such communication is contrary 
to company policy and outside the scope of the employment of the individual concerned.  The company will not accept any 
liability in respect of such communication, and the employee responsible will be personally liable for any damages or other 
liability arising.

------------=_1077208408-21153-155--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?015f01c3f706$1a515c70$6764a8c0>