This is the procedure on how to replace broken disk from zfs raid-1 array. In this case we simulate to replace zfs raid-1.

  • Check zfs pool status
    #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
    #
    sgdisk -R /dev/sdb /dev/sda [newdisk - existing disk]
  • Regenerate the partition UID
    #
    sgdisk -G /dev/sdb 
  • Replacing the disk
    #zpool replace rpool /dev/sdb2 /dev/sdb2
  • Monitoring resilvering process, the
    #zpool status -v
  • For the disk where boot partition resided, make sure to update the grub configuration to mark the replacement disk as bootable
    #dpkg-reconfigure grup-pc

    #Make sure to check the new disk.

Thank You

Previous ArticleNext Article

Leave a Reply

Your email address will not be published.