RAID1, replace failed disk

  • /dev/sda – ok disk
  • /dev/sdb – failed disk, to be replaced

Remove failed disks from the array

mdadm --manage /dev/md0 --remove /dev/sdb1

Add new disk

Create the exact same partitioning as on /dev/sda.

sfdisk -d /dev/sda | sfdisk /dev/sdb

Add disk to mdx arrays

mdadm --manage /dev/md0 --add /dev/sdb1

Let it sync, then add bootloader to disks

# grub
grub> find /grub/stage1
 (hd0,0)
 (hd1,0)
grub> device (hd0) /dev/sda
grub> root (hd0,0)
grub> setup (hd0)
grub> device (hd0) /dev/sdb
grub> root (hd0,0)
grub> setup (hd0)

Links:

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.