I'm having problems mounting a root-raid system. My raid setup is the
following:
md0: /dev/hda1 /dev/hdc1
md1: /dev/hda3 /dev/hdc5
md2: /dev/hda5 /dev/hdc6
(all raid1)
When booting with /dev/hda2 as the root and mounting /dev/md0 on
/mnt/newroot, everything comes up fine. The problem comes in with using
a boot CD with dos/loadlin on it and an initrd file called rescue.gz.
Basically, everything comes up fine (kernel boots, etc), but when it starts
to ckraid /dev/md0, I get the following error:
md:03:02: invalid superblock magic (0) on block 128448
/dev/md0: invalid argument
It ckraid's the other md volumes fine (md1 and md2)..
Later on in the boot I get:
ckraid: version 0.36.4
parsing configuration file
handling device md0
analyzing super-block
disk 0: /dev/hda1, 257008kB, superblock at 256896kB
/dev/hda1 is mounted
ckraid: aborted
then later on,:
Oops!: md0 not running, giving up!
isofs_read_super: bread failed, dev=09:00, iso_blknum=16, block=32
kernel panic: unable to mount root fs on 09:00
Then everything stops.
I have been working on this for two days now and I am just about
to give up. If anyone can assist me, it would be much appreciated.
here are my system files (from initrd image):
(/bin/ash is standard bourne shell)
linuxrc:
#!/bin/ash
if [ -s /etc/mdtab -a -f /sbin/mdadd ]
then
[ "$VERBOSE" != no ] && echo "Adding md devices."
mdadd -ar
if [ $? -ne 0 -a -d /etc/raid -a -x /sbin/ckraid ]; then
echo "Some of the RAID devices have errors:"
for conf in /etc/raid/*.conf; do
echo " Checking \"`echo $conf | sed 's?.*/\([^/]*\).conf?\1?'`\":"
ckraid --fix $conf
done
mdstop -a
mdadd -ar
if [ $? -ne 0 ]; then
echo " WARNING: unrecovered RAID errors!"
fi
fi
fi
/bin/mount -t proc /proc /proc
echo 0x900 > /proc/sys/kernel/real-root-dev
/bin/umount /proc
--- snip ---
/etc/fstab:
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/md0 / ext2 defaults,errors=remount-ro 0 1
/dev/md1 /var ext2 defaults 0 2
/dev/md2 /usr ext2 defaults 0 2
#/dev/hda2 none swap sw 0 0
proc /proc proc defaults 0 0
--- snip ---
/etc/mdtab:
/dev/md0 raid1 /dev/hda1 /dev/hda2
/dev/md1 raid1 /dev/hda3 /dev/hdc2
/dev/md2 raid1 /dev/hda5 /dev/hdc3
dmesg -- this is from a successful boot using /dev/hda2 as the root partition:
Linux version 2.2.10 (root@smtp) (gcc version 2.7.2.3) #2 Wed Jul 28 11:35:03 EDT 1999
Detected 299751905 Hz processor.
Console: colour VGA+ 80x25
Calibrating delay loop... 299.01 BogoMIPS
Memory: 95836k/98304k available (832k kernel code, 408k reserved, 1188k data, 40k init)
CPU: Intel Pentium II (Klamath) stepping 04
Checking 386/387 coupling... OK, FPU using exception 16 error reporting.
Checking 'hlt' instruction... OK.
POSIX conformance testing by UNIFIX
PCI: PCI BIOS revision 2.10 entry at 0xee880
PCI: Using configuration type 1
PCI: Probing PCI hardware
Linux NET4.0 for Linux 2.2
Based upon Swansea University Computer Society NET3.039
NET4: Unix domain sockets 1.0 for Linux NET4.0.
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP
Starting kswapd v 1.5
Serial driver version 4.27 with no serial options enabled
ttyS00 at 0x03f8 (irq = 4) is a 16550A
ttyS01 at 0x02f8 (irq = 3) is a 16550A
pty: 256 Unix98 ptys configured
RAM disk driver initialized: 16 RAM disks of 4096K size
PIIX4: IDE controller on PCI bus 00 dev a1
PIIX4: not 100% native mode: will probe irqs later
ide0: BM-DMA at 0x1030-0x1037, BIOS settings: hda:DMA, hdb:pio
ide1: BM-DMA at 0x1038-0x103f, BIOS settings: hdc:DMA, hdd:DMA
hda: WDC AC24300L, ATA DISK drive
hdc: Maxtor 83249D3, ATA DISK drive
hdd: MATSHITA CR-5850, ATAPI CDROM drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
hda: WDC AC24300L, 4112MB w/256kB Cache, CHS=557/240/63, UDMA
hdc: Maxtor 83249D3, 3089MB w/256kB Cache, CHS=6278/16/63, UDMA
hdd: ATAPI 24X CD-ROM drive, 128kB Cache
Uniform CDROM driver Revision: 2.55
Floppy drive(s): fd0 is 1.44M
FDC 0 is a National Semiconductor PC87306
md driver 0.36.6 MAX_MD_DEV=4, MAX_REAL=8
raid1 personality registered
PCI: Enabling bus mastering for device 00:80
TLAN 1.0: eth0 irq=11 io=1020, Compaq Netelligent 10/100 TX Embedded UTP, Rev. 16
Partition check:
hda: hda1 hda2 hda3 hda4 < hda5 >
hdc: [PTBL] [784/128/63] hdc1 hdc2 hdc3
VFS: Mounted root (ext2 filesystem) readonly.
Freeing unused kernel memory: 40k freed
REGISTER_DEV hda1 to md0 done
REGISTER_DEV hdc1 to md0 done
raid1: device 03:01 operational as mirror 0
raid1: device 16:01 operational as mirror 1
raid1: raid set 09:00 active with 2 out of 2 mirrors
md: updating raid superblock on device 03:01, sb_offset == 256896
md: updating raid superblock on device 16:01, sb_offset == 257920
REGISTER_DEV hda3 to md1 done
REGISTER_DEV hdc2 to md1 done
md: 09:01: raid array is not clean -- run ckraid
REGISTER_DEV hda5 to md2 done
REGISTER_DEV hdc3 to md2 done
md: 09:02: raid array is not clean -- run ckraid
md: updating raid superblock on device 03:01, sb_offset == 256896
md: updating raid superblock on device 16:01, sb_offset == 257920
REGISTER_DEV hda1 to md0 done
REGISTER_DEV hdc1 to md0 done
raid1: device 03:01 operational as mirror 0
raid1: device 16:01 operational as mirror 1
raid1: raid set 09:00 active with 2 out of 2 mirrors
md: updating raid superblock on device 03:01, sb_offset == 256896
md: updating raid superblock on device 16:01, sb_offset == 257920
REGISTER_DEV hda3 to md1 done
REGISTER_DEV hdc2 to md1 done
raid1: device 03:03 operational as mirror 0
raid1: device 16:02 operational as mirror 1
raid1: raid set 09:01 active with 2 out of 2 mirrors
md: updating raid superblock on device 03:03, sb_offset == 1534592
md: updating raid superblock on device 16:02, sb_offset == 1536128
REGISTER_DEV hda5 to md2 done
REGISTER_DEV hdc3 to md2 done
raid1: device 03:05 operational as mirror 0
raid1: device 16:03 operational as mirror 1
raid1: raid set 09:02 active with 2 out of 2 mirrors
md: updating raid superblock on device 03:05, sb_offset == 612224
md: updating raid superblock on device 16:03, sb_offset == 612800
TLAN: eth0: Starting autonegotiation.
TLAN: eth0: Autonegotiation complete.
TLAN: eth0: Link active.
TIA
--Adam