zfs_prepare_disk
—
special script that gets run before bringing a disk into a
pool
zfs_prepare_disk
is an optional script
that gets called by libzfs before bringing a disk into a pool. It can be
modified by the user to run whatever commands are necessary to prepare a
disk for inclusion into the pool. For example, users can add lines to
zfs_prepare_disk
to do things like update the
drive's firmware or check the drive's health.
zfs_prepare_disk
is optional and can be removed if
not needed. libzfs will look for the script at
/usr/local/libexec/zfs/zfs_prepare_disk.
zfs_prepare_disk
runs with a limited
$PATH.
zfs_prepare_disk
should return 0 on
success, non-zero otherwise. If non-zero is returned, the disk will not be
included in the pool.