zfs/cmd
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
..
arc_summary Removed Python 2 and Python 3.5- support 2023-04-13 15:59:45 -07:00
arcstat Removed Python 2 and Python 3.5- support 2023-04-13 15:59:45 -07:00
dbufstat Removed Python 2 and Python 3.5- support 2023-04-13 15:59:45 -07:00
fsck_zfs Turn shellcheck into a normal make target. Fix new files it caught 2021-06-09 13:05:34 -07:00
mount_zfs `mount.zfs -o zfsutil` leverages `zfs_mount_at()` 2022-02-16 17:58:55 -08:00
raidz_test Removed duplicated includes 2021-03-22 12:34:58 -07:00
vdev_id Remove basename(1). Clean up/shorten some coreutils pipelines 2022-02-16 17:58:55 -08:00
zdb Report ashift of L2ARC devices in zdb 2023-12-21 11:16:30 -08:00
zed zed: fix typo in variable ZED_POWER_OFF_ENCLO*US*RE_SLOT_ON_FAULT 2024-02-13 14:22:48 -08:00
zfs Fix "Add colored output to zfs list" 2023-04-13 09:39:53 -07:00
zfs_ids_to_path zfs_ids_to_path: print correct wrong values 2021-04-14 13:19:50 -07:00
zgenhostid zgenhostid: use argument path directly 2021-06-08 14:47:05 -07:00
zhack cppcheck: integrete cppcheck 2021-01-26 16:12:26 -08:00
zinject cppcheck: integrete cppcheck 2021-01-26 16:12:26 -08:00
zpool zpool: Add slot power control, print power status 2024-02-13 14:22:48 -08:00
zpool_influxdb Use fallthrough macro 2021-11-02 09:50:30 -07:00
zstream Fix unreachable code in zstreamdump 2022-12-01 12:39:41 -08:00
ztest zed: mark disks as REMOVED when they are removed 2023-03-27 11:32:09 -07:00
zvol_id Use substantially more robust program exit status logic in zvol_id 2021-09-14 12:23:38 -07:00
zvol_wait zvol_wait logic may terminate prematurely 2022-11-01 12:35:36 -07:00
Makefile.am Turn shellcheck into a normal make target. Fix new files it caught 2021-06-09 13:05:34 -07:00