On 13-06-24 03:14 AM, Ondrej Zary wrote: .. > Being tired of using hdparm manually, I created a simple hdd_realloc utility > that reads the disk in big blocks (1 MB). When there's a read error, it reads > the failed block sector-by-sector and tries to rewrite the sectors that fail > to read. It work fine for disks with just a couple of pending sectors. Something like that would work very well if it used the hdparm approach (directly to the drive) for the sector-by-sector part. Going through the block layer isn't always going to work, because the kernel likes to do I/O in PAGE_SIZE multiples. And the SCSI stack in Linux has rather atrocious error handling. It lumps multiple requests together, and can fail the entire lot even if only a single sector is bad. Cheers -- Mark Lord Real-Time Remedies Inc. mlord@xxxxxxxxx -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html