Fixing fs with fsck

Robert Fitzpatrick lists at webtent.net
Tue Dec 6 13:55:58 PST 2005


I just did some fsck /var and getting the problems below. I am at a
remote locatation and need to go on-site to repair these things in
single user mode. Can someone point me to information or suggest what to
look out for when doing the disk checks. It is a production machine and
I'd like to limit the possibility of it having to be re-installed due to
losing something I should not have. In the past, on a development server
here, I have just answered 'Y' to everything and got by with no
problems. However, I did that on a laptop once answer 'Y' to REMOVE
questions, etc. and ended up not being able to boot and doing a
reinstall. But I suspected the HD on the laptop had failed and the
problem was not the file system.

This is a summary of what I'm seeing while running fsck on /var
and /usr/ below. And should I do tunefs while at it? Just looking for
some helpful advise. I am also hoping the fs has something to do with my
problem of reaching kern.maxfiles and having to restart services to
relax the number of kern.openfiles.

Get a few INCORRECT BLOCK COUNT in Phase 1, lots of these in Phase 2:

UNALLOCATED  I=967619  OWNER=postfix MODE=100600
SIZE=353 MTIME=Dec  5 18:18 2005
FILE=/spool/postfix/defer/E/E60BEEC3C2

UNEXPECTED SOFT UPDATE INCONSISTENCY

REMOVE? no

And plenty of this in Phase 4:

UNREF FILE  I=22  OWNER=vscan MODE=100640
SIZE=80174 MTIME=Jun 20 11:30 2005
RECONNECT? no

fsck /usr not as bad, but still:

esmtp# fsck /usr
** /dev/da0s1d (NO WRITE)
** Last Mounted on /usr
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
LINK COUNT FILE I=2425895  OWNER=pgsql MODE=0
SIZE=0 MTIME=Dec  5 18:23 2005  COUNT 0 SHOULD BE -1
ADJUST? no

** Phase 5 - Check Cyl groups
SUMMARY INFORMATION BAD
SALVAGE? no

ALLOCATED FILE 2425895 MARKED FREE
ALLOCATED FRAG 9702124 MARKED FREE
BLK(S) MISSING IN BIT MAPS
SALVAGE? no

326108 files, 2473634 used, 7443685 free (128341 frags, 914418 blocks,
1.3% fragmentation)

--
Robert




More information about the freebsd-questions mailing list