mistakes in the doc

Benoit-Pierre DEMAINE <[email protected]>
Newsgroups gmane.linux.utilities.smartmontools
Message-ID <[email protected]>
http://smartmontools.sourceforge.net/badblockhowto.html

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

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:

Obviously missing Third step. And conversion of
first sector from hexa to decimal, and then conversion into FS
block number.

Now everything is back to normal: the sector
has been reallocated. Compare the output just below to similar
output near the top of this article:

There is no similar block at top of article.

***

The page lacks a few things:

- consideration about RAID (note: RAID1 implementation by mdadm
varies with version: raid1 by 0.9 is not at all the same as for 1.2;
1.x versions can be migrated to raid5; I don't know if it's possible
with 0.9 - gotta test it some day); equations on how to transfert a
disk-sector offset into a filesystem sector

- consideration about crypto: which crypto layers keep sectors in
place, and which ones don't

- easily perform manual test at user level using dd if=/dev/urandom
of=/mnt/disk/foo untill the disk is full (take care; the system may
dislike a full disk), then read the file again, to perform write
then read test on whole the free space, without using dangerous
tools like badblocks. I sometimes use dychotomy with this: first
file uses only 99% of free space; then a second file for 99% of
remaining space. Read second small file, then delete it at once;
this reduces the chance of full disk on system critical partitions
(like /tmp or /var). dd can easily perform a raw disk read; but non
destructive write test is more tricky. Doing this test twice is a
good indicator; a disk can be damaged in a way that ECC works fine;
but considering that a double urandom is unlikely to produce twice
the same sequence at the same place, a bad sector will probably be
detected with this method. This lacks write test where files are;
this test is not perfect; it's an easy alternative to check live
disk sanity without destroying the FS.

- considerations about hidden FS.

--
>o_/ DEMAINE Benoît-Pierre (aka DoubleHP) http://benoit.demaine.info/
If computing were an exact science, IT engineers would'nt have work \_o<

"So all that's left, Is the proof that love's not only blind but deaf."
(FAKE TALES OF SAN FRANCISCO, Arctic Monkeys)

------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet

_______________________________________________
Smartmontools-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/smartmontools-support
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.