fsck not working on messed-up file system

Thomas Mueller mueller23 at insightbb.com
Thu Sep 20 08:28:33 UTC 2012

> ***** PLEASE RERUN FSCK *****

> > Script done on Wed Sep 19 04:17:27 2012

> > Would this indicate a software bug, or is my Western Digital Caviar Green
> > 3 TB hard drive failing?

>         Either something was referencing sectors off the end of the disc,
> or the drive is failing. I'd be inclined to copy the data off somewhere
> safe and subject the disc to extensive tests with smartctl from
> smartmontools, then if it passes recreate the fileystem(s) and restore the
> data.

> Steve O'Hara-Smith <ateve at sohara.org>

I went looking to see if there was something more powerful than fsck in the ports tree, category sysutils, but didn't find anything.

I wonder why NetBSD fsck was able to revive the partition when FreeBSD fsck got stuck in a loop, though I easily got out of said loop by not re-rerunning fsck.
Maybe NetBSD fsck was better than FreeBSD fsck for repairing NetBSD mischief?

It might be good to build, from ports, not only smartmontools but also subversion, on my backup 8 GB FreeBSD USB stick.

I might also want to rerun "cvs up -dP" on the NetBSD pkgsrc and system-source directories before using again, hoping to retrieve anything that might have been lost. 

> > Script started on Wed Sep 19 04:15:02 2012
> > fsck_ffs /dev/ada0p9

> just to make sure: the partition was not mounted when you started fsck?

> > Now I wonder if the file system is really fixed, with possibly some
> > files in /pkgsrc subdirectories lost, or if the hard drive is
> > starting to fail.

> You see it soon. I would not bother about a single problem like this. I
> have had it over and over again at a location with bad power supply
> with a normal PC without UPS.

> The hard disk is - one year later - still working in a different
> location without any new problems.

> Erich

I remembered not to run fsck on a mounted partition.

When I booted into NetBSD, I mounted the partition, /dev/dk6, and found it didn't look trashed, though there was a warning regarding the dirty flag.

Then I umounted before running fsck_ffs, successfully.

It was not a power problem, I have Opti-UPS.

NetBSD crashed a few times with the partition in question mounted.

Starting X and exiting X are high-crash-risk in NetBSD.

Maybe using the same partition by both FreeBSD and NetBSD induces file system errors?  Or maybe it's the NetBSD system crash.

I could be sure to not have any partition on 3 TB hard disk mounted unnecessarily when running NetBSD: umount when finished and before running X.


More information about the freebsd-questions mailing list