ZFS - hot spares : automatic or not?
hirez at libeljournal.com
Tue Jan 11 16:12:37 UTC 2011
On 11/01/2011 03:38, Dan Langille wrote:
> On 1/4/2011 11:52 AM, John Hawkes-Reed wrote:
>> On 04/01/2011 03:08, Dan Langille wrote:
>>> Hello folks,
>>> I'm trying to discover if ZFS under FreeBSD will automatically pull in a
>>> hot spare if one is required.
>>> This raised the issue back in March 2010, and refers to a PR opened in
>>> May 2009
>>> * http://lists.freebsd.org/pipermail/freebsd-fs/2010-March/007943.html
>>> * http://www.freebsd.org/cgi/query-pr.cgi?pr=134491
>>> In turn, the PR refers to this March 2010 post referring to using devd
>>> to accomplish this task.
>>> Does the above represent the the current state?
>>> I ask because I just ordered two more HDD to use as spares. Whether they
>>> sit on the shelf or in the box is open to discussion.
>> As far as our testing could discover, it's not automatic.
>> I wrote some Ugly Perl that's called by devd when it spots a drive-fail
>> event, which seemed to DTRT when simulating a failure by pulling a drive.
> Without such a script, what is the value in creating hot spares?
We went through that loop in the office.
We're used to the way the Netapps work here, where often one's first
notice of a failed disk is a visit from the courier with a replacement.
(I'm only half joking)
In the end, writing enough perl to swap in the spare disk made much more
sense than paging the relevant admin on disk-fail and expecting them to
be able to type straight at 4AM.
Our thinking is that having a hot spare allows us to do the physical
disk-swap in office hours, rather than (for instance) running in a
degraded state over a long weekend.
If it's of interest, I'll see if I can share the code.
More information about the freebsd-stable