Re: unable to recover ext3 - please help
From: Gordon Henderson (gordon_at_lion.drogon.net)
Date: 10/15/04
- Next message: Chris Cole: "Re: Anybody use Linux on Dells?"
- Previous message: Robert Heller: "Re: Anybody use Linux on Dells?"
- In reply to: Maciej Mrozowski: "unable to recover ext3 - please help"
- Next in thread: Maciej Mrozowski: "Re: unable to recover ext3 - please help"
- Reply: Maciej Mrozowski: "Re: unable to recover ext3 - please help"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 15 Oct 2004 10:43:39 +0000 (UTC)
In article <cko6rp$86e$1@panorama.wcss.wroc.pl>,
Maciej Mrozowski <reavertm@hotmail.com> wrote:
>hi
>yesterday my gentoo has freezed (propably due to hard disk cable
>corruption).
>It booted properly, but after that, some files begin to vapour. I rebooted
>system immediately (reset switch) and changed the ide cable. Next time my
>linux hasn't started reporting typical kernel error message - unable to
>mount root. I used rescue cd and started to recover filesystems. For root
>partition it was only necessary to find a superblock to make fsck recover
>important files. Unfortunataly i didn't managed to recover second ext3
>partition. fsck.ext3 has failed with message:
>"ext3 recovery flag clear, but journal has data. Recovery flag not set in
>backup superblock, so running journal anyway.
>fsck.ext3: unable to set superblock flags on /usr/local"
>i have absolutely no idea what to do now. unfortunately this partition
>contains data very important for me (for example, location of meeting of my
>project group for tomorrow) and I just don't want to think what's going to
>happen with me if i loose all of this.I would like to repair that filesystem
>(even with corrupted directory structure with all of them moved to
>lost+found, like it was after running fsck on my first partition) rather
>than recover number of files using some recovery tools, because i just don't
>have so much disk space.
It's obviously not important enough for you to keep a backup of, so
just format the entre disk and install from scratch, miss the meeting,
lose your job, end up on the dole, lost, forlorn, and pennyless, all
because you never bothered to take the simple steps of making a backup.
However, here is what I'd do in this situation ...
It sounds like you've recovered root, so boot the machine in maintenance
mode. Under Debian you pass the -b flag to the kernel via Lilo. (Note,
this is a lower-level than single user with the -s flag) This should
leave you with / mounted read-only and nothing else mounted. (Although
mount will lie to you and tell you other disks are mounted) I don't know
what Gentoo will do though - hopefully it will be sensible.
Re-mount root read/write -
mount -oremount,rw /
Mount your failed partition as ext2, read-only:
mount -r -t ext2 /dev/hdaX /mnt
(/dev/hdaX is the partition that /usr/local resides under)
See if your files exist under /mnt. If so, copy them to some space under
root. If not, then recover then from backup. Oops, you were too lazy
to do this. Better luck next time. If the files are damaged and lost,
then you might get lots of errors from the kernel as it tries to read
them. In extreme caes theres the possibility of a kernel crash, although
I haven't seen this for some time.
Then you can umount it and fsck it - as an ext2 filesystem.
umount /dev/hdaX
fsck -t ext2 -fC -y /dev/hdaX
if it found any errors, do it again until it runs clean.
Remount it as before, and try to find your most important files and copy
them to somewhere under root.
At this point, you've probably done as much as you can without delving
into serious low-level voodoo.
If it looks in-tact after the fscking, you can re-create the journal with
tune2fs -j /dev/hdX
and then reboot your machine. However, if it's that badly hosed, I'd
rebuild the machine.
AND KEEP A BACKUP NEXT TIME!
Good luck...
Gordon
- Next message: Chris Cole: "Re: Anybody use Linux on Dells?"
- Previous message: Robert Heller: "Re: Anybody use Linux on Dells?"
- In reply to: Maciej Mrozowski: "unable to recover ext3 - please help"
- Next in thread: Maciej Mrozowski: "Re: unable to recover ext3 - please help"
- Reply: Maciej Mrozowski: "Re: unable to recover ext3 - please help"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|