Problem getting Raid 5 to work

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

Problem getting Raid 5 to work

Postby RagingRaven » Aug 18th, '14, 17:04

I'm trying to install mageia 4(.1) on 5 disks with/on a raid 5 configuration, but I can't seem to get the /boot partion to work.

I've followed the information provided in this post with the only difference being the raid 5 instead of 1:
viewtopic.php?f=8&t=7975#p49644

So I did the following:
Boot Mageia 4 Live DVD
I created:
22mb partition, type raid on each hdd (to become a 90mb /boot partion later on) (sda1, sdb1, sdc1, sdd1, sde1)
3GB partition, type raid on each hdd (to become a 12GB / partions later on) (sda5, sdb5, sdc5, sdd5, sde5 / not sure why 5, but that's what it became)
1GB partition, type raid on each hdd (to become a 4GB swap partition later on) (sda6, sdb6, sdc6, sdd6, sde6)
927GB partition, type raid on each hdd (to become a 3.6TB /var partition later on) (sda7, sdb7, sdc7, sdd7, sde7)

I then click on each corresponding partion to add them to a raid md device:
sda5, sdb5, etc. into md1
sda6, sdb6, etc. into md2
sda7, sdb7, etc. into md3
After every "add to raid" I got a few errors saying something along the lines of "unknown device sda5" etc. but it did add them to the raid devices

After that I formatted each md device as suggested.

I then went to console, became su root and did the following commands:

# mdadm --create /dev/md5 --metadata=0.90 --raid-devices=5 --level=raid5 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1
# sync ; sync

I then went back to diskdrake and formatted the new raid device md5.

I then rebooted into the normal mageia 4.1 DVD and chose custom partitioning, set mount points:
md1 /
md2 swap
md3 /var
But when i try to set mountpoint on md5 to /boot it still says "You've selected a software raid partition as /boot. No bootloader is able to handle this.."

From what I understood in the other topic the --metadata=0.90 should have fixed this, but I cannot continue for some reason.

What am I missing or misunderstanding which is causing me this problem?
User avatar
RagingRaven
 
Posts: 60
Joined: Aug 18th, '14, 16:40
Location: Oud-Beijerland, Near Rotterdam, The Netherlands

[SOLVED] Problem getting Raid 5 to work

Postby hankivy » Aug 18th, '14, 19:41

The boot partition cannot be RAID5. It must be RAID1, or not raid at all. The boot loaders are not smart enough to deal with the parity issues of reading multiple drives and combining all of the parts into a kernel image. It works for RAID1 because every partition is a duplicate of the other partitions. Then the boot loader only needs one of the partitions to be readable and clean.

Look at the internals of RAID5, and RAID1 on wiki. See http://en.wikipedia.org/wiki/RAID .
Imagine the issues for the bootloader if some subset of the drives is down.

The boot partition is only a few MegaBytes out of a TeraByte or more. Just put a duplicate on several drives. If you need reliablity, put the duplicates on drives on different controllers, data cables, and power supplies; so the failure of a single subsystem will not result in a boot failure. Ditto, the bootloader.

You should be able to make the other partitions RAID5.
Last edited by hankivy on Apr 3rd, '16, 21:04, edited 1 time in total.
hankivy
 
Posts: 136
Joined: May 19th, '14, 20:36

Re: Problem getting Raid 5 to work

Postby RagingRaven » Aug 18th, '14, 20:01

Thanks for the reply, I know how the different raid levels work, I just never put 1 and 1 together.
I saw that it worked for raid one, so I jumped to the conclusion that it must also work for raid 5, but that's obviously pretty silly now that you mention it.

The option of a duplicate sounds like what I'm going to use, but can I assign /boot multiple times during mandriva 4.1 installation or do I just have to copy it's content manually afterwards?
User avatar
RagingRaven
 
Posts: 60
Joined: Aug 18th, '14, 16:40
Location: Oud-Beijerland, Near Rotterdam, The Netherlands

Re: Problem getting Raid 5 to work

Postby hankivy » Aug 18th, '14, 21:48

The /boot partition as a RAID1 partition will be automatically duplicated for you.

To get the system to boot as desired when the normal primary bootable hard drive is down, is more problematic.
The lower level stuff will have to be installed, or configured, multiple times.
One limiting factor is the CMOS configuration of the bootable devices on your system.

Assuming the CMOS configuration allows three bootable hard drives, and you are using the master boot record, MBR, and LILO; for your boot loader:
Install and configure the MBR, and LILO three times, once on each of the bootable hard drives.
Make sure these are the hard drives listed in the CMOS configuration of bootable devices.

[NOTE: You may wish to reserve the last bootable device to a removable device, DVD, etc. for rescue, new installs, etc.]

When a new kernel is to be the default, then all three LILOs will have to have their default changed.

Just extend all of these principles when you use UEFI, and/or GRUB, etc. for the boot loading process.
hankivy
 
Posts: 136
Joined: May 19th, '14, 20:36

Re: Problem getting Raid 5 to work

Postby RagingRaven » Aug 18th, '14, 22:59

I've been reading a bit more into the installation of a raid1 array and manually adding lilo to each disk.

From what I now understand I can create a raid1 array which will include all my 22mb (or perhaps bigger seeing as I was aiming for a 100mb /boot) partitions (sda1, sdb1, sdc1, sdd1, sde1)

I should then create a or edit the lilo.conf file and run lilo for each disk.

I'm guessing the most easy way to do this is to first do the mageia installation and then locate the lilo.conf file, edit the "boot=" line and run lilo, rince repeat for each disk.
Seeing as there is a raid array am I right in assuming Mageia chooses LiLo as the default bootloader?

I'm I on the right track here ?
I'm pretty new to (manually configuring) Lilo so I'm hoping I'm understanding things right.

As for my CMOS, it looks like there isn't a limit to the number of devices I can add to the boot sequence.

Again thanks for your replies, it's a great help.
User avatar
RagingRaven
 
Posts: 60
Joined: Aug 18th, '14, 16:40
Location: Oud-Beijerland, Near Rotterdam, The Netherlands


Return to Advanced support

Who is online

Users browsing this forum: No registered users and 1 guest