From 727d9efc84bac6acd0a11580c8d677489f120464 Mon Sep 17 00:00:00 2001 From: Christian Wiese Date: Wed, 5 Dec 2007 01:02:41 +0200 Subject: [PATCH] Fixed stone install modul to properly detect "special" RAID controllers With this fix stone will be able to detect drives properly, while using one of the following RAID controllers: - Mylex DAC960/AcceleRAID/eXtremeRAID PCI RAID Controllers Driver: DAC960 Device: /dev/rd/cdp - Compaq Intelligent Drive Array Driver: cpqarray Device: /dev/ida/cdp - Compaq Next Generation Drive Array Driver: cciss Device: /dev/cciss/cdp The drives were not properly detected by the stone installer because those controllers are using a non-common way of representing devices (see above). --- base/stone/stone_mod_install.sh | 55 ++++++++++++++++++++++++++++++--- 1 file changed, 51 insertions(+), 4 deletions(-) diff --git a/base/stone/stone_mod_install.sh b/base/stone/stone_mod_install.sh index b53086bea..a5c00102f 100644 --- a/base/stone/stone_mod_install.sh +++ b/base/stone/stone_mod_install.sh @@ -1,7 +1,8 @@ -# --- T2-COPYRIGHT-NOTE-BEGIN --- +# --- SDE-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # -# T2 SDE: package/.../stone/stone_mod_install.sh +# Filename: package/.../stone/stone_mod_install.sh +# Copyright (C) 2007 The OpenSDE Project # Copyright (C) 2004 - 2006 The T2 SDE Project # Copyright (C) 1998 - 2003 Clifford Wolf # @@ -11,7 +12,7 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version 2 of the License. A copy of the # GNU General Public License can be found in the file COPYING. -# --- T2-COPYRIGHT-NOTE-END --- +# --- SDE-COPYRIGHT-NOTE-END --- part_mounted_action() { if gui_yesno "Do you want to un-mount the filesystem on $1?" @@ -134,7 +135,7 @@ de-activate it.\" ''" disk_add() { local x y=0 cmd="$cmd 'Edit partition table of $1:' 'disk_action $1'" - for x in $( cd /dev/ ; ls $1[0-9]* 2> /dev/null ) + for x in $( cd /dev/ ; ls $1$2[0-9]* 2> /dev/null ) do part_add $x ; y=1 done @@ -174,6 +175,52 @@ This dialog allows you to modify your discs parition layout and to create filesy disk_add $x found=1 done + # + # Check for Special Drive Array Controllers + # + # Mylex DAC960/AcceleRAID/eXtremeRAID PCI RAID Controllers + # Driver: DAC960 + # up to 8 controllers, 32 logical drives, 7 partitions + # Device: /dev/rd/cdp + # + # Compaq Intelligent Drive Array + # Driver: cpqarray + # up to 8 controllers, 16 logical drives, 15 partitions + # Device: /dev/ida/cdp + # + # Compaq Next Generation Drive Array + # Driver: cciss + # up to 8 controllers, 16 logical drives, 15 partitions + # Device: /dev/cciss/cdp + # + + # cmax = maximum number of controllers - 1 + # dmax = maximum number of logical drives - 1 + for x in rd cpqarray cciss ; do + if [ -d /dev/$x ] ; then + case $x in + rd) + cmax=7 + dmax=31 + ;; + cpqarray|cciss) + cmax=7 + dmax=15 + ;; + esac + + for c in $( seq 0 $cmax ); do + for d in $( seq 0 $dmax ); do + if [ -b /dev/$x/c${c}d${d} ] ; then + disk_add $x/c${c}d${d} p + found=1 + fi + done + done + fi + done + + for x in $( cat /etc/lvmtab 2> /dev/null ); do vg_add "$x" found=1