Troubleshooting a gmirror disk marked broken

Charles Swiger cswiger at
Thu Jun 27 17:06:49 UTC 2013


On Jun 27, 2013, at 9:58 AM, Adam Vande More <amvandemore at> wrote:
> On Thu, Jun 27, 2013 at 10:16 AM, Charles Swiger <cswiger at> wrote:
>> If you haven't rebuilt the mirror already, running a full disk read scan
>> against both drives (ie, via "dd if=/dev/ad4 of=/dev/null bs=1m" or similar)
>> might be prudent.  That will help identify/migrate any sectors which are
>> failing but still recoverable via ECC to the spare sectors.
> I was going to say something like that too but AFAIK sectors aren't remapped on failed reads, has to be written to(dd if=/dev/zero of=/dev/ad4 bs=1m).  If it were me, I make sure I had fully tested complete backups before I broke the mirror and did that.

If the drive reads a sector with ECC-correctable errors, it's supposed to try to re-write that sector in order to fix up the ECC data.  If that write fails, it remaps.

Of course, your suggestion of blanking the entire drive and restoring from the mirror or a backup would be best, or perhaps "better short of replacing the drive".


More information about the freebsd-questions mailing list