![](https://seccdn.libravatar.org/avatar/3b5c52cfe73181ab9556c8de48ac7805.jpg?s=120&d=mm&r=g)
Xavier Callejas wrote:
Hi,
How can I be sure that my hard disk has badblocks? How can I test all the entire disk if it has badblocks?
I'm getting this in my '/var/log/messages':
... ar 20 14:27:18 xavier kernel: sd 0:0:0:0: [sda] Add. Sense: Unrecovered read error - auto reallocate failed Mar 20 14:27:18 xavier kernel: end_request: I/O error, dev sda, sector 171206258 ...
Thanks, I'm very worry about this.
Hi Xavier, I would examine it with smartctl - this is in the smartmontools package. Query the drive SMART attributes with #smartctl -a /dev/sda and look in particular at the reallocated sector and pending sector count. Any non zero value is bad. To run a smart test on the drive use #smartctl -t [short/long] /dev/sda and again view the log where you will see completed tests listed. If you need to clone the drive use ddrescue #ddrescue /dev/sda /dev/new_drive logfile.txt Pete -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org