[SOLVED] How to install Mageia on a software RAID 1?

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[SOLVED] How to install Mageia on a software RAID 1?

Postby magfan » Feb 17th, '15, 16:50

Hello,

my new system has two SSDs and I want to install Mageia on a RAID 1. How could I do this?

    1. In case Mageia offers to create a RAID 1 during the installation routine (which I don't know) I could try it. However, it must be possible to boot the system if one of the disks fails. So, grub should be installed on both disks, right? Can this be done? Do I still have to provide a boot partition besides the RAID?

    2. There is also an Intel "onboard" RAID controller on the motherboard. I could just create a RAID 1 in BIOS and then install Mageia on it. In this case I could boot directly from the RAID.

    3. Maybe there is even a manual solution if I used mdadm with the option -imsm for the Intel Rapid Storage Technology (RSTe). But I have no idea when to create this RAID 1 during the installation process.

What seems to be the best / most reliable solution?
Last edited by magfan on Jul 27th, '15, 18:10, edited 1 time in total.
magfan
 
Posts: 334
Joined: Apr 3rd, '12, 12:33

Re: How to install Mageia on a software RAID 1?

Postby xboxboy » Feb 18th, '15, 00:29

Yes, the old raid issue. First thing are you using windows or other os's to dual boot?

By all account's if your just doing a mga install then mdadm (software raid) is proposed to be the easiest and safest bet. This, of course isn't what I did.

I still use M$ very occaisionly: So this is how I finished up:
Grub, Windows and mga on one hard disk.
Then I use the on board intel raid controller (this is true fake raid: you need the CPU to run the driver to operate the raid: It is not hardware raid) for 2 sets of 2 disks both in raid 1 (mirror) arrays. These purely hold data and are then linked to my /home.

I originally tried to install mga to a raid 1 array, and it was just too hard or impossible: So I just got another, separate OS hdd: If I was to do it again, the OS's would go on a SSD to be even faster :)

The next issue you may come across, is for some reason, fedora-storage-init isn't working properly on my system for the last couple of mga's, and pops up in bugzilla from time to time, with no real fix it seems, but a work around is simple:
https://forums.mageia.org/en/viewtopic.php?f=7&t=5191#p36311 (I hope that link works, if not let me know)

So, the theory is mdadm is now the driver of choice for the intel raid, but I'll be damned if I can get it to work, so we have to get dmraid to do the lifting: So by commenting out those lines that's what your doing.

If I were you, to save countless hours of cursing, guessing and hair pulling, I would do like I did, but grab a SSD for the OS(s), it'll be faster, and if you stuff up your install, you don't risk playing with the raid arrays with your data on.

Hope that helps.
xboxboy
 
Posts: 401
Joined: Jun 2nd, '13, 06:41

Re: How to install Mageia on a software RAID 1?

Postby jiml8 » Feb 18th, '15, 02:03

What I generally do in that situation is partition both drives identically, with a small partition in the front of the drive, and the entire remainder of the drive given over to the RAID.

I then go through the installation process, defining one of the small partitions as /boot at that point in the installation, and defining both of the large second partitions as belonging to the RAID. Build the RAID using mdadm, install the system on it, and keep on going.

After the system is up and running, copy the contents of the /boot partition to the small partition on the other drive, then install grub on the other drive as well. You can also do this with dd, picking up the entire front of the drive, but you have to be careful not to overrun the partition boundary between the first and second partitions.

After doing this, you will need to be sure to keep the unused boot partition up to date; when you do something that changes /boot you need to rsync everything to the other partition as well.
jiml8
 
Posts: 1254
Joined: Jul 7th, '13, 18:09

Re: How to install Mageia on a software RAID 1?

Postby magfan » Feb 20th, '15, 15:51

The delivery of two system parts (hardware) has been delayed. So I will have to wait at least one week before I can try something...
magfan
 
Posts: 334
Joined: Apr 3rd, '12, 12:33

Re: How to install Mageia on a software RAID 1?

Postby magfan » Mar 5th, '15, 14:20

I was already scared when I read about the problems with disk partitioning during the installation process of mga5beta3 (Errata: https://wiki.mageia.org/en/Mageia_5_Errata#Formatting_the_wrong_drive). It seems to be impossible to make a fresh install on a newly created RAID. Even not with two empty disks. And as mentioned in the Errata a solution will not be available for the final release of mga5. Probably I should install mga4.1 on a new RAID and upgrade it later? Or should I wait for mga5 to install it on a single disk and convert this single drive to a RAID after the installation?
Attachments
mga5b3_install_raid_error.png
mga5b3_install_raid_error.png (123.42 KiB) Viewed 12441 times
magfan
 
Posts: 334
Joined: Apr 3rd, '12, 12:33

Re: How to install Mageia on a software RAID 1?

Postby magfan » Mar 16th, '15, 17:05

It is impossible to create a software RAID with mga5b3 which I use because of the new integration of EFI management. Whenever I want to add a partition from the second SSD to the RAID the installation process fails and cannot be redone (see picture in my previous post). The only chance is to remove any partition table from both SSDs using a live DVD. But again, you will kill your installation once you try to create a RAID from within the Mageia installer. I do not even have another OS installed. The system should become a pure Mageia workstation with a software RAID 1 for the system. So, back to the main question: How can I install Mageia on a software RAID 1? Or: How can I create a software RAID 1 from a normal installation?
magfan
 
Posts: 334
Joined: Apr 3rd, '12, 12:33

Re: How to install Mageia on a software RAID 1?

Postby doktor5000 » Mar 16th, '15, 23:14

AFAIR it has never been possible to create a software raid (mdadm) using the installer GUI.

But you can always switch to a tty via Ctrl+Alt+F2 and then create your RAID as you like it, before you get to the partitioning screen.
Just tried in a VM similar to https://raid.wiki.kernel.org/index.php/ ... tup#RAID-1 and RAID creation worked just fine.
Although I had the partitioner already open, and after reloading the partition table the VM locked up. Had to kill it, but after restarting
it the RAID was still there and re-syncing ... have to check a bit more.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18061
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: How to install Mageia on a software RAID 1?

Postby doktor5000 » Mar 16th, '15, 23:57

doktor5000 wrote:AFAIR it has never been possible to create a software raid (mdadm) using the installer GUI.

FWIW, actually it seems to have been possible in the past. Check e.g. http://www.linuxsolutions.org/faqs/mand ... ftwareraid

Testing in a fresh VM, the RAID creation worked just fine.
Image
Although the installer didn't see the RAID, only the two individual unpartitioned disks.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18061
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: How to install Mageia on a software RAID 1?

Postby magfan » Mar 17th, '15, 00:05

OK, but how do I install Mageia on that RAID if the installer does not see it?
magfan
 
Posts: 334
Joined: Apr 3rd, '12, 12:33

Re: How to install Mageia on a software RAID 1?

Postby doktor5000 » Mar 17th, '15, 00:18

My only bet would be to test older Mageia and Mandriva installer and see which is the last known good version. Then we could open a bugreport and ask about that regression.
If I'm not misinterpreting https://bugs.mageia.org/show_bug.cgi?id=11105 it seems the last version where that was working seems to be Mageia 1.
Maybe it will be fixed for mga5 ...
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18061
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: How to install Mageia on a software RAID 1?

Postby magfan » Mar 17th, '15, 10:01

That would be great! I had a software RAID installation some years ago but I do not remember whether it was from Mandriva 10.2 or Mageia 1. Once it was installed I always just upgraded to the latest Mageia version. That is why I did not have problems with it. But right now there exists only one way to install Mageia on a software RAID:

- you have to install Mageia on a single disk,
- create a degraded RAID (one disk missing) on a second disk,
- copy the Mageia installation from the first disk to the degraded RAID in rescue mode,
- add the first disk to the degraded RAID,
- and finally when both disks are synchronized re-install grub2-efi on both disks and adapt /etc/fstab and /etc/mtab

That is the theory but how can I do it? Especially the last step (re-installing grub and adapting system files) worries me. How can I do this?
magfan
 
Posts: 334
Joined: Apr 3rd, '12, 12:33

Re: How to install Mageia on a software RAID 1?

Postby doktor5000 » Mar 18th, '15, 00:32

Better do a reproducible fresh installation on a test machine where the newly created RAID is not recognised, and attach /root/drakx/report.bug.xz to the abovementioned bugreport so this gets fixed.

For your last question I can't really help you, as I've no practical experience with software RAID on linux, sorry.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18061
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: How to install Mageia on a software RAID 1?

Postby magfan » Mar 18th, '15, 18:01

The file "/root/drakx/report.bug.xz" does not exist and the file "/tmp/ddebug.log" is empty. The best I could get is the image "mga5b3_install_raid_error.png" from one of my my previous postings. At least the error is always the same. No matter how you partition the disks (before installation or during installation) as soon as you want to add a second partition to a RAID (e.g.md0) the installation procedure stops with this error.
magfan
 
Posts: 334
Joined: Apr 3rd, '12, 12:33

Re: How to install Mageia on a software RAID 1?

Postby doktor5000 » Mar 18th, '15, 21:24

Can you show the contents of /root/drakx/ please?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18061
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: How to install Mageia on a software RAID 1?

Postby magfan » Mar 18th, '15, 22:20

This directory (/root/drakx) does not exist. I switched to console (ctrl+alt+f2) and seached for drakx but could not find it. Just an empty /root/tmp.
magfan
 
Posts: 334
Joined: Apr 3rd, '12, 12:33

Re: How to install Mageia on a software RAID 1?

Postby doktor5000 » Mar 19th, '15, 19:28

That is weird :?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18061
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: How to install Mageia on a software RAID 1?

Postby magfan » Jul 22nd, '15, 14:10

Finally, I decided to wait for Mageia 5. But it turned out that it did not help...

I want a software RAID 1 managed by mdadm because it is more easy to handle (e.g. error messages via email). In case I decide to use the onboard controller chip (Intel) the RAID will be managed by dmraid, not mdadm. Even Intel advises to use mdadm, but it is not possible to choose. So, the onboard controller is not an option.

Creating a RAID 1 with two disks and installing Mageia 5 on it works perfectly well. The disappointing part of the story is that I am unable to boot this RAID. I am always ending up in grub. How can I install grub (or grub2?) properly? I am using Mageia 5 UEFI DVD for installation and I prefer to have two separate partitions for "/boot" and "/".
magfan
 
Posts: 334
Joined: Apr 3rd, '12, 12:33

How to install Mageia on a software RAID 1?

Postby hankivy » Jul 25th, '15, 02:51

My system was installed with Mageia4 and RAID1 using mdadm to control the RAID1 file systems. The post https://forums.mageia.org/en/viewtopic.php?f=8&t=7975#p49644 in the topic is my final detailed solution. Due to other system issues at the time, I had to use LILO as my boot loader, for Mageia4. Mageia5 should have more options, GRUB, etc. I cannot comment on using an Intel chip RAID controller, or dual booting to Windows. But you should be able to use some of the methods described to get your system going.
hankivy
 
Posts: 128
Joined: May 19th, '14, 20:36

Re: How to install Mageia on a software RAID 1?

Postby magfan » Jul 27th, '15, 18:09

@hankivy: I think the major problem is somehow related to the grub2 installation on a (mdadm-) raid. I could prepare a mdadm-raid and install mga5 like you did with mga4. But I was unable to boot the system after the installation. And when I looked at my system with a live boot-repair disk (see below) I found out that not grub2 but grub legacy had been installed although I could not even choose another bootloader than grub2 during installation. And the installed MBR on drive /dev/sda looks for a stage2 file which has been placed on hard disk /dev/sdb. OK. The MBR on /dev/sdb looks for the stage2 file in the correct place, but grub does not work on my UEFI-system...

After all I decided to choose the "old" raid version (dmraid). If the installation on a madm-raid is already complicated I do not even want to think about what might happen once such a raid fails. The only thing I had to do was to add "rootdelay=20" to the grub command line to let the raid assemble.


Code: Select all
============================= Boot Info Summary: ===============================

 => Grub Legacy0.970.97 is installed in the MBR of /dev/sda and looks at
    sector 807693056 of the same hard drive for the stage2 file.  A stage2
    file is at this location on /dev/sdb.  Stage2 looks on partition #5 for
    /boot/grub/menu.lst..
 => Grub Legacy0.970.97 is installed in the MBR of /dev/sdb and looks at
    sector 807701248 on boot drive #1 for the stage2 file.  A stage2 file is
    at this location on /dev/sdb.  Stage2 looks on partition #5 for
    /boot/grub/menu.lst..
 => Syslinux MBR (3.61-4.03) is installed in the MBR of /dev/sdc.
magfan
 
Posts: 334
Joined: Apr 3rd, '12, 12:33

Re: [SOLVED] How to install Mageia on a software RAID 1?

Postby hankivy » Jul 27th, '15, 20:46

Out of my personal curiosity and a quest for professional knowledge, how and where did you get the boot summary information in your previous post? :?:

Possibly related to the problems you ran into, is mageia bug 11105, see: https://bugs.mageia.org/show_bug.cgi?id=11105

I did seem to notice that your three drives have different MBR's. My two drives also can have different MBR's. It is a complicating factor, that can also be an asset. I once deleted all of my kernels from the /boot partition, :o :( (fyi. separate from root partition). The default state of my system was to have the boot loader installed on both drives. After cycling power, my system was still able to boot, from /dev/sda, the default kernel. :?: :D :?: I forced a re-installation of the latest kernel on the system, forced building a new init. kernel image, and forced an installation of the boot loader on /dev/sda, in spite of warning and error messages. Then booting from /dev/sda failed. :( But booting from /dev/sdb was able to boot the previous default kernel. :D Then I forced building another new init. kernel image, and installed the boot loader on /dev/sda without error messages. Then a boot from /dev/sda was successful. :D After success, the boot loader was re-installed on both drives.
hankivy
 
Posts: 128
Joined: May 19th, '14, 20:36

Re: [SOLVED] How to install Mageia on a software RAID 1?

Postby doktor5000 » Jul 27th, '15, 21:13

hankivy wrote:Out of my personal curiosity and a quest for professional knowledge, how and where did you get the boot summary information in your previous post? :?:

Not sure and never used it, but could be https://sourceforge.net/projects/bootinfoscript/
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18061
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: [SOLVED] How to install Mageia on a software RAID 1?

Postby magfan » Jul 28th, '15, 14:26

@hankivy, @doktor5000: I used the "Boot-Repair-Disk" (http://sourceforge.net/p/boot-repair-cd/home/Home). Usually after starting their live-system you can either (almost) automatically repair your system or you will get an URL where you can get more information about your system. In my case it was http://paste.ubuntu.com/11925028. The final suggestions to repair my system were around line 522:

Code: Select all
=================== Suggested repair
The default repair of the Boot-Repair utility would not act on the MBR.
Additional repair would be performed:  repair-filesystems


=================== User settings
The settings chosen by the user will not act on the boot.


Unfortunately, the parameter rootdelay=20 does not really help. Still it is very likely that booting will fail. Not always but very often. However, installing grub2 on a Intel BIOS RAID is a new topic. It is just a pity that the Mageia Rescue-DVD does not provide an option to boot an installed system...

And yes, there are different MBRs: two from the build-in SSDs (/dev/sda, /dev/sdb) and one from the USB-stick with the Boot-Repair-Disk live-system (/dev/sbc).
magfan
 
Posts: 334
Joined: Apr 3rd, '12, 12:33

Re: [SOLVED] How to install Mageia on a software RAID 1?

Postby doktor5000 » Jul 28th, '15, 20:07

magfan wrote:It is just a pity that the Mageia Rescue-DVD does not provide an option to boot an installed system...

All the images should offer that option:
Bildschirmfoto2_169.png
Bildschirmfoto2_169.png (328.63 KiB) Viewed 12014 times

It cannot be done from within the rescue system as there the bootloader has already been completed, so no chainloading possible anymore.

Although not sure if I missed a point in your question ...
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18061
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: [SOLVED] How to install Mageia on a software RAID 1?

Postby magfan » Jul 29th, '15, 09:02

The mga5 DVD-image (64bit) I downloaded last monday does not offer that option:
Attachments
mga5_uefi_boot.png
mga5_uefi_boot.png (710.04 KiB) Viewed 12004 times
magfan
 
Posts: 334
Joined: Apr 3rd, '12, 12:33

Re: [SOLVED] How to install Mageia on a software RAID 1?

Postby doktor5000 » Jul 29th, '15, 20:08

That's because you booted in UEFI mode, a small but important fact you forgot to mention in the last few posts.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18061
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Next

Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest

cron