View previous topic :: View next topic |
Author |
Message |
peterab85 n00b
Joined: 05 Jan 2013 Posts: 4
|
Posted: Sat Jan 05, 2013 2:45 am Post subject: Software Raid Wont Boot |
|
|
Hi All
I am having troubles trying to get software raid to boot correctly on my new gentoo installation. In this computer I have three identical 160GB hard drives. On these drives I have setup three raid arrays, the boot partion (md1) and swap partion (md2) are mirrored across two drives (raid 1) and the root partion (md3) is stripped across all three drives in a raid 5 configuration. During the installation I followed the guides located here: http://en.gentoo-wiki.com/wiki/Software_RAID_Install and http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?full=1 . However, despite following these guides I have not had success in getting the installation to boot. I have read many posts in regards to these problems on this forum but still have not had any success. I have tried various kernel configs and have even tried genkernel. After further reading, I have found that grub can not load arrays with 1.2 blocks so I have added initrd to the grub configuration file, however this still does not work. The errors I am getting are below.
When booting the kernel I complied without initrd I get the flowing error:
Code: |
No filesystem could mount root, tried: ext3
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(9,3)
Pid:1, comm: swapper/0 Not tainted 3.6.11-gentoo #2
|
When booting the kernel I complied with initrd I get the flowing error:
Code: |
->Mounting /dev/md3 as root...
->Using mount -t ext3 -o ro
mount:mounting /dev/md3 on /newroot failed: invalid argument
!!Could not mount specified ROOT,try again
!!Could not find the root block device in
|
When booting with genkernel I get the flowing error:
Code: |
->Mounting /dev/md3 as root...
->Using mount -t ext3 -o ro
mount:mounting /dev/md3 on /newroot failed: invalid argument
!!Could not mount specified ROOT,try again
!!Could not find the root block device in
|
Can anyone point me in the right direction? Any help is greatly appreciated! My config files are posted below for your reference.
fdisk config sda
Code: |
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xad77a272
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 67583 32768 fd Linux raid autodetect
/dev/sda2 67584 4261887 2097152 fd Linux raid autodetect
/dev/sda3 4261888 312581807 154159960 fd Linux raid autodetect
|
fdisk config sdb
Code: |
Disk /dev/sdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 * 2048 67583 32768 fd Linux raid autodetect
/dev/sdb2 67584 4261887 2097152 fd Linux raid autodetect
/dev/sdb3 4261888 312581807 154159960 fd Linux raid autodetect
|
fdisk config sdc
Code: |
Disk /dev/sdc: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdc1 * 2048 67583 32768 fd Linux raid autodetect
/dev/sdc2 67584 4261887 2097152 fd Linux raid autodetect
/dev/sdc3 4261888 312581807 154159960 fd Linux raid autodetect
|
/etc/mdadm.conf
Code: |
ARRAY /dev/md1 metadata=0.90 UUID=66e0446e:a89499bb:cb201669:f728008a
ARRAY /dev/md2 metadata=1.2 name=livecd:2 UUID=341cc1eb:8f310932:c566a032:4a6278bd
ARRAY /dev/md3 metadata=1.2 name=livecd:3 UUID=70789b25:da92d1a7:aa051535:f3c03717
|
/etc/fstab
Code: |
/dev/md1 /boot ext2 noatime,notail,rw 1 2
/dev/md2 none swap sw 0 0
/dev/md3 / ext3 noatime,notail,rw 0 1
/dev/cdrom /mnt/cdrom auto noauto,ro 0 0
|
/boot/grub.conf
Code: |
default 0
timeout 5
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
title Gentoo Linux 3.6.11 Genkernel
root (hd0,0)
kernel /boot/kernel-genkernel-x86_64-3.6.11-gentoo mdadm md=3,/dev/sda3,/dev/sdb3,/dev/sdc3 real_root=/dev/md3 rootfstype$
initrd /boot/initramfs-genkernel-x86_64-3.6.11-gentoo
title Gentoo Linux 3.6.11
root (hd0,0)
kernel /kernel-3.6.11-gentoo root=/dev/md3 md=3,/dev/sda3,/dev/sdb3,/dev/sdc3 rootfstype=ext3
title Gentoo Linux 3.6.11 initrd
root (hd0,0)
kernel /kernel-3.6.11-gentoo root=/dev/md3 md=3,/dev/sda3,/dev/sdb3,/dev/sdc3 rootfstype=ext3
initrd /boot/initramfs-genkernel-x86_64-3.6.11-gentoo
title Gentoo Linux 3.6.11 (rescue)
root (hd0,0)
kernel /kernel-3.6.11-gentoo root=/dev/md3 md=3,/dev/sda3,/dev/sdb3,/dev/sdc3 init=/bin/bb
initrd /boot/initramfs-genkernel-x86_64-3.6.11-gentoo
|
lspci -l [/b]
Code: |
00:00.0 Host bridge: Intel Corporation 3200/3210 Chipset DRAM Controller (rev 01)
Subsystem: Hewlett-Packard Company Device 31f3
00:01.0 PCI bridge: Intel Corporation 3200/3210 Chipset Host-Primary PCI Express Bridge (rev 01)
Kernel driver in use: pcieport
00:1a.0 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 (rev 02)
Subsystem: Hewlett-Packard Company Device 31f4
Kernel driver in use: uhci_hcd
Kernel modules: uhci-hcd
00:1a.1 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 (rev 02)
Subsystem: Hewlett-Packard Company Device 31f4
Kernel driver in use: uhci_hcd
Kernel modules: uhci-hcd
00:1a.2 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #6 (rev 02)
Subsystem: Hewlett-Packard Company Device 31f4
Kernel driver in use: uhci_hcd
Kernel modules: uhci-hcd
00:1a.7 USB controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 (rev 02)
Subsystem: Hewlett-Packard Company Device 31f4
Kernel driver in use: ehci_hcd
Kernel modules: ehci-hcd
00:1c.0 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 1 (rev 02)
Kernel driver in use: pcieport
00:1c.4 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 5 (rev 02)
Kernel driver in use: pcieport
00:1c.5 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 6 (rev 02)
Kernel driver in use: pcieport
00:1d.0 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 02)
Subsystem: Hewlett-Packard Company Device 31f4
Kernel driver in use: uhci_hcd
Kernel modules: uhci-hcd
00:1d.1 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 02)
Subsystem: Hewlett-Packard Company Device 31f4
Kernel driver in use: uhci_hcd
Kernel modules: uhci-hcd
00:1d.2 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 02)
Subsystem: Hewlett-Packard Company Device 31f4
Kernel driver in use: uhci_hcd
Kernel modules: uhci-hcd
00:1d.7 USB controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 02)
Subsystem: Hewlett-Packard Company Device 31f4
Kernel driver in use: ehci_hcd
Kernel modules: ehci-hcd
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 92)
00:1f.0 ISA bridge: Intel Corporation 82801IR (ICH9R) LPC Interface Controller (rev 02)
Subsystem: Hewlett-Packard Company Device 31f4
00:1f.2 IDE interface: Intel Corporation 82801IR/IO/IH (ICH9R/DO/DH) 4 port SATA Controller [IDE mode] (rev 02)
Subsystem: Hewlett-Packard Company Device 31f4
Kernel driver in use: ata_piix
Kernel modules: ata_generic, pata_acpi, ata_piix
00:1f.3 SMBus: Intel Corporation 82801I (ICH9 Family) SMBus Controller (rev 02)
Subsystem: Hewlett-Packard Company Device 31f4
00:1f.5 IDE interface: Intel Corporation 82801I (ICH9 Family) 2 port SATA Controller [IDE mode] (rev 02)
Subsystem: Hewlett-Packard Company Device 31f4
Kernel driver in use: ata_piix
Kernel modules: ata_generic, pata_acpi, ata_piix
0d:00.0 VGA compatible controller: Matrox Electronics Systems Ltd. MGA G200e [Pilot] ServerEngines (SEP1) (rev 02)
Subsystem: Hewlett-Packard Company ProLiant DL140 G3
0e:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5722 Gigabit Ethernet PCI Express
Subsystem: Hewlett-Packard Company NC105i PCIe Gigabit Server Adapter
Kernel driver in use: tg3
Kernel modules: tg3
|
cat /proc/mdstat (on live cd)
Code: |
Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] [linear] [multipath]
md125 : active (auto-read-only) raid1 sda2[0] sdb2[1]
2096116 blocks super 1.2 [2/2] [UU]
md126 : active raid1 sda1[0] sdb1[1]
32704 blocks [2/2] [UU]
md127 : active raid5 sdb3[1] sda3[0] sdc3[3]
308317184 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/3] [UUU]
unused devices: <none>
|
Note for some reason the raid arrays have renamed them self's to md125-127 when they where originally md1-3, I am not sure if this is causing me problems. |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
|
Back to top |
|
|
Sum1 Tux's lil' helper
Joined: 26 Dec 2006 Posts: 104
|
Posted: Sun Jan 13, 2013 12:01 am Post subject: |
|
|
DONAHUE wrote: | https://forums.gentoo.org/viewtopic-t-943656-highlight-md125.html seems to have the last step in your journey as well as the previous ones you already suffered through. |
Yes, I was going to suggest rebuilding the swap and root partitions with "metadata = 0.90" in mdadm.conf.
I tried a similar RAID 1 install at this time last year using the 1.20 option and received similar failure.
Upon reinstall everything worked perfectly with the older "metadata=0.90" option.
***I should clarify that my install used Grub 1.x |
|
Back to top |
|
|
Goverp Veteran
Joined: 07 Mar 2007 Posts: 1998
|
Posted: Sun Jan 13, 2013 10:50 am Post subject: Re: Software Raid Wont Boot |
|
|
peterab85 wrote: | ...
However, despite following these guides I have not had success in getting the installation to boot.
...
After further reading, I have found that grub can not load arrays with 1.2 blocks so I have added initrd to the grub configuration file, however this still does not work. |
AFAIK, it's grub-2 that can handle some sorts of RAID, and you're using "legacy" grub which can't handle any sort of RAID. But that's not the issue, as all it needs do is find the kernel from the boot partition (hd0,0) which your logs show works.
Before you had the initrd (actually, IIUC you are using an initramfs, but I don't think the difference matters here, and grub uses the keyword initrd in either case), you were trying to get the kernel to assemble the array. There are two ways you can do that; auto-assembly and assembly via the kernel parameter list. Your grub.conf shows you using the latter.
FWIW, auto-assembly uses the partition type FD, and absolutely requires metadata 0.90, and is deprecated. Assembly via kernel parameters (md=3,/dev/sda3,...) doesn't document which metadata is supported, or whether its deprecated. From my experience, I'd say it should be deprecated as it appears to use much of the same code as auto-assembly.
As far as I can tell, the kernel contains a stripped-down version of mdadm that can assembly V0.90 arrays, and which can assemble arrays with V1.0 metadata when using the kernel parameter list, BUT IT STILL USES V0.90 code. It works because V0.90 and V1.0 metadata occupy the same place on disk. V1.2 metadata is elsewhere, so I think it will never assemble them. I had a similar setup with V1.0 metadata working for a few years. Then I noticed it was ignoring the V1.0 bit maps I'd specified. As a result, I'm sure the kernel is running back-level mdadm code, which is reasonable given auto-assembly is deprecated.
SO, all that says you need an initrd to run current mdadm to assemble your V1.2 array. Reformatting to use V0.90 metadata is literally a backward step.
peterab85 wrote: | The errors I am getting are below.
When booting the kernel I complied without initrd I get the flowing error:
Code: |
No filesystem could mount root, tried: ext3
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(9,3)
Pid:1, comm: swapper/0 Not tainted 3.6.11-gentoo #2
|
When booting the kernel I complied with initrd I get the flowing error:
Code: |
->Mounting /dev/md3 as root...
->Using mount -t ext3 -o ro
mount:mounting /dev/md3 on /newroot failed: invalid argument
!!Could not mount specified ROOT,try again
!!Could not find the root block device in
|
When booting with genkernel I get the flowing error:
Code: |
->Mounting /dev/md3 as root...
->Using mount -t ext3 -o ro
mount:mounting /dev/md3 on /newroot failed: invalid argument
!!Could not mount specified ROOT,try again
!!Could not find the root block device in
|
|
The failure without an initrd shows the kernel assembly failed. It's possibly changing your kernel parameters to
Code: | root=/dev/md127 md=127,/dev/sda3,/dev/sdb3,/dev/sdc3 | might work - the kernel seems to build md127 irrespective of what you specified when you created the array, and definitely the kernel ignored mdadm.conf (since it can't read it at this time!). But you'll have the kernel using V0.90 code to handle a V1.20 metadata, and that's not good.
The other two boot sequences are the same, the distinction is that genkernel builds the initrd for you, but it looks like both use the same initial boot script. If you look at what genkernel leaves behind, this boot script is a massive "one size fits all" script for RAID, LVM, LUKS and no doubt more. I found a much easier way to do it using the kernel "make" scripts, and I intend to add a HOW-TO to the wiki "real soon now". But for the moment, you should be able to fix what you have now.
I'd start by removing the md=3,... parameters from the kernel parameter lists in both of the initrd cases - as you are using the initrd to build the array, you definitely don't want the kernel trying to do it as well. Your root should specify /dev/md3, but if that still doesn't work it might be worth trying /dev/md127. (I think the md127 comes from the kernel assembly code; this shows it ignores the metadata). You also need to change the "mdadm" parameter for the genkernel setup to "domdadm". So your genkernel setup should be similar to the following:
Code: | title Gentoo Linux 3.6.11 Genkernel
root (hd0,0)
kernel /boot/kernel-genkernel-x86_64-3.6.11-gentoo domdadm root=/dev/md3 rootfstype=ext3
initrd /boot/initramfs-genkernel-x86_64-3.6.11-gentoo |
Hope that helps. _________________ Greybeard |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54216 Location: 56N 3W
|
Posted: Sun Jan 13, 2013 4:17 pm Post subject: |
|
|
peterab85,
Kernel raid auto assembly only works with raid superblock version 0.9.
Your root is version 1.2, therfore you you must use an initrd to assemble your raid before root can be mounted.
If you don't mind the initrd built by black magic, both genkernel and dracut can build you a suitable initrd.
Its not difficult to do it yourself either but I say that with the benefit of getting wrong more times than I got it right first time. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
|
|
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
|
|