Re: dump/restore corrupted filesystems



On Wed, Apr 18, 2007 at 04:09:22PM -0500, CyberLeo Kitsana wrote:

Roland Smith wrote:
Sorry if I wasn't clear. Most all of the data is readable and complete
if I mount the filesystem read-only. It just panics the box when mounted
read/write, and fsck can't fix the damage.

That might be worth filing a PR for, especially the panics.

Exactly what is damaged? Garbage in files? Wrong inode counts? I've had
unclean filesystems because of panics, but nothing fsck_ffs couldn't
fix.

You might want to check the hardware too. Use smartmontools in case of
(S)ATA drives.

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.

Good luck,

////jerry


--8<--
rsync: readlink
"/raid/Backup/Pizzabox/2007-02-23/cyberleo/secondlife/linux/SecondLife_i686_1_13_2_15/skins/xui/es"
failed: Bad file descriptor (9)
rsync: readlink
"/raid/Backup/Pizzabox/2007-02-23/cyberleo/secondlife/linux/SecondLife_i686_1_13_2_15/skins/xui/fr"
failed: Bad file descriptor (9)
--8<--

fsck_ufs dies after about 30 minutes of grinding with the following:

--8<--
** Phase 2 - Check Pathnames
DIRECTORY CORRUPTED I=93409222 OWNER=1002 MODE=40755
SIZE=512 MTIME=Feb 10 00:49 2007
DIR=?

UNEXPECTED SOFT UPDATE INCONSISTENCY

SALVAGE? no

MISSING '.' I=93409222 OWNER=1002 MODE=40755
SIZE=512 MTIME=Feb 10 00:49 2007
DIR=?

UNEXPECTED SOFT UPDATE INCONSISTENCY
CANNOT FIX, FIRST ENTRY IN DIRECTORY CONTAINS

UNEXPECTED SOFT UPDATE INCONSISTENCY
fsck_ufs: inoinfo: inumber -1170056596 out of range
--8<--

(full output is at
http://home.cyberleo.net/cyberleo/workspace/Zip/Bugs/fbsd-20070320-corr/saba-fsck-raid.txt
)

It's possible this might be a result of the odd interaction between
geom_raid5 and UFS, as discovered in January (
http://www.nabble.com/geom_raid5-livelock--p8304142.html ), but I can't
be sure.


I've already chalked this up to just an unfortunate occurrence, as the
circumstances that caused the corruption in the first place are likely
either long gone or so obscure as to be nearly impossible for me to root
out.

Looking at /usr/src/sbin/dump/traverse.c, dump traverses the used
inodes list and all directories. So if any of these is corrupt, your
dump will be too. And if the contents of the inodes is corrupted, so
will the dump.

Thanks for this insight. I'll avoid dump/restore and just use manual
copying for now.

--
Fuzzy love,
-CyberLeo
Technical Administrator
CyberLeo.Net Webhosting
http://www.CyberLeo.Net
<CyberLeo@xxxxxxxxxxxx>

Furry Peace! - http://www.fur.com/peace/
_______________________________________________
freebsd-questions@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"
_______________________________________________
freebsd-questions@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: dump/restore corrupted filesystems
    ... and fsck can't fix the damage. ... That might be worth filing a PR for, especially the panics. ... So if any of these is corrupt, ...
    (freebsd-questions)
  • Re: Does Word SP-3 address the old problem of a build-up of list templates?
    ... Once a document is corrupt, merely opening it in a fixed system isn't likely ... it doesn't fix existing buildup. ... >>>> documents which had a build-up of list templates. ... >>>> necessary edit to the Windows registry which corrected the problem. ...
    (microsoft.public.word.numbering)
  • Re: Cannot open zips they are either invalid or corrupt
    ... but don't know how to fix or where to start. ... It was done legitimately for some so that they could spread the results across multiple external media sources *and* the software 'sharing' community liked it because it allowed for checksums easily and made the download sizes smaller and a bunch of smaller single files is less to download overall. ... Now - I understand that you later state, "I also downloaded a corrupted zip repair utitlity called Object Fix and it repaired the corrupted zip." ... ;-) Skimming the results might lead someone to quickly believe you had a corrupt 7-Zip install and somehow had a messed up native compression utility as well. ...
    (microsoft.public.windowsxp.general)
  • Re: Obviously, Republicans are socialists.
    ... then you have a government. ... problem is that it is corrupt... ... enough to put their lives on the line to fix it. ... imported goods that equal the costs of manufacturing those same items ...
    (rec.bicycles.racing)
  • ath induced panic in -stable
    ... I run into a nasty panic which results in a corrupt ... It looks like a cascade of panics. ... #15 0xc06e98b1 in trap (frame= ...
    (freebsd-stable)