This is the procedure on how to replace broken disk from zfs raid array. In this case we simulate to replace zfs raid-1.
- Check zfs pool status1#zfs status -v
- Get the disk information and replaced it (Let’s say that the failed disk is /dev/sdb)
- Clone the disk partition table from the health disk to replacement
#1sgdisk -R /dev/sdb /dev/sda [newdisk - existing disk]
- Regenerate the partition UID
#1sgdisk -G /dev/sdb
- Replacing the disk 1#zpool replace rpool /dev/sdb2 /dev/sdb2
- Monitoring resilvering process, the 1#zpool status -v
- For the disk where boot partition resided, make sure to update the grub configuration to mark the replaced disk as bootable1#dpkg-reconfigure grup-pc
#Make sure to check the new disk.