LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How do I set up raid for a multi linux boot pse? (https://www.linuxquestions.org/questions/linux-software-2/how-do-i-set-up-raid-for-a-multi-linux-boot-pse-870905/)

PeggySue 03-25-2011 04:57 AM

How do I set up raid for a multi linux boot pse?
 
I want to build a system using software raid 5. It will have one stable Debian distro, a shared /data area, a boot partition and several raid devices to install and test drive other linux distros. The Debian distro will be in charge of the boot partition.

My problem is that I can't visualize where the data that defines the raid devices is stored.
If I create arrays from partitions on all disks for /boot, swap, /data and / for Debian leaving space for other distros, I think I can build a Debian system on raid. So far so good, but when I install the next distro I will have to omit the boot install and update Debian grub to boot to the new system.

The definition for the new / partition may be md5, for example, but that won't appear in the Debian /dev folder so where is it? and how do I get Debian on raid to see distro2 on another raid device?

I have created a Debian on raid without a boot loader but I can't see it from my Mint9 which is on a separate non raid disk. update-grub in Mint doesn't find Debian on raid!!

tinyTux 03-31-2011 02:57 PM

Quote:

Originally Posted by PeggySue (Post 4302721)
I want to build a system using software raid 5. It will have one stable Debian distro, a shared /data area, a boot partition and several raid devices to install and test drive other linux distros. The Debian distro will be in charge of the boot partition.

My problem is that I can't visualize where the data that defines the raid devices is stored.
If I create arrays from partitions on all disks for /boot, swap, /data and / for Debian leaving space for other distros, I think I can build a Debian system on raid. So far so good, but when I install the next distro I will have to omit the boot install and update Debian grub to boot to the new system.

The definition for the new / partition may be md5, for example, but that won't appear in the Debian /dev folder so where is it? and how do I get Debian on raid to see distro2 on another raid device?

I have created a Debian on raid without a boot loader but I can't see it from my Mint9 which is on a separate non raid disk. update-grub in Mint doesn't find Debian on raid!!

Please forgive me if I am wasting your zero-reply status, but I think you approach is somewhat convoluted for what you want to accomplish. In the past I had a RAID 1 / LVM configuration that could dual boot Debian and Gentoo, and I could add any other distros I wanted fairly easily.

The overall configuration looks like so
Code:

MBR  | Hard Disk 1 : Hard Disk 2 : Hard Disk 3 : Hard Disk 4... |
grub | Raid Device 1          | Raid Device 2                  |
    | ext3/xfs boot partition | LVM volume group              |
                              | Debian LV, Ubuntu LV, etc.    |

You can create this partitioning/layering scheme fairly easily with a Debian Net-Install disk.

With this configuration, when you want to install new OS, just create new Logical Volume, and then install OS to it. Do not re-install grub each time, but instead just mount boot partition and edited grub.cfg to point to appropriate kernel and initrd, and pass in real_root and mdadm / lvm params to your kernels (or whatever is appropriate for the distro). Of course, you have to make sure that each distro has appropriate RAID/LVM drivers installed in the initrd. (In Gentoo, e.g., you tell genkernel to build the initramfs with RAID/LVM support, and then then you pass a /dev/mapper/<lv-name> argument as a kernel parameter, which the initramfs uses.)

Frankly, though, if this is just for testing: Why bother with RAID at all? Or maybe just put your /data on RAID, but leave the other ones to simple partitions or to LVM?

[Extra note: Also be aware that your boot partition and bootloader don't actually have to be on a hard disk. They can be on USB or CD-ROM.]

PeggySue 03-31-2011 04:10 PM

Hi TinyTux

Thanks for the reply. My objective is more about learning than fixing a production machine. I had thought about LVM but had decided to understand RAID first. I am impressed by the speed performance of RAID 0 so thought I would try RAID 5 to recover the loss of reliability that goes with RAID 0. You can't stripe /boot hence the mix of RAID and non-RAID.

I am making progress and can now add distros on RAID arrays and add the data from their grub.cfg to the master Debian grub2 files to get them to boot. I can also recover if a distro wipes the mbr. (I thought Ubuntu alternative install was going to ask which drive to install-grub on but it didn't, it just scribbled over sda!)

I now understand the make up of the partition table in the mbr and how you must load kernel modules in grub to boot RAID but I still can't see where the data that defines the make up of RAID arrays is stored. It can only be in /boot somewhere. The search continues.

I'm interested that you use Gentoo. I have built Gentoo on my two other computers but after I do a Gentoo install I have to lie down in a darkened room for two days!

tinyTux 03-31-2011 06:16 PM

Quote:

Originally Posted by PeggySue (Post 4310038)
Hi TinyTux

Thanks for the reply. My objective is more about learning than fixing a production machine. I had thought about LVM but had decided to understand RAID first. I am impressed by the speed performance of RAID 0 so thought I would try RAID 5 to recover the loss of reliability that goes with RAID 0. You can't stripe /boot hence the mix of RAID and non-RAID.

I am making progress and can now add distros on RAID arrays and add the data from their grub.cfg to the master Debian grub2 files to get them to boot. I can also recover if a distro wipes the mbr. (I thought Ubuntu alternative install was going to ask which drive to install-grub on but it didn't, it just scribbled over sda!)

I now understand the make up of the partition table in the mbr and how you must load kernel modules in grub to boot RAID but I still can't see where the data that defines the make up of RAID arrays is stored. It can only be in /boot somewhere. The search continues.

I'm interested that you use Gentoo. I have built Gentoo on my two other computers but after I do a Gentoo install I have to lie down in a darkened room for two days!

"Lie down in a darkened room for two days!" I've never heard that one before! :D

Gentoo installs go pretty quick once you get familiar with all the standard tools and you know what it is you want. "Pretty quick", of course, does not include the compile time. ;) I'm moving toward archiving a set of base images that match my preferences (one for desktop, one for server, and so forth) w. PXE boot and some kind of NFS/iSCSI set up to make things move along faster.

I'm hooked on Gentoo for a few core reasons: esp. I love having all that source code code within easy reach, and all the customization that is possible with the Portage system.

http://frigidcode.com/documentation/...too-linux.html

Anyway, hope your RAID experiments go well!


All times are GMT -5. The time now is 03:10 AM.