PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Kernel kann Raid nicht mounten



totycro
27.05.08, 08:35
Hallo,

Ich habe mir unlängst 2 Festplatten (500GB Samsung S-ATA II 501LJ 16MB) zugelegt, und möchte die als Raid betreiben:

md0: /boot aus sda1, sdb1 als level 1
md1: / aus sda2, sdb2 als level 0
md2: swap aus sda3, sdb3 als level 0
Vorgegangen bin ich nach dieser Anleitung aus dem Gentoo Wiki: http://gentoo-wiki.com/HOWTO_Gentoo_Install_on_Software_RAID

Es funktioniert auch alles außer dem Booten, da erscheint die Fehlermeldung "Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(9,1)", davor werden meine Partitionen mit irgendwelchen Zusatzinformation angezeigt. (Ich weiß nicht, wie ich die vorherigen Meldungen anzeigen lassen kann, sie werden ja nicht auf der Festplatte gespeichert)

Die Raid- (raid0 und raid1), Dateisystem- (ext3) und SATA-Controller-Treiber sind in den Kernel fest einkompiliert:

CONFIG_MD=y
CONFIG_BLK_DEV_MD=y
CONFIG_MD_LINEAR=y
CONFIG_MD_RAID0=y
CONFIG_MD_RAID1=y
[...]
CONFIG_EXT3_FS=y
[...]
CONFIG_SATA_SIS=y

Hat jemand eine Idee, wie ich den Kernel zum Booten bewegen könnte?

INFOS:
Kernel Sourcen: linux-2.6.25-gentoo-r4

fstab:

# <fs> <mountpoint> <type> <opts> <dump/pass>

/dev/md0 /boot ext3 noauto,noatime 1 2
/dev/md1 / ext3 noatime 0 1
/dev/md2 none swap sw 0 0
/dev/cdrom /mnt/cdrom audo noauto,ro 0 0
/dev/fd0 /mnt/floppy auto noauto 0 0

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
# POSIX shared memory (shm_open, shm_unlink).
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
# use almost no memory if not populated with files)
shm /dev/shm tmpfs nodev,nosuid,noexec 0 0

mdadm.conf:

DEVICE /dev/sd[ab][123]
MAILADDR root
ARRAY /dev/md0 level=raid1 num-devices=2 name=0 UUID=d07d9e58:df8f5d5c:b559f913:d3db5ff4
ARRAY /dev/md1 level=raid0 num-devices=2 name=1 UUID=6a480871:ea8ae5d5:73662027:4089abb1
ARRAY /dev/md2 level=raid0 num-devices=2 name=2 UUID=4e8cca2f:50420ab2:f8a670e2:1a58fe58

fdisk -l /dev/sda:

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 12 96358+ fd Linux raid autodetect
/dev/sda2 13 60758 487942245 fd Linux raid autodetect
/dev/sda3 60759 60801 345397+ fd Linux raid autodetect

fdisk -l /dev/sdb:

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 12 96358+ fd Linux raid autodetect
/dev/sdb2 13 60758 487942245 fd Linux raid autodetect
/dev/sdb3 60759 60801 345397+ fd Linux raid autodetect


lspci -v:

00:00.0 Host bridge: Silicon Integrated Systems [SiS] 760/M760 Host (rev 03)
Subsystem: Foxconn International, Inc. Device 0c92
Flags: bus master, medium devsel, latency 32
Memory at d0000000 (32-bit, non-prefetchable) [size=128M]
Capabilities: [a0] AGP version 3.1
Capabilities: [d0] HyperTransport: Slave or Primary Interface
Capabilities: [f0] HyperTransport: Interrupt Discovery and Configuration

00:01.0 PCI bridge: Silicon Integrated Systems [SiS] SG86C202 (prog-if 00 [Normal decode])
Flags: bus master, 66MHz, medium devsel, latency 99
Bus: primary=00, secondary=01, subordinate=01, sec-latency=32
I/O behind bridge: 0000d000-0000dfff
Memory behind bridge: e8000000-e80fffff
Prefetchable memory behind bridge: d8000000-e7ffffff

00:02.0 ISA bridge: Silicon Integrated Systems [SiS] SiS964 [MuTIOL Media IO] (rev 36)
Flags: bus master, medium devsel, latency 0

00:02.5 IDE interface: Silicon Integrated Systems [SiS] 5513 [IDE] (rev 01) (prog-if 80 [Master])
Subsystem: Foxconn International, Inc. Device 0c92
Flags: bus master, medium devsel, latency 128
I/O ports at <unassigned>
I/O ports at <unassigned>
I/O ports at <unassigned>
I/O ports at <unassigned>
I/O ports at 4000 [size=16]

00:03.0 USB Controller: Silicon Integrated Systems [SiS] USB 1.0 Controller (rev 0f) (prog-if 10 [OHCI])
Subsystem: Foxconn International, Inc. Device 0c92
Flags: bus master, medium devsel, latency 32, IRQ 18
Memory at e8125000 (32-bit, non-prefetchable) [size=4K]

00:03.1 USB Controller: Silicon Integrated Systems [SiS] USB 1.0 Controller (rev 0f) (prog-if 10 [OHCI])
Subsystem: Foxconn International, Inc. Device 0c92
Flags: bus master, medium devsel, latency 32, IRQ 19
Memory at e8120000 (32-bit, non-prefetchable) [size=4K]

00:03.2 USB Controller: Silicon Integrated Systems [SiS] USB 1.0 Controller (rev 0f) (prog-if 10 [OHCI])
Subsystem: Foxconn International, Inc. Device 0c92
Flags: bus master, medium devsel, latency 32, IRQ 20
Memory at e8121000 (32-bit, non-prefetchable) [size=4K]

00:03.3 USB Controller: Silicon Integrated Systems [SiS] USB 2.0 Controller (prog-if 20 [EHCI])
Subsystem: Silicon Integrated Systems [SiS] USB 2.0 Controller
Flags: bus master, medium devsel, latency 32, IRQ 17
Memory at e8122000 (32-bit, non-prefetchable) [size=4K]
Capabilities: [50] Power Management version 2

00:04.0 Ethernet controller: Silicon Integrated Systems [SiS] SiS900 PCI Fast Ethernet (rev 91)
Subsystem: Foxconn International, Inc. Device 0c92
Flags: bus master, medium devsel, latency 32, IRQ 21
I/O ports at e000 [size=256]
Memory at e8123000 (32-bit, non-prefetchable) [size=4K]
[virtual] Expansion ROM at 40000000 [disabled] [size=128K]
Capabilities: [40] Power Management version 2

00:05.0 IDE interface: Silicon Integrated Systems [SiS] RAID bus controller 180 SATA/PATA [SiS] (rev 01) (prog-if 85 [Master SecO PriO])
Subsystem: Foxconn International, Inc. Device 0c92
Flags: bus master, 66MHz, medium devsel, latency 32, IRQ 16
I/O ports at ed00 [size=8]
I/O ports at e800 [size=4]
I/O ports at e900 [size=8]
I/O ports at ea00 [size=4]
I/O ports at eb00 [size=16]
I/O ports at <unassigned>
Capabilities: [58] Power Management version 2

00:08.0 Multimedia audio controller: Creative Labs SB0400 Audigy2 Value
Subsystem: Creative Labs Device 1001
Flags: bus master, medium devsel, latency 32, IRQ 22
I/O ports at ec00 [size=64]
Capabilities: [dc] Power Management version 2

00:09.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
Subsystem: Realtek Semiconductor Co., Ltd. RT8139
Flags: bus master, medium devsel, latency 32, IRQ 21
I/O ports at e400 [size=256]
Memory at e8124000 (32-bit, non-prefetchable) [size=256]
Capabilities: [50] Power Management version 2

00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration
Flags: fast devsel
Capabilities: [80] HyperTransport: Host or Secondary Interface

00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map
Flags: fast devsel

00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller
Flags: fast devsel

00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control
Flags: fast devsel

01:00.0 VGA compatible controller: ATI Technologies Inc RV350 NJ [Radeon 9800 XT] (prog-if 00 [VGA controller])
Subsystem: Micro-Star International Co., Ltd. Device 9560
Flags: bus master, stepping, 66MHz, medium devsel, latency 32, IRQ 5
Memory at d8000000 (32-bit, prefetchable) [size=128M]
I/O ports at d000 [size=256]
Memory at e8030000 (32-bit, non-prefetchable) [size=64K]
[virtual] Expansion ROM at e8000000 [disabled] [size=128K]
Capabilities: [58] AGP version 3.0
Capabilities: [50] Power Management version 2

