to reproduce: root# mkdir -p /var/tmp/ztest root# cd !$ cd /var/tmp/ztest root# truncate -s 10g zfsbase root# mdconfig -f zfsbase md1 root# truncate -s 1g zl2arc root# mdconfig -f zl2arc md2 root# zpool create ztest /dev/md1 root# zpool status ztest pool: ztest state: ONLINE scan: none requested config: NAME STATE READ WRITE CKSUM ztest ONLINE 0 0 0 md1 ONLINE 0 0 0 errors: No known data errors root# zpool add -n ztest cache /dev/md2 would update 'ztest' to the following configuration: ztest md1 root# zpool destroy ztest root# mdconfig -u 2 -d root# mdconfig -u 1 -d root# rm zfsbase zl2arc
This was fixed upstream in https://github.com/openzfs/zfs/commit/c24fa4b19a1b117945f3235e014f926fe93b0c5a So it is fixed in 13.0 and later.