Comments on How To Set Up Software RAID1 On A Running System (Incl. GRUB2 Configuration) (Debian Squeeze)
How To Set Up Software RAID1 On A Running System (Incl. GRUB2 Configuration) (Debian Squeeze) This guide explains how to set up software RAID1 on an already running Debian Squeeze system. The GRUB2 bootloader will be configured in such a way that the system will still be able to boot if one of the hard drives fails (no matter which one).
10 Comment(s)
Comments
Why would you modprobe multipath? I think that is only used for fiber cards. It shouldnt have anything to do with mdadm.
sgdisk --replicate=/dev/sdb /dev/sda
sgdisk --randomize-guids --move-second-header /dev/sdb
insmod mdraid
to insmod mdraid1x
(at least for a RAID1 or 10 configuration), as the old-named module does no longer exist. Furthermore, if you don't have a separated /boot/partition you need to fix the path to the kernel and ramdisk (probably "/boot/vmlinuz-2.6…" and "/boot/initrd.img-2.6…"
How can I do this on Debian 7? Now I've killed 6 VMs with this Turorial :D
Thanks for this tutorial. I had a much simpler task of just putting /home in raid 1. I followed this minus the grub stuff since I was not including a bootable partition in the array and it was very helpful.
This line is rights restricted on my running system:
vi /etc/mtab
I can open and edit the file but not save it. From what I understand, mtab is symlink of /proc/self/mounts. What are the steps required to save the changes on a live system?
> Now I've killed 6 VMs with this Turorial
No wonder, really.
Tutorial is not only extremely badly written, even worse: it suggests making destructive changes to the system boot process.
All you need to migrate living system to the RAID is:
1. Add enough disks.
2. Create raid partitions on these newly added disks.
3. Assemble arrays with "missing" parts.
4. Format the arrays into chosen FS.
5. Copy (cp --preserve=all) everything to the respective arrays.
6. Install grub to raid. (grub-install --recheck --no-floppy /dev/md0)
Some operations may require to boot from LiveCD.
What to scatter through four pages? I don't see.
Based in your config and your failure scenario, is it possible to replace sda without put /dev/sdb in /dev/sda's place and connect the new HDD as /dev/sdb!)?.
For example, keeping your config (a closer to real life scenario): sda fails, you must reboot the system (for any reason) but you are not able to change sdb to sda connection and get a new replacement disk so you need to reboot with a faulty sda and a working sdb in a degradated md0. What's the best way to handle your grub config, considering it's pointing to sda (md/0 or hd0,1)
For Debian 8 I had to run dpkg-reconfigure mdadm to get RAID support into initrd.
Great tutorial. I got RAID working in a couple of days. What held me up was the outdated modulees. I loaded mdraid1x instead of raid and mdraid and it all just worked!
I was able to use this to move Debian 10.4 to RAID1, with the following amendments:in grub menuentry had replace insmod raid insmod mdraidwith insmod mdraid1xand /etc/mtab were not save-able, but w/o editing it the guide still seem to workas for /boot/vmlinuzyou possibly did cp -dpRx /boot /mnt/md2which created /boot subfolder inside /bootcd /boot followed by cp -dpRx . /mnt/md2 is in the guide for that reason