diff options
author | Tim Chase <[email protected]> | 2018-05-03 18:23:15 -0500 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2018-05-08 21:39:50 -0700 |
commit | a0ad7ca54e7803b31458c78bc755d41d22a6ee78 (patch) | |
tree | e64145fb8585242f3c7ba97c25067677604fa8b2 | |
parent | 6cb8e5306d9696d155ae7a808f56c4e46d69b64c (diff) |
Clear vdev_faulted
Clear vdev_faulted if ZPOOL_CONFIG_AUX_STATE is not set to "external"
ZoL supports "zpool export -f" (force fault), which can be combined
with "-t" (temporary fault; don't persist across export/import) and
causes a MOS configuration to be set with ZPOOL_CONFIG_FAULTED=1
and without ZFS_CONFIG_AUX_STATE set at all. In this case, the
previously-offlined vdev should be imported in an on-line state and.
Clearing the "vdev_faulted" flag causes the import to treat the
device as on-line. Typically, resilver will catch it up based on
its DTL.
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Tim Chase <[email protected]>
Closes #7459
-rw-r--r-- | module/zfs/vdev.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/module/zfs/vdev.c b/module/zfs/vdev.c index ad53c0c89..2a28b1c9d 100644 --- a/module/zfs/vdev.c +++ b/module/zfs/vdev.c @@ -754,6 +754,8 @@ vdev_alloc(spa_t *spa, vdev_t **vdp, nvlist_t *nv, vdev_t *parent, uint_t id, ZPOOL_CONFIG_AUX_STATE, &aux) == 0 && strcmp(aux, "external") == 0) vd->vdev_label_aux = VDEV_AUX_EXTERNAL; + else + vd->vdev_faulted = 0ULL; } } } |