(configure) Linux, ...
Clear all

(configure) Linux, how to boot from one disk in RAID1 failure?

1 Posty
1 Users
0 Reactions
2,416 Widok
Topic starter

Linux, how to boot from one disk in RAID1 failure?

1 Answer
Topic starter

in my opinion

  • * You neeed separate ext2 /boot partition – easest way is to add pendrive or third disk with that mount point
  •  /boot partition should be on stable ground, connect hdd to sata-1 input, because if you connect it to sata-3 and remove something from sata-1 or sata-2, the name assigned to sata-3 /dev/sdc will be /dev/sdb, this behavior is ok for disks in raid-1 (/dev/sdb and /dev/sdc)
  1. create software raid
  2. create exactly same partitions on /dev/sdc1 and /dev/sdd2 (disk one and two)
  3. assign proper mount point to raid partitions (/ for /dev/md0, /var for /dev/md1 etc)
  4. create small partition for /boot on external drive (additional hdd or usb)
  5. assign grub to partition where is /boot
  6. thats is..

ok? but my one disk fail! how to start with one disk in raid-1 on debian?

  1. grub cannot start system, but it still able to load linux kernel (ufff) from external /boot partition
  2. you can run system on one disk using below procedure
    1. stop all md* devices

       mdadm --stop /dev/md*

    2. recreate raid-1
      mdadm --assemble --scan
    3. we need "mkconf" command from /usr folder
      1. ​find partition where is /usr
      2. mount that folder

        mkdir /tmp/help
        mount -t ext4 /dev/md0 /tmp/help

      3. backup current configuration and create new one 
        mv /etc/mdadm/mdadm.conf /etc/mdadm/mdadm.conf.old
        /tmp/help/usr/share/mdadm/mkconf > /etc/mdadm/mdadm.conf
  3. prepare new disk
    1. create exactly same partition size as working hdd 
    2. using this command 
      sfdisk -d /dev/sda > sfdisk /dev/sdb
    3. associate new hdd with raid-1
      mdadm --manage /dev/md0 --add /dev/sdb1
      mdadm --manage /dev/md1 --add /dev/sdb5
      mdadm --manage /dev/md2 --add /dev/sdb6
    4. and so one...
    5. watch rebuilding process

      watch -n 1 cat /proc/mdstat



Author Name

Author Email

Your question *

Preview 0 Revisions Saved