zfs/lib/libzutil
Tony Hutter a9520e6e59
zpool: Add slot power control, print power status
Add `zpool` flags to control the slot power to drives.  This assumes
your SAS or NVMe enclosure supports slot power control via sysfs.

The new `--power` flag is added to `zpool offline|online|clear`:

    zpool offline --power <pool> <device>    Turn off device slot power
    zpool online --power <pool> <device>     Turn on device slot power
    zpool clear --power <pool> [device]      Turn on device slot power

If the ZPOOL_AUTO_POWER_ON_SLOT env var is set, then the '--power'
option is automatically implied for `zpool online` and `zpool clear`
and does not need to be passed.

zpool status also gets a --power option to print the slot power status.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Mart Frauenlob <AllKind@fastest.cc>
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes #15662
2023-12-21 10:53:16 -08:00
..
os zpool: Add slot power control, print power status 2023-12-21 10:53:16 -08:00
Makefile.am Use setproctitle to report progress of zfs send 2023-01-17 10:17:35 -08:00
zutil_device_path.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zutil_import.c zpool: Add slot power control, print power status 2023-12-21 10:53:16 -08:00
zutil_import.h nvpair: Constify string functions 2023-03-14 15:25:50 -07:00
zutil_nicenum.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zutil_pool.c zpool: Add slot power control, print power status 2023-12-21 10:53:16 -08:00