HomeFreeBSD

zpool: Add slot power control, print power status

Description

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

Details

Provenance
Tony Hutter <hutter2@llnl.gov>Authored on Dec 21 2023, 6:53 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Feb 13 2024, 10:22 PM
Parents
rG6b33ae072cd2: zed: fix typo in variable ZED_POWER_OFF_ENCLO*US*RE_SLOT_ON_FAULT
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG0bc841fb5957: zpool: Add slot power control, print power status (authored by Tony Hutter <hutter2@llnl.gov>).Feb 13 2024, 10:22 PM