INCORRECT BLOCK COUNT and UNALLOCATED errors

Lou Hevly soc at visca.com
Thu Nov 2 14:01:13 PST 2006


At 14:38 02/11/06 -0500, Woodchuck wrote:
>On Thu, 2 Nov 2006, Lou Hevly wrote:
>
> > Greetings:
> >
> > I'm getting INCORRECT BLOCK COUNT and UNALLOCATED  errors when 
> fscking
> > two of my partitions (/var and /home; output and dmesg attached 
> below).
> >
> > Can I run fsck interactively by doing the following?
> >
> > umount /var
> > fsck -p /dev/wd0e
> > (of perhaps fsck -p /dev/wd0e)
> > mount /dev/wd0e /var
>
>Why the -p (preen) option?

Sorry, I meant fsck -y /dev/wd0e.  Here's what I've done:

$ apachectl stop
$ qmailctl stop
$ umount -f /var

$ fsck /dev/wd0e
** /dev/rwd0e
** File system is clean; not checking

So then I did:

$ fsck -f /dev/wd0e
** /dev/rwd0e
** File system is already clean
** Last Mounted on /var
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
185576 files, 6907224 used, 3412283 free (39083 frags, 421650 blocks, 
0.4% fragmentation)

When I remounted /var got the same result:
$ mount /dev/wd0e /var
$ fsck /dev/wd0e
** /dev/rwd0e (NO WRITE)
** Last Mounted on /var
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
185576 files, 6907224 used, 3412283 free (39083 frags, 421650 blocks, 
0.4% fragmentation)

But then I restarted Apache and I got errors again.



>The system need not be single-user to run fsck.

True.  But I want to be able to correct errors, destroying data (or at 
least putting it in lost+found) if necessary.
$ fsck /dev/wd0e
** /dev/rwd0e (NO WRITE)
** Last Mounted on /var
** Phase 1 - Check Blocks and Sizes
INCORRECT BLOCK COUNT I=412673 (4 should be 0)
CORRECT? no

INCORRECT BLOCK COUNT I=412832 (4 should be 0)
CORRECT? no

INCORRECT BLOCK COUNT I=432822 (4 should be 0)
CORRECT? no

INCORRECT BLOCK COUNT I=432972 (4 should be 0)
CORRECT? no
etc.

>However,  you will need to isolate the system and perhaps kill various
>processes. (Those with files open on /var or whatever filesystem you
>are fsck'ing).   Do not be umounting /var or /home on a system with
>random users and processes.  You want a quiet system.

My system is pretty calm.

>Man 8 init, see the bit about kill -s TSTP 1, I've never tried that.
>
> > This is a remote machine and I'd have to pay someone to boot it 
> into
> > single user mode.
> >
> >
> > $ fsck /dev/wd0e
> > ** /dev/rwd0e (NO WRITE)
> > ** Last Mounted on /var
> > ** Phase 1 - Check Blocks and Sizes
> > INCORRECT BLOCK COUNT I=186033 (8 should be 0)
> > CORRECT? no
>
>Here's a question... why not say "yes"?  (or is this "preen" output?
>I've never used -p).

/dev/rwd0e (NO WRITE)

I'm pretty sure you have to umount the partition to be able to answer 
"yes".

>Also, just rebooting will (usually) clear these errors.
>
>Or are you somehow bypassing the fsck at boot?

No, I even added the -f flag to fsck in /etc/rc, but the docs say that 
fsck won't make any corrections that might destroy data without user 
input.

Thanks very much for your input.



More information about the Openbsd-newbies mailing list