Skip to contentSkip to conversation

Reiserfs Data Recovery

DISCUSSION Nick Vahalik 5 participants 15 messages Mar 8, 2004 – Mar 9, 2004 2 messages not in the archive

lore
Share & tools
lore
#0 lore raw

Hello,

System: Slackware 9.1
Dual P3 1Ghz/133Mhz FSB
1 GB Ram PC133 Ram
Running Hardware Raid1 on top of a highpoint 37x2 raid controller 2x80 GB Drives

My system crashed yesterday (xscreensaver... bah!) and when I rebooted my /raid partition wouldn't mount. So I ran reiserfsck /dev/sda1 and it said I needed to rebuild my superblock because my Root Super Block 0 was corrupt. So I ran reiserfsck --rebuild-sb /dev/sda1 and after that it was saying that it failed and I needed to run reiserfsck --rebuild-tree. Well, I did and about an hour later I get something like this (the log is about 80k):
1537 directory entries were hashed with not set hash.
112120 directory entries were hashed with "r5" hash.
Selected hash ("r5") does not match to the hash set in the super block (not set).
"r5" hash is selected
Flushing..finished
Read blocks (but not data blocks) 38667615
Leaves among those 56626
- corrected leaves 2478
- leaves all contents of which could not be saved and deleted 19
pointers in indirect items to wrong area 5167 (zeroed)
Objectids found 116706

Pass 1 (will try to insert 56607 leaves):
####### Pass 1 #######
Looking for allocable blocks .. finished
0%pass1: block 65604, item 16, entry 4: The entry "P313"?" of the [50706 50722 0x1 DIR (3)] is hashed with not set whereas proper hash is "r5" - deleted
pass1: block 65604, item 16, entry 9: The entry "P313"?" of the [50706 50722 0x1 DIR (3)] is hashed with not set whereas proper hash is "r5" - deleted pass1.c 408 pass1_correct_leaf
pass1_correct_leaf: block 65636, item 0, pointer 7: The wrong pointer (2224053807) in the file [50872 50891]. Must be fixed on pass0. Aborted

So, I figured I'd run it once more and just hope and pray that it would kinda fix itself, and well, I got the same thing again:

1200 directory entries were hashed with not set hash. 110404 directory entries were hashed with "r5" hash. "r5" hash is selected
Flushing..finished
Read blocks (but not data blocks) 38667391
Leaves among those 56589
- corrected leaves 2484
- leaves all contents of which could not be saved and deleted 28 pointers in indirect items to wrong area 4947 (zeroed) Objectids found 116691

Pass 1 (will try to insert 56561 leaves):
####### Pass 1 #######
Looking for allocable blocks .. finished
0%pass1: block 65540, item 19, entry 0: The entry "" of the [50257 50323 0x1 DIR (3)] is hashed with not set whereas proper hash is "r5" - deleted
pass1: block 65540, item 19, entry 0: The entry ".." of the [50257 50323 0x2 DIR (3)] is hashed with not set whereas proper hash is "r5" - deleted pass1.c 408 pass1_correct_leaf left 56393, 0 /sec
pass1_correct_leaf: block 65604, item 2, pointer 1: The wrong pointer (1) in the file [50696 50698]. Must be fixed on pass0. Aborted

It looks like the numbers are getting smaller, but all I know is that it still won't mount... and I have everything on this partition... this was my backup (I just reformatted) and without this data I am seriously screwed. Will normal data recovery methods work (like, Encase or Ontrack?) or is there a better way?

Nick Vahalik

#2 lore raw

Philippe,

root@bardiel:~# reiserfsck -V
reiserfsck 3.6.11 (2003 www.namesys.com)

Nick Vahalik

Quoted 11 lines · Philippe Gramoulle

Hello,

What is your reiserfsck version ( reiserfsck -V ? )

Thanks,

Philippe

#3 lore raw

Hello,

I'd suggest that you try first the latest reiserfsprogs 3.6.13.

ftp.namesys.com:/pub/reiserfsprogs/reiserfsprogs-3.6.13.tar.gz

It problem still occurs, then someone at Namesys might help you more than me.

Thanks,

Philippe

On Mon, 08 Mar 2004 08:43:56 -0600
Nick Vahalik <[email protected]> wrote:

  | Philippe,
  | 
  | root@bardiel:~# reiserfsck -V
  | reiserfsck 3.6.11 (2003 www.namesys.com)
  | 
  | Nick Vahalik
  | 
#4 lore raw

Hello again,

Okay, I updated reiserfsprogs and this is what I got:

0%....20%....40%....60%....80%....100% left 0, 15217 /sec
"r5" hash is selected
Flushing..finished
Read blocks (but not data blocks) 38667613
Leaves among those 56652
- corrected leaves 2500
- leaves all contents of which could not be
saved and de leted 26
pointers in indirect items to wrong area 5332 (zeroed) Objectids found 116644

Pass 1 (will try to insert 56626 leaves):
Looking for allocable blocks .. finished
0%pass1.c 408 pass1_correct_leaf left 56623, 3 /sec
pass1_correct_leaf: block 65604, item 0, pointer 1: The wrong pointer (379082642 5) in the file [50696 50697]. Must be fixed on pass0. Aborted

I can post the logfile... if anyone wants to see it.

Nick Vahalik

Quoted 28 lines · Philippe Gramoullé

Hello,

I'd suggest that you try first the latest reiserfsprogs 3.6.13.

ftp.namesys.com:/pub/reiserfsprogs/reiserfsprogs-3.6.13.tar.gz

It problem still occurs, then someone at Namesys might help you more than me.

Thanks,

Philippe

On Mon, 08 Mar 2004 08:43:56 -0600
Nick Vahalik <[email protected]> wrote:

 | Philippe,
 | 
 | root@bardiel:~# reiserfsck -V
 | reiserfsck 3.6.11 (2003 www.namesys.com)
 | 
 | Nick Vahalik
 | 
#5 lore raw

Hello Nick,

Quoted 16 lines · Nick Vahalik

Hello again,

Okay, I updated reiserfsprogs and this is what I got:

0%....20%....40%....60%....80%....100% left 0,
15217 /sec
"r5" hash is selected
Flushing..finished
Read blocks (but not data blocks) 38667613
Leaves among those 56652
- corrected leaves 2500
- leaves all contents of which could not be
saved and de leted 26
pointers in indirect items to wrong area 5332 (zeroed) Objectids found 116644

Quoted 7 lines

Pass 1 (will try to insert 56626 leaves):
Looking for allocable blocks .. finished
0%pass1.c 408 pass1_correct_leaf left 56623,
3 /sec
pass1_correct_leaf: block 65604, item 0, pointer 1: The wrong pointer (379082642 5) in the file [50696 50697]. Must be fixed on pass0. Aborted

When such things happen especially in different places of the tree at every fsck run this often indicates some hardware problem. I would check the memory with memtest first.

Signature · 2 lines
Thanks,
Vitaly Fertman
#6 lore raw
In reply to Nick Vahalik
Quoted 5 lines · Nick Vahalik

My system crashed yesterday (xscreensaver... bah!) and when I rebooted my /raid partition wouldn't mount. So I ran reiserfsck /dev/sda1 and it said I needed to rebuild my superblock because my Root Super Block 0 was corrupt. So I ran reiserfsck --rebuild-sb /dev/sda1 and after that it was saying that it failed and I needed to run reiserfsck --rebuild-tree.

