Notifications
Clear all
BugOverflow
1
Posty
1
Users
0
Reactions
2,540
Widok
0
12/08/2015 3:46 pm
Topic starter
Linux, how to boot from one disk in RAID1 failure?
1 Answer
0
12/08/2015 3:53 pm
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)
- create software raid
- create exactly same partitions on /dev/sdc1 and /dev/sdd2 (disk one and two)
- assign proper mount point to raid partitions (/ for /dev/md0, /var for /dev/md1 etc)
- create small partition for /boot on external drive (additional hdd or usb)
- assign grub to partition where is /boot
- thats is..
ok? but my one disk fail! how to start with one disk in raid-1 on debian?
- grub cannot start system, but it still able to load linux kernel (ufff) from external /boot partition
- you can run system on one disk using below procedure
- stop all md* devices
mdadm --stop /dev/md*
recreate raid-1
mdadm --assemble --scan
we need "mkconf" command from /usr folder
find partition where is /usr
mount that folder
mkdir /tmp/help
mount -t ext4 /dev/md0 /tmp/help
- 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
- stop all md* devices
- prepare new disk
- create exactly same partition size as working hdd
- using this command
sfdisk -d /dev/sda > sfdisk /dev/sdb
- 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
- and so one...
- watch rebuilding process
watch -n 1 cat /proc/mdstat