to gmirror or to ZFS

Frank Leonhardt frank2 at
Sat Jul 20 17:14:16 UTC 2013

On 16/07/2013 20:48, Charles Swiger wrote:
> Hi--
> On Jul 16, 2013, at 11:27 AM, Johan Hendriks <joh.hendriks at> wrote:
>>> Well, "don't do that".  :-)
>> When the server reboots because of a powerfailure at night, then it boots.
>> Then it starts to rebuild the mirror on its own, and later the fsck kicks in.
>> Not much i can do about it.
>> Maybe i should have done it without the automatic attachment for a new device.
> It's normally the case that getting a hot spare automatically attached should be
> fine, but not if you also have the box go down entirely and need to fsck.
> I'm more used to needing to explicitly physically swap out a failed mirror component,
> in which case one can make sure the system is OK before the replacement drive goes in.
Agreed. Blaming gmirror for this kind of thing overlooks the overall 
design and operating procedures of the system, and assuming ZFS would 
have been any better may be wishful thinking. I've had plenty of gmirror 
crashes over the years, and they have all been recoverable. One thing I 
never allow it to do is to rebuild automatically. That's something for a 
human to initiate once the problem has been identified, and if it's 
flaky power in the data centre the job is postponed until I'm satisfied 
it's not going to drop during the rebuild. IME, one power failure is 
normally followed by several more.

It's worth noting, as a warning for anyone who hasn't been there, that 
the number of times a second drive in a RAID system fails during a 
rebuild is higher than would be expected. During a rebuild the remaining 
drives get thrashed, hot, and if they're on the edge, that's when 
they're going to go. And at the most inconvenient time. Okay - obvious 
when you think about it, but this tends to be too late.

Regards, Frank.

More information about the freebsd-questions mailing list