You are not logged in.

#1 2015-02-01 12:13:19

Fackamato
Member
Registered: 2006-03-31
Posts: 579

[Intel RAID] MD doesn't assemble

Hi folks

I've 2 Intel SSD's in RAID0 (provided by the Intel ROM):

$ cat /proc/mdstat 
Personalities : [raid0] 
md126 : active raid0 sda[1] sde[0]
      312577024 blocks super external:/md127/0 128k chunks
      
md127 : inactive sda[1](S) sde[0](S)
      4520 blocks super external:imsm
       
unused devices: <none>

from dmesg:

[   13.381505] md: bind<sde>
[   13.509831] md: bind<sda>
[   13.510679] md: bind<sde>
[   13.510747] md: bind<sda>
[   13.604387] md: raid0 personality registered for level 0
[   13.604657] md/raid0:md126: md_size is 625154048 sectors.
[   13.604659] md: RAID0 configuration for md126 - 1 zone
[   13.604660] md: zone0=[sda/sde]
[   13.604673] md126: detected capacity change from 0 to 320078872576
[   13.608599]  md126: p1 p2 p3 p4 < p5 >
[   13.608714] md126: p5 size 61914624 extends beyond EOD, truncated
[   14.476908] EXT4-fs (md126p3): mounting ext2 file system using the ext4 subsystem
[   14.478127] EXT4-fs (md126p3): mounted filesystem without journal. Opts: (null)

They assemble fine (although very late in the boot process as you can see) and I can mount the partitions (md126p3, for example). I formatted md126p5 to ext4 and rsync'd Archlinux over there. However, when I reboot, it can't find the root fs. In the busybox(?) environment I don't have any /dev/md* devices.

mkinitcpio.conf (same kernel and initrd used on the existing install):

HOOKS="base udev autodetect modconf block mdadm dmraid lvm2 filesystems keyboard fsck"

Any idea where I can begin to look? So basically the devices gets detected fine in the extisting install (which is on a separate device). But not when I boot with root pointed to the partition on the RAID device. I'm suspecting something very late in the boot process (13s, so must be userspace?) finds and assembles the RAID, but what/how? Why can't it be done using mkinitcpio.conf?

Thanks

Offline

#2 2015-02-03 07:59:49

MSC
Member
Registered: 2014-07-13
Posts: 33

Re: [Intel RAID] MD doesn't assemble

Were you following the instructions here?

According to that page your hooks should have "mdadm_udev" rather than "mdadm" or "dmraid". Make sure /etc/mdadm.conf knows about your array, as mkinitcpio will use that to assemble it.

Offline

#3 2015-02-14 13:15:47

Fackamato
Member
Registered: 2006-03-31
Posts: 579

Re: [Intel RAID] MD doesn't assemble

MSC wrote:

Were you following the instructions here?

According to that page your hooks should have "mdadm_udev" rather than "mdadm" or "dmraid". Make sure /etc/mdadm.conf knows about your array, as mkinitcpio will use that to assemble it.

Thanks, I tried mdadm_udev but that doesn't work. (removed dmraid and mdadm)

The only thing that works is manually adding the mdadm binary in mkinitcpio.conf and when the boot fails due to no root device, in the shell do mdadm --assemble --scan;exit .

Offline

#4 2015-02-14 13:31:04

frostschutz
Member
Registered: 2013-11-15
Posts: 1,647

Re: [Intel RAID] MD doesn't assemble

You learn something new every day. I did not know there was an alternative to 'mdadm' for assembling raids, called 'mdassemble' which is what the mkinitcpio includes instead of mdadm; I also can scarcely find any documentation for that mdassemble command (and mdassemble --help does not show help and not even error unknown option but tries to assemble anyway - yikes!). It says something when not even the manpage is installed by default but has to be located with Google.

http://linux.die.net/man/8/mdassemble

It says it's for initrd, but I'm not entirely sure if I would trust it. So far I've always used the "real" mdadm in initramfs, I also find that to be more useful if something is wrong with your RAID and all you have is the initramfs rescue shell, with mdadm you can at least do something to fix it, but mdassemble gives you nothing.

But giving it the benefit of the doubt... can you show us your mdadm.conf?

Edit: Ooh. The mdadm hook uses mdassemble. The mdadm_udev hook uses mdadm. If you use the latter you should not have to manually include the mdadm binary.

Last edited by frostschutz (2015-02-14 13:35:03)

Offline

Board footer

Powered by FluxBB