01:00.1 Display controller: ATI Technologies Inc RV350 NJ [Radeon 9800 XT] (Secondary)
Subsystem: Micro-Star International Co., Ltd. Device 9561
Flags: stepping, 66MHz, medium devsel
Memory at e0000000 (32-bit, prefetchable) [disabled] [size=128M]
Memory at e8020000 (32-bit, non-prefetchable) [disabled] [size=64K]
Capabilities: [50] Power Management version 2

grub.conf:
timeout 10
default 0
splashimage=(hd0,0)/boot/grub/splash.xpm.gz

title naql
root (hd0,0)
kernel /boot/kernel root=/dev/md1 md=1,/dev/sda2,/dev/sdb2
boot

Kernel Config:
http://phpfi.com/319946

totycro
28.05.08, 08:10
Fehlen noch irgendwelche Infos oder ist am Szenario etwas nicht klar?

Es ist ein bisschen dringend, also werd ich mich bald leider gezwungen sehen, in einem anderen Forum zu doppelposten..

quinte17
28.05.08, 19:06
wichtig wäre noch:


cat /proc/mdstat

was beim booten genau schief läuft. kernelpanic oder was? genaue meldung

den swap auf ein raid0 zu tun ist sinnfrei, da sich der swap eh in einem raid verteilen würde bei mehreren swap partitionen... nur halt ohne extra zwischenschicht. raid1 wäre zwar sinnvoll, aber nur wenn man auch einen echten absturz der swap-partitionen verkraften können möchte.

mehr fällt mir grad nicht ein :)

greetz

ps: das hier ist ein forum, kein livechat

totycro
28.05.08, 19:52
ps: das hier ist ein forum, kein livechat
Ja, ich weiß, ich hab nur versucht, einen möglichen Doppelpost zu rechtfertigen. :o

Das mit der Swap am raid0 hab ich schon irgendwo gelesen, ich werde mich dann drum kümmern, wenn der Kernel endlich die Root-Partition mountet.

/proc/mdstat von einer livecd aus:

Personalities : [raid1] [raid0]
md2 : active raid0 sda3[0] sdb3[1]
690688 blocks super 1.0 64k chunks

md1 : active raid0 sda2[0] sdb2[1]
975884416 blocks super 1.0 64k chunks

md0 : active raid1 sda1[0] sdb1[1]
96348 blocks super 1.0 [2/2] [UU]

unused devices: <none>

Bei der Kernel Panic sieht der Bildschirm so aus (die vorherigen Meldungen flitzen ziemlich schnell vorbei; ich weiß nicht, wie ich sie in Ruhe lesen könnte):

0102 8192 ram2 (driver?)
0103 8192 ram3 (driver?)
0104 8192 ram4 (driver?)
[ ähnliche nachrichten bis ram15 ]
0340 4194302 hdb driver: ide-cdrom
0800 488386584 sda driver: sd
0801 96358 sda1
0802 487942245 sda2
0803 345397 sda3
0800 488386584 sdb driver: sd
0801 96358 sdb1
0802 487942245 sdb2
0803 345397 sdb3
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(9,1)

quinte17
29.05.08, 08:47
also es sieht bei dir so aus, als ob der autodetect nicht so will :) (der ist ja eh deprecated)
hier mal ein link, der wieder zu einem link führt was dein problem eigentlich betrifft:
(forensuche nach "raid")
http://www.linuxforen.de/forums/showthread.php?t=251577&highlight=raid

bei mir funktioniert der autodetect zwar auch noch in der neuen version, dies führe ich aber darauf zurück, dass ich die alten pata treiber verwende und nicht schon die neuen libata. in letzter zeit häufen sich berichte dass der autodetect nicht mehr geht.

greetz

totycro
29.05.08, 13:23
Thx für den Hinweis, ich bin schon mal auf den Artikel gestoßen, aber er war mir irgendwie zu lang.. :rolleyes:

Ich habe jetzt ein initramfs mit "/usr/src/linux/usr/gen_init_cpio initramfs-source >/boot/initramfs" erstellt, doch beim Booten erscheint diese Meldung:

Freeing unused kernel memory: 784k freed
Failed to execute /init
Kernel panic - not syncing: No init found. Try passing init= option to the kernel.
In der initramfs ist /init aber enthalten, ich habs mal testweise mit cpio entpackt. Muss ich dem Kernel noch irgendwie sagen, dass er jetzt die initramfs verwenden soll?

EDIT:
Der Kernel bricht jetzt früher ab, jetzt kann ich die Ausgaben von md lesen:

md: linear personality registered for level -1
md: raid0 peronality registered for level 0
md: raid1 personality registered for level 1
md: multipath personality registered for level -4
md: faulty personality registered for level -5


grub.conf sieht jetzt so aus:

timeout 10
default 0
splashimage=(hd0,0)/boot/grub/splash.xpm.gz

title naql
root (hd0,0)
kernel /boot/kernel
initrd /boot/initramfs
boot

quinte17
29.05.08, 15:32
welche dateien sind denn in deiner initramfs?
/sbin/mdadm
muss existieren und statisch gebunden sein, damit das initscript (von dem artikel) funktionieren kann.

greetz

totycro
29.05.08, 16:15
welche dateien sind denn in deiner initramfs?
/sbin/mdadm
muss existieren und statisch gebunden sein, damit das initscript (von dem artikel) funktionieren kann.

greetz

Bei mir sind weder busybox noch mdadm statisch gelinkt, ich werd mich jetzt mal dransetzten. Aber ist das wirklich der Grund dafür, dass /init nicht gefunden wird?

Diese Dateien sind in der initramfs:

$ ls -lR
total 4
drwxr-xr-x 2 root root 400 May 29 15:42 bin
drwxr-xr-x 2 root root 80 May 29 15:42 dev
drwxr-xr-x 2 root root 80 May 29 15:42 etc
-rwxr-xr-x 1 root root 3903 May 29 15:42 init
drwxr-xr-x 2 root root 40 May 29 15:42 new-root
drwxr-xr-x 2 root root 40 May 29 15:42 proc
drwxr-xr-x 2 root root 180 May 29 15:42 sbin
drwxr-xr-x 2 root root 40 May 29 15:42 sys

./bin:
total 864
lrwxrwxrwx 1 root root 12 May 29 15:42 [ -> /bin/busybox
lrwxrwxrwx 1 root root 12 May 29 15:42 [[ -> /bin/busybox
lrwxrwxrwx 1 root root 12 May 29 15:42 ash -> /bin/busybox
-rwxr-xr-x 1 root root 875964 May 29 15:42 busybox
lrwxrwxrwx 1 root root 12 May 29 15:42 cat -> /bin/busybox
lrwxrwxrwx 1 root root 12 May 29 15:42 echo -> /bin/busybox
lrwxrwxrwx 1 root root 12 May 29 15:42 false -> /bin/busybox
lrwxrwxrwx 1 root root 12 May 29 15:42 ls -> /bin/busybox
lrwxrwxrwx 1 root root 12 May 29 15:42 mkdir -> /bin/busybox
lrwxrwxrwx 1 root root 12 May 29 15:42 mount -> /bin/busybox
lrwxrwxrwx 1 root root 12 May 29 15:42 mountpoint -> /bin/busybox
lrwxrwxrwx 1 root root 12 May 29 15:42 sed -> /bin/busybox
lrwxrwxrwx 1 root root 12 May 29 15:42 sh -> /bin/busybox
lrwxrwxrwx 1 root root 12 May 29 15:42 test -> /bin/busybox
lrwxrwxrwx 1 root root 12 May 29 15:42 tr -> /bin/busybox
lrwxrwxrwx 1 root root 12 May 29 15:42 true -> /bin/busybox
lrwxrwxrwx 1 root root 12 May 29 15:42 umount -> /bin/busybox
lrwxrwxrwx 1 root root 12 May 29 15:42 wc -> /bin/busybox

./dev:
total 0
crw------- 1 root root 5, 1 May 29 15:42 console
crw-rw-rw- 1 root root 1, 3 May 29 15:42 null

./etc:
total 8
-rw-r--r-- 1 root root 1106 May 29 15:42 fstab
-rw-r--r-- 1 root root 2471 May 29 15:42 mdadm.conf

./new-root:
total 0

./proc:
total 0

./sbin:
total 192
lrwxrwxrwx 1 root root 12 May 29 15:42 e2fsck -> /bin/busybox
lrwxrwxrwx 1 root root 12 May 29 15:42 fsck -> /bin/busybox
lrwxrwxrwx 1 root root 12 May 29 15:42 fsck.ext2 -> /bin/busybox
lrwxrwxrwx 1 root root 12 May 29 15:42 fsck.ext3 -> /bin/busybox
-rwxr-xr-x 1 root root 187416 May 29 15:42 mdadm
lrwxrwxrwx 1 root root 12 May 29 15:42 mdev -> /bin/busybox
lrwxrwxrwx 1 root root 12 May 29 15:42 switch_root -> /bin/busybox

./sys:
total 0

Die Config der initramfs sieht so aus:

dir /bin 0755 0 0
file /bin/busybox /bin/busybox 0755 0 0
slink /bin/sh /bin/busybox 0755 0 0
slink /bin/ash /bin/busybox 0755 0 0
slink /bin/[ /bin/busybox 0755 0 0
slink /bin/[[ /bin/busybox 0755 0 0
slink /bin/test /bin/busybox 0755 0 0
slink /bin/mount /bin/busybox 0755 0 0
slink /bin/umount /bin/busybox 0755 0 0
slink /bin/cat /bin/busybox 0755 0 0
slink /bin/echo /bin/busybox 0755 0 0
slink /bin/false /bin/busybox 0755 0 0
slink /bin/ls /bin/busybox 0755 0 0
slink /bin/mountpoint /bin/busybox 0755 0 0
slink /bin/mkdir /bin/busybox 0755 0 0
slink /bin/sed /bin/busybox 0755 0 0
slink /bin/true /bin/busybox 0755 0 0
slink /bin/tr /bin/busybox 0755 0 0
slink /bin/wc /bin/busybox 0755 0 0
dir /sbin 0755 0 0
slink /sbin/mdev /bin/busybox 0755 0 0
slink /sbin/fsck /bin/busybox 0755 0 0
slink /sbin/e2fsck /bin/busybox 0755 0 0
slink /sbin/fsck.ext2 /bin/busybox 0755 0 0
slink /sbin/fsck.ext3 /bin/busybox 0755 0 0
slink /sbin/switch_root /bin/busybox 0755 0 0
# (the next two are optional)
file /sbin/mdadm /sbin/mdadm 0755 0 0
#file /sbin/lvm /usr/i686-pc-linux-uclibc/sbin/lvm 0755 0 0
file /init /initramfs-init 0755 0 0

# supporting directories
dir /proc 0755 0 0
dir /sys 0755 0 0
dir /new-root 0755 0 0
dir /etc 0755 0 0
file /etc/fstab /etc/fstab 0644 0 0
#dir /etc/lvm 0755 0 0
# (the next two are optional)
#file /etc/lvm/lvm.conf /etc/lvm/lvm.conf 0644 0 0
file /etc/mdadm.conf /etc/mdadm.conf 0644 0 0

# initial device files required (mdev creates the rest)
dir /dev 0755 0 0
nod /dev/console 0600 0 0 c 5 1
nod /dev/null 0666 0 0 c 1 3

quinte17
29.05.08, 19:47
wenn mdadm da von alleine lauffähig ist, dann sollte das kein problem sein.
warum er die init nicht findet, verstehe ich auch nicht. eigentlich sollte er ja die init als root mounten, und dann sollte die init die root umstellen (oder so ähnlich)

bin im moment ein wenig ratlos

edit: sehe gerade :) die init findet er ja, er kann sie nur nicht ausführen, dass sollte näher ergründet werden.

totycro
30.05.08, 20:17
es bootet! ES BOOTET! :D

Vielen Dank für deine Hilfe, quinte17.
Mit den statischen Binaries und nach dem Anpassem von /init in der initramfs funktioniert jetzt alles, und es ist einfach cool, wenn man ein Script vor /sbin/init ausführen kann, hier wird sicher noch so manches Geekiges Platz finden :D

quinte17
31.05.08, 08:15
glückwunsch :)
zum beispiel die passworteingabe einer verschlüsselten root-partition... oder das aktivieren von einer lvm-root...
die frage ist nur was alles sinnvoll ist.

greetz