Is it intentional that ZFS does not read from a hot spare under a mirror,
even after the resilver has completed?
We have observed this behavior and I spent some time digging into it. Here
is an example of the zpool status once the resilver has completed:
NAME STATE READ WRITE CKSUM
jjpool DEGRADED 0 0 0
mirror-0 DEGRADED 0 0 0
c1t2d0 ONLINE 0 0 0
spare-1 FAULTED 0 0 0
c1t3d0 FAULTED 0 0 0 too many errors
c1t4d0 ONLINE 0 0 0
spares
c1t4d0 INUSE currently in use
Because the "spare-1" vdev stays in the "faulted" state, vdev_readable()
always returns false for that vdev and all of the read workload is going to
the other side of the mirror.
I've tried to determine if this is a regression, intentional, or just an
oversight, but I am not sure.
If this is an oversight, I have a small change which will change the
"spare" vdev state to "degraded" once the hot-spare resilver has completed.
This allows reads to go to the healthy hot-spare under the "spare-1" vdev.
If that seems reasonable, I could get the patch ready for review.
Thanks,
Jerry
------------------------------------------
openzfs: openzfs-developer
Permalink:
https://openzfs.topicbox.com/groups/developer/Tc7b699f05a31ea88-M564540115158e19ab38db035
Delivery options: https://openzfs.topicbox.com/groups