Something changed since crux-2.3. ;-)
Hopefully.
But with the good old crux-2.3 boot-cd, I can boot a server and the
md-devices were autodetected and binded correctly.
Crux-2.3 md, scsi, sata compiled into kernel -> works
Crux-2.4, Crux-2.5: kernel modular, initramfs -> no autodetect anymore
Or is this a difference between mdev and udev ?
I tried also a selfbuild kernel with all relevant parts buildin. But
this doesn't help.
Short google-session brought some results:
"... kernel autodetect is correspondingly deprecated."
http://linux-raid.osdl.org/index.php/RAID_Boot
They solved it with an initramfs and mdadm.conf.
But this is the wrong way for a live-cd.
I attached 2 patches for "manuell auto-detecting" raids within the
squashfs-environment.
Is this the "right" way for crux ?
Any help would be appreciated.
best regards
Falk Hamann
--
Falk Hamann, IT
T +49-7191-9669-242, F +49-7191-9669-6242, Falk.Hamann@dbaudio.com
www.dbaudio.com
d&b audiotechnik GmbH, Eugen-Adolff-Str. 134, 71522 Backnang, Germany
Geschäftsführer: Frank Bothe, Markus Strohmeier
Finanzen: Kay Lange; Marketing: Simon Johnston; Vertrieb: Peter Tongue
Sitz: Backnang; Amtsgericht - Registergericht - Stuttgart, HRB 725789
--- /tmp/squashfs-root/opt/bin/raids.sh.empty 1970-01-01 01:00:00.000000000 +0100
+++ /tmp/squashfs-root/opt/bin/raids.sh 2008-11-28 15:09:55.000000000 +0100
@@ -0,0 +1,28 @@
+#!/bin/bash
+partitions=`cat /proc/partitions |sed "2d;s/(s*S*){3}s*(S*)/2/;"`
+uuids=""
+for dev in $partitions;do
+ hdd=`echo $dev | sed -e 's#([a-z]+)([0123456789]+)#/dev/1#'`
+ nr=`echo $dev | sed -e 's#([a-z]+)([0123456789]+)#2#'`
+ if [ ! -b $hdd ];then continue;fi
+ id=`sfdisk --id $hdd $nr`
+ if [ "XXX$id" == "XXXfd" ];then
+ uuid=`mdadm --examine /dev/$dev|grep UUID|sed "s/.*UUIDs*:s*(S*)/1/"`
+ minor=`mdadm --examine /dev/$dev|grep "Preferred Minor"|sed "s/.*Preferred Minors*:s*(S*)/1/"`
+ uuids="$uuids $uuid"
+ if [ -e /sys/block/md${minor}/md/array_state ];then
+ status=`cat /sys/block/md${minor}/md/array_state`
+ case "$status" in
+ clean)
+ echo md$minor already started and clean
+ ;;
+ *)
+ echo Status of md$minor is "$status". Please start manually, if needed !
+ echo mdadm --assemble /dev/md${minor} --uuid $uuid
+ ;;
+ esac
+ else
+ mdadm --assemble /dev/md${minor} --uuid $uuid
+ fi
+ fi
+done
--- /tmp/squashfs-root/etc/rc.orig 2008-12-01 14:19:56.000000000 +0100
+++ /tmp/squashfs-root/etc/rc 2008-11-28 12:35:11.000000000 +0100
@@ -27,4 +27,12 @@
# Setup network
/sbin/ifconfig lo 127.0.0.1
+# SW-Raids
+read -t5 -p "Do want to search and start SW-raids ? (Y/n)" choice
+if [ "XXX$choice" != "XXXn" ];then
+ if [ -x /opt/bin/raids.sh ];then
+ /opt/bin/raids.sh
+ fi
+fi
+
# End of file
_______________________________________________
CRUX mailing list
CRUX@lists.crux.nu
http://lists.crux.nu/mailman/listinfo/crux
12-01-2008, 05:34 PM
Juergen Daubert
CRUX-CD without raid-autodetect !?
On Mon, Dec 01, 2008 at 02:44:29PM +0100, Falk Hamann wrote:
> Dear community
Hallo Falk,
> Something changed since crux-2.3. ;-)
> Hopefully.
> But with the good old crux-2.3 boot-cd, I can boot a server and the
> md-devices were autodetected and binded correctly.
>
> Crux-2.3 md, scsi, sata compiled into kernel -> works
> Crux-2.4, Crux-2.5: kernel modular, initramfs -> no autodetect anymore
thanks for the report, even though I'm not really sure what your problem
actually is.
I've no "real" raid here, only two partitions on my harddisk configured
as raid, to test the basic functions of mdadm. However I was able to
examine and assemble that raid after booting with crux-2.5-test3:
#> mdadm --examine --scan --config=partitions
ARRAY /dev/md0 level=raid1 num-devices=2 UUID=59d193c1:4b1ad41f:43f33740:3d6f013e
#> mdadm --assemble --config=partitions --super-minor=0 /dev/md0
mdadm: /dev/md0 has been started with 2 drives.