bad sector in gmirror HDD

Dan Langille dan at langille.org
Fri Aug 19 21:09:10 UTC 2011


System in question: FreeBSD 8.2-STABLE #3: Thu Mar  3 04:52:04 GMT 2011

After a recent power failure, I'm seeing this in my logs:

Aug 19 20:36:34 bast smartd[1575]: Device: /dev/ad2, 2 Currently unreadable (pending) sectors

And gmirror reports:

# gmirror status
      Name    Status  Components
mirror/gm0  DEGRADED  ad0 (100%)
                      ad2

I think the solution is: gmirror rebuild

Comments?



Searching on that error message, I was led to believe that identifying the bad sector and
running dd to read it would cause the HDD to reallocate that bad block.

  http://smartmontools.sourceforge.net/badblockhowto.html

However, since ad2 is one half of a gmirror, I don't think this is the best approach.

Comments?




More information:

smartd, gpart, dh, diskinfo, and fdisk output at http://beta.freebsddiary.org/smart-fixing-bad-sector.php

also:

# gmirror list
Geom name: gm0
State: DEGRADED
Components: 2
Balance: round-robin
Slice: 4096
Flags: NONE
GenID: 0
SyncID: 1
ID: 3362720654
Providers:
1. Name: mirror/gm0
   Mediasize: 40027028992 (37G)
   Sectorsize: 512
   Mode: r6w5e14
Consumers:
1. Name: ad0
   Mediasize: 40027029504 (37G)
   Sectorsize: 512
   Mode: r1w1e1
   State: SYNCHRONIZING
   Priority: 0
   Flags: DIRTY, SYNCHRONIZING
   GenID: 0
   SyncID: 1
   Synchronized: 100%
   ID: 949692477
2. Name: ad2
   Mediasize: 40027029504 (37G)
   Sectorsize: 512
   Mode: r1w1e1
   State: ACTIVE
   Priority: 0
   Flags: DIRTY, BROKEN
   GenID: 0
   SyncID: 1
   ID: 3585934016



-- 
Dan Langille - http://langille.org



More information about the freebsd-stable mailing list