zfs remove device from a raid

RedNano asked:

I had a raid5 setup of three disks working up until a couple days ago, when a SATA cable acted up and left the pool on a degraded state.
The disk is there, it’s fine now but the system refuses to use it again.
zpool status shows the degraded raid and the offending device as:

21389740192374901283740 UNAVAIL was /dev/disk/by-id/xxxxxxxxxxxxxxxxx-part1

How can i tell ZFS that THAT is actually the disk it must use again?
I (stupidly) even wiped the whole disk and rebuilt the partitions, so, once the array is fixed, a resilver will be due.

My answer:

Like any other disk replacement, you can simply use zpool replace.

zpool replace tank ata-WHATEVER-part1

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.