Compaq Smart Array support cciss and ida

Timo.Schnibbe at bertelsmann.de Timo.Schnibbe at bertelsmann.de
Tue Mar 5 12:58:41 CET 2002


Hi,

I have created a patch to enable support for both, the cciss and the ida
driver for Compaqs Smart Array Controllers in the script setup_harddisks.
This patch still works with all sd* and hd* harddisks as well.

Timo

Here comes the patch:

--- setup_harddisks.timo	Tue Mar  5 12:34:59 2002
+++ setup_harddisks	Tue Mar  5 12:34:59 2002
@@ -254,7 +254,7 @@
     }
     $result = `sh -c "LC_ALL=C sfdisk -d -q"`;
     foreach $line(split(/\n/,$result)){
-	if($line =~ m'# partition table of
/dev/(ida/c\dd\d|rd/c\dd\d|[a-z]+)'i){
+	if($line =~ m'# partition table of
/dev/(cciss/c\dd\d|ida/c\dd\d|rd/c\dd\d|[a-z]+)'i){
 	   $disk = $1;
         }
 	if($line =~
m#/^/dev/(.+?)\s*:\s+start=\s*(\d+),\s+size=\s*(\d+),\s+Id=\s*([a-z0-9]+)\b(
.*)$#i){
@@ -322,7 +322,7 @@
 	    if ($paras =~ / end/i){
 		$disk = "";
 	    } else {
-		if($paras =~ m# (/dev/)?(ida/c\dd\d|rd/c\dd\d|[a-z]+)#i){
+		if($paras =~ m#
(/dev/)?(cciss/c\dd\d|ida/c\dd\d|rd/c\dd\d|[a-z]+)#i){
 		    $disk = "$2";
 		    ($DiskMountpoints{$disk})
 		      && die "ERROR: there are more than one configuration
of disk $disk.\n";
@@ -681,7 +681,7 @@
 	$PrimaryNo = 1;
         foreach $mountpoint(split(/\s/,$DiskMountpoints{$disk})) {
 	    $part = $MountpointPart{$mountpoint};
-	    $part =~ /(\d+)/;
+	    $part =~ /(\d+)$/;
 	    ($1 < 5) && ($PrimaryNo++);
 	    if ( ($1 == 5) && ($PrimaryNo < 5) ){
 	        for $number($PrimaryNo..4) {



More information about the linux-fai mailing list