When SMART tells you about possibly defective hard disk blocks, you might want to know what volumes are affected so you can perform extra precautions or rewrite the data to the the disk to reallocate the affected blocks.
The excellent
Bad block HOWTO for smartmontools tells you how to do this, but is too easy to get confused by all the different block numbers, sizes and offsets you have to calculate.
Therefore, I have written a small script that performs the calculations and determines the LVM2 volume that contains a given block number:
badblocklocate.py.
Can determine LVM2 logical volume names from block numbers given on the command line, or can call smartctl to automatically determine defective blocks. Please see the comments at the top of the file for usage information.
For now, it works for LVM2 logical volumes only (though classical partitions can be determined through the error message.) If time permits, i might extend it that it also determines which file contains the defective blocks.
Kommentare
Mo, 05.04.2010 11:17
Naja... Irgendwie bin ich n icht überrascht dass Microsoft Research rausbekommt dass IT- Sicherheit eigentlich to [...]
Mo, 29.03.2010 22:47
Eigentlich nicht. Ausser dass die ganzen me-too-Trackbacks inzwischen auf Twitter stattfi nden (ausser hier). Da [...]
Mo, 29.03.2010 09:06
hat sich deine meinung zu trac kbacks geändert in letzter zei t?
Mi, 21.01.2009 22:33
Aber es hätte auch sein Gutes: Eine Plattform weniger für e klige Linkspammer.
Mi, 21.01.2009 15:39
Ja manchmal hat man im Leben e infach so viele Sachen, denen man sich widmen möchte oder au ch muss, dass da gewisse [...]
Mo, 10.11.2008 14:17
Ich leihe mir ungern eine Fahr rad fahre lieber nur mein eige nes. Hatte mal ein negatives E rlebenis mit einen Leihr [...]
Fr, 25.07.2008 01:50
Schaust Du Wikipedia. «The first version of SQL was devel oped at IBM by Donald D. Chamb erlin and Raymond F. Boy [...]