]> git.proxmox.com Git - mirror_zfs.git/commit
zed: detect and offline physically removed devices
authorloli10K <ezomori.nozomu@gmail.com>
Tue, 18 Sep 2018 21:45:52 +0000 (23:45 +0200)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 9 Nov 2018 19:17:24 +0000 (11:17 -0800)
commitd48091de81e5eab2aa32d7a52db4f147bd813523
treeafb0974ccc0d02287e4734d3142a900b6959758c
parent13c59bb76b2f56db9f3ff6597d8a865347158e2c
zed: detect and offline physically removed devices

This commit adds a new test case to the ZFS Test Suite to verify ZED
can detect when a device is physically removed from a running system:
the device will be offlined if a spare is not available in the pool.

We implement this by using the existing libudev functionality and
without relying solely on the FM kernel module capabilities which have
been observed to be unreliable with some kernels.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Don Brady <don.brady@delphix.com>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
Closes #1537
Closes #7926
cmd/zed/agents/zfs_agents.c
cmd/zed/agents/zfs_mod.c
cmd/zed/agents/zfs_retire.c
include/sys/fs/zfs.h
include/sys/vdev_impl.h
module/zfs/vdev.c
module/zfs/vdev_label.c
tests/runfiles/linux.run
tests/zfs-tests/tests/functional/cli_root/zpool_expand/zpool_expand_001_pos.ksh
tests/zfs-tests/tests/functional/fault/Makefile.am
tests/zfs-tests/tests/functional/fault/auto_offline_001_pos.ksh [new file with mode: 0755]