mirror_zfs/cmd/zpool
Tony Hutter 0bc841fb59 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
2024-02-13 14:22:48 -08:00
..
compatibility.d Add compatibility file sets (ZoL 0.6.1, 0.6.4, OpenZFS 2.1) 2021-04-07 13:24:08 -07:00
os zpool: Add slot power control, print power status 2024-02-13 14:22:48 -08:00
zpool.d zed: misc vdev_enc_sysfs_path fixes 2024-02-13 14:22:48 -08:00
.gitignore Add .gitignore files to exclude build products 2010-01-08 11:35:17 -08:00
Makefile.am Rescan enclosure sysfs path on import 2021-11-02 16:31:05 -07:00
zpool_iter.c zpool: Add slot power control, print power status 2024-02-13 14:22:48 -08:00
zpool_main.c zpool: Add slot power control, print power status 2024-02-13 14:22:48 -08:00
zpool_util.c OpenZFS restructuring - zpool 2019-09-30 12:16:06 -07:00
zpool_util.h zpool: Add slot power control, print power status 2024-02-13 14:22:48 -08:00
zpool_vdev.c zed: misc vdev_enc_sysfs_path fixes 2024-02-13 14:22:48 -08:00