]> git.proxmox.com Git - mirror_zfs.git/commit
zed: unclean disk attachment faults the vdev
authorAmeer Hamza <106930537+ixhamza@users.noreply.github.com>
Tue, 29 Nov 2022 17:24:10 +0000 (22:24 +0500)
committerGitHub <noreply@github.com>
Tue, 29 Nov 2022 17:24:10 +0000 (09:24 -0800)
commite996c502e4f55facaa3b836fcf41f824eb1b6f73
tree1cef1651df48c64107115c8aa17318ec49343544
parent303678350a7253c7bee9d6a3347ee1bcdf9cc177
zed: unclean disk attachment faults the vdev

If the attached disk already contains a vdev GUID, it
means the disk is not clean. In such a scenario, the
physical path would be a match that makes the disk
faulted when trying to online it. So, we would only
want to proceed if either GUID matches with the last
attached disk or the disk is in a clean state.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Ameer Hamza <ahamza@ixsystems.com>
Closes #14181
cmd/zed/agents/zfs_mod.c
module/zfs/vdev.c