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
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 [...]
Fr, 18.07.2008 23:28
Mein real-Markt ist im Stuttga rter Raum. Die Gemüsewaagen sind mit Kamera, nicht die Ein kaufswägen.
Fr, 18.07.2008 07:58
Also der Beitrag wurde ja scho n im April geschrieben und ich war bisher schon mehrere Male im Real einkaufen, auch [...]
Mo, 14.07.2008 12:06
Sowas finde ich ne sehr umwelt freundliche Lösung. Das sollte publiker gemacht werden.