Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 479544 - sys-kernel/dracut-030 with <sys-fs/mdadm-3.2.6-r1 fails to boot with root on RAID because of missing option mdadm --offroot
Summary: sys-kernel/dracut-030 with <sys-fs/mdadm-3.2.6-r1 fails to boot with root on ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Amadeusz Żołnowski (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on: 480910
Blocks:
  Show dependency tree
 
Reported: 2013-08-02 17:43 UTC by Peter Volkov (RETIRED)
Modified: 2013-10-06 18:35 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
dracut-manual-boot-1.png (dracut-manual-boot-1.png,20.22 KB, image/png)
2013-08-02 17:43 UTC, Peter Volkov (RETIRED)
Details
dracut-manual-boot-2.png (dracut-manual-boot-2.png,16.83 KB, image/png)
2013-08-02 17:43 UTC, Peter Volkov (RETIRED)
Details
dracut-debug.tar.xz (debug.tar.xz,22.21 KB, application/x-xz)
2013-08-02 17:44 UTC, Peter Volkov (RETIRED)
Details
mdadm.conf (mdadm.conf,2.74 KB, text/plain)
2013-08-02 17:45 UTC, Peter Volkov (RETIRED)
Details
emerge--info.txt (emerge--info.txt,4.40 KB, text/plain)
2013-08-02 17:46 UTC, Peter Volkov (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Volkov (RETIRED) gentoo-dev 2013-08-02 17:43:32 UTC
Created attachment 354952 [details]
dracut-manual-boot-1.png

Today I've installed new server with root on lvm that in turn is on raid1:

 # lsblk 
NAME                MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda                   8:0    0 931.5G  0 disk  
|-sda1                8:1    0   512M  0 part  /boot/efi1
`-sda2                8:2    0   931G  0 part  
  `-md127             9:127  0   931G  0 raid1 
    `-l-root (dm-0) 254:0    0    10G  0 lvm   /
sdb                   8:16   0 931.5G  0 disk  
|-sdb1                8:17   0   512M  0 part  /boot/efi2
`-sdb2                8:18   0   931G  0 part  
  `-md127             9:127  0   931G  0 raid1 
    `-l-root (dm-0) 254:0    0    10G  0 lvm   /

Unfortunately at boot dracut failed to mount root and it ended at the resque shell without raid1 being assembled. After I assemble raid manually and start lvm it bootted as expected (see, dracut-manual-boot-1.png and dracut-manual-boot-2.png).

To fix this issue I've started to read dracut logs (attached) and found that it looks for --offroot option in mdadm. I've tried to upgrade mdadm to 3.2.6-r1 and it worked!

I'm not sure if this is a final fix or only workaround. --offroot option was added in mdadm-3.2.3 and I've tried to boot with 3.2.3-r2 and 3.2.5-r1 and dracut failed to boot with both of them. It works only with 3.2.6-r1 as I see.
Comment 1 Peter Volkov (RETIRED) gentoo-dev 2013-08-02 17:43:52 UTC
Created attachment 354954 [details]
dracut-manual-boot-2.png
Comment 2 Peter Volkov (RETIRED) gentoo-dev 2013-08-02 17:44:18 UTC
Created attachment 354956 [details]
dracut-debug.tar.xz
Comment 3 Peter Volkov (RETIRED) gentoo-dev 2013-08-02 17:45:44 UTC
Created attachment 354960 [details]
mdadm.conf

 # blkid 
/dev/sdb1: LABEL="EFI-BOOT" UUID="F743-46D9" TYPE="vfat" PARTLABEL="EFI System" PARTUUID="627a1c55-f29c-4ffb-b161-47e8d23ffd37" 
/dev/sdb2: UUID="160643da-cfee-732b-b7e7-4b81d770b3dd" UUID_SUB="6649ee2e-f0c5-b366-59a3-45b5facdd1e6" LABEL="sysresccd:raid1" TYPE="linux_raid_member" PARTLABEL="Linux LVM" PARTUUID="a10088b6-d43a-4240-978d-0f758b4bc41d" 
/dev/sda1: LABEL="EFI-BOOT" UUID="F721-034A" TYPE="vfat" PARTLABEL="EFI System" PARTUUID="c3f7252b-a57d-411c-b049-49e9ba16e928" 
/dev/sda2: UUID="160643da-cfee-732b-b7e7-4b81d770b3dd" UUID_SUB="8e880096-d6fa-c23e-6f31-2aa54ae3b1f9" LABEL="sysresccd:raid1" TYPE="linux_raid_member" PARTLABEL="Linux LVM" PARTUUID="875d1b6e-4506-4ae7-907d-359cb2e93dd2" 
/dev/md127: UUID="7ZyDlE-rgqv-TZ5W-KbMM-yH3K-Vpx9-zRwYVv" TYPE="LVM2_member" 
/dev/mapper/l-root: LABEL="root" UUID="85d10aa3-507f-4fc9-9150-cd5473fd3a91" TYPE="ext4"
Comment 4 Peter Volkov (RETIRED) gentoo-dev 2013-08-02 17:46:27 UTC
Created attachment 354962 [details]
emerge--info.txt
Comment 5 Alexander Tsoy 2013-08-02 20:43:35 UTC
3.2.5-r1 and 3.2.6 are broken. See bug 416081.
Comment 6 Alexander Tsoy 2013-08-02 20:47:21 UTC
3.2.3-r2 uses /dev/.mdadm as MAP_DIR, so it also should work, but I didn't try it.
Comment 7 Alexander Tsoy 2013-08-02 21:02:07 UTC
Or may be MAP_DIR is not a problem. Initramfs contains compatibility symlinks:

$ sudo lsinitrd /boot/initramfs-3.9.9-hardened.img | grep var
drwxr-xr-x   2 root     root            0 Aug  3 00:59 var
lrwxrwxrwx   1 root     root           11 Aug  3 00:59 var/lock -> ../run/lock
lrwxrwxrwx   1 root     root           10 Aug  3 00:59 var/log -> ../run/log
lrwxrwxrwx   1 root     root            6 Aug  3 00:59 var/run -> ../run
Comment 8 Amadeusz Żołnowski (RETIRED) gentoo-dev 2013-09-13 18:01:53 UTC
New mdadm is ~arm keyworded and dracut depends on new mdadm, therefore problem should be fixed. Thank you for report!
Comment 9 Alexander Tsoy 2013-10-04 19:46:47 UTC
No. It seems that the real problem is that Peter haven't appended "rd.md.uuid" or "rd.auto" option to the kernel cmdline. It's actually a bug in dracut: with mdadm-3.2.6 incremental assembly rule is not removed from 64-md-raid.rules and all MD devices get assembled unconditionally.

Proof from debug log:

///lib/dracut/hooks/pre-trigger/30-parse-md.sh@8(source): info 'rd.md=0: removing MD RAID activation'
Comment 10 Alexander Tsoy 2013-10-04 19:55:53 UTC
By the way mentioned dracut bug have been fixed:
http://git.kernel.org/cgit/boot/dracut/dracut.git/commit/?id=ecc13ef17e376c4ee54a2177687ef018466f53ca
Comment 11 Amadeusz Żołnowski (RETIRED) gentoo-dev 2013-10-06 18:35:46 UTC
Patch applied, see bug #485748.