LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-25-2011, 04:57 AM   #1
PeggySue
LQ Newbie
 
Registered: Aug 2007
Posts: 6

Rep: Reputation: 0
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!!
 
Old 03-31-2011, 02:57 PM   #2
tinyTux
Member
 
Registered: Mar 2011
Location: Extended Memory
Distribution: Gentoo
Posts: 64

Rep: Reputation: 9
Quote:
Originally Posted by PeggySue View Post
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.]

Last edited by tinyTux; 03-31-2011 at 03:00 PM.
 
Old 03-31-2011, 04:10 PM   #3
PeggySue
LQ Newbie
 
Registered: Aug 2007
Posts: 6

Original Poster
Rep: Reputation: 0
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!
 
Old 03-31-2011, 06:16 PM   #4
tinyTux
Member
 
Registered: Mar 2011
Location: Extended Memory
Distribution: Gentoo
Posts: 64

Rep: Reputation: 9
Quote:
Originally Posted by PeggySue View Post
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!

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!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
restoring ubuntu in boot option in multi-boot set up. avee137 Linux - Newbie 4 05-07-2010 01:42 AM
LXer: The Dao of ULTILEX (or how to create your own set of multi-boot live Linux dist LXer Syndicated Linux News 0 04-26-2009 01:01 AM
RAID-0 multi-boot jeepaholic Linux - Hardware 2 05-15-2008 09:08 AM
RAID-0 multi-boot jeepaholic Linux - General 2 05-14-2008 02:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration