dump/restore corrupted filesystems
cyberleo at cyberleo.net
Thu Apr 19 00:05:02 UTC 2007
Jerry McAllister wrote:
>> Smart says that the drives are fine, as does the manufacturer's disk
>> fitness tools. All the files that are readable contain correct data, but
>> the files that are corrupt are totally not readable, and cannot even be
>> removed manually:
> Given that, I would try to make a dump(8) of it. If dump dies on
> a particular file, try to exclude that file from the dump either by
> rm-ing it or setting a nodump flag and try again. You may not
> actually be able to do the rm or nodump flag though if you cannot
> mount it with write permission. You might be able to force it
> mounted without doing the fsck in single user.
> Note that tar allows you to specify exclusions. I usually don't
> suggest using tar for mass moves because it has weaknesses with
> hard links and might also not transfer flags and permissions
> correctly. But, if tar is what it takes, then use it.
Force-mounting the filesystem works just fine. It's when I try to modify
any munged file that it panics the box, with ufs_dirbad or somesuch.
I have been using rsync to recover readable data, which handles
hard-links, permissions, sparse files, and et cetera. I figure it's
best, as that's what is used to drop the differential backups onto the
box in the first place.
<CyberLeo at CyberLeo.Net>
Furry Peace! - http://www.fur.com/peace/
More information about the freebsd-questions