K 10 svn:author V 5 gibbs K 8 svn:date V 27 2011-08-16T23:47:53.421205Z K 7 svn:log V 2285 Add ZFSD, a ZFS fault management daemon. This daemon has the following features: o When a vdev for an active pool is inserted into the system, it will re-integrate it with the pool. o When an unlabeled or inactive disk is inserted into the same physical location as a missing member of a pool with the "autoreplace" attribute set, the inserted disk will be used to replace the missing disk. o When the cumulative soft-error count for a vdev exceeds 50 errors, the vdev will be marked degraded, alerting users to a potential problem. The error counts are persisted across reboots. The daemon is written to be easily extended for more advanced fault management policies and to handle new features such as spare pool management. cddl/sbin/zfsd/zpool_list.cc: cddl/sbin/zfsd/zpool_list.h: ZpoolList is a standard container allowing filtering and iteration of imported ZFS pool information. cddl/sbin/zfsd/callout.cc: cddl/sbin/zfsd/callout.h: Timer services built on top of the POSIX interval timer API. cddl/sbin/zfsd/vdev.cc: cddl/sbin/zfsd/vdev.h: Wrapper class used to provide easy access to Vdev nvlist data. cddl/sbin/zfsd/zfsd.cc: cddl/sbin/zfsd/zfsd.h: Daemon main, devctl socket handling, and global application state exported through the ZfsDaemon singleton. cddl/sbin/zfsd/case_file.cc: cddl/sbin/zfsd/case_file.h: CaseFile objects aggregate vdev faults that may require ZFSD action in order to maintain the health of a ZFS pool. They also handle serialization/deserialization of fault data to persistent storage. cddl/sbin/zfsd/vdev_iterator.cc: cddl/sbin/zfsd/vdev_iterator.h: Helper class for traversing and finding vdev objects within a pool configuration. cddl/sbin/zfsd/dev_ctl_event.cc: cddl/sbin/zfsd/dev_ctl_event.h: Class hierarchy used to express events received via the devctl API. cddl/sbin/zfsd/zfsd_exception.cc: cddl/sbin/zfsd/zfsd_exception.h: Definition of exceptions explicitly thrown by ZFSD. cddl/sbin/zfsd/Makefile: cddl/sbin/Makefile: Add zfsd to the build. etc/rc.d/zfsd: Rc script for ZFSD. etc/defaults/rc.conf: ZFSD defaults, just like ZFS, to being disabled. etc/mtree/BSD.root.dist: Create the etc/zfs/cases directory used to store persistent fault data. Sponsored by: Spectra Logic Corporation END