This is just a note I found on my computer while doing some clean up, and I thought I’d put it here rather than just delete it.
Basically, it’s just some commands + links I found while desperately trying to eliminate a bad block on a hard drive by forcing it to be reassigned. As far as I remember, this didn’t work quite well, and I ended up just requesting the disk to be changed (this happened on a rented dedicated server that I had just ordered).
root@81-7-14-247:~# sg_verify --lba=1909768496 /dev/sda
root@81-7-14-247:~# sg_verify --lba=1909768503 /dev/sda
verify (10): Descriptor format, current; Sense key: Medium Error
Additional sense: Unrecovered read error - auto reallocate failed
Descriptor type: Information
medium or hardware error, reported lba=0x71d4c137
root@81-7-14-247:~# sg_reassign --address=0x71d4c130 -v /dev/sda
reassign blocks cdb: 07 00 00 00 00 00
reassign blocks: Fixed format, current; Sense key: Illegal Request
Additional sense: Invalid command operation code
REASSIGN BLOCKS not supported