Bug 15400 - Problem installer when creating raid partitions (INTERNAL ERROR: unknown device md0)
Summary: Problem installer when creating raid partitions (INTERNAL ERROR: unknown devi...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: Installer (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: release_blocker major
Target Milestone: Mageia 5
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard:
Keywords:
: 15774 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-03-02 13:04 CET by Alejandro Vargas
Modified: 2015-04-28 12:25 CEST (History)
10 users (show)

See Also:
Source RPM:
CVE:
Status comment:


Attachments

Description Alejandro Vargas 2015-03-02 13:04:11 CET
Description of problem:
Installer reports errors when installing in RAID 1 disks.

Version-Release number of selected component (if applicable):

Problem happens in Mageia 4 and Cauldron (mga 5)

How reproducible:

Try to install on a machina with 2 disks. 

Steps to Reproduce:

1. In partitioning, change to expert mode.
2. On each disk, create a primary partition starteng at block 2048 of type "linux swap" (2048 makes room for grub2).
3. On each disk, create a primary partition of type Linux raid. 
4. Add the raid partition of sda to a new raid (md0)
5. Add the raid partition of sdb to an existing raid (md0)

Result in mageia 3: all OK. You can format md0 and install the system on it. /boot on a raid1 device is OK. 

Result on mageia 4:

An error like this:

INTERNAL ERROR: unknown device md0
MDK::Common::Various::internal_error() called from /usr/lib/libDrakX/devices.pm:130
[...]


Trying to do any change on raid partitions gives the same error. You even can't remove the partitions. The only options is to reboot and start again. 

After rebooting, an error reports sdb has a bad partition table (and it is not true).

After a few days of trying different options, my only chance was installing mageia 3 and upgrading to mga4.

Reproducible: 

Steps to Reproduce:
Comment 1 Alejandro Vargas 2015-03-02 13:14:01 CET
For the record: I installed various servers with mageia and always requests the server has 2 hard disks (different model if possible for avoiding nearly simultaneous failures if the disks are identical).

I normally partitions the disks as this:
sda1 swap
sda2 linux raid

sdb1 swap
sdb2 linux raid

md0 raid1 including sda2 and sdb2
linux lvm on md0

ROOT on the LVM

Boot with Grub2 that can boot from LVM without problems BUT only if the first partition leaves enough space for Grub2 (i.e. starting on block 2048).

This scenario worked very well for me until Mageia 4. In Mageaia 4 and 5 the installer fails to set up this scenario.

Why software raid istead of hardware raid? Because hardware raid depends on the raid controller. If there is a problem, I can remove one disk of a software raid and read it with a simple USB disk adapter. This can't be done if it is a hardware raid. And the linux hardare raid works very fast and very well.

Priority: Normal => release_blocker
CC: (none) => alejandro.anv
Target Milestone: --- => Mageia 5
Severity: normal => major

Barry Jackson 2015-03-02 14:34:46 CET

CC: (none) => zen25000

Comment 2 Alejandro Vargas 2015-03-02 15:04:14 CET
An extra info... I think one of the disks could be previously partitioned with GUID. I deleted the partitions with the mageia installer, but the rests of a previous GUID partitions could be the reason of the error.
Thierry Vignaud 2015-03-03 15:32:59 CET

CC: (none) => thierry.vignaud
Summary: Problem installer when creating raid partitions => Problem installer when creating raid partitions (INTERNAL ERROR: unknown device md0)

claire robinson 2015-03-03 16:00:25 CET

CC: (none) => eeeemail

Comment 3 Markus Mertens 2015-03-16 21:44:03 CET
The installer fails under two conditions:

1. A RAID has been created in the BIOS (Intel RSTe Oprom RAID). This RAID (/dev/mapper/isw_*) is correctly detected with gparted on a LiveDVD (KNOPPIX). Calling "mdadm --examine --scan" in a terminal shows the correct assembly of drives. However, this RAID is not detected during the hardware scanning procedure in the Mageia installer. And later - during partitioning - you cannot select this RAID.

2. Two fresh disks cannot be assemled into a RAID during the installation process. It is possible to partition the disks and to assign a specific type to the partitions (ext4, linux RAID or anything else). But you cannot add a second partition to a RAID. This always fails. Also, the Mageia installer creates some corrupted RAID data on the disks which makes it impossible to start a second attempt to install Mageia. It will hang when it tries to read the partitions. You have to clean the disks / partition tables using a Live- or RescueDVD (not Mageia!).

My question is: is mdadm correctly included in the installer - if at all?

CC: (none) => Mertens.MPT

Comment 4 Alejandro Vargas 2015-03-17 12:32:20 CET
In the case of the HP Proliant ML310e Gen8 V2. The BIOS RAID is only a software raid. Mageia installer detects it as two separate disks, installs OK but BIOS can't boot it. I needed to disable the BIOS RAID. 

But I installed Mageia in RAID many times (raid 1). In this case I think the problem was a previous GUID partition on one of the disks. I needed to wipe the disks (dd if=/dev/zero of=/dev/xxx,etc.). The installer reads the normal partition table but the kernel reads the GUID table. I tried with gdisk, removing the GUID data, etc. with no luck. The only solution was to fill the disk with zeroes. May be the other solution where use GUID for both disks.
x bill 2015-03-17 13:38:26 CET

CC: (none) => xbill9

Comment 5 x bill 2015-03-17 13:43:34 CET
I am seeing the same problems on RAID10 mdadm installs over both new and existing linux raid partitions.

It seems like it is changes in the latest installer scripts that are not detecting the mdadm raid settings.
Comment 6 David Walser 2015-03-17 20:02:20 CET
(In reply to Markus Mertens from comment #3)
> The installer fails under two conditions:

Making two different bugs, but condition 1 you described sounds like a duplicate of Bug 11105.  Please add comments relevant to that issue there.

For this bug report, please stick to the issue of not being able to create a new RAID in the installer (condition 2).
Comment 7 Vladimir Zawalinski 2015-03-27 06:36:06 CET
(In reply to Markus Mertens from comment #3)
> The installer fails under two conditions:
> 
> 1. A RAID has been created in the BIOS (Intel RSTe Oprom RAID). This RAID
Re: Comment 3

> (/dev/mapper/isw_*) is correctly detected with gparted on a LiveDVD
> (KNOPPIX). Calling "mdadm --examine --scan" in a terminal shows the correct
> assembly of drives. However, this RAID is not detected during the hardware
> scanning procedure in the Mageia installer. And later - during partitioning
> - you cannot select this RAID.
> 
> 2. Two fresh disks cannot be assemled into a RAID during the installation
> process. It is possible to partition the disks and to assign a specific type
> to the partitions (ext4, linux RAID or anything else). But you cannot add a
> second partition to a RAID. This always fails. Also, the Mageia installer
> creates some corrupted RAID data on the disks which makes it impossible to
> start a second attempt to install Mageia. It will hang when it tries to read
> the partitions. You have to clean the disks / partition tables using a Live-
> or RescueDVD (not Mageia!).
> 
> My question is: is mdadm correctly included in the installer - if at all?

The MGA5 installer I have found fails to correctly detect firmware raid and from this report, Linux raid as well. The classical installer allows completion but sometimes fails to recognise a member disk and tries to put a partition there (Bug 15446), while the live installer crashes unrecoverably on encountering a member disk (Bug 14330). I have found that gparted recognises the raid disk and members, but cannot make changes to them stick (eg partitioning). If I partition the raid array in a distribution that fully supports firmware/software raid (I have ntfs,btrfs and ext4 on the one raid0 'disk'), then reboot into Mageia5, I can mount and use the raid array created in this way. .

CC: (none) => vzawalin1

Comment 8 Mageia Robot 2015-03-27 21:35:55 CET
commit 839024ea72b1828ceed72316f661cf3cbfad0f7d
Author: Thierry Vignaud <thierry.vignaud@...>
Date:   Fri Mar 27 10:26:58 2015 -0400

    fix creating RAID devices (mga#15400)
    
    regression fixed by reverting a line from
    commit 329701ba075af74ae6d7f857f62c35c942c24486
---
 Commit Link:
   http://gitweb.mageia.org/software/drakx/commit/?id=839024ea72b1828ceed72316f661cf3cbfad0f7d
Rémi Verschelde 2015-03-29 22:27:05 CEST

CC: (none) => remi

Comment 9 Rémi Verschelde 2015-04-11 00:00:00 CEST
Can someone confirm if this bug is fixed by the commit linked in comment 8? It should be included in the current RC ISOs and in boot.iso.
Comment 10 Tony Blackwell 2015-04-11 01:33:13 CEST
This looks to have a good deal in common with my earlier bug 13592, although the approach to setting up RAID was different.  Common underlying problem however?
Tonyb

CC: (none) => tablackwell

Comment 11 Vladimir Zawalinski 2015-04-11 03:42:42 CEST
Relates to comment 3 by Markus Mertens.

The two most recent versions of Classical 86_64 installers (Rounds 7 and 8,tested only in UEFI install mode) correctly identify firmware RAID array member disks (and shield them from view) and also show the raid array in the partitioner as a monolithic block that is read-only. Therefore, nothing can be done with the RAID array, and this remains a constraint for Classical Installer.

The two most recent versions of Live installer (Rounds 7 and 8, but 8 preferred) correctly identify firmware fake RAID arrays, show available partitions, and allow  creation of new partitions, so that Mageia 5 can be installed on the actual RAID 'disk'. I have done this.  These comments relate to Live iso for 86_64 KDE and firmware RAID only. I have not so far attempted to build Linux software RAID post-installation, but may do so. 

I have not used boot.iso in any of this.

Note that all RAID support in Mageia 5 is dome with *dmraid* and operations with mdadm should be avoided at least until MGA6 (tmb)
Comment 12 Vladimir Zawalinski 2015-04-11 03:48:44 CEST
Re comment 11

And all done for UEFI mode only on a laptop that supports firmware raid (0 in my case) spread over 2 internal electro-mechanical member hard disks.
Comment 13 Tony Blackwell 2015-04-11 11:58:01 CEST
My preliminary experience with RC (we are at '8' I think) differs in an important respect from this.  See earlier bug 13592.  I've just now deleted all GPT partitions on 2 disks, switched back to RAID0 in the BIOS, but disks are still seen separately with no way I can see to have the whole RAID0 array seen as one disk by the installer.  All the above discussion seems to assume there are pre-existing firmware fake-raid arrays, but the installer doesn't seem able to create them from scratch.  I've yet to do again the dmraid stuff as per bug 13592; will start again at my comment '5' in bug 13592 - will try it now and see if outcome is better...

The ideal would be if the installer itself did partitioning within RAID0 given that UEFI BIOS has the disks assigned as RAID0, even though they are currently 'blank' (but not zero'ed as someone suggested may be necessary)

Tonyb
Comment 14 Alejandro Vargas 2015-04-11 18:01:20 CEST
I can try in a virtual machine...
Comment 15 Alejandro Vargas 2015-04-13 13:54:22 CEST
Just downloaded Mageia 5 beta 3 and problem stills there.

Steps to reproduce: 

1) Create a virtual machine with virtualbox:
64 bits, 1Gb RAM, 2 disks of 16Gb each one. 

2) Add Mageia installer iso as DVD (Mageia-5-beta3-x86_64-DVD.iso)

3) Start into rescue mode.

4) Use gdisk to create a GPT partition on the second disk (sdb) (see http://imgur.com/rM1KE2w.png)

5) reboot into installer

6) go to manual partition, expert mode. 

7) go to the first disk and create 2 partitions of type Linux Raid, one of 1Gb and other of the rest. At this point, there is a little problem that should be solved: the default first sector proposed by the installer is 1, but nowdays, all partition programa proposes 2014 to make room for grub2 modules. (see http://i.imgur.com/ESWpbcn.png)

The type is Linux Raid and the first partition should start at sector 2048 and a size of 1024 Mb. For the second one use the rest of the disk (choose size=999999999999999 for it).

8) Select the first partition and "add to raid/new/ md0".

