-
Better suppert for Compaq Computer Corporation Smart Array 5
Hello,
Got sum trouble with that raid controller mentioned above. The hardware gets detected and the driver comes up and detects all bays and everything is perfect but the device nodes in /dev/cciss are not created.
Sollution:
add to the iso image on knoppix /dev/cciss and run the script here to the missing mknods calls:
Code:
#!/bin/sh
#
# Author: Francis Wiran <Francis.Wiran@hp.com>
#
# Script to create device nodes for SMART Array controllers, idea from
# mkdev.cciss found in Documentation. The argument syntax is different,
# hence, the name change.
#
# Usage:
# mkdev_dyn.cciss [ctlr num] [major num] [num log vol] [num partitions]
#
# With no arguments, the script will check to see if there are any cciss
# nodes already created in the /dev directory. If so, then it will assume
# that the nodes for the first 8 controllers are already created by
# /etc/makedev.d, which is likely. If not, then the script will create
# them, using the major numbers reserved for cciss controllers (104 thru 111).
#
# After that, it will start creating nodes for the controllers which major
# numbers are dynamically allocated by the kernel. It will check
# /proc/devices for any cciss controllers with major numbers other than
# 104 thru 111 and creates the nodes.
#
# Note that it is a good idea to run rmdev_dyn.cciss script if you remove
# those controllers (the ones which major numbers were dynamically allocated)
# This will unclutter /dev, as well as preventing possible problems due to
# referenced devices and major numbers no longer available or taken by
# other non-cciss drivers.
#
# With no arguments, the script assumes 16 logical volumes per controller
# and 16 partitions per volume;
#
# Passing arguments:
# If you know that one of your controllers, say cciss8, has been dynamically
# assigned major number 254, and were planning on no more than 2 logical
# volumes, using a maximum of 4 partitions per volume, you could do:
#
# mkdev_dyn.cciss 8 254 2 4
#
# Of course, this has no real benefit over "mkdev_dyn.cciss 8 254" except
# that it doesn't create as many device nodes in /dev/cciss.
#
# Inputs
NR_CTLR=${1-8}
NR_MAJOR=${2-254}
NR_VOL=${3-16}
NR_PART=${4-16}
echo_usage()
{
echo "Usage: mkdev_dyn.cciss [ctlr num] [maj] [volumes] [partitions]"
echo "The script assumes that ctlr 0 thru 7 is statically created"
echo "Therefore, if you want to pass arguments make sure that"
echo "ctlr num is equal or greater than 8, and the major number"
echo "is not one that's statically assigned for cciss controller."
echo "Check the correct major number in /proc/devices"
# Hmm... we don't support volumes and partitions greater than 16
# either.
}
echo_create()
{
echo "created /dev/cciss/c${1}* nodes using major number ${2}"
}
# Function: do_mknod()
# Creates devices nodes under /dev/cciss
# Inputs: $1 - ctlr number
# $2 - major number
# $3 - number of devices on controller
# $4 - number of partitions per device
do_mknod()
{
D=0;
while [ $D -lt $3 ]; do
P=0;
while [ $P -lt $4 ]; do
MIN=`expr $D \* 16 + $P`;
if [ $P -eq 0 ]; then
mknod /dev/cciss/c${1}d${D} b $2 $MIN
else
mknod /dev/cciss/c${1}d${D}p${P} b $2 $MIN
fi
P=`expr $P + 1`;
done
D=`expr $D + 1`;
done
}
# Function: do_dyn
# Search and create cciss nodes for the controllers which
# major numbers are allocated dynamically by the kernel
# instead of using kernel.org 's value of 104 to 111.
#
# Input: $1 - ctlr num - will create nodes /dev/cciss/c${1}
# $2 - major num - the major number to assign to the nodes
# $3 - volumes - max number of volumes per controller
# $4 - partitions - max number of partitions per volume
#
# Note: Without input, this function will start creating nodes
# for controller c8 and above, making assumption that
# c0 thru c7 are already made, and the name c8 and above
# are not already taken.
do_dyn()
{
if [ $# -eq 0 ]; then
C=0;
for MAJ in `cat /proc/devices |\
grep cciss |\
awk '/cciss[0-9]$/ { sub("cciss", "cciss0") }; {print}' |\
sort -k 2,2 |\
awk '{print $1-i}'`;
do
if [ `ls -l /dev/cciss/c* |\
awk '{print $5-i}' |\
uniq |\
grep $MAJ |\
wc -l` -gt 0 ]; then
:
else
do_mknod $C $MAJ $NR_VOL $NR_PART;
echo_create $C $MAJ;
fi
C=`expr $C + 1`;
done
else
do_mknod $1 $2 $3 $4;
echo_create $1 $2;
fi
exit
}
# Start here
# Check the input values
if [ $NR_CTLR -lt 8 ]; then
echo_usage;
exit
fi
if [ $NR_CTLR -ge 8 ]; then
if [ \( $NR_MAJOR -ge 104 \) -a \( $NR_MAJOR -le 111 \) ]; then
echo_usage;
exit
fi
fi
if [ ! -d /dev/cciss ]; then
mkdir -p /dev/cciss
fi
# Assume that if c0d0p1 node already exist, then all nodes from c0d0p1
# to c7d15p15 have been created for us.
if [ ! -b /dev/cciss/c0d0p1 ]; then
C=0;
while [ $C -lt 8 ]; do
MAJ=`expr $C + 104`;
do_mknod $C $MAJ $NR_VOL $NR_PART;
echo_create $C $MAJ;
C=`expr $C + 1`;
done
fi
if [ $# -gt 0 ]; then
do_dyn $NR_CTLR $NR_MAJOR $NR_VOL $NR_PART;
else
do_dyn;
fi
:P
Similar Threads
-
By saa_1973 in forum Networking
Replies: 0
Last Post: 08-02-2005, 03:02 PM
-
By lsten in forum Hdd Install / Debian / Apt
Replies: 0
Last Post: 03-19-2005, 02:05 AM
-
By BillyBobber in forum Customising & Remastering
Replies: 6
Last Post: 01-16-2004, 10:09 PM
-
By wooac in forum Hdd Install / Debian / Apt
Replies: 0
Last Post: 01-08-2004, 06:47 AM
-
By egbill3eagle in forum Hardware & Booting
Replies: 2
Last Post: 01-08-2004, 03:15 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
AMD EPYC 7282 CPU Processor 16 Cores 32 Threads 2.8GHZ up to 3.2GHZ 120W no lock
$75.00
Intel - Core i7-12700K Desktop Processor 12 (8P+4E) Cores up to 5.0 GHz Unloc...
$419.99
Intel Xeon E5-2697A V4 2.6GHz CPU Processor 16-Core Socket LGA2011 SR2K1
$39.99
Intel - Core i9-12900K Desktop Processor 16 (8P+8E) Cores up to 5.2 GHz Unloc...
$619.99
Intel Quad Core i3-12100 3.3GHz 12MB LGA1700 12th Gen. CPU Processor SRL62
$46.03
AMD Ryzen 5 4500 6-Core 3.6GHz Socket AM4 65W CPU Desktop Processor
$79.00
AMD Ryzen 7 7700x Processor (5.4 GHz, 8 Cores, LGA 1718/Socket AM5) Box -...
$259.99
Intel Core i9-14900KF Unlocked Desktop Processor
$579.99
Intel Core i7-3770 3.40GHz 8MB Quad Core Socket LGA1155 CPU Processor SR0PK
$35.00
Intel 16 Core i7-13700T DESKTOP processor TURBO Boost 4.90Ghz CM8071504820903
$269.00