HomeFreeBSD

Fix double spares for failed vdev

Description

Fix double spares for failed vdev

It's possible for two spares to get attached to a single failed vdev.
This happens when you have a failed disk that is spared, and then you
replace the failed disk with a new disk, but during the resilver
the new disk fails, and ZED kicks in a spare for the failed new
disk. This commit checks for that condition and disallows it.

Reviewed-by: Akash B <akash-b@hpe.com>
Reviewed-by: Ameer Hamza <ahamza@ixsystems.com>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes: #16547
Closes: #17231

Details

Provenance
Tony Hutter <hutter2@llnl.gov>Authored on May 2 2025, 4:03 PM
GitHub <noreply@github.com>Committed on May 2 2025, 4:03 PM
Parents
rG3b188772696e: ZTS: Fix replacement/resilver_restart_001 on FreeBSD
Branches
Unknown
Tags
Unknown