zfs icon indicating copy to clipboard operation
zfs copied to clipboard

Misleading error message when trying to replace device in zpool, if ashift doesn't match

Open yshui opened this issue 2 years ago • 0 comments

Was #12382, but that issue is old and closed, so I am creating a new one.

Other cases of the same problem: https://forum.proxmox.com/threads/zpool-disk-replacement-already-in-replacing-spare-config-wait-for-completion-or-use-zpool-detach.96554/

The cause seems to be, the detected ashift for the incoming device doesn't match the existing ashift of the vdev. But the reported error is:

cannot replace X with Y: already in replacing/spare config; wait for completion or use 'zpool detach'

When there is no resilver in progress.

in libzfs_pool.c, zpool_vdev_attach; probably a case is missed when ENOTSUP is returned.

yshui avatar Apr 10 '23 05:04 yshui