aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornssrikanth <75025422+nssrikanth@users.noreply.github.com>2021-01-29 01:00:26 +0000
committerGitHub <noreply@github.com>2021-01-29 01:00:26 +0000
commitcf0a6dd3ede987212cad7f7c0afed64e54bd9975 (patch)
tree5621f80a6c71736ce4f836095a2bca55d01ec4d6
parent2993698eb3dfc0b462d216b2ea8bbe7bdb06f841 (diff)
downloadsrc-cf0a6dd3ede987212cad7f7c0afed64e54bd9975.tar.gz
src-cf0a6dd3ede987212cad7f7c0afed64e54bd9975.zip
Added extra check to replace Faulted VDEV with Distributed Spare
In ZED zfs_retire agent added a check to handle Distributed Spare replacement for Faulted VDEV also. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Co-authored-by: Vipin Kumar Verma <vipin.verma@hpe.com> Signed-off-by: Mark Maybee <mark.maybee@hpe.com> Closes #11354 Closes #11355
-rw-r--r--cmd/zed/agents/zfs_retire.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/zed/agents/zfs_retire.c b/cmd/zed/agents/zfs_retire.c
index 89bb84e489b6..1c4cc885b5e5 100644
--- a/cmd/zed/agents/zfs_retire.c
+++ b/cmd/zed/agents/zfs_retire.c
@@ -334,7 +334,7 @@ zfs_retire_recv(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl,
*/
if (strcmp(class, "resource.fs.zfs.removed") == 0 ||
(strcmp(class, "resource.fs.zfs.statechange") == 0 &&
- state == VDEV_STATE_REMOVED)) {
+ (state == VDEV_STATE_REMOVED || state == VDEV_STATE_FAULTED))) {
char *devtype;
char *devname;