]> git.proxmox.com Git - mirror_zfs.git/commit - module/zfs/zfs_ioctl.c
Force fault a vdev with 'zpool offline -f'
authorTony Hutter <hutter2@llnl.gov>
Fri, 19 May 2017 19:30:16 +0000 (12:30 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 19 May 2017 19:30:16 +0000 (12:30 -0700)
commit4a283c7f77eb5065e9f03b122bf8ead4f4a1e2be
tree2a4daf72ae62343aa7f24305a592fc2f31bb2eeb
parenta32df59e187a6187eb96c52b93cf02e8af51f327
Force fault a vdev with 'zpool offline -f'

This patch adds a '-f' option to 'zpool offline' to fault a vdev
instead of bringing it offline.  Unlike the OFFLINE state, the
FAULTED state will trigger the FMA code, allowing for things like
autoreplace and triggering the slot fault LED.  The -f faults
persist across imports, unless they were set with the temporary
(-t) flag.  Both persistent and temporary faults can be cleared
with zpool clear.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes #6094
13 files changed:
cmd/zpool/zpool_main.c
include/libzfs.h
include/sys/fs/zfs.h
lib/libzfs/libzfs_pool.c
man/man8/zpool.8
module/zfs/spa_misc.c
module/zfs/vdev.c
module/zfs/vdev_label.c
module/zfs/zfs_ioctl.c
tests/runfiles/linux.run
tests/zfs-tests/tests/functional/cli_root/zpool_offline/Makefile.am
tests/zfs-tests/tests/functional/cli_root/zpool_offline/zpool_offline_001_pos.ksh
tests/zfs-tests/tests/functional/cli_root/zpool_offline/zpool_offline_003_pos.ksh [new file with mode: 0755]