Skip to contentSkip to conversation

Hard errors, trying to recover

DISCUSSION Kristian Koehntopp 6 participants 9 messages Jun 29, 2004 – Jul 1, 2004

lore
Share & tools
lore
#0 lore raw

I have a 160 GB disk that has at least one hard read-error.

I tried reiserfsck'ing that disk, in order to salvage data on that disk by copying it to a safe location one last time. Unfortunately, reiserfsck --rebuild-tree runs into that read-error and stops, lecturing me on disk quality (I knew that!). Now I cannot even mount that disk, because reiserfsck zeroed root block 0 during the rebuild-tree.

I am at the moment dd'ing that disk with conv=noerrors, hoping that I will get an image (which will be truncated by 4 GB, because my scratch disk is somewhat smaller than the source disk). I tried to reiserfsck --rebuild-tree the partial image, but I reiserfsck breaks down, because it is unable to read the last block of the images (it is a partial image).

What can I do to salvage the data on my broken disk?

Kristian

#1 lore raw

Hello,

Quoted 8 lines · Kristian Koehntopp

I have a 160 GB disk that has at least one hard read-error.

I tried reiserfsck'ing that disk, in order to salvage data on that disk by copying it to a safe location one last time. Unfortunately, reiserfsck --rebuild-tree runs into that read-error and stops, lecturing me on disk quality (I knew that!). Now I cannot even mount that disk, because reiserfsck zeroed root block 0 during the rebuild-tree.

Quoted 7 lines

I am at the moment dd'ing that disk with conv=noerrors, hoping that I will get an image (which will be truncated by 4 GB, because my scratch disk is somewhat smaller than the source disk). I tried to reiserfsck --rebuild-tree the partial image, but I reiserfsck breaks down, because it is unable to read the last block of the images (it is a partial image).

What can I do to salvage the data on my broken disk?

we deal with hardware problems only under www.namesys.com/support.html terms.

Signature · 2 lines
Thanks,
Vitaly Fertman
#2 lore raw
Quoted 2 lines · Vitaly Fertman

we deal with hardware problems only under
www.namesys.com/support.html terms.

I have the hardware problem well under control now, thank you.

My mail referred more to two observations I made in that process:

1. Unless reiserfsck --rebuild-tree succeeds and finishes, it does more harm than good, because the disk is unmountable if reiserfsck --rebuild-tree stops halfway.

reiserfsck --rebuild-tree seems to stop when it has discovered something it believes to be a hard read error.

That combination of behaviours is somewhat suboptimal and could be improved, I believe. I'd rather have reiserfsck to present me with a choice to assume the defect block as all zero and continue or stop here and try other things.

2. When I make an image of a disk, and that image is incomplete for whatever reason, I cannot reiserfsck that image because of seeks beyond the end of the medium. Again, I'd rather have the choice of reiserfsck trying to salvage the incomplete medium (assuming all zero data for all missing blocks) or stop with an error.

The combination of 1 and 2 has bitten me badly in trying to salvage a failing 160GB disk, because I tried reiserfsck --rebuild-tree before making an image.

It may also be a good idea in some cases to have a version of reiserfsck that fsck's the disk to a new medium, that is, reiserfsck reads as much as it can from the defect disk or a possibly incomplete image of such a disk, and tries to construct a useable image on a new replacement partition.

I was able to force a reiserfsck to finish using a combination of writes to the defect blocks in order to force reallocation and thermal stimulation of the dying disk (don't ask, you do not want to know :). The filesystem was mountable r/o after that. The final copy is still in progress, but 132 of 135 GB have already been saved.

Kristian

#3 lore raw
Quoted 7 lines · Kristian Köhntopp

2. When I make an image of a disk, and that image is incomplete for whatever reason, I cannot reiserfsck that image because of seeks beyond the end of the medium. Again, I'd rather have the choice of reiserfsck trying to salvage the incomplete medium (assuming all zero data for all missing blocks) or stop with an error.

That's why you should NOT use dd. dd is crap for data recovery. Use dd_rescue instead. It will give you the options of writing zeroes instead of aborting the copy, reading the disk backwards etc. And reiserfsck should work perfectly with an image made by dd_rescue.

Carl-Daniel

Signature · 1 line
http://www.hailfinger.org/
#4 lore raw
In reply to Kristian Köhntopp
Quoted 11 lines · Kristian Köhntopp
Quoted 2 lines · Vitaly Fertman

we deal with hardware problems only under
www.namesys.com/support.html terms.

I have the hardware problem well under control now, thank you.

My mail referred more to two observations I made in that process:

1. Unless reiserfsck --rebuild-tree succeeds and finishes, it does more harm than good, because the disk is unmountable if reiserfsck --rebuild-tree stops halfway.

no, this is protection exactly from mounting not repaired filesystems as this may lead to futher severe fs corruptions.

Quoted 7 lines

reiserfsck --rebuild-tree seems to stop when it has discovered something it believes to be a hard read error.

That combination of behaviours is somewhat suboptimal and could be improved, I believe. I'd rather have reiserfsck to present me with a choice to assume the defect block as all zero and continue or stop here and try other things.

there could be different hardware problems and sometimes you should fix them before proceeding. bad blocks is one of these problems that reiserfsck is able to deal with (www.namesys.com/bad-block-handling.html).

Quoted 6 lines

2. When I make an image of a disk, and that image is incomplete for whatever reason, I cannot reiserfsck that image because of seeks beyond the end of the medium. Again, I'd rather have the choice of reiserfsck trying to salvage the incomplete medium (assuming all zero data for all missing blocks) or stop with an error.

you probably used some old reiserfsprogs.

Quoted 19 lines

The combination of 1 and 2 has bitten me badly in trying to salvage a failing 160GB disk, because I tried reiserfsck --rebuild-tree before making an image.

It may also be a good idea in some cases to have a version of reiserfsck that fsck's the disk to a new medium, that is, reiserfsck reads as much as it can from the defect disk or a possibly incomplete image of such a disk, and tries to construct a useable image on a new replacement partition.

I was able to force a reiserfsck to finish using a combination of writes to the defect blocks in order to force reallocation and thermal stimulation of the dying disk (don't ask, you do not want to know :). The filesystem was mountable r/o after that. The final copy is still in progress, but 132 of 135 GB have already been saved.

Kristian

Signature · 2 lines
Thanks,
Vitaly Fertman
#5 lore raw
Quoted 1 line · Vitaly Fertman

you probably used some old reiserfsprogs.

Suse Linux 9.0 with all patches, reiserfsck identifies itself as

white:~ # reiserfsck -V
reiserfsck 3.6.9 (2003 www.namesys.com)

Kristian

Signature · 1 line
Jetzt auch: Kristian =?iso-8859-15?q?K=F6hntopp?= <[email protected]>
#6 lore raw
Quoted 7 lines · Kristian Köhntopp
Quoted 1 line · Vitaly Fertman

you probably used some old reiserfsprogs.

Suse Linux 9.0 with all patches, reiserfsck identifies itself as

white:~ # reiserfsck -V
reiserfsck 3.6.9 (2003 www.namesys.com)

which is also very old, as 2.6.17 exists

Quoted 3 lines

Kristian

Signature · 1 line
Redeeman <[email protected]>
#7 lore raw
Quoted 4 lines · Redeeman
Quoted 2 lines

white:~ # reiserfsck -V
reiserfsck 3.6.9 (2003 www.namesys.com)

which is also very old, as 2.6.17 exists

That's even older ;)

The latest version is 3.6.17.

Ray

#8 lore raw

Am Donnerstag, 1. Juli 2004 08:23 schrieb Raymond A. Meijer:

Quoted 9 lines · Redeeman
Quoted 4 lines
Quoted 2 lines

white:~ # reiserfsck -V
reiserfsck 3.6.9 (2003 www.namesys.com)

which is also very old, as 2.6.17 exists

That's even older ;)

The latest version is 3.6.17.

Yes, but "SuSE" do not increase the last level even if they have "all" fixes in...

Chris have a patched reiserfs-3.6.13-2 in his home for SuSE 9.0.

Greetings,
Dieter