summaryrefslogtreecommitdiffstats
path: root/Documentation/mkdev.cciss
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-10-05 01:18:40 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-10-05 01:18:40 +0000
commit012bb3e61e5eced6c610f9e036372bf0c8def2d1 (patch)
tree87efc733f9b164e8c85c0336f92c8fb7eff6d183 /Documentation/mkdev.cciss
parent625a1589d3d6464b5d90b8a0918789e3afffd220 (diff)
Merge with Linux 2.4.0-test9. Please check DECstation, I had a number
of rejects to fixup while integrating Linus patches. I also found that this kernel will only boot SMP on Origin; the UP kernel freeze soon after bootup with SCSI timeout messages. I commit this anyway since I found that the last CVS versions had the same problem.
Diffstat (limited to 'Documentation/mkdev.cciss')
-rw-r--r--Documentation/mkdev.cciss40
1 files changed, 40 insertions, 0 deletions
diff --git a/Documentation/mkdev.cciss b/Documentation/mkdev.cciss
new file mode 100644
index 000000000..fbbaf30a7
--- /dev/null
+++ b/Documentation/mkdev.cciss
@@ -0,0 +1,40 @@
+#!/bin/sh
+# Script to create device nodes for SMART array controllers
+# Usage:
+# mkdev.cciss [num controllers] [num log volumes] [num partitions]
+#
+# With no arguments, the script assumes 1 controller, 16 logical volumes,
+# and 16 partitions/volume, which is adequate for most configurations.
+#
+# If you had 5 controllers and were planning on no more than 4 logical volumes
+# each, using a maximum of 8 partitions per volume, you could say:
+#
+# mkdev.cciss 5 4 8
+#
+# Of course, this has no real benefit over "mkdev.cciss 5" except that it
+# doesn't create so many device nodes in /dev/cciss.
+
+NR_CTLR=${1-1}
+NR_VOL=${2-16}
+NR_PART=${3-16}
+
+if [ ! -d /dev/cciss ]; then
+ mkdir -p /dev/cciss
+fi
+
+C=0; while [ $C -lt $NR_CTLR ]; do
+ MAJ=`expr $C + 104`
+ D=0; while [ $D -lt $NR_VOL ]; do
+ P=0; while [ $P -lt $NR_PART ]; do
+ MIN=`expr $D \* 16 + $P`
+ if [ $P -eq 0 ]; then
+ mknod /dev/cciss/c${C}d${D} b $MAJ $MIN
+ else
+ mknod /dev/cciss/c${C}d${D}p${P} b $MAJ $MIN
+ fi
+ P=`expr $P + 1`
+ done
+ D=`expr $D + 1`
+ done
+ C=`expr $C + 1`
+done