And do not do write-sector on a disk that is in use in RAID, otherwise that sectors data is gone. I will completely remove a disk/partition and do --write-sectors against it and then do a --add (don't do a re-add). In general though I have not had a lot of luck with the write-sector fixing and/or forcing a reallocate even when the sector is clearly bad. I have to conclude (based on both WD and seagate not reallocating sectors that reliably fail rereads in <30-seconds after just being re-written) that pretty much everyone's disk firmware must suck. Would --make-bad-sector work to force a reallocate? On Mon, Jan 31, 2022 at 9:40 AM Nix <nix@xxxxxxxxxxxxx> wrote: > > On 29 Jan 2022, Wols Lists told this: > > > I believe there is also a way of injecting a hardware error onto a > > drive. Unless you can take a backup of the backup :-) I wouldn't > > recommend it at the moment, but there's some ATA command or whatever > > that tells the drive to flag a sector as bad, and return a read error > > until it's over-written. > > See hdparm --make-bad-sector. The manpage says "EXCEPTIONALLY DANGEROUS. > DO NOT USE THIS OPTION!!". It is not lying. :) > > (This is also --write-sector, which is merely VERY DANGEROUS, but can be > used to force rewrites of bad sectors. Make sure you get the sector > number right! Needless to say, if you don't, it's too late, and there's > no real way to test in advance...)