bootdisk: README.RAID (HEAD) installer-functions (HEAD) installer-prep (HEAD) installer-raid-functions (HEAD) installer-validate (HEAD) [qboosh]

PLD CVS pld-cvs-commit w pld.org.pl
Pią, 23 Sie 2002, 14:45:22 CEST


Module name:	bootdisk
Changes by:	qboosh	02/08/23 14:44:49

Modified files:
	README.RAID installer-functions installer-prep
	installer-raid-functions installer-validate

Log message:
- added ataraid support

Index: README.RAID
===================================================================
RCS file: /cvsroot/bootdisk/batch-installer/README.RAID,v
diff -d -u -r1.2 -r1.3
--- README.RAID	2001/10/13 11:49:02	1.2
+++ README.RAID	2002/08/23 12:44:48	1.3
@@ -63,13 +63,14 @@
   * DAC960, with devices in /dev/rd
   * cciss, with devices in /dev/cciss
 cpqarray/EISA is not supported, as there is currently no way to pass it arguments.
+  * ataraid (hptraid or pdcraid), with devices in /dev/ataraid
 
 In order to install on these raid devices one need to list /dev/ida/c0d0 or whatever
 in dest_devices, (same as /dev/hda or /dev/sda), and then in dest_partX_device
-(either /dev/rd/c0d0 or /dev/rd/c1d7p3). /dev/(ida|rd|cciss)/c\dd\d+ is treated equally
-the same as /dev/[hs]d[a-z]. 
+(either /dev/rd/c0d0 or /dev/rd/c1d7p3). /dev/(ida|rd|cciss)/c\dd\d+ and
+/dev/ataraid/d\d+ are treated equally the same as /dev/[hs]d[a-z]. 
 
-Devices in /dev/ida|rd|cciss are created during installation.
+Devices in /dev/ida|rd|cciss|ataraid are created during installation.
 
 
 --mal

Index: installer-functions
===================================================================
RCS file: /cvsroot/bootdisk/batch-installer/installer-functions,v
diff -d -u -r1.52 -r1.53
--- installer-functions	2002/07/29 11:06:13	1.52
+++ installer-functions	2002/08/23 12:44:48	1.53
@@ -494,7 +494,7 @@
 
 # usage: part DEVICE MINOR -> make partiton name
 part () {
-  if echo $1 | grep -q '/dev/\(ida\|rd\|cciss\)/' ; then
+  if echo $1 | grep -q '/dev/\(ida\|rd\|cciss\|ataraid\)/' ; then
     echo "${1}p${2}"
   else
     echo "$1$2"

Index: installer-prep
===================================================================
RCS file: /cvsroot/bootdisk/batch-installer/installer-prep,v
diff -d -u -r1.88 -r1.89
--- installer-prep	2002/07/29 11:10:36	1.88
+++ installer-prep	2002/08/23 12:44:48	1.89
@@ -423,7 +423,7 @@
       load_module sd_mod
   fi
 
-  if echo "$1" | grep -q '/dev/hd' ; then
+  if echo "$1" | grep -q '/dev/\(hd\|ataraid\)' ; then
     # if ide-disk is already loaded we havn't got anything to do.
     # note that this ain't that simple with SCSI -- scsi_hostadapter
     # might have been changed since last load etc.
@@ -449,6 +449,11 @@
   if echo "$1" | grep -q '/dev/rd/' ; then
     . installer-raid-functions
     setup_DAC960
+  fi
+
+  if echo "$1" | grep -q '/dev/ataraid/' ; then
+    . installer-raid-functions
+    setup_ataraid
   fi
   
   if echo "$1" | grep -q '/dev/i2o/' ; then

Index: installer-raid-functions
===================================================================
RCS file: /cvsroot/bootdisk/batch-installer/installer-raid-functions,v
diff -d -u -r1.8 -r1.9
--- installer-raid-functions	2002/07/29 11:11:17	1.8
+++ installer-raid-functions	2002/08/23 12:44:48	1.9
@@ -312,6 +312,19 @@
   mk_hdraid_devices /dev/cciss 104 16
 }
 
+setup_ataraid () {
+  load_package hdraid-mod ataraid.o hptraid.o pdcraid.o
+  load_module ataraid
+  insmod /hptraid.o || insmod /pdcraid.o
+  # devfs doesn't create /dev/ataraid/dXpY devices...
+  for d in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; do
+    mknod /dev/ataraid/d${d} b 114 $(($d * 16))
+    for p in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; do
+      mknod /dev/ataraid/d${d}p${p} b 114 $(($d * 16 + $p))
+    done
+  done
+}
+
 make_i2o_devices () {
   local dev l cnt major minor dev
   

Index: installer-validate
===================================================================
RCS file: /cvsroot/bootdisk/batch-installer/installer-validate,v
diff -d -u -r1.77 -r1.78
--- installer-validate	2002/07/29 11:13:25	1.77
+++ installer-validate	2002/08/23 12:44:48	1.78
@@ -129,6 +129,7 @@
     /dev/hd[a-h] | /dev/sd[a-p] | \
     /dev/ida/c[0-2]d[0-9] | /dev/ida/c[0-2]d1[1-5] | \
     /dev/cciss/c[0-2]d[0-9] | /dev/cciss/c[0-2]d1[1-5] | \
+    /dev/ataraid/d[0-9] | /dev/ataraid/d1[1-5] | \
     /dev/i2o/hd[a-p] | \
     /dev/rd/c[0-7]d[0-9] | /dev/rd/c[0-7]d[1-3][0-9] )
       echo disk
@@ -138,6 +139,8 @@
     /dev/md[0-9] | /dev/md1[1-5] | \
     /dev/cciss/c[0-2]d[0-9]p[1-9] | /dev/cciss/c[0-2]d1[1-5]p[1-9] | \
     /dev/cciss/c[0-2]d[0-9]p1[1-5] | /dev/cciss/c[0-2]d1[1-5]p1[1-5] | \
+    /dev/ataraid/d[0-9]p[1-9] | /dev/ataraid/d1[1-5]p[1-9] | \
+    /dev/ataraid/d[0-9]p1[1-5] | /dev/ataraid/d1[1-5]p1[1-5] | \
     /dev/i2o/hd[a-p][1-9] | /dev/i2o/hd[a-p]1[1-6] | \
     /dev/ida/c[0-2]d[0-9]p[1-9] | /dev/ida/c[0-2]d1[1-5]p[1-9] | \
     /dev/ida/c[0-2]d[0-9]p1[1-5] | /dev/ida/c[0-2]d1[1-5]p1[1-5] | \
@@ -543,14 +546,16 @@
     all_mnt_points="$all_mnt_points $dest_part_mnt_point"
     all_devices="$all_devices $dest_part_device "
    
-    if echo $dest_part_device | grep -q raid ; then
+    if echo $dest_part_device | grep -q 'raid[0-9l]' ; then
       check_raid_dev dest_part${id}_device $dest_part_device
       # little cheat... we don't need to specify size here...
       dest_part_size=1
       eval dest_part${id}_size=1
     else
       if echo $dest_part_device | grep -q '/dev/\(ida\|rd\|cciss\)/' ; then
-      	dev=`echo $dest_part_device | sed -e 's@\(/dev/\(ida\|rd\|cciss\)/c[0-9]d[0-9][0-9]*\).*@\1@' || :` 
+      	dev=`echo $dest_part_device | sed -e 's@\(/dev/\(ida\|rd\|cciss\)/c[0-9]d[0-9][0-9]*\).*@\1@' || :`
+      elif echo $dest_part_device | grep -q '/dev/ataraid/' ; then
+	dev=`echo $dest_part_device | sed -e 's@\(/dev/ataraid/d[0-9][0-9]*\).*@\1@' || :`
       else
         dev=`echo $dest_part_device | sed -e 's/[0-9]*$//' || :`
       fi



Więcej informacji o liście dyskusyjnej pld-installer