Filesystem is corrupt fsck.reiserfs --rebuild-tree

Hi, my OpenSuse 10.3 system won’t boot for some reason.

I have /home mounted on a separate physical hard drive to the rest of the system - has worked fine with no problems.

Now, on bootup, fsck is reporting:

Filesystem is NOT clean
Filesystem seems to have fatal corruptions. Running with --rebuild-tree is required.
fsck.reiserfs /dev/disk/by-id/<diskname>-part 1 failed (status 0x4). Run manually!
... blogd: no message logging because /var filesystem is not accessible
... fsck failed for at least one filesystem (not /)
Please repair manually and reboot
The root filesystem is already mounted read-write

I can boot with the intallation CD and use a rescue system and I think my next step is to run

fsck.reiserfs --rebuild-tree /dev/disk/by-id/<diskname-part 1>

but when I tried, there were dire warnings about backing up the partition first, and I cancelled back out.

My problem is: how can I back up the partition when openSuse can’t see it? When I’m in the rescue installation, /home is empty (presumably I’m looking at /root/home and it’s a temporary directory)

Should I go ahead and run the fsck.reiserfs --rebuild-tree command? And have I got the command syntax right?

Thanks for your help…

I suppose you do have allready a backup (from at least only a few days ago) as everybody should have. That would mean that you have complied to the meaning of that warning.

You can use *dd *to make a copy of the partition (see man dd). But I doubt it will be very usefull to make a copy of the current situation because that is unusable.

When you have replaced <diskname-part 1> with the real value then the statement seems to be OK. Or just use /dev/sda1 or what the partition is (/dev/disk/<diskname-part 1> links to it).

yes, go ahead. Backing up a corrupt/broken file system will give you a snapshot that will also be corrupt/broken and if you try to restore it, you’ll also have to rebuild the tree for it. Reiserfs is know to much often corrupt its tree than other file systems and you really may consider using another FS, like ext3 or xfs since also the future of reiserfs is pretty dark

Thanks for all your help - I ran fsck.reiserfs --rebuild-tree and it seemed to work: system came back up - with issues, but I hope I can work around them, get my data off and upgrade the PC.

I’ll use ext3 next time - although I didn’t exactly *choose *reiserfs - I believe it was the default when I installed 10.3.

Can anyone tell me how I check for bad sectors on the physical disk?

Thanks