Note: whatever you do, do _not_ touch the second drive of your array with reiserfsck. Assuming it is still in the state where it was before you started playing around, it may be the _only_ thing that ends up saving your ass! When you need a new copy of the corrupt filesystem to play with, just dd the mirror drive *TO* the playground drive (don't accidentally confuse the if and of), and only play around with the copy you made. If worse comes to worse, having a copy of the filesystem that is not messed around with, will give the RFS pay-for support a better chance of getting all your data back.

Quoted 2 lines

screwed. Will normal data recovery methods work (like, Encase or Ontrack?) or is there a better way?

I don't know of any analytic data recovery tool that works with ReiserFS. I think your best bet, especially if you depend on this data, is to suck it up and pay the $20 before something worse happens. Think about which is worth more... a consulting fee, or all your work.

Good luck!

Signature · 1 line
Ryan Underwood, <[email protected]>

A message that is not in the archive (sent off-list or not yet received): [email protected]

#8 lore raw
Quoted 8 lines · Nick Vahalik
Quoted 5 lines

Note: whatever you do, do _not_ touch the second drive of your array with reiserfsck. Assuming it is still in the state where it was before
...

I thought I mentioned that this was a Raid 0. There is no mirroring. It's a stripe.
I know. Just tell me what I already assumed: I'm screwed.

Whoops. In your initial post:
----------------
Hello,

System: Slackware 9.1
Dual P3 1Ghz/133Mhz FSB
1 GB Ram PC133 Ram
Running Hardware Raid1 on top of a highpoint 37x2 raid controller 2x80 GB Drives
----------------

:-(
Yeah, if it's raid 0, you don't have much of a chance besides giving the filesystem as it is to someone who knows exactly what they are doing wrt ReiserFS.

I'm having trouble figuring out how exactly a system crash would have wiped out your super-block...

Quoted 4 lines

Well, I was thinking more of forensics analysis tools... (Network Security Major at ***********) and we have some neat equipment/software over there... but I'm not sure how much of it will work with ReiserFS...

Without something that understands the logical structures of the specific filesystem in question (Reiser), it will be difficult to get anything done. I can't really offer any help myself because I was in the same boat you were a few weeks ago. Fortunately, it was just /usr, not my life work. Plus, it was apparently a conspiracy on my part to destroy my data, judging from the steps I took (wiping out 2 perfectly good backups in the process of trashing it); it wasn't my system randomly borking itself like yours seems to have.

I wish I could offer more help, but my advice based on my own experience is to not do anymore damage than has already been done and to get expert help. In the end I could barely retrieve anything from my filesystem and in the process messed up any chances anyone else would have had to help me out. Doh! :)

Signature · 1 line
Ryan Underwood, <[email protected]>

A message that is not in the archive (sent off-list or not yet received): [email protected]

#10 lore raw
Quoted 4 lines · Nick Vahalik

Same here. Of course, now I'm wondering if the crash had anything to do with a possible faulty drive. It's one of those IBM Deathstars! I forgot about it until about 2 am this morning when I found my receipt. Eh, well at least I had my code backed up...

Oh wow, you do definitely want to run IBM DFT as soon as possible. That might be the only thing that is wrong... usually you would see some syslog errors though when you tried to mount the drives if the system was having problems reading from the drive(s). DFT should not destroy any data or make anything worse, but it will try to relocate the sector if it is having trouble reading it.

this firmware upgrade was released a while ago and corrects some deathstar crashing if you have one of the listed drives:
http://www-1.ibm.com/support/docview.wss?rs=0&q=DTLA&uid=psg1MIGR-44195

Quoted 5 lines

Well, I was thinking about doing more of a raw data recovery. We have tools that will just simply look for files minus the structure and dump the results out into a spare drive. I did this once to another web server I had. It recovered 80% of my code... and the MBR/SB was completely eradicated on that drive as well.

Yeah, I guess you can try something if you have the tools, but just guessing that to get anything serious done you will need tools that understand Reiser structures. Otherwise all you can do in a general case is to find contiguous allocation blocks and try to piece together files from those. That approach might get all of your data, though pieceing it together would be loads of fun...

Quoted 7 lines

Well you replied, and I guess this is just another lesson to backup, backup, backup! In all honesty, I don't think the filesystem itself is damaged, I still think it's just the superblock. I've had this problem before with another drive... it just decided to MBR/Root SB... It was also an Hitachi (IBM) Drive. *sigh* Oh well, I'll just set the drives aside and leave em. Maybe in a week or two I'll have enough money to actually afford $25.

I think you might try the DFT approach before giving up, but definitely don't do anymore damage with reiserfsck. :) Also, since this is a stripe set, is the md device able to start the raid successfully? If so, and if it only fails when you try to mount the filesystem on the raid, you will have better chances than if md can't even figure out that you have a stripe set spanning those disks.

Signature · 1 line
Ryan Underwood, <[email protected]>
#11 lore raw
Quoted 8 lines · Ryan Underwood

Oh wow, you do definitely want to run IBM DFT as soon as possible. That might be the only thing that is wrong... usually you would see some syslog errors though when you tried to mount the drives if the system was having problems reading from the drive(s). DFT should not destroy any data or make anything worse, but it will try to relocate the sector if it is having trouble reading it.

Well, I ran the DFT, Quick, Advanced, and Bad Sector Tests on all three of my drives. (One boot and the two in the stripe) and they all completely successfully without any errors. The drives appear to have checked out.

Quoted 8 lines

I think you might try the DFT approach before giving up, but definitely don't do anymore damage with reiserfsck. :) Also, since this is a stripe set, is the md device able to start the raid successfully? If so, and if it only fails when you try to mount the filesystem on the raid, you will have better chances than if md can't even figure out that you have a stripe set spanning those disks.

I'm using highpoint's source code driver (hpt37x2.o) compiled for my SMP kernel.
...
But... when I dmesg I only see one processor...? Could that be an issue... I'm gonna recompile and try it again.

Nick Vahalik

#12 lore raw
In reply to Ryan Underwood
Quoted 6 lines · Ryan Underwood

Running Hardware Raid1 on top of a highpoint 37x2 raid controller 2x80 GB Drives
----------------

I had really bad experiences with highpoint.

Signature · 1 line
Hans
#13 lore raw
Quoted 10 lines · Hans Reiser
Quoted 6 lines · Ryan Underwood

Running Hardware Raid1 on top of a highpoint 37x2 raid controller 2x80 GB Drives
----------------

I had really bad experiences with highpoint.

Actually, I messed up... It should have been raid 0 instead of raid 1. But I haven't had any problems so far. I did test the memory of my system and memtest didn't give any errors. I will, however run the IBM DFT tool and see if it can detect any error with the drives.

#14 lore raw
Quoted 5 lines · Nick Vahalik
Quoted 3 lines · Hans Reiser
Quoted 1 line · Ryan Underwood
Quoted 10 lines
Quoted 7 lines
Quoted 5 lines

Running Hardware Raid1 on top of a highpoint 37x2 raid controller 2x80 GB Drives
----------------

I had really bad experiences with highpoint.

Actually, I messed up... It should have been raid 0 instead of raid 1. But I haven't had any problems so far. I did test the memory of my system and memtest didn't give any errors. I will, however run the IBM DFT tool and see if it can detect any error with the drives.

My bad experience was with getting their drivers to work with 2.6, and I tried to use raid 1..., and I figured out that it wasn't really hardware raid because it needed a software driver that wasn't in 2.6 and it was work to figure out that it was missing and they don't provide telephone support and, oh, I just hated them by the end of the experience.... I ended up just using each drive as a separate device and their hardware as a dumb ide controller.

Signature · 1 line
Hans
#15 lore raw
Quoted 2 lines · Hans Reiser

My bad experience was with getting their drivers to work with 2.6, and I tried to use raid 1..., and I figured out that it wasn't really hardware raid because it needed a software driver that wasn't in 2.6 and it was work to figure out that it was missing and they don't provide telephone support and, oh, I just hated them by the end of the experience.... I ended up just using each drive as a separate device and their hardware as a dumb ide controller.

Indeed, I too contacted them about a 2.6 driver and a few days later the only I response was that work was 'in progress' on a 2.6 driver. Some of their newer hardware is already supported (they said, but I haven't checked). Yeah, next time I'll just buy a real raid controller (and hopefully some better drives!).

Nick Vahalik

#16 lore raw
In reply to Hans Reiser
Quoted 8 lines · Hans Reiser
Quoted 1 line

My bad experience was with getting their drivers to work with 2.6, and I tried to use raid 1..., and I figured out that it wasn't really hardware raid because it needed a software driver that wasn't in 2.6 and it was work to figure out that it was missing and they don't provide telephone support and, oh, I just hated them by the end of the experience.... I ended up just using each drive as a separate device and their hardware as a dumb ide controller.

Yeah, effectively all those cheap "RAID" cards (those w/o a CPU or local cache) do is provide you with a pretty BIOS menu to setup your arrays. All the work is done by the md driver anyway. The BIOS stores the array configuration at the end of the disks (I think) and the "driver" just picks up that configuration and starts running a md set over the assocated disks. The hardware itself is a basic ATA controller as far as I can tell.

Signature · 1 line
Ryan Underwood, <[email protected]>