9) Select the second partition and "add to raid/new/md1". This is the result on raid tab, all ok until now: http://i.imgur.com/BUix3Mo.png

10) Now go to the second disk (sdb), and click the button for deleting all partitions. 

11) Create 2 partitions just like in the first disk: type Linux Raid, starting 2048, size 1024. The second using the rest of disk.

12) Then go to the first partition and "add to raid...", choose md0 (http://i.imgur.com/uK8bUXB.png)  ahd there is the error: 

http://i.imgur.com/0tCwT68.png
http://i.imgur.com/rype5rs.png

I am not sure if it is necesary to create the GPT partition first. I will check this later.
Comment 16 Alejandro Vargas 2015-04-13 14:07:15 CEST
Confirnmed: yo do not need to previously create a GPT partition. The problem occurs with 2 empty disks:

http://i.imgur.com/1lwjwkM.png
Comment 17 Rémi Verschelde 2015-04-13 14:11:47 CEST
Alejandro, could you try with a boot.iso image (it downloads and runs the latest version classical installer). Mageia 5 beta 3 is really old now, much as changed in preparation for the RC.

You can find boot.iso on any mirror, e.g. http://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia/distrib/cauldron/x86_64/install/images/
Comment 18 Alejandro Vargas 2015-04-13 14:25:59 CEST
Rémi: should I try the installation with the text installer? Because if I boot with boot.iso and then change to the installer DVD, the error stills there.
Comment 19 Rémi Verschelde 2015-04-13 14:31:21 CEST
I'm not sure I understand. What do you mean by changing to the installer DVD?
When you boot on boot.iso, you should chose "Install Mageia 5", then configure the network, choose a mirror, and then it will start the graphical installer.
Comment 20 Thierry Vignaud 2015-04-13 14:32:37 CEST
You must do a network install from a http mirror in order to use latest installer stage2.
Pointing to a DVD from a local disk would still use old installer
See https://wiki.mageia.org/en/Boot.iso_install#Choose_the_installation_method
Comment 21 Alejandro Vargas 2015-04-13 14:37:44 CEST
Ok, with normal partitions (not GPT) it worked ok. The installation aborted with a "retriving failed: curl failed: exit with 22 problem reading syntesys file of medium Core Release" but at least the partitioning worked Ok. Now I will try previously creating a GPT partition and will report if it fails.
Comment 22 Thierry Vignaud 2015-04-14 13:05:49 CEST
Yes this was fixed by comment #8

Status: NEW => RESOLVED
Resolution: (none) => FIXED

Comment 23 Thierry Vignaud 2015-04-27 11:57:19 CEST
*** Bug 15774 has been marked as a duplicate of this bug. ***

CC: (none) => grimble00060

Comment 24 Tony Blackwell 2015-04-27 12:16:05 CEST
This has some overlap with my bug 13592.
See the working solution there M5RC9 x86_64, in comment 27 (you can prune out some superfluous stuff).  

Short version: could do a RAID 0 install entirely from the Classical DVD, with a bit of manual work.
Comment 25 Thierry Vignaud 2015-04-28 12:25:31 CEST
*** Bug 15774 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.