ZFS v28 on -STABLE not using hot spare

Jeremy Chadwick freebsd at jdc.parodius.com
Tue Jan 3 16:27:22 UTC 2012


On Tue, Jan 03, 2012 at 04:27:29PM +0100, Olivier Smedts wrote:
> 2012/1/3 Johan Hendriks <joh.hendriks at gmail.com>:
> > ZFS on FreeBSD does not have 'HOT' spares.
> > They are cold, and human intervention is needed to replace a disk in a pool.
> > There are some topics about it on the net.
> >
> > I opt for a warning, because a lot of users get a false security sence when
> > using the spares.
> > zpool should not accept the spare without a warning to the user that it is a
> > cold spare and not a hot one.
> >
> > it looks like there is some work planned for a zfs deamon that should
> > overcome this problem on FreeBSD
> >
> > http://svnweb.freebsd.org/base?view=revision&revision=222836
> >
> > On Solaris there is also a deamon running that does the actual replace.
> >
> > It should not be to hard to make a script that checks every minute or what
> > time interval you want and check if a pool is degraded, then check if
> > autoreplace is set for the pool, if so check if there is a spare, if so do
> > the actual replace.
> > Unfortunally i can not code :(
> > Maybe some one has a script lying around. ??
> 
> Or maybe some devd.conf lines to handle this automatically ?

At this time I'd recommend against that -- such a script would have to
parse "zpool status" output *very carefully*.  The output format from
"zpool status" has also changed over time (on both Solaris and FreeBSD),
so this complicates matters further.

autoreplace defaults to off on FreeBSD because the necessary code bits
in the kernel aren't completed.

If folks need spares to be utilised automatically, they should run
Solaris or OpenIndiana/Illumos.

-- 
| Jeremy Chadwick                                jdc at parodius.com |
| Parodius Networking                       http://www.parodius.com/ |
| UNIX Systems Administrator                   Mountain View, CA, US |
| Making life hard for others since 1977.               PGP 4BD6C0CB |



More information about the freebsd-fs mailing list