Skip to contentSkip to conversation

Identifying files with badblocks

DISCUSSION Felix E. Klee 2 participants 2 messages Jun 8, 2003 – Jun 9, 2003

lore
Share & tools
lore
#0 lore raw

Hi,

I am using a ReiserFS 3.6 formatted IBM-DJSA-220-ATA-harddisk with SuSE LINUX 8.2. Today, by using
badblocks -s /dev/hda under LINUX
and IBM/Hitachi's
Drive Fitness under DOS,
I found that the drive contains a continuous section of bad blocks. The Drive Fitness Utility has an option to repair the corresponding sector but this will destroy all data in it. This is OK, but I need to know what data is destroyed so that I can recreate it later. So, now my question:

How do I find out which files correspond to certain bad blocks on my Reiser file system?

Felix

Signature · 2 lines
To contact me in private don't reply but send mail to
    felix DOT klee AT inka DOT de
#1 lore raw

Hello!

Quoted 11 lines · Felix E. Klee

I am using a ReiserFS 3.6 formatted IBM-DJSA-220-ATA-harddisk with SuSE LINUX 8.2. Today, by using
badblocks -s /dev/hda under LINUX
and IBM/Hitachi's
Drive Fitness under DOS,
I found that the drive contains a continuous section of bad blocks. The Drive Fitness Utility has an option to repair the corresponding sector but this will destroy all data in it. This is OK, but I need to know what data is destroyed so that I can recreate it later. So, now my question:
How do I find out which files correspond to certain bad blocks on my Reiser file system?

Well, you can do
debugreiserfs -d /dev/your_device >somefile.
then lookup the blocknumber there as text string.
This will give you file's key.
Then lookup the direntry by this key.

Bye,
Oleg