ZFS and autoreplace.

Johan Hendriks joh.hendriks at gmail.com
Sat Dec 3 09:53:53 UTC 2011


Hello all.

I  noticed that the autoreplace function is not working in FreeBSD.

So after some search on the net i believe this has not been implemented.
Should ZFS not warn users that put a a spare in the pool that this is 
NOT a hot spare, and human intervention is needed to put the spare in place.
I think that a lot of users could get false sence of secutity.

In case of the auto replace, i think the pool must not insert the spare 
when an administrator sets a drive offline!
Only when a drive fails, and goes to UNAVAIL or REMOVED state.

For me, and i think others having hot spares is almost an normal thing 
to have, especially with an advanced system as ZFS.

Also does anyone have a script that can do this.
My scripting capabilities are as close to non existing..

Secondly devd.

Are the entries in /etc/devd.conf accurate?
if i see enries in /var/run/devd.pipe, the all look like.
!system=ZFS subsystem=ZFS type=misc.fs.zfs.config_sync.

the entry's in devd.conf do not contain the subsystem entry.
notify 10 {
     match "system"      "ZFS";
     match "type"        "data";
     action "logger -p kern.warn 'ZFS: zpool I/O failure, zpool=$pool 
error=$zio_err'";
};

should they not contain the following line also?
match "subsystem"  "ZFS"

if i convert the above example to detect a state change , no entry in 
the log.
notify 10 {
     match "system"      "ZFS";
     match "type"        "resource.fs.zfs.statechange";
     action "logger -p kern.warn 'ZFS: State has chaged on , zpool=$pool'";
};

if i add the line match "subsystem" "ZFS" then i get the warning in my 
/var/log/messages.
notify 10 {
     match "system"      "ZFS";
     match "subsytem"  "ZFS";
     match "type"        "resource.fs.zfs.statechange";
     action "logger -p kern.warn 'ZFS: State has chaged on , zpool=$pool'";
};

And which match type is there for a removed or unavailable drive?


Thanks for your patience
regards
Johan Hendriks






More information about the freebsd-fs mailing list