zfs_prepare_disk
will be passed the following environment variables:
| POOL_NAME
|
Name of the pool
|
| VDEV_PATH
|
Path to the disk (like /dev/sda)
|
| VDEV_PREPARE
|
Reason why the disk is being prepared for inclusion
('create', 'add', 'replace', or 'autoreplace').
This can be useful if you only want the script to be run under certain actions.
|
| VDEV_UPATH
|
Path to one of the underlying devices for the
disk.
For multipath this would return one of the /dev/sd* paths to the disk.
If the device is not a device mapper device, then
VDEV_UPATH
just returns the same value as
VDEV_PATH
|
| VDEV_ENC_SYSFS_PATH
|
Path to the disk's enclosure sysfs path, if available
|
Note that some of these variables may have a blank value.
POOL_NAME
is blank at pool creation time, for example.