Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 352459 - Installation of gentoo to software raid fails because of renaming of /dev/md2 to /dev/md
Summary: Installation of gentoo to software raid fails because of renaming of /dev/md2...
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-23 00:09 UTC by Juergen Rose
Modified: 2011-01-25 01:28 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Juergen Rose 2011-01-23 00:09:34 UTC
I started my installation with booting a aptosid-Live-DVD 
(http://ftp.spline.de/pub/aptosid/release/aptosid-2010-03-apate-kde-full-i386-amd64-201012262151.iso), then I installed mdadm-v3.1.4. Following mainly
http://www.gentoo.org/doc/en/gentoo-x86+raid+lvm2-quickinstall.xml
I created RAID devices, physical and logical volumes and installed gentoo:

root@aptosid:~# mdadm --create /dev/md0 --level=1 --raid-devices=2  --metadata=0.90 /dev/sda1 /dev/sdb1
root@aptosid:~# mdadm --create /dev/md1 --level=1 --raid-devices=2 --metadata=0.90  /dev/sda3 /dev/sdb3
root@aptosid:~# mdadm --create /dev/md2 --level=1 --raid-devices=2   /dev/sda5 /dev/sdb5
root@aptosid:~# cat /proc/mdstat 
Personalities : [raid1] 
md2 : active raid1 sdb5[1] sda5[0]
      1873009126 blocks super 1.2 [2/2] [UU]      
md1 : active raid1 sdb3[1] sda3[0]
      4192896 blocks [2/2] [UU]      
md0 : active raid1 sdb1[1] sda1[0]
      264960 blocks [2/2] [UU]

I did not make any entries in /etc/mdadm.conf.

root@aptosid:~# vgcreate vg0 /dev/md2
root@aptosid:~# lvcreate -L128G -nusr vg0
...
root@aptosid:~# mkfs -c -text4 /dev/mapper/vg0-usr
...
root@aptosid:/mnt/gentoo/usr# df
...
/dev/sdb6             25308412   2205752  21817060  10% /mnt/test2
/dev/md1               4127040     73812   3843584   2% /mnt/gentoo
/dev/md0                256586      2062    241276   1% /mnt/gentoo/boot
/dev/mapper/vg0-usr  132111844    192064 125208896   1% /mnt/gentoo/usr
/dev/mapper/vg0-portage
                      16772008     45036  15888112   1% /mnt/gentoo/usr/portage_caiman
/dev/mapper/vg0-distfiles
                      16772008     45036  15888112   1% /mnt/gentoo/usr/portage_caiman/distfiles
/dev/mapper/vg0-home 264223748    191580 250610396   1% /mnt/gentoo/home_caiman
/dev/mapper/vg0-tmp   16776700     32840  16743860   1% /mnt/gentoo/tmp
/dev/mapper/vg0-var    4128448    139392   3779344   4% /mnt/gentoo/var
/dev/mapper/vg0-vtmp  33553404     32840  33520564   1% /mnt/gentoo/var/tmp
/dev/mapper/vg0-opt    4128448    139388   3779348   4% /mnt/gentoo/opt
/dev/mapper/vg0-ftp  134152192     32928 134119264   1% /mnt/gentoo/home_caiman/ftp
/dev/mapper/vg0-src   67106812     32840  67073972   1% /mnt/gentoo/usr/src_caiman
...
root@aptosid:/mnt/gentoo/usr# cd /mnt/gentoo
root@aptosid:/mnt/gentoo# wget http://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/releases/amd64/current-stage3/stage3-amd64-20110113.tar.bz2
...
root@aptosid:/# chroot /mnt/gentoo/ /bin/bash
...
aptosid src # emerge --sync
caiman portage_caiman # time emerge gentoo-sources
...
aptosid / # emerge -vuDN lvm2
aptosid / # emerge -vuDN mdadm

After rebooting from harddisk there is no /dev/md2.

'cat /proc/mdstat' shows:
Personalities : [raid1] 
md126 : inactive sdb5[1](S)
      1873009262 blocks super 1.2      
md127 : inactive sda5[0](S)
      1873009262 blocks super 1.2
md1 : active raid1 sda3[0] sdb3[1]
      4192896 blocks [2/2] [UU]
md0 : active raid1 sdb1[1] sda1[0]
      264960 blocks [2/2] [UU]
unused devices: <none>

'll /dev/md*' shows:
brw-rw---- 1 root disk 9,   0 Jan 22 21:51 /dev/md0
brw-rw---- 1 root disk 9,   1 Jan 22 23:11 /dev/md1
brw-rw---- 1 root disk 9, 126 Jan 22 21:51 /dev/md126
brw-rw---- 1 root disk 9, 127 Jan 22 21:51 /dev/md127

/dev/md:
total 0
lrwxrwxrwx 1 root root 6 Jan 22 21:51 0_0 -> ../md0
lrwxrwxrwx 1 root root 6 Jan 22 23:11 1_0 -> ../md1

'uname -a' shows:
Linux caiman 2.6.37-gentoo #3 SMP Sat Jan 22 17:46:52 CET 2011 x86_64 AMD Phenom(tm) II X6 1090T Processor AuthenticAMD GNU/Linux

'pvscan' says:
  No matching physical volumes found

mdadm under gentoo has also version 3.1.4.
Wenn I boot again from the live DVD, I find again md0, md1 and md2.

Any hint how to handle this situation is deeply appreciated.


Reproducible: Always
Comment 1 Juergen Rose 2011-01-23 09:22:12 UTC
Some additional information: 
The linux version at the Live-DVD is: 2.6.36-2.slh.3-aptosid-amd64.

After rebooting with the Live-DVD, pvscan and lvscan find all physical and logical volumes.

Comment 2 Juergen Rose 2011-01-23 10:28:49 UTC
Adding device-mapper, lvm and mdadm to runlevel boot solve the issue for me. I now have md127 instead of md2, but all logical volumes are present and mounted as expected. Perhaps I should add, that I do not use a initial ramdisk.The raid1 funtionality is compiled into the kernel:

root@caiman:/root(12)# gzip -cd /proc/config.gz  | grep -i raid
# CONFIG_RAID_ATTRS is not set
# CONFIG_MD_RAID0 is not set
CONFIG_MD_RAID1=y
# CONFIG_MD_RAID10 is not set
CONFIG_MD_RAID456=m
# CONFIG_MULTICORE_RAID456 is not set
# CONFIG_ASYNC_RAID6_TEST is not set
CONFIG_ASYNC_RAID6_RECOV=m
CONFIG_RAID6_PQ=m
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2011-01-25 01:28:49 UTC
Where is the bug?