|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Re: Software RAID install
From: Alex Cichowski (alex
epathology.com.au)
Date: Fri Jul 25 2003 - 10:28:47 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, 24 Jul 2003, Steven J. Surdock, PE wrote:
> Is it possible to build a ramdisk kernel with RAIDFrame support, create a
> RAID 1 array during the install and then perform a "normal" install on the
> array?
The patch below may be of some use. It adds partial RAIDframe support to
the i386 ramdisk CD and install program.
You still have to set up the RAID array in the shell before starting the
installation, but the patched install program will then do everything
except install the kernel and bootloader, which you can manually install
on small boot partitions on each drive.
(A note on building the ramdisk CD: you have to update the MAKEDEV in
/dev, as this is the one actually used by the build rather than the one in
the source tree.)
Alex
------------------------------
diff -uNr src.orig/distrib/i386/common/install.md src/distrib/i386/common/install.md
--- src.orig/distrib/i386/common/install.md Mon Jan 27 02:28:39 2003
+++ src/distrib/i386/common/install.md Sat Jun 28 21:17:27 2003

-160,13 +160,21 
{
local _disk=$1
- ask "Do you want to use *all* of $_disk for OpenBSD?" no
- case $resp in
- y*|Y*) md_prep_fdisk ${_disk} Y ;;
- *) md_prep_fdisk ${_disk} ;;
- esac
+ case $_disk in
+ raid*) cat << __EOT
+
+You will now create an OpenBSD disklabel for the RAID array. The disklabel
+defines how OpenBSD splits up the RAID array into OpenBSD partitions in which
+filesystems and swap space are created.
- cat << __EOT
+__EOT
+ ;;
+ *) ask "Do you want to use *all* of $_disk for OpenBSD?" no
+ case $resp in
+ y*|Y*) md_prep_fdisk ${_disk} Y ;;
+ *) md_prep_fdisk ${_disk} ;;
+ esac
+ cat << __EOT
You will now create an OpenBSD disklabel inside the OpenBSD MBR
partition. The disklabel defines how OpenBSD splits up the MBR partition

-176,6 +184,8 
start of the disk, NOT the start of the OpenBSD MBR partition.
__EOT
+ ;;
+ esac
md_checkfordisklabel $_disk
case $? in
diff -uNr src.orig/distrib/i386/ramdisk_cd/list.local src/distrib/i386/ramdisk_cd/list.local
--- src.orig/distrib/i386/ramdisk_cd/list.local Tue Apr 30 12:53:57 2002
+++ src/distrib/i386/ramdisk_cd/list.local Sat Jun 28 21:17:28 2003

-3,3 +3,7 
# add local links; use bin/sh since instbin has already been unlinked
LINK instbin sbin/wicontrol
LINK instbin sbin/ancontrol
+
+# add raidctl
+LINK instbin sbin/raidctl
+
diff -uNr src.orig/distrib/miniroot/install.sub src/distrib/miniroot/install.sub
--- src.orig/distrib/miniroot/install.sub Fri Mar 7 05:34:17 2003
+++ src/distrib/miniroot/install.sub Sat Jun 28 21:17:28 2003

-162,7 +162,15 
}
get_dkdevs() {
- bsort `sed -ne "${MDDISKDEVS:-/^[sw]d[0-9][0-9]* /s/ .*//p}" /var/run/dmesg.boot`
+ local _x, _y, _devs
+ _devs=`sed -ne "${MDDISKDEVS:-/^[sw]d[0-9][0-9]* /s/ .*//p}" /var/run/dmesg.boot`
+ for _x in /dev/raid[0-9]c /dev/raid[0-9][0-9]c; do
+ [ -b $_x ] || continue
+ raidctl -s "$_x" >/dev/null 2>&1 || continue
+ _y=${_x#/dev/}
+ _devs="$_devs ${_y%c}"
+ done
+ bsort $_devs
}
get_cddevs() {

-1738,7 +1746,10 
echo "done."
cd /
- md_installboot $ROOTDISK
+ case $ROOTDISK in
+ raid*) echo NOTE: Boot setup must be performed manually for RAID root disks. ;;
+ *) md_installboot $ROOTDISK ;;
+ esac
populateusrlocal
diff -uNr src.orig/etc/etc.i386/MAKEDEV src/etc/etc.i386/MAKEDEV
--- src.orig/etc/etc.i386/MAKEDEV Tue Jan 7 03:49:59 2003
+++ src/etc/etc.i386/MAKEDEV Sat Jun 28 21:26:44 2003

-222,7 +222,7 
case $i in
ramdisk)
R std bpf0 fd0 wd0 wd1 wd2 sd0 sd1 sd2 tty00 tty01 rd0
- R st0 cd0 ttyC0 random wskbd0
+ R st0 cd0 ttyC0 random wskbd0 raid0 raid1 raid2 raid3
;;
std)
diff -uNr src.orig/etc/etc.i386/MAKEDEV.md src/etc/etc.i386/MAKEDEV.md
--- src.orig/etc/etc.i386/MAKEDEV.md Thu Dec 5 15:00:21 2002
+++ src/etc/etc.i386/MAKEDEV.md Sat Jun 28 21:26:21 2003

-105,7 +105,7 
dnl
ramdisk)
_recurse std bpf0 fd0 wd0 wd1 wd2 sd0 sd1 sd2 tty00 tty01 rd0
- _recurse st0 cd0 ttyC0 random wskbd0
+ _recurse st0 cd0 ttyC0 random wskbd0 raid0 raid1 raid2 raid3
;;
_std(1, 2, 50, 4, 7)
diff -uNr src.orig/sys/arch/i386/conf/RAMDISK_CD src/sys/arch/i386/conf/RAMDISK_CD
--- src.orig/sys/arch/i386/conf/RAMDISK_CD Wed Sep 25 04:38:14 2002
+++ src/sys/arch/i386/conf/RAMDISK_CD Sat Jun 28 21:17:28 2003

-331,3 +331,4 
#pseudo-device ppp 1 # PPP
pseudo-device bpfilter 1 # packet filter
pseudo-device rd 1 # ramdisk
+pseudo-device raid 4 # RAIDframe
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]