Re: dump/restore corrupted filesystems



On Mon, Apr 16, 2007 at 11:14:35PM -0500, CyberLeo Kitsana wrote:
Roland Smith wrote:
On Mon, Apr 16, 2007 at 09:11:48AM -0500, CyberLeo Kitsana wrote:
I have a 1.2TB UFS2 filesystem with irrecoverable corruption. As such, I
must move all 500GB or so of data off of it and re-newfs it.

If the corruption is due to hardware failure, your data is probably lost.

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.

My question was more along the lines of whether or not dump/restore
would see that those corrupted directory and file inodes were indeed
corrupt and not bother attempting to back them up, or if it would
happily back them up and restore them in their corrupted state to a new
filesystem, thus trashing it.

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.

Ironically, this is the machine that holds the backups.

Oops.

Roland
--
R.F.Smith http://www.xs4all.nl/~rsmith/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)

Attachment: pgpCVtoHbkqxE.pgp
Description: PGP signature



Relevant Pages

  • Re: White screen and corrupt programs and drivers
    ... having a virus which no major antivirus software manufacturer can ... went corrupt, adobe software corrupt and norton antivirus 2005 worm ... both monitor and programs were workin ... hardware failure can certainly corrupt software. ...
    (microsoft.public.security)
  • Re: dump/restore corrupted filesystems
    ... and fsck can't fix the damage. ... That might be worth filing a PR for, especially the panics. ... If dump dies on ... So if any of these is corrupt, ...
    (freebsd-questions)
  • 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: kernel bug at sched.c: 564
    ... > due to corrupted and unrepairable inodes on an ext3 file system. ... > cause of the corrupt inodes was a tripped circuit breaker that ... From my understanding, modern drives should ...
    (comp.os.linux.misc)
  • Re: gorged harddrive
    ... df is showing how much disk is used/free based on inodes and filesizes. ... df reads out the free blocks on the filesytem, file sizes and inodes don't have anything to do with it. ... I have seen corrupt directory entries that indicate that blocks are being used that are not actually being used cause du to return wrong results, one would need to look through the files in the funny directory and see if any of the sizes look wrong, given that they are certain kinds of files there is a certain range that should be valid, and an entry having something way outside of that range should be a hint that that directory entry is corrupted. ...
    (Fedora)