Bad Block howto - missing: Third Step , ext2/ext3 first example
"David C. Rankin" <[email protected]>
| Newsgroups | gmane.linux.utilities.smartmontools |
|---|---|
| Organization | Rankin Law Firm, PLLC |
| Message-ID | <[email protected]> |
Bruce, Doug, whoever,
The current badblocks howto at
http://smartmontools.sourceforge.net/badblockhowto.html is missing "Third Step:"
in the "ext2/ext3 first example" showing how to calculate the block address in
/dev/hda3. The offset is shown correctly, and the "Note:" regarding the
fractional part of calculation is there, but the "Third Step" title and how to
calculate it is gone... It should show:
Second Step: we need to find the block size of the file system (normally 4096
bytes for ext2):
root]# tune2fs -l /dev/hda3 | grep Block
Block count: 29119820
Block size: 4096
<missing>
Third Step - we need to calculate the block address within /dev/hda3. The
general form of the formula is:
(LBA Address - partition start) * sector size / Block Size
In this example:
(23421417 - 5269320) * 512 / 4096 = 2269012.125
</missing>
Note: the fractional part of 0.125 indicates that this problem LBA is actually
the second of the eight sectors that make up this file system block.
Fourth Step: we use debugfs to locate the inode stored in this block, and the
file that contains that inode:
Thanks for a good howto.
--
David C. Rankin, J.D.,P.E.
------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce