From cf0a6dd3ede987212cad7f7c0afed64e54bd9975 Mon Sep 17 00:00:00 2001 From: nssrikanth <75025422+nssrikanth@users.noreply.github.com> Date: Fri, 29 Jan 2021 06:30:26 +0530 Subject: [PATCH] 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 Co-authored-by: Vipin Kumar Verma Signed-off-by: Mark Maybee Closes #11354 Closes #11355 --- cmd/zed/agents/zfs_retire.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/zed/agents/zfs_retire.c b/cmd/zed/agents/zfs_retire.c index 89bb84e489..1c4cc885b5 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;