If a zfs pool contains a replacing vdev (either created manually by "zpool replace" or by zfsd(8) via autoreplace by physical path) and then new spares get added to the pool, zfsd(8) will use one to replace the drive that is already being replaced. That's a waste of resources that just slows down the rebuild. zfsd should be changed not to do that.
A commit references this bug: Author: asomers Date: Mon Jan 29 23:36:06 UTC 2018 New revision: 328570 URL: https://svnweb.freebsd.org/changeset/base/328570 Log: Add a regression test for PR 225547 zfsd(8) shouldn't add a spare to a replacing vdev tests/sys/cddl/zfs/tests/zfsd/Makefile tests/sys/cddl/zfs/tests/zfsd/zfsd_hotspare_008_neg.ksh tests/sys/cddl/zfs/tests/zfsd/zfsd_test.sh Add a test case to check that zfsd shouldn't activate a spare for a child of a replacing vdev. Fixing zfsd itself is still TODO. PR: 225547 Sponsored by: Spectra Logic Corp Changes: projects/zfsd/head/tests/sys/cddl/zfs/tests/zfsd/Makefile projects/zfsd/head/tests/sys/cddl/zfs/tests/zfsd/zfsd_hotspare_008_neg.ksh projects/zfsd/head/tests/sys/cddl/zfs/tests/zfsd/zfsd_test.sh
A commit references this bug: Author: asomers Date: Tue Jan 30 21:25:43 UTC 2018 New revision: 328605 URL: https://svnweb.freebsd.org/changeset/base/328605 Log: zfsd: Don't spare a vdev that's being replaced If a zfs pool contains a replacing vdev (either created manually by "zpool replace" or by zfsd(8) via autoreplace by physical path) and then new spares get added to the pool, zfsd shouldn't use one to replace the drive that is already being replaced. That's a waste of resources that just slows down the rebuild. PR: 225547 MFC after: 3 weeks Sponsored by: Spectra Logic Corp Changes: head/cddl/usr.sbin/zfsd/case_file.cc
A commit references this bug: Author: asomers Date: Tue Jan 30 21:26:31 UTC 2018 New revision: 328606 URL: https://svnweb.freebsd.org/changeset/base/328606 Log: Clear the expected failure for zfsd_hotspare_008_neg PR: 225547 Sponsored by: Spectra Logic Corp Changes: projects/zfsd/head/tests/sys/cddl/zfs/tests/zfsd/zfsd_test.sh
A commit references this bug: Author: asomers Date: Thu Feb 22 02:16:44 UTC 2018 New revision: 329792 URL: https://svnweb.freebsd.org/changeset/base/329792 Log: MFC r328605: zfsd: Don't spare a vdev that's being replaced If a zfs pool contains a replacing vdev (either created manually by "zpool replace" or by zfsd(8) via autoreplace by physical path) and then new spares get added to the pool, zfsd shouldn't use one to replace the drive that is already being replaced. That's a waste of resources that just slows down the rebuild. PR: 225547 Sponsored by: Spectra Logic Corp Changes: _U stable/11/ stable/11/cddl/usr.sbin/zfsd/case_file.cc