Linux RAID subsystem development
 help / color / mirror / Atom feed
From: Roy Sigurd Karlsbakk <roy@karlsbakk.net>
To: Alexander Zvyagin <zvyagin.alexander@gmail.com>
Cc: linux-raid <linux-raid@vger.kernel.org>
Subject: Re: RAID50 boot problems
Date: Fri, 19 Apr 2013 12:35:59 +0200 (CEST)	[thread overview]
Message-ID: <16868321.4.1366367759598.JavaMail.root@zimbra> (raw)
In-Reply-To: <CAGqvA+sui=5R7+agbrJgHTQpm+1e9PVZ_MskjO3RTWq+LcAdnQ@mail.gmail.com>

----- Opprinnelig melding -----
> Hi,
> 
> I have almost working RAID50 (two RAID5 forms RAID0) in my
> Linux-mint13. When booting the system always ends up in initramfs
> shell, saying it cannot find the "root". When I type "cat
> /proc/mdstat" I see that both RAID5 are available, but they did not
> form RAID0. So I do "mdadm -A --scan" to finish the raid creation.
> After that I can exit the initramfs shell and system finishes booting
> (and works later) without any problems. Of course initramfs image is
> in sync with root (/etc/mdadm/mdadm.conf file is the same in initramfs
> and rootfs).
> This is what my system is using:
> kernel 3.5.0-26-generic
> mdadm - v3.2.5 - 18th May 2012
> 
> To summarize, I have RAID50 which _almost_ works. It just needs to be
> pushed/kicked during the boot. Could you advise my how can I
> automatize the process, so I do not need to type "mdadm -A
> --scan;exit" every time I switch on my computer?

Interesting… I have an ubuntu 13.04 VM for just raid testing, and I tried this configuration. I created two RAID-5s here and then a RAID-0 on top of those. I yet haven't put a filesystem on it. I just wanted to see if I could reproduce your issue, and I can.

It seems what happens is it only runs an initial scan, and then just finding the raids on physical (or otherwise) disks. In my case, md9 won't be available before md0 and md1 are started. I solved this by adding a line to /etc/rc.local

# If using nested MD, such as RAID5+0, another scan is needed
mdadm --assemble --scan

See below for full logs.

roy

root@raidtest:~# mdadm --detail --scan >> /etc/mdadm/mdadm.conf
(edit mdadm.conf to remove old entries)
root@raidtest:~# update-initramfs -u 
update-initramfs: Generating /boot/initrd.img-3.8.0-18-generic
root@raidtest:~# cat /proc/mdstat 
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
md9 : active raid0 md0[0] md1[1]
      4191232 blocks super 1.2 512k chunks
      
md1 : active raid5 vde[0] vdg[3] vdf[1]
      2096000 blocks super 1.2 level 5, 64k chunk, algorithm 2 [3/3] [UUU]
      
md0 : active raid5 vdd[3] vdc[1] vdb[0]
      2096000 blocks super 1.2 level 5, 64k chunk, algorithm 2 [3/3] [UUU]
      
unused devices: <none>

root@raidtest:~# reboot
...
root@raidtest:~# cat /proc/mdstat 
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
md0 : active raid5 vdd[3] vdc[1] vdb[0]
      2096000 blocks super 1.2 level 5, 64k chunk, algorithm 2 [3/3] [UUU]
      
md1 : active raid5 vdg[3] vde[0] vdf[1]
      2096000 blocks super 1.2 level 5, 64k chunk, algorithm 2 [3/3] [UUU]
      
unused devices: <none>
root@raidtest:~# 

-- 
Vennlige hilsener / Best regards

roy
--
Roy Sigurd Karlsbakk
(+47) 98013356
roy@karlsbakk.net
http://blogg.karlsbakk.net/
GPG Public key: http://karlsbakk.net/roysigurdkarlsbakk.pubkey.txt
--
I all pedagogikk er det essensielt at pensum presenteres intelligibelt. Det er et elementært imperativ for alle pedagoger å unngå eksessiv anvendelse av idiomer med xenotyp etymologi. I de fleste tilfeller eksisterer adekvate og relevante synonymer på norsk.
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2013-04-19 10:35 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAGqvA+t8Nr7D6h35ZKVi5Wa0tF46TQHK_Af_mXO2=ByRjWRQag@mail.gmail.com>
2013-04-17 18:45 ` RAID50 boot problems Alexander Zvyagin
     [not found]   ` <CAGA4a+GQp1RV_1pA6PBP=dbXV3MHhU74=Mo24xqqjKfWfoWXJA@mail.gmail.com>
2013-04-19  9:40     ` Alexander Zvyagin
2013-04-19 10:35   ` Roy Sigurd Karlsbakk [this message]
2013-04-19 10:42     ` Tommy Apel
2013-04-19 10:51       ` Roy Sigurd Karlsbakk
2013-04-19 11:38         ` Alexander Zvyagin
2013-04-19 10:45     ` Roy Sigurd Karlsbakk
2013-04-19 11:45   ` Roman Mamedov
2013-04-19 15:58     ` Roy Sigurd Karlsbakk
2013-04-21 22:10       ` NeilBrown
2013-04-22 11:02         ` Roy Sigurd Karlsbakk
2013-04-23 17:34           ` Roy Sigurd Karlsbakk
2013-04-24  6:52             ` NeilBrown
2013-04-24 11:19               ` Roy Sigurd Karlsbakk
2013-04-24 12:12                 ` NeilBrown
2013-04-24 12:29                   ` Roy Sigurd Karlsbakk
2013-04-24 20:01                     ` Roy Sigurd Karlsbakk
2013-04-24 23:35                     ` NeilBrown
2013-04-24 22:44               ` Dmitrijs Ledkovs
2013-04-24 23:44                 ` NeilBrown
2013-04-26 19:10                   ` Roy Sigurd Karlsbakk
2013-04-26 19:24                   ` Dmitrijs Ledkovs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=16868321.4.1366367759598.JavaMail.root@zimbra \
    --to=roy@karlsbakk.net \
    --cc=linux-raid@vger.kernel.org \
    --cc=zvyagin.alexander@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox