Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
genkernel initramfs fails to assemble nested RAID0 array
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
ayay4
n00b
n00b


Joined: 21 Oct 2013
Posts: 2

PostPosted: Mon Oct 21, 2013 6:09 pm    Post subject: genkernel initramfs fails to assemble nested RAID0 array Reply with quote

Hello everyone.
I'm in the process of switching from a single-disk installation to a three-disk raid.

The system only boots with manual intervention.
(I'm fairly sure it was working last night, but I wiped /boot and re-created my kernel and initramfs this morning.)

I'm using:
-> a minimal 3.10.11 kernel patched with tuxonice (mdadm autoassembly disabled)
-> genkernel 3.4.45.1

The setup is looks like this:
Code:

/dev/sda1 => /boot (ext2)

---------------------------------------------
|                                           |
|  ---------------------------------        |
|  |  /dev/sd[cd]2 (raid0 ext4)    |        |
|  |                               |        |
|  |                      /dev/md1 |        |
|  ---------------------------------        |
|                                           |
|  ---------------------------------        |
|  |  /dev/sdb2 (ext4)             |        |
|  |                               |        |
|  |                               |        |
|  ---------------------------------        |
|                                           |
|                      /dev/md2 => / (ext4) |
---------------------------------------------


Here's the output of `mdadm -E` for each partition in the order in which they appear above:
Code:

0 root # mdadm -E /dev/sdc2
/dev/sdc2:
          Magic : a92b4efc
        Version : 0.90.00
           UUID : c73b3536:a6a1fdab:3d186b3c:53958f34
  Creation Time : Mon Oct 21 14:03:34 2013
     Raid Level : raid0
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 1

    Update Time : Mon Oct 21 14:03:34 2013
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0
       Checksum : 4c889163 - correct
         Events : 1

     Chunk Size : 512K

      Number   Major   Minor   RaidDevice State
this     0       8       34        0      active sync   /dev/sdc2

   0     0       8       34        0      active sync   /dev/sdc2
   1     1       8       50        1      active sync   /dev/sdd2



0 root # mdadm -E /dev/sdd2
/dev/sdd2:
          Magic : a92b4efc
        Version : 0.90.00
           UUID : c73b3536:a6a1fdab:3d186b3c:53958f34
  Creation Time : Mon Oct 21 14:03:34 2013
     Raid Level : raid0
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 1                          # Edit: I wonder if this is related. The previous disks (that md1 consists of) have this set to 2.

    Update Time : Mon Oct 21 14:03:34 2013
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0
       Checksum : 4c889175 - correct
         Events : 1

     Chunk Size : 512K

      Number   Major   Minor   RaidDevice State
this     1       8       50        1      active sync   /dev/sdd2

   0     0       8       34        0      active sync   /dev/sdc2
   1     1       8       50        1      active sync   /dev/sdd2



0 root # mdadm -E /dev/sdb2
/dev/sdb2:
          Magic : a92b4efc
        Version : 0.90.00
           UUID : ae99181e:bfa43055:3d186b3c:53958f34
  Creation Time : Mon Oct 21 14:03:45 2013
     Raid Level : raid0
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 2

    Update Time : Mon Oct 21 14:03:45 2013
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0
       Checksum : 4ce8a6bc - correct
         Events : 1

     Chunk Size : 512K

      Number   Major   Minor   RaidDevice State
this     0       8       18        0      active sync   /dev/sdb2

   0     0       8       18        0      active sync   /dev/sdb2
   1     1       9        1        1      active sync   /dev/md/1  # Symlink to ../md1 - I did not do this.


The contents of /etc/mdadm.conf which I pass to genkernel:
Code:
DEVICE /dev/sd[bcd]2 /dev/md1
ARRAY /dev/md1 devices=/dev/sdc2,/dev/sdd2
ARRAY /dev/md2 devices=/dev/sdb2,/dev/md1

This works fine when bootstrapping the array manually with `mdadm -As`

And my grub.conf:
Code:
title Gentoo Linux 3.10.11-geek md2
root (hd0,0)
kernel /kernel-3.10.11-geek-mini root=/dev/ram0 real_root=/dev/md2 domdadm
initrd /initramfs-genkernel-x86_64-3.10.11-geek


After editing `/usr/share/genkernel/defaults/initrd.scripts` to invoke mdadm with the --verbose flag, booting looks like this:
http://i.imgur.com/VepO5b5.jpg
Despite the messages about /dev/sdd2 being busy and having no superblock, the /dev/md1 array (look above) is created. /dev/md2 however, is not.
Here's what dmesg has to say about this:
http://i.imgur.com/7U0Gkp4.jpg
If I go ahead and bring /dev/md2 up manually I can boot my system:
http://i.imgur.com/vBfC2Nw.jpg (I don't need to append `/dev/sdb2 /dev/md1` while assembling. Added it here for clarity.)

I should also note that this does not work: (errors about /dev/sdb2 being busy)
Code:
 # mdadm --assemble /dev/md2

I have to bring down /dev/md2 before /dev/sdb2 is available:
Code:
 # mdadm --stop /dev/md2 && mdadm --assemble /dev/md2

`lsof /dev/sdb2` does not reveal anything interesting about this past a few `/dev/console` processes and `/init` and returns that same output even after /dev/md2 is brought down.

Thanks for reading. I have spent many hours and countless reboots on this. Any help appreciated.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum