Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 31 Jan 2021 17:12:40 -0500
From:      "Matt Emmerton" <matt@gsicomp.on.ca>
To:        <freebsd-questions@FreeBSD.org>
Subject:   Help recovering damaged drive - fsck segfaults, read-only mount looks ok
Message-ID:  <012a01d6f81e$3103d390$930b7ab0$@gsicomp.on.ca>

next in thread | raw e-mail | index | archive | help
Hi,

I have a FreeBSD-11 machine that I recently upgraded to FreeBSD-12.  It has
a Sii RAID-1 pair of 1TB drives. 
A week ago this system got unexpectedly powered off and when it came back
up, mount refuses to mount my RAID-1 FS because it is durty.
fsck runs, but segfaults.  It's clear that the corruption is confusing fsck
and causing the trap.

If I force a mount in readonly mode, I can inspect the drive and at first
glance, everything seems valid.  Since this machine is used for backups, I
have lots of other medata (eg, checksums) and I'm slowly working through to
see if anything important is damaged.

>From some of the stuff that fsck is finding, it's clear that the corruption
is in a rather large-and-deep directory tree that was recently deleted.
It's possible that the 'rm -rf' for this was running in the background when
the system lost power.

Is there any way to have fsck be more "selective" in what it checks/repairs?
It's been a long time since I've done low-level filesystem surgery, but it
seems to me that if I can prevent it from going off into the weeds (and
trying to repair inode entries that are no longer relevant), all will be
well.

Any advice?  I have thought about doing some inspection with "ls -i" and
then being very selective in the inodes I get fsck to repair, but that seems
challenging to get right.

Regards,
--
Matt Emmerton






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?012a01d6f81e$3103d390$930b7ab0$>