I have a Debian system installed on zfspool of 4 HDDs (like raid10 - raid0 of two raid1). And was displayed like set of 2 mirrors mirror0 and mirror1 each with 2 HDDs.
One of the disks became Faulted. As there was no more free slots in this server, I detached it by command:
zpool detach poolname diskname
And then unplug it physically, and plug in a new one. Now zpool looks like this:
zpool status rpool
pool: rpool
state: ONLINE
scan: scrub repaired 52K in 0 days 08:33:06 with 0 errors on Sun May 9 08:57:09 2021
config:
NAME STATE READ WRITE CKSUM
rpool ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
ata-TOSHIBA_HDWQ140_104EK2MQFAYG-part3 ONLINE 0 0 0
ata-TOSHIBA_HDWQ140_1042K0ECFAYG-part3 ONLINE 0 0 0
ata-TOSHIBA_HDWQ140_104EK2MLFAYG ONLINE 0 0 0
Looks like it's not a raid10 anymore. And I can not replace faulted disk with new one:
zpool replace rpool 4504484537486819887 /dev/disk/by-id/newdisk_id
cannot replace 4504484537486819887 with /dev/disk/by-id/newdisk_id: no such device in pool
What is the safe way to add a new disk to pool and restore pool configuration?