# gmirror DEGRADED 100% - could i replace hdd?



## Thorny (Jan 12, 2012)

Hello,

I have the following gmirror status:

```
# gmirror status
      Name    Status  Components
mirror/gm0  DEGRADED  ad8
                      ad10 (100%)
```

ad10 was a defect HDD, which was removed from gm0 and then replaced. 

While building the RAID with the new ad10, a defect sector was found at ad8. The defect sector could not be copied to ad10  Because of the single defect sector, the RAID is degraded.

Now I want to replace ad8, but I'm afraid to lose my data. Is it secure to remove ad8 from the RAID and replace it? Is there another possibility?

Thanks for your hints,
Thorny


----------



## Sfynx (Jan 12, 2012)

You've hit the big problem with single redundancy: the chance that there are undetected problems on other drives once a drive fails. If you cannot get the copy of the sector from the old defective drive (when it is completely busted) you've lost the sector and have to restore from backup (it should be possible to figure out which files were affected).

This is one of the reasons I'm now only using ZFS for RAID with double redundancy (RAID-Z2) and periodic scrubs, to catch any problems as soon as possible when it can still self-heal itself. In the worst case (data error on two copies on the same locations ) it automatically reports the affected files as well.


----------



## mav@ (Jan 12, 2012)

In many cases write to the defective sector will trigger remap and quite likely disk will live fine for some (may be long) time. It should be enough at least to compete rebuild.

What's about removing ad8, I am not sure gmirror will promote ad10 disk in that case, but you can quite safely remove ad8, destroy and recreate mirror on ad10 and then add new disk for ad8 and rebuild. If anything go wrong, you still have unmodified old ad8 in your table.


----------



## Thorny (Jan 13, 2012)

Hm... okay, next question: how to remove a hdd in a server far away? I have no physical access and the support is very expensive. 

Idea: With *atacontrol detach* this should be possible. Then I could have a look, how gmirror is reacting. If something goes wrong, I could reattach ad8 and detach ad10. What do you think about this?


----------



## mav@ (Jan 13, 2012)

That should be possible.


----------



## Thorny (Jan 20, 2012)

It doesn't work. After detaching ad8 the server crashed. After rebooting it, a gmirror load crashed it again. I was forced to deactivate gmirror and could not recreate it with my current knowledge.

I took this situation to switch to a better server and facing the next problem. -.- Now I have trouble to create partitions and especially a correct bootloader at a 3 TB disc.


----------

