Help recovering damaged drive - fsck segfaults, read-only mount looks ok
Matt Emmerton
matt at gsicomp.on.ca
Sun Jan 31 22:12:49 UTC 2021
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
More information about the freebsd-questions
mailing list