# [SOLVED] Overheating and Bad Blocks the sequel!

## net-0

So I copied this over, and my issue isnt solved... and I posted it into a solved thread..... soo

I think the same thing happened to me... only I get really impatient and forget to read things through... Im going to stop before I break more.....

Anyways I think I borked my system due to over heating on the hard drive, I'm using reiserfs and I use this system as a fileserver so its always running... I started noticing files missing so I googled a few howto to repair the damaged or missing files.

And right off the bat I thought I should try,

reiserfsck --rebuild-tree -S -l /root/recovery.log /dev/hda4 based on this howto.....

http://antrix.net/journal/techtalk/reiserfs_data_recovery_howto.comments

It stops about 5 minutes into the rebuild and says bad blocks.... little did I know its recommend to make a copy which makes since... but now I already have ran this... so is there still hope in recovering any of my information?

I dont think the disk is damaged I think there is coruption and I'm clueless in recovery... because Im so impatient but I have infromation I would like to save... and any help is great.

Thanks,

And hopefully someone will answer... since it seems SOLVED has been added.

----------

## Sadako

It would of course still be a good idea to make a backup now before proceeding, if it's feasible.

What does "/root/recovery.log" contain?

Anyway, first you should run reiserfsck again (readonly this time), just to see how screwed you are (or aren't, hopefully).

```
reiserfsck -y --check /dev/hda4
```

Next you need to run badblocks, it won't change anything on the drive so it's safe.

I'd use something like

```
badblocks -n -p 2 -b 4096 -s -o badblocks.list /dev/hda4
```

I'm fairly certain mkreiserfs uses a 4096 blocksize by default.

Next you need to add the badblocks list to the filesystem, which can be done with either reiserfsck --fix-fixable -B badblocks.list, or reiserfstune -B badblocks.list.

But how you proceed really depends on what the last fsck report.

It might also be an idea if you added a link to the other thread you were talking about.

----------

## net-0

Here is a link to the other thread

https://forums.gentoo.org/viewtopic-p-3858237-highlight-.html#3858237

I posted all the info I felt could be of use, thanks for the help I will try the steps.

Also would it possible to make a backup of that partition if I cant even mount it?

----------

## net-0

```

Will read-only check consistency of the filesystem on /dev/hda4

Will put log info to 'stdout'

###########

reiserfsck --check started at Sun Jan 21 16:53:29 2007

###########

Replaying journal..

Reiserfs journal '/dev/hda4' in blocks [18..8211]: 0 transactions replayed

Checking internal tree..

Bad root block 0. (--rebuild-tree did not complete)

Aborted

```

Man that rebuild-tree option might have owned my chances of recovery?

----------

## Sadako

 *net-0 wrote:*   

> Also would it possible to make a backup of that partition if I cant even mount it?

 Yeah, as long as you have as much free space available as the size of the partition.

To create the backup (as file hda4-backup in the current directory), run

```
dd if=/dev/hda4 of=hda4-backup bs=512 conv=notrunc
```

 *net-0 wrote:*   

> 
> 
> ```
> Checking internal tree..
> 
> ...

 Actually, I'd take the fact that it's aware --rebuild-tree was run but didn't complete as a good sign.

Once you have a badblocks file (and you've made a backup of the filesystem) try the following;

```
reiserfsck --badblocks badblocks.list --rebuild-tree /dev/hda4
```

and hopefully it'll be able to pick up were it left off.

----------

## net-0

It keeps like dying, well I am able to reboot... but it makes my system really sluggesh... and it does nothing for hours... so I reboot and keep trying.

```

badblocks -n -p 2 -b 4096 -s -o badblocks.list /dev/hda4

```

Using that command just makes a list of the badblocks correct? Then later I use it with fsck right?

Is there anyway to manually make a document that contains the location of the badblocks?

```

gentoo ventserver # badblocks /dev/hda4

13769856

13769857

13769858

13769859

14986680

14986684

14986685

14986686

14986687

63389936

63389948

63389949

63389950

63389951

63389952

63389953

63389954

63389955

63389956

63389957

63389958

63389959

63389960

63389961

63389962

63389963

63389964

63389965

63389966

63389967

63389968

63389969

63389970

63389971

71939208

71939224

71939225

71939226

71939227

71939228

71939229

71939230

71939231

 
```

I got all that from just running badblocks /dev/hda4

Also does having badblocks for sure mean I have a dying drive? Because its fairly new, within a year or two I would say... but I guess it could be dying.

What Im trying to ask is, can corruption cause bad blocks?

So I think my plan will be to get another hard drive copy the broken data and try to work on that, any other advice? I will be private messaging you Hopeless if you don't mind.

So Hopeless is my current situation hopeless?

Thanks again for the help I have learned a lot so far, good stuff   :Shocked: 

----------

## Rad

Yes, there's more advice. Power the drive down until you get the new one.

Then create the backup on a the drive as Hopeless described it (you'll probably have to add noerror to conv on that dd command he provided for it to copy things over, though) and run reiserfsck on that. Fsck the new drive with the copy, not the original!

If reiserfsck succeeds and you have your data back, you can run a long SMART test using 

```
smartctl -t long </dev/drive>
```

  to assess whether the old drive is still of any use. smartctl is contained in the "smartmontools" package.

----------

## net-0

Ok so I bought a new sata drive just to fix this....

Its drive /dev/sda1 and I made one big reiserfs partition and mounted it in /mnt/repair.

Starting back off where I left off.... heh lets see what happens.

Hopeless this is what I tried,

dd if=/dev/hda4 of=/mnt/repair/home bs=512 conv=notrunc

So does this make a complete copy of the directory or an image?

----------

## net-0

```

dd: reading `/dev/hda4': Input/output error

27539648+0 records in

27539648+0 records out

14100299776 bytes (14 GB) copied, 980.031 s, 14.4 MB/s

```

Sadface, whatever will I do? Any suggestions? I tried to copy it and this is what I'm left with.... is reiser a flacky filesystem or is the drive actually borked... and how can I find the answer... haha I'm sure its not reiser... probly just my dumb luck....

Any suggestions will be so awsome, and I will <3 U largely.

----------

## net-0

Heh for giggles most likely not helpful....

http://theneto.com/phpsysinfo-dev/

That can show my mounted partitions. And maybe something useful I didn't mention.

----------

## net-0

bump

----------

## Sadako

Hey, I just got read pm now, haven't been around much.

 *net-0 wrote:*   

> 
> 
> ```
> 
> dd: reading `/dev/hda4': Input/output error
> ...

 

dd has nothing to do with the filesystem, it operates directly on the device itself, so if it reports an input/output error like this then it's definately a hardware issue.

In the list of badblocks you posted, the first was 13769856, and this was with badblocks' default block size of 1024.

The dd output suggests it read up to block number 27539648, with a block size of 512.

Divide that by 2, effectively making the block size 1024, and you have 13769824, only 32 blocks (or kilobytes) before the first bad block.

So what you need is to have dd be aware of the bad blocks, using the list provided by the badblocks program, but I'm not sure how to do this.

Simplest thing to try first is ddrescue in stead of dd, as this seems to be exactly what it was written for.

So `emerge ddrescue`, and then run `ddrescue if=/dev/hda4 of=/mnt/repair/home bs=512 conv=notrunc,noerror`

Actually, did you add noerror to the dd command line as Rad suggested?

If not, you really should try that first.

If all else fails, it should be possible to write a wrapper script around dd, which uses the badblocks list to stop before the bad blocks, and start again them, effectively skipping them.

I'll have a go at writing that while waiting for an update from you.

Good luck.

The word "block" appears in this post 12 times. I really think I need to improve my vocabulary...

----------

## net-0

Awsome! Your back on the thread.

Again thanks for the information I'm testing it now with the noerror... option.

dd if=/dev/hda4 of=/mnt/repair/home bs=512 conv=notrunc,noerror

and if that doesnt work Ill try the rescue ... so it's a hardware issue... guess Ill back everything up and rma the drive.

I'll run this now, and when I get back from work Ill tell you how it went.

AGAIN AGAIN! Thanks, was kind of bummed I wasn't getting much activity on this tread.

----------

## net-0

Ok so DD finished, and it seems it worked... however its an Image file right?

Its not like the directory I backed up is still a directory is it?

Just curious were you think I should go from here?

```

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7049.72 s, 10.4 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7049.72 s, 10.4 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7049.72 s, 10.4 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7049.72 s, 10.4 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7049.72 s, 10.4 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7049.73 s, 10.4 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7049.73 s, 10.4 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7049.73 s, 10.4 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7049.73 s, 10.4 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7049.73 s, 10.4 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7049.73 s, 10.4 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7049.73 s, 10.4 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7049.73 s, 10.4 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7049.76 s, 10.4 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7049.76 s, 10.4 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7049.77 s, 10.4 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7049.77 s, 10.4 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7049.77 s, 10.4 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7049.77 s, 10.4 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7049.77 s, 10.4 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7049.77 s, 10.4 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7055.9 s, 10.4 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7055.9 s, 10.4 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7055.9 s, 10.4 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7055.9 s, 10.4 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7055.9 s, 10.4 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7055.9 s, 10.4 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7055.9 s, 10.4 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7055.9 s, 10.4 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7055.92 s, 10.4 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7055.92 s, 10.4 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7055.92 s, 10.4 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7055.92 s, 10.4 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7055.92 s, 10.4 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7055.92 s, 10.4 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7055.92 s, 10.4 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7055.92 s, 10.4 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7056.03 s, 10.4 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7056.03 s, 10.4 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7056.03 s, 10.4 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7056.03 s, 10.4 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7056.03 s, 10.4 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7056.03 s, 10.4 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7056.03 s, 10.4 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7056.03 s, 10.4 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7092.98 s, 10.4 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7123.93 s, 10.3 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7155.26 s, 10.3 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7186.19 s, 10.3 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7217.12 s, 10.2 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7254.18 s, 10.2 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7285.09 s, 10.1 MB/s

dd: reading `/dev/hda4': Input/output error

143877968+0 records in

143877968+0 records out

73665519616 bytes (74 GB) copied, 7316.01 s, 10.1 MB/s

387406979+0 records in

387406979+0 records out

198352373248 bytes (198 GB) copied, 12914 s, 15.4 MB/s

```

Thats the output... doesnt look promising.

----------

## Sadako

 *net-0 wrote:*   

> Ok so DD finished, and it seems it worked... however its an Image file right?
> 
> Its not like the directory I backed up is still a directory is it?
> 
> Thats the output... doesnt look promising.

 

Actually, this looks very promising to me; it copied 74 GB before encountering any read errors, 

whereas the last attempt encountered errors after just 14 GB (was what you posted everything, or just as far as you could scroll?).

Anyway, yes, what you now have is an image of the filesystem that you had on hda4.

Now you can run try running fsck, but first you either have to set the image file up as a loopback device,

or copy it to another device.

Seeing as how you have a new hard drive, I presume you're going to go with the second option.

Just create a partition on the new drive which is at least as large as hda4 (don't worry if it's larger, you can either decrease the size later, or increase the size of the filesystem).

Presuming the new partition is sda2, just run

```
dd if=/mnt/repair/home of=/dev/sda2 bs=512 conv=notrunc,noerror
```

You could have just as easily have copied directly from the old drive to the new, i.e. dd if=/dev/hda4 of=/dev/sda1, but I didn't think of that eariler.   :Embarassed: 

Might be worthwhile to do it that way anyway, as it shouldn't take any longer, and it would be interesting to see if the errors reported are identical.

I'd also recommend using ddrescue, as it is supposed to be better at dealing with such errors, so if you decide to do it this way you would run

```
ddrescue if=/dev/hda4 of=/dev/sda2 bs=512
```

After all this you're back to trying reiserfsck, keeping your fingers crossed.

----------

## net-0

I did make the copy to the new partition, which is /mnt/repair or /dev/sda1

Also I'm getting 

ddrescue: cannot open input file: No such file or directory

when I try to ddrescue if=/dev/hda4 of=/dev/sda1 bs=512

So with this image file, Would I mount it like an iso? Or how would I go about doing that?

----------

## net-0

Now im trying to mount it,

its like this.

```

gentoo / # cd /mnt/repair/

gentoo repair # ls

home

gentoo repair # mkdir home.mnt

gentoo repair # mount home home.mnt/

mount: home is not a block device (maybe try `-o loop'?)

gentoo repair # mount -o loop home home.mnt/

mount: Operation not supported

gentoo repair #

```

----------

## net-0

Hey thanks for following this!

----------

## Sadako

 *net-0 wrote:*   

> Also I'm getting 
> 
> ddrescue: cannot open input file: No such file or directory
> 
> when I try to ddrescue if=/dev/hda4 of=/dev/sda1 bs=512

 Shit.

I should have read the manual properly first, with ddrescue the command should be

```
ddrescue /dev/hda4 /dev/sda1 bs=512
```

I just assumed it was the same as dd. My bad.   :Embarassed: 

The reason I didn't go into loop devices first is because you have to have support for it in the kernel,

```
grep BLK_DEV_LOOP /usr/src/linux/.config
```

should tell you if it's currently configured or not, if not it's under "Device Drivers -> Block devices" in menuconfig.

Then you would use "losetup /dev/loop0 /mnt/imagefile", where imagefile is the filesystem image (whatever you had "of" set to when running dd).

Then you would mount /dev/loop0 just as you would mount /dev/hda4

By copying the filesystem to /mnt/repair, you are copying one filesystem as an entire file onto another.

This isn't necessary, rather than create a filesystem on sda1, mount it, and then copy the filesystem on hda4 to it, 

you can simply copy the data on hda4 directly on to sda1, meaning when you mount sda1, you are mounting the exact same filesystem as if you were mounting hda4 itself.

Sorry if I'm not making this very clear, please ask me to explain anything you don't understand.

Anyway, you shouldn't try to mount the filesystem before running fsck on it, 

but if you insist on doing so you should at least add the "-o ro" option to the mount command to mount it read-only.

Just to try to clear things up, if the last dd command used an "of=/mnt/whatever", you need to setup a loopfile, or copy /mnt/whatever to some other empty partition with dd.

If you used of=/dev/sda1, you should be able to mount/fsck sda1 directly.

When using of=/dev/sda1, it will overwrite everything on the partition already (including the new filesystem you created), so be sure it's not mounted first.

I don't know about you, but I think I've just given myself a headache, and I don't think I'm being too helpful.

Maybe somebody else wants to chime in?

----------

## net-0

Hey its all very useful information and I really do appreciate the responce.

I'm just kind of confused, how I should start this procedure,

Like if you were going to do some steps...

Do you recommend DD or DDrescue? And after I do this... how should I lay it out?

Should I tell it to send the information directly to the drive, then mount it? Or mount the drive as extra space... and then mount the image file?

Thats whats really confusing, the sending of the backup... do I want it on a filesystem? Or do I want to copy the image intact with the filesystem... and I used genkernel so I'm pretty sure mounting of loops is default option... I have mounted iso images before so I would guess this is the same.

Then after I do have the backup howto repair it? Which tools do I use? reiserfsck? And what syntax.... if it's bothersome to explain a few how to's that you might have seen could also be helpful.

Don't worry you make great sense, and it's fine It seems tricky... but very valuable in the future if I lose data again... I assume you have knowledge of this from previous encounters?

Anyways thanks for the info, and anything you add will be appreciated.   :Shocked: 

-- neto

ps it only sounds confusing because of all the different syntax, and programs used to recover   :Very Happy: 

----------

## Sadako

Okay, so I'll go through these one at a time, then I'm off to bed.   :Razz: 

 *net-0 wrote:*   

> Hey its all very useful information and I really do appreciate the responce.
> 
> I'm just kind of confused, how I should start this procedure,
> 
> Like if you were going to do some steps...
> ...

 

If I where in your position, I would use

```
ddrescue /dev/hda4 /dev/sda1 bs=512
```

which basically copies all the data the partition hda4 to sda1.

That's the simplest I can put it.

 *net-0 wrote:*   

> Thats whats really confusing, the sending of the backup... do I want it on a filesystem? Or do I want to copy the image intact with the filesystem... and I used genkernel so I'm pretty sure mounting of loops is default option... I have mounted iso images before so I would guess this is the same.

 

Just like the last question, it depends on what's more convienient to you, but I think copying to a partition is preferable than copying to an image file, 

if for no other reason than I'd prefer to be running fsck and such on a normal filesystem, rather than a filesystem image on a loopback device.

As for genkernal and loopback, first see what "ls /dev/loop*" returns.

If nothing is reported, try "modprobe loop", it might just be compiled as a module which needs to be loaded.

 *net-0 wrote:*   

> Then after I do have the backup howto repair it? Which tools do I use? reiserfsck? And what syntax.... if it's bothersome to explain a few how to's that you might have seen could also be helpful.

 

Okay, just assuming you successfully use the ddrescue command above, next I would try a simple "reiserfsck -y --check /dev/sda1"

It'll probably just report "Bad root block 0. (--rebuild-tree did not complete)", like last time, but it's worth checking anyway.

Next I would try rebuilding the tree again, and this is where you really need to keep your fingers crossed;

```
reiserfsck -y --rebuild-tree /dev/sda1
```

 *net-0 wrote:*   

> Don't worry you make great sense, and it's fine It seems tricky... but very valuable in the future if I lose data again... I assume you have knowledge of this from previous encounters?

 

Unfortunately, yes, I learned the hard way too, although I picked most of his stuff up from simply tinkering around with stuff afterwards.

I'll check on your progress after some badly needed beauty sleep.

Good night and good luck.

----------

## net-0

And thanks for the steps, and right before you went to bed   :Very Happy:   Me too, so I was able to let the copy run all night....

```

gentoo mnt # ddrescue /dev/hda4 /dev/sda1 bs=512

Press Ctrl-C to interrupt

Initial status (read from logfile)

rescued:         0 B,  errsize:       0 B,  errors:       0

Current status

rescued:   198352 MB,  errsize:   77824 B,  current rate:        0 B/s

   ipos:    73665 MB,   errors:     152,    average rate:   22400 kB/s

   opos:    73665 MB

```

Theres the output, now I'm going to run fsck and go to work at lunch I will post the output.

Thanks again   :Very Happy: 

----------

## net-0

And right before I leave for work... I got this

```

reiserfsck -y --rebuild-tree /dev/sda1

reiserfsck 3.6.19 (2003 www.namesys.com)

*************************************************************

** Do not  run  the  program  with  --rebuild-tree  unless **

** something is broken and MAKE A BACKUP  before using it. **

** If you have bad sectors on a drive  it is usually a bad **

** idea to continue using it. Then you probably should get **

** a working hard drive, copy the file system from the bad **

** drive  to the good one -- dd_rescue is  a good tool for **

** that -- and only then run this program.                 **

** If you are using the latest reiserfsprogs and  it fails **

** please  email bug reports to reiserfs-list@namesys.com, **

** providing  as  much  information  as  possible --  your **

** hardware,  kernel,  patches,  settings,  all reiserfsck **

** messages  (including version),  the reiserfsck logfile, **

** check  the  syslog file  for  any  related information. **

** If you would like advice on using this program, support **

** is available  for $25 at  www.namesys.com/support.html. **

*************************************************************

Will rebuild the filesystem (/dev/sda1) tree

Will put log info to 'stdout'

Do you want to run this program?[N/Yes] (note need to type Yes if you do):Yes

Replaying journal..

Reiserfs journal '/dev/sda1' in blocks [18..8211]: 0 transactions replayed

###########

reiserfsck --rebuild-tree started at Tue Feb  6 08:32:04 2007

###########

Pass 0:

####### Pass 0 #######

Loading on-disk bitmap .. ok, 42794346 blocks marked used

Skipping 9688 blocks (super block, journal, bitmaps) 42784658 blocks will be read

0%.block 3580230: The number of items (2) is incorrect, should be (0) - corrected

block 3580230: The free space (32) is incorrect, should be (4072) - corrected

.                                                  left 38786196, 10305 /sec

The problem has occurred looks like a hardware problem. If you have

bad blocks, we advise you to get a new hard drive, because once you

get one bad block  that the disk  drive internals  cannot hide from

your sight,the chances of getting more are generally said to become

much higher  (precise statistics are unknown to us), and  this disk

drive is probably not expensive enough  for you to you to risk your

time and  data on it.  If you don't want to follow that follow that

advice then  if you have just a few bad blocks,  try writing to the

bad blocks  and see if the drive remaps  the bad blocks (that means

it takes a block  it has  in reserve  and allocates  it for use for

of that block number).  If it cannot remap the block,  use badblock

option (-B) with  reiserfs utils to handle this block correctly.

bread: Cannot read the block (4771010): (Input/output error).

Aborted

```

Heh I hope the new drive works.

----------

## Sadako

That's not too unexpected, as the blocks dd failed to read would be corrupt as far as fsck is concerned.

First thing you have to do now is create a new badblocks list with the correct blocksize;

```
badblocks -b 4096 -o badblocks.hda4 -p 2 /dev/hda4
```

Then you should use reiserfstune to make the filesystem on sda1 aware of the bad blocks that were "copied" from hda4;

```
reiserfstune -B badblocks.hda4 /dev/sda1
```

Then try resierfsck again once again;

```
reiserfsck -y --rebuild-tree /dev/sda1
```

----------

## net-0

This is what happens when I try to run,

reiserfstune -B badblocks.hda4 /dev/sda1

```

reiserfstune -B badblocks.hda4 /dev/sda1

reiserfstune: Bad block 3442432 is used already in reiserfs tree. To mark it as a bad block use reiserfsck

--fix-fixable with -B option.

reiserfstune: Bad block 3442434 is used already in reiserfs tree. To mark it as a bad block use reiserfsck

--fix-fixable with -B option.

reiserfstune: Bad block 3442454 is used already in reiserfs tree. To mark it as a bad block use reiserfsck

--fix-fixable with -B option.

reiserfstune: Bad block 3442455 is used already in reiserfs tree. To mark it as a bad block use reiserfsck

--fix-fixable with -B option.

reiserfstune: Bad block 3442457 is used already in reiserfs tree. To mark it as a bad block use reiserfsck

--fix-fixable with -B option.

reiserfstune: Bad block 3442458 is used already in reiserfs tree. To mark it as a bad block use reiserfsck

--fix-fixable with -B option.

reiserfstune: Bad block 3442459 is used already in reiserfs tree. To mark it as a bad block use reiserfsck

--fix-fixable with -B option.

reiserfstune: Bad block 3442460 is used already in reiserfs tree. To mark it as a bad block use reiserfsck

--fix-fixable with -B option.

reiserfstune: Bad block 3442461 is used already in reiserfs tree. To mark it as a bad block use reiserfsck

--fix-fixable with -B option.

reiserfstune: Bad block 3442462 is used already in reiserfs tree. To mark it as a bad block use reiserfsck

--fix-fixable with -B option.

reiserfstune: Bad block 3442463 is used already in reiserfs tree. To mark it as a bad block use reiserfsck

--fix-fixable with -B option.

reiserfstune: Bad block 3442464 is used already in reiserfs tree. To mark it as a bad block use reiserfsck

--fix-fixable with -B option.

reiserfstune: Bad block 3746648 is used already in reiserfs tree. To mark it as a bad block use reiserfsck

--fix-fixable with -B option.

reiserfstune: Bad block 3746650 is used already in reiserfs tree. To mark it as a bad block use reiserfsck

--fix-fixable with -B option.

reiserfstune: Bad block 3746651 is used already in reiserfs tree. To mark it as a bad block use reiserfsck

--fix-fixable with -B option.

reiserfstune: Bad block 3746652 is used already in reiserfs tree. To mark it as a bad block use reiserfsck

--fix-fixable with -B option.

reiserfstune: Bad block 3746653 is used already in reiserfs tree. To mark it as a bad block use reiserfsck

--fix-fixable with -B option.

reiserfstune: Bad block 3746654 is used already in reiserfs tree. To mark it as a bad block use reiserfsck

--fix-fixable with -B option.

reiserfstune: Bad block 3746655 is used already in reiserfs tree. To mark it as a bad block use reiserfsck

--fix-fixable with -B option.

reiserfstune: Bad block 3746657 is used already in reiserfs tree. To mark it as a bad block use reiserfsck

--fix-fixable with -B option.

reiserfstune: Bad block 3746658 is used already in reiserfs tree. To mark it as a bad block use reiserfsck

--fix-fixable with -B option.

reiserfstune: Bad block 3746659 is used already in reiserfs tree. To mark it as a bad block use reiserfsck

--fix-fixable with -B option.

reiserfstune: Bad block 3746660 is used already in reiserfs tree. To mark it as a bad block use reiserfsck

--fix-fixable with -B option.

reiserfstune: Bad block 3746661 is used already in reiserfs tree. To mark it as a bad block use reiserfsck

--fix-fixable with -B option.

reiserfstune: Bad block 3746662 is used already in reiserfs tree. To mark it as a bad block use reiserfsck

--fix-fixable with -B option.

reiserfstune: Bad block 3746663 is used already in reiserfs tree. To mark it as a bad block use reiserfsck

--fix-fixable with -B option.

reiserfstune: Bad block 3746665 is used already in reiserfs tree. To mark it as a bad block use reiserfsck

--fix-fixable with -B option.

reiserfstune: Bad block 3746666 is used already in reiserfs tree. To mark it as a bad block use reiserfsck

--fix-fixable with -B option.

reiserfstune: Bad block 3746667 is used already in reiserfs tree. To mark it as a bad block use reiserfsck

--fix-fixable with -B option.

reiserfstune: Bad block 3746668 is used already in reiserfs tree. To mark it as a bad block use reiserfsck

--fix-fixable with -B option.

reiserfstune: Bad block 3746669 is used already in reiserfs tree. To mark it as a bad block use reiserfsck

--fix-fixable with -B option.

reiserfstune: Bad block 3746670 is used already in reiserfs tree. To mark it as a bad block use reiserfsck

--fix-fixable with -B option.

reiserfstune: Bad block 3746671 is used already in reiserfs tree. To mark it as a bad block use reiserfsck

--fix-fixable with -B option.

reiserfstune: Bad block 15847456 is used already in reiserfs tree. To mark it as a bad block use reiserfsck

--fix-fixable with -B option.

reiserfstune: Bad block 15847489 is used already in reiserfs tree. To mark it as a bad block use reiserfsck

--fix-fixable with -B option.

reiserfstune: Bad block 15847490 is used already in reiserfs tree. To mark it as a bad block use reiserfsck

--fix-fixable with -B option.

reiserfstune: Bad block 15847491 is used already in reiserfs tree. To mark it as a bad block use reiserfsck

--fix-fixable with -B option.

reiserfstune: Bad block 15847492 is used already in reiserfs tree. To mark it as a bad block use reiserfsck

--fix-fixable with -B option.

reiserfstune: Bad block 17984768 is used already in reiserfs tree. To mark it as a bad block use reiserfsck

--fix-fixable with -B option.

reiserfstune: Bad block 17984801 is used already in reiserfs tree. To mark it as a bad block use reiserfsck

--fix-fixable with -B option.

reiserfstune: Bad block 17984802 is used already in reiserfs tree. To mark it as a bad block use reiserfsck

--fix-fixable with -B option.

reiserfstune: Bad block 17984803 is used already in reiserfs tree. To mark it as a bad block use reiserfsck

--fix-fixable with -B option.

reiserfstune: Bad block 17984804 is used already in reiserfs tree. To mark it as a bad block use reiserfsck

--fix-fixable with -B option.

reiserfstune: Bad block 17984805 is used already in reiserfs tree. To mark it as a bad block use reiserfsck

--fix-fixable with -B option.

reiserfstune: Bad block 17984806 is used already in reiserfs tree. To mark it as a bad block use reiserfsck

--fix-fixable with -B option.

reiserfstune: Bad block 17984807 is used already in reiserfs tree. To mark it as a bad block use reiserfsck

--fix-fixable with -B option.

reiserfstune: 0 blocks were marked as bad.

```

Ill try

reiserfsck -B badblocks.hda4 --fix-fixable /dev/sda1

output:

```

reiserfsck -B badblocks.hda4 --fix-fixable /dev/sda1

reiserfsck 3.6.19 (2003 www.namesys.com)

*************************************************************

** If you are using the latest reiserfsprogs and  it fails **

** please  email bug reports to reiserfs-list@namesys.com, **

** providing  as  much  information  as  possible --  your **

** hardware,  kernel,  patches,  settings,  all reiserfsck **

** messages  (including version),  the reiserfsck logfile, **

** check  the  syslog file  for  any  related information. **

** If you would like advice on using this program, support **

** is available  for $25 at  www.namesys.com/support.html. **

*************************************************************

Will check consistency of the filesystem on /dev/sda1

and will fix what can be fixed without --rebuild-tree

Bad block list will contain only blocks specified in 'badblocks.hda4' file

Will put log info to 'stdout'

Do you want to run this program?[N/Yes] (note need to type Yes if you do):Yes

###########

reiserfsck --fix-fixable started at Wed Feb  7 08:03:43 2007

###########

Replaying journal..

Reiserfs journal '/dev/sda1' in blocks [18..8211]: 0 transactions replayed

Checking internal tree../  1 (of   2)/ 14 (of 128)/ 88 (of 170)bad_indirect_item: block 17983837: The item (5 30267 0x6c2d001 IND (1), len 4048, location 48 entry count 0, fsck need 0, format new) has the bad pointer (181) to the block (17984768), which is in tree already - zeroed

bad_indirect_item: block 17983837: The item (5 30267 0x6c2d001 IND (1), len 4048, location 48 entry count 0, fsck need 0, format new) has the bad pointer (214) to the block (17984801), which is in tree already - zeroed

bad_indirect_item: block 17983837: The item (5 30267 0x6c2d001 IND (1), len 4048, location 48 entry count 0, fsck need 0, format new) has the bad pointer (215) to the block (17984802), which is in tree already - zeroed

bad_indirect_item: block 17983837: The item (5 30267 0x6c2d001 IND (1), len 4048, location 48 entry count 0, fsck need 0, format new) has the bad pointer (216) to the block (17984803), which is in tree already - zeroed

bad_indirect_item: block 17983837: The item (5 30267 0x6c2d001 IND (1), len 4048, location 48 entry count 0, fsck need 0, format new) has the bad pointer (217) to the block (17984804), which is in tree already - zeroed

bad_indirect_item: block 17983837: The item (5 30267 0x6c2d001 IND (1), len 4048, location 48 entry count 0, fsck need 0, format new) has the bad pointer (218) to the block (17984805), which is in tree already - zeroed

bad_indirect_item: block 17983837: The item (5 30267 0x6c2d001 IND (1), len 4048, location 48 entry count 0, fsck need 0, format new) has the bad pointer (219) to the block (17984806), which is in tree already - zeroed

bad_indirect_item: block 17983837: The item (5 30267 0x6c2d001 IND (1), len 4048, location 48 entry count 0, fsck need 0, format new) has the bad pointer (220) to the block (17984807), which is in tree/  2 (of   2)/ 41 (of 164)/ 17 (of 170)bad_indirect_item: block 15846839: The item (19728 19729 0x62e4001 IND (1), len 4048, location 48 entry count 0, fsck need 0, format new) has the bad pointer (644) to the block (15847456), which is in tree already - zeroed

bad_indirect_item: block 15846839: The item (19728 19729 0x62e4001 IND (1), len 4048, location 48 entry count 0, fsck need 0, format new) has the bad pointer (677) to the block (15847489), which is in tree already - zeroed

bad_indirect_item: block 15846839: The item (19728 19729 0x62e4001 IND (1), len 4048, location 48 entry count 0, fsck need 0, format new) has the bad pointer (678) to the block (15847490), which is in tree already - zeroed

bad_indirect_item: block 15846839: The item (19728 19729 0x62e4001 IND (1), len 4048, location 48 entry count 0, fsck need 0, format new) has the bad pointer (679) to the block (15847491), which is in tree already - zeroed

bad_indirect_item: block 15846839: The item (19728 19729 0x62e4001 IND (1), len 4048, location 48 entry count 0, fsck need 0, format new) has the bad pointer (680) to the block (15847492), which is in tree already / 43 (of 164)/ 79 (of 170)bad_indirect_item: block 3442218: The item (19735 19746 0x4fa5001 IND (1), len 4048, location 48 entry count 0, fsck need 0, format new) has the bad pointer (240) to the block (3442432), which is in tree already - zeroed

bad_indirect_item: block 3442218: The item (19735 19746 0x4fa5001 IND (1), len 4048, location 48 entry count 0, fsck need 0, format new) has the bad pointer (242) to the block (3442434), which is in tree already - zeroed

bad_indirect_item: block 3442218: The item (19735 19746 0x4fa5001 IND (1), len 4048, location 48 entry count 0, fsck need 0, format new) has the bad pointer (262) to the block (3442454), which is in tree already - zeroed

bad_indirect_item: block 3442218: The item (19735 19746 0x4fa5001 IND (1), len 4048, location 48 entry count 0, fsck need 0, format new) has the bad pointer (263) to the block (3442455), which is in tree already - zeroed

bad_indirect_item: block 3442218: The item (19735 19746 0x4fa5001 IND (1), len 4048, location 48 entry count 0, fsck need 0, format new) has the bad pointer (265) to the block (3442457), which is in tree already - zeroed

bad_indirect_item: block 3442218: The item (19735 19746 0x4fa5001 IND (1), len 4048, location 48 entry count 0, fsck need 0, format new) has the bad pointer (266) to the block (3442458), which is in tree already - zeroed

bad_indirect_item: block 3442218: The item (19735 19746 0x4fa5001 IND (1), len 4048, location 48 entry count 0, fsck need 0, format new) has the bad pointer (267) to the block (3442459), which is in tree already - zeroed

bad_indirect_item: block 3442218: The item (19735 19746 0x4fa5001 IND (1), len 4048, location 48 entry count 0, fsck need 0, format new) has the bad pointer (268) to the block (3442460), which is in tree already - zeroed

bad_indirect_item: block 3442218: The item (19735 19746 0x4fa5001 IND (1), len 4048, location 48 entry count 0, fsck need 0, format new) has the bad pointer (269) to the block (3442461), which is in tree already - zeroed

bad_indirect_item: block 3442218: The item (19735 19746 0x4fa5001 IND (1), len 4048, location 48 entry count 0, fsck need 0, format new) has the bad pointer (270) to the block (3442462), which is in tree already - zeroed

bad_indirect_item: block 3442218: The item (19735 19746 0x4fa5001 IND (1), len 4048, location 48 entry count 0, fsck need 0, format new) has the bad pointer (271) to the block (3442463), which is in tree already - zeroed

bad_indirect_item: block 3442218: The item (19735 19746 0x4fa5001 IND (1), len 4048, location 48 entry count 0, fsck need 0, format new) has the bad pointer (272) to the block (3442464), which is in tree already - / 44 (of 164)/  4 (of 170)bad_indirect_item: block 3746318: The item (19735 19749 0x5bd5001 IND (1), len 4048, location 48 entry count 0, fsck need 0, format new) has the bad pointer (340) to the block (3746648), which is in tree already - zeroed

bad_indirect_item: block 3746318: The item (19735 19749 0x5bd5001 IND (1), len 4048, location 48 entry count 0, fsck need 0, format new) has the bad pointer (342) to the block (3746650), which is in tree already - zeroed

bad_indirect_item: block 3746318: The item (19735 19749 0x5bd5001 IND (1), len 4048, location 48 entry count 0, fsck need 0, format new) has the bad pointer (343) to the block (3746651), which is in tree already - zeroed

bad_indirect_item: block 3746318: The item (19735 19749 0x5bd5001 IND (1), len 4048, location 48 entry count 0, fsck need 0, format new) has the bad pointer (344) to the block (3746652), which is in tree already - zeroed

bad_indirect_item: block 3746318: The item (19735 19749 0x5bd5001 IND (1), len 4048, location 48 entry count 0, fsck need 0, format new) has the bad pointer (345) to the block (3746653), which is in tree already - zeroed

bad_indirect_item: block 3746318: The item (19735 19749 0x5bd5001 IND (1), len 4048, location 48 entry count 0, fsck need 0, format new) has the bad pointer (346) to the block (3746654), which is in tree already - zeroed

bad_indirect_item: block 3746318: The item (19735 19749 0x5bd5001 IND (1), len 4048, location 48 entry count 0, fsck need 0, format new) has the bad pointer (347) to the block (3746655), which is in tree already - zeroed

bad_indirect_item: block 3746318: The item (19735 19749 0x5bd5001 IND (1), len 4048, location 48 entry count 0, fsck need 0, format new) has the bad pointer (349) to the block (3746657), which is in tree already - zeroed

bad_indirect_item: block 3746318: The item (19735 19749 0x5bd5001 IND (1), len 4048, location 48 entry count 0, fsck need 0, format new) has the bad pointer (350) to the block (3746658), which is in tree already - zeroed

bad_indirect_item: block 3746318: The item (19735 19749 0x5bd5001 IND (1), len 4048, location 48 entry count 0, fsck need 0, format new) has the bad pointer (351) to the block (3746659), which is in tree already - zeroed

bad_indirect_item: block 3746318: The item (19735 19749 0x5bd5001 IND (1), len 4048, location 48 entry count 0, fsck need 0, format new) has the bad pointer (352) to the block (3746660), which is in tree already - zeroed

bad_indirect_item: block 3746318: The item (19735 19749 0x5bd5001 IND (1), len 4048, location 48 entry count 0, fsck need 0, format new) has the bad pointer (353) to the block (3746661), which is in tree already - zeroed

bad_indirect_item: block 3746318: The item (19735 19749 0x5bd5001 IND (1), len 4048, location 48 entry count 0, fsck need 0, format new) has the bad pointer (354) to the block (3746662), which is in tree already - zeroed

bad_indirect_item: block 3746318: The item (19735 19749 0x5bd5001 IND (1), len 4048, location 48 entry count 0, fsck need 0, format new) has the bad pointer (355) to the block (3746663), which is in tree already - zeroed

bad_indirect_item: block 3746318: The item (19735 19749 0x5bd5001 IND (1), len 4048, location 48 entry count 0, fsck need 0, format new) has the bad pointer (357) to the block (3746665), which is in tree already - zeroed

bad_indirect_item: block 3746318: The item (19735 19749 0x5bd5001 IND (1), len 4048, location 48 entry count 0, fsck need 0, format new) has the bad pointer (358) to the block (3746666), which is in tree already - zeroed

bad_indirect_item: block 3746318: The item (19735 19749 0x5bd5001 IND (1), len 4048, location 48 entry count 0, fsck need 0, format new) has the bad pointer (359) to the block (3746667), which is in tree already - zeroed

bad_indirect_item: block 3746318: The item (19735 19749 0x5bd5001 IND (1), len 4048, location 48 entry count 0, fsck need 0, format new) has the bad pointer (360) to the block (3746668), which is in tree already - zeroed

bad_indirect_item: block 3746318: The item (19735 19749 0x5bd5001 IND (1), len 4048, location 48 entry count 0, fsck need 0, format new) has the bad pointer (361) to the block (3746669), which is in tree already - zeroed

bad_indirect_item: block 3746318: The item (19735 19749 0x5bd5001 IND (1), len 4048, location 48 entry count 0, fsck need 0, format new) has the bad pointer (362) to the block (3746670), which is in tree already - zeroed

bad_indirect_item: block 3746318: The item (19735 19749 0x5bd5001 IND (1), len 4048, location 48 entry count 0, fsck need 0, format new) has the bad pointer (363) to the block (3746671), which is in trfinished

Comparing bitmaps..finished

Checking Semantic tree:

/ftp/Videos/Death to Smoochie.avivpf-10680: The file [5 30267] has the wrong block count in the StatData (1426824) - corrected to (1426760/Anime/Hanaukyo Maid T/ftp/Videos/Anime/Trigun/Trigun - 10.avivpf-10680: The file [19735 19746] has the wrong block count in the StatData (215024) - corrected to (214/Trigun - 13.avivpf-10680: The file [19735 19749] has the wrong block count in the StatData (295320) - corrected to (295152)                             /Ranma ?/Ranma ? - S1 - 01.avivpf-10680: The file [19728 19729] has the wrong block count in the StatDafinished                                                                        No corruptions found

There are on the filesystem:

        Leaves 45441

        Internal nodes 295

        Directories 4589

        Other files 83867

        Data block pointers 42739004 (83 of them are zero)

        Safe links 0

###########

reiserfsck finished at Wed Feb  7 08:12:25 2007

###########

```

----------

## net-0

Then I reran reiserfstune

```

reiserfstune -B badblocks.hda4 /dev/sda1

reiserfstune: 46 blocks were marked as bad.

```

And I am going to retry

reiserfsck -y --rebuild-tree /dev/sda1

I will let you know at my lunch again, everything seems to be going well... fingers crossed.

And thanks again, you have really been a life saver... losing your data sucks large.

----------

## net-0

Here is the output for the rebuild...

```

 reiserfsck --rebuild-tree /dev/sda1

reiserfsck 3.6.19 (2003 www.namesys.com)

*************************************************************

** Do not  run  the  program  with  --rebuild-tree  unless **

** something is broken and MAKE A BACKUP  before using it. **

** If you have bad sectors on a drive  it is usually a bad **

** idea to continue using it. Then you probably should get **

** a working hard drive, copy the file system from the bad **

** drive  to the good one -- dd_rescue is  a good tool for **

** that -- and only then run this program.                 **

** If you are using the latest reiserfsprogs and  it fails **

** please  email bug reports to reiserfs-list@namesys.com, **

** providing  as  much  information  as  possible --  your **

** hardware,  kernel,  patches,  settings,  all reiserfsck **

** messages  (including version),  the reiserfsck logfile, **

** check  the  syslog file  for  any  related information. **

** If you would like advice on using this program, support **

** is available  for $25 at  www.namesys.com/support.html. **

*************************************************************

Will rebuild the filesystem (/dev/sda1) tree

Will put log info to 'stdout'

Do you want to run this program?[N/Yes] (note need to type Yes if you do):Yes

Replaying journal..

Reiserfs journal '/dev/sda1' in blocks [18..8211]: 0 transactions replayed

###########

reiserfsck --rebuild-tree started at Tue Feb  6 12:57:18 2007

###########

Pass 0:

####### Pass 0 #######

Loading on-disk bitmap .. ok, 42794346 blocks marked used

Skipping 9688 blocks (super block, journal, bitmaps) 42784658 blocks will be read

0%pass0: block 42721, item 3: The file [8713 279333] has the wrong mode (?r--------), corrected to (-r--------)

pass0: block 42721, item 5: Not the directory [8713 308975] has the wrong mode (dr-------x), corrected to (-r-------x)

pass0: block 42721, item 7: The directory [8713 309044] has the wrong mode (?r-------x), corrected to (dr-------x)

verify_directory_item: block 42721, item 8713 309044 0x1 DIR (3), len 80, location 2932 entry count 3, fsck need 0, format old: All entries were deleted from the directory

pass0: block 42721, item 8: The directory [8713 334288] has the wrong mode (pr-------x), corrected to (dr-------x)

verify_directory_item: block 42721, item 8713 334288 0x1 DIR (3), len 152, location 2816 entry count 5, fsck need 0, format old: All entries were deleted from the directory

pass0: block 42721, item 9: The directory [8713 335083] has the wrong mode (?r--------), corrected to (dr--------)

verify_directory_item: block 42721, item 8713 335083 0x1 DIR (3), len 96, location 2828 entry count 3, fsck need 0, format old: All entries were deleted from the directory

pass0: block 42721, item 10: The directory [8713 364274] has the wrong mode (?---------), corrected to (d---------)

verify_directory_item: block 42721, item 8713 364274 0x1 DIR (3), len 80, location 2800 entry count 3, fsck need 0, format old: All entries were deleted from the directory

pass0: block 42721, item 11: The file [8713 366096] has the wrong mode (sr--------), corrected to (-r--------)

pass0: block 42721, item 13: The file [8713 366111] has the wrong mode (?r--------), corrected to (-r--------)

pass0: block 42721, item 15: The directory [8713 368587] has the wrong mode (lr--------), corrected to (dr--------)

verify_directory_item: block 42721, item 8713 368587 0x1 DIR (3), len 216, location 2492 entry count 8, fsck need 0, format old: All entries were deleted from the directory

pass0: block 42721, item 16: The directory [8713 393876] has the wrong mode (?---------), corrected to (d---------)

verify_directory_item: block 42721, item 8713 393876 0x1 DIR (3), len 80, location 2584 entry count 3, fsck need 0, format old: All entries were deleted from the directory

pass0: block 42721, item 17: The directory [8713 396817] has the wrong mode (?r--------), corrected to (dr--------)

verify_directory_item: block 42721, item 8713 396817 0x1 DIR (3), len 152, location 2468 entry count 5, fsck need 0, format old: All entries were deleted from the directory

pass0: block 42721, item 18: The directory [8713 450730] has the wrong mode (cr--------), corrected to (dr--------)

verify_directory_item: block 42721, item 8713 450730 0x1 DIR (3), len 248, location 2328 entry count 8, fsck need 0, format old: All entries were deleted from the directory

pass0: block 42721, item 19: The directory [8713 483346] has the wrong mode (?---------), corrected to (d---------)

verify_directory_item: block 42721, item 8713 483346 0x1 DIR (3), len 216, location 2316 entry count 7, fsck need 0, format old: All entries were deleted from the directory

.block 3580230: The number of items (2) is incorrect, should be (0) - corrected

block 3580230: The free space (32) is incorrect, should be (4072) - corrected

...20%.block 14405225: The number of items (33807) is incorrect, should be (1) - corrected

block 14405225: The free space (219) is incorrect, should be (3792) - corrected

pass0: vpf-10110: block 14405225, item (0): Unknown item type found [243535616 2365587457 0x528b044a ??? (15)] - deleted

...40%.block 24309762: The free space (1) is incorrect, should be (976) - corrected

pass0: vpf-10110: block 24309762, item (0): Unknown item type found [1300627472 610272256 0x4002460 ??? (15)] - deleted

block 24309763: The number of items (5) is incorrect, should be (1) - corrected

block 24309763: The free space (16448) is incorrect, should be (976) - corrected

pass0: vpf-10210: block 24309763, item 0: The item with wrong offset or length found [473972800 1077945440 0x40404040401c40 DRCT (2)], len 3072 - deleted

.block 25866111: The number of items (256) is incorrect, should be (1) - corrected

block 25866111: The free space (256) is incorrect, should be (4033) - corrected

pass0: vpf-10110: block 25866111, item (0): Unknown item type found [268509184 33615888 0xe100000 ??? (15)] - deleted

.block 27685938: The number of items (3633) is incorrect, should be (1) - corrected

block 27685938: The free space (61250) is incorrect, should be (704) - corrected

pass0: vpf-10110: block 27685938, item (0): Unknown item type found [568241922 254954942 0xf20f122 ??? (15)] - deleted

.60%....block 38851244: The number of items (65295) is incorrect, should be (1) - corrected

block 38851244: The free space (240) is incorrect, should be (4048) - corrected

pass0: vpf-10110: block 38851244, item (0): Unknown item type found [268439552 69616 0xf00ff010 ??? (15)] - deleted

block 38904454: The number of items (61454) is incorrect, should be (1) - corrected

block 38904454: The free space (4353) is incorrect, should be (3536) - corrected

80%block 40355976: The number of items (16) is incorrect, should be (1) - corrected

block 40355976: The free space (0) is incorrect, should be (4048) - corrected

pass0: vpf-10110: block 40355976, item (0): Unknown item type found [0 65537 0x10000000 ??? (15)] - deleted

....100%                       left 0, 18284 /sec

88448 directory entries were hashed with "r5" hash.

        "r5" hash is selected

Flushing..finished

        Read blocks (but not data blocks) 42784658

                Leaves among those 45476

                        - corrected leaves 2

                        - leaves all contents of which could not be saved and deleted 26

                pointers in indirect items to wrong area 311 (zeroed)

                Objectids found 88471

Pass 1 (will try to insert 45450 leaves):

####### Pass 1 #######

Looking for allocable blocks .. finished

0%....20%....40%....60%....80%....100%                          left 0, 91 /sec

Flushing..finished

        45450 leaves read

                45413 inserted

                        - pointers in indirect items pointing to metadata 6 (zeroed)

                37 not inserted

        non-unique pointers in indirect items (zeroed) 34

####### Pass 2 #######

Pass 2:

0%....20%....40%....60%....80%...vpf-10260: The file we are inserting the new item (131326 16711696 0x100ff001001 IND (1), len 512, location 3584 entry count 4080, fsck need 0, format new) into has no StatData, insertion was skipped

.100%                          left 0, 24 /sec

Flushing..finished

        Leaves inserted item by item 37

Pass 3 (semantic):

####### Pass 3 #########

/ftp/Games/Installers/Oni/GameDataFolder/level6_Final.rawvpf-10680: The file [45855 99123] has the wrong block count in the StatData (51984) - corrected to (519/server/cstrike/models/props/de_inferno/spireb.dx90.vtxvpf-10680: The file [2299Flushing..finished                                                                      Files found: 83856

        Directories found: 4589

        Symlinks found: 5

Pass 3a (looking for lost dir/files):

####### Pass 3a (lost+found pass) #########

Looking for lost directories:

Looking for lost files:2 /sec

vpf-10670: The file [8713 145231] has the wrong size in the StatData (1513238062518244864) - corrected to (0)

vpf-10690: The object [8713 145231] has the wrong block count in the StatData (419437824) - corrected to (0)

vpf-10680: The file [8713 279333] has the wrong block count in the StatData (318771712) - corrected to (0)

vpf-10670: The file [8713 308975] has the wrong size in the StatData (4900273741277250561) - corrected to (32768)

vpf-10680: The file [8713 308975] has the wrong block count in the StatData (1208043777) - corrected to (0)

vpf-10670: The file [8713 366096] has the wrong size in the StatData (14411739812761487360) - corrected to (24576)

vpf-10680: The file [8713 366096] has the wrong block count in the StatData (3422604544) - corrected to (0)

vpf-10670: The file [8713 366111] has the wrong size in the StatData (13547033290908678912) - corrected to (16384)

vpf-10680: The file [8713 366111] has the wrong block count in the StatData (3254829312) - corrected to (0)

The object [8713 507681] has wrong mode (?--------x) - corrected to -rw-------

vpf-10670: The file [8713 507681] has the wrong size in the StatData (15060549534130229505) - corrected to (0)

vpf-10680: The file [8713 507681] has the wrong block count in the StatData (3573667329) - corrected to (0)

Flushing..finished

        Objects without names 6

        Empty lost dirs removed 18

        Files linked to /lost+found 6

Pass 4 - finished  done 45368, 37 /sec

        Deleted unreachable items 10

Flushing..finished

Syncing..finished

###########

reiserfsck finished at Tue Feb  6 14:05:05 2007

###########

```

Well I'm pretty stoked that most of my files were recovered, kind of sad I lost most of my music though =(

Thanks alot for all the help, I really do appreciate it... its a good feeling to recover a large portion of what took me a while to accumulate.

Now I seen a few suggestions to test the drive for errors... what do you recommend? I would like to run a long test to make sure its not just a hardware problem... maybe there are some recoverable blocks.... just want to test it before I RMA it.

----------

## Sadako

 *net-0 wrote:*   

> Well I'm pretty stoked that most of my files were recovered, kind of sad I lost most of my music though =(
> 
> Thanks alot for all the help, I really do appreciate it... its a good feeling to recover a large portion of what took me a while to accumulate.
> 
> Now I seen a few suggestions to test the drive for errors... what do you recommend? I would like to run a long test to make sure its not just a hardware problem... maybe there are some recoverable blocks.... just want to test it before I RMA it.

 

I glad it mostly worked out for you.

Have you looked at what's in "/lost+found"?

Roughly how much data is missing?

I would hold on to the original filesystem in case there is any chance that more could be recovered, but I don't really have any idea how you would proceed with that.

Anyway, for testing the drive I'd suggest using smartmontools like Rad suggested earlier, just emerge the package and then read the manual.

I'd also suggest backing up up all the files you want to save to another device and then nuking the filesystem on sda1, and proceed to partition and format your new drive as you see fit.

----------

## net-0

Ya seriously I can't thank you enough for laying it all out for me.... 

Hmm I don't understand how the lost and found directory works....

```
'gentoo lost+found # ls -l

total 1048784

p-----S--T 1  452990720  486546432                  0 Jun 25  1986 8713_145231

-r-S-----T 1  218107392  251661824 864705422324403200 Jul 28  1979 8713_279333

-r-------t 1 1174488321 1157711361              32768 Apr 12  2008 8713_308975

-r----S--T 1 3389049088 3372272128              24576 May 11  1942 8713_366096

-r----S--T 1 3187719424 3170942720              16384 Jun 12  1935 8713_366111

-rw------- 1 3540111873 3523334913                  0 Feb 22  1947 8713_507681

```

Thats what it looks like for me. Useful? Useless?

Anyways hella happy I have all my cd images still ^_^

Ya I'm going to buy another drive right now so I can full check that badblock drive.... But I thought I should send you the lost and found directory sense you mentioned it... and I have no idea what to do with it 0_o

----------

## Sadako

The lost and found directory contains files found during fsck, only the paths and names of the files where not recoverable, so they're placed in this directory.

Once I acidentally rm -r'd a directory containing loads of mp3's, but using the --rebuild-tree option I was able to recover everything.

Each subdirectory was dumped into lost+found, but each file and directory within those still had their names.

That's one reason I like reiserfs so much, it comes with a pretty awesome undelete ability (as long as you're willing to risk everything else on the filesystem, i.e. make a backup first).

Anyway, I'd run the "file" command on each of those files, eg;

```
file lost+found/*
```

This should tell you what each of the files are, second one looks interesting.

Anyway, I'm very glad I could help.

I guess you can (finally) mark this one as [SOLVED].

----------

## net-0

Here is what happens when I file that directory...

```

gentoo home # file lost+found/*

lost+found/8713_145231: setgid sticky fifo (named pipe)

lost+found/8713_279333: setuid sticky data

lost+found/8713_308975: sticky data

lost+found/8713_366096: setgid sticky data

lost+found/8713_366111: setgid sticky data

lost+found/8713_507681: empty

```

What does that mean?! So are these files or directories I don't really understand. I'll check it out though I'm sure there are some walkthroughs. 

Thanks again, you have made a pretty niffty little howto for badblock recovery   :Very Happy: 

----------

