summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2009-02-06 11:47:09 -0800
committerBrian Behlendorf <[email protected]>2009-02-06 11:47:09 -0800
commit97e40aae09a90e0958d722e7d7916d8628c0944d (patch)
tree58691c8766ed5ba67e86314c4c9d45f172287dfd /scripts
parent6c863d6aa1d15021719265fc4ce08fdfffa8bf34 (diff)
Add 8 basic x4550 configurations which are of interest.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/zpool-config/x4550-raid0.sh23
-rw-r--r--scripts/zpool-config/x4550-raid10-2x24.sh53
-rw-r--r--scripts/zpool-config/x4550-raid10-3x16.sh46
-rw-r--r--scripts/zpool-config/x4550-raid10-6x8.sh39
-rw-r--r--scripts/zpool-config/x4550-raidz-12x4.sh43
-rw-r--r--scripts/zpool-config/x4550-raidz-6x8.sh43
-rw-r--r--scripts/zpool-config/x4550-raidz2-12x4.sh43
-rw-r--r--scripts/zpool-config/x4550-raidz2-6x8.sh43
8 files changed, 323 insertions, 10 deletions
diff --git a/scripts/zpool-config/x4550-raid0.sh b/scripts/zpool-config/x4550-raid0.sh
index 8007d081d..458d7211f 100644
--- a/scripts/zpool-config/x4550-raid0.sh
+++ b/scripts/zpool-config/x4550-raid0.sh
@@ -3,18 +3,21 @@
# Sun Fire x4550 (Thumper) Raid-0 Configuration
#
-DEVICES="/dev/sda /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf \
- /dev/sdg /dev/sdh /dev/sdi /dev/sdj /dev/sdk /dev/sdl \
- /dev/sdm /dev/sdn /dev/sdo /dev/sdp /dev/sdq /dev/sdr \
- /dev/sds /dev/sdt /dev/sdu /dev/sdv /dev/sdw /dev/sdx \
- /dev/sdy /dev/sdz /dev/sdaa /dev/sdab /dev/sdac /dev/sdad \
- /dev/sdae /dev/sdaf /dev/sdag /dev/sdah /dev/sdai /dev/sdaj \
- /dev/sdak /dev/sdal /dev/sdam /dev/sdan /dev/sdao /dev/sdap \
- /dev/sdaq /dev/sdar /dev/sdas /dev/sdat /dev/sdau /dev/sdav"
+DEVICES=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000`)
+
+S_IDX=0
+STRIPES=()
zpool_create() {
- msg ${CMDDIR}/zpool/zpool create -f ${ZPOOL_NAME} ${DEVICES}
- ${CMDDIR}/zpool/zpool create -f ${ZPOOL_NAME} ${DEVICES} || exit 1
+
+ while [ ${S_IDX} -lt ${#DEVICES[@]} ]; do
+ STRIPE=`readlink -f ${DEVICES[${S_IDX}]}`
+ STRIPES[${S_IDX}]="${STRIPE}"
+ let S_IDX=S_IDX+1
+ done
+
+ msg ${CMDDIR}/zpool/zpool create -f ${ZPOOL_NAME} ${STRIPES[*]}
+ ${CMDDIR}/zpool/zpool create -f ${ZPOOL_NAME} ${STRIPES[*]} || exit 1
}
zpool_destroy() {
diff --git a/scripts/zpool-config/x4550-raid10-2x24.sh b/scripts/zpool-config/x4550-raid10-2x24.sh
new file mode 100644
index 000000000..cc20cb7e5
--- /dev/null
+++ b/scripts/zpool-config/x4550-raid10-2x24.sh
@@ -0,0 +1,53 @@
+#!/bin/bash
+#
+# Sun Fire x4550 (Thumper) Raid-10 Configuration (2x24 mirror)
+#
+
+DEVICES=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000`)
+DEVICES_02=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000\:02`)
+DEVICES_03=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000\:03`)
+DEVICES_04=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000\:04`)
+DEVICES_41=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000\:41`)
+DEVICES_42=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000\:42`)
+DEVICES_43=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000\:43`)
+
+M_IDX=0
+MIRRORS=()
+
+zpool_create() {
+
+ D_IDX=0
+ while [ ${D_IDX} -lt ${#DEVICES_02[@]} ]; do
+ MIRROR1=`readlink -f ${DEVICES_02[${D_IDX}]}`
+ MIRROR2=`readlink -f ${DEVICES_41[${D_IDX}]}`
+ MIRRORS[${M_IDX}]="mirror ${MIRROR1} ${MIRROR2}"
+ let D_IDX=D_IDX+1
+ let M_IDX=M_IDX+1
+ done
+
+ D_IDX=0
+ while [ ${D_IDX} -lt ${#DEVICES_03[@]} ]; do
+ MIRROR1=`readlink -f ${DEVICES_03[${D_IDX}]}`
+ MIRROR2=`readlink -f ${DEVICES_42[${D_IDX}]}`
+ MIRRORS[${M_IDX}]="mirror ${MIRROR1} ${MIRROR2}"
+ let D_IDX=D_IDX+1
+ let M_IDX=M_IDX+1
+ done
+
+ D_IDX=0
+ while [ ${D_IDX} -lt ${#DEVICES_04[@]} ]; do
+ MIRROR1=`readlink -f ${DEVICES_04[${D_IDX}]}`
+ MIRROR2=`readlink -f ${DEVICES_43[${D_IDX}]}`
+ MIRRORS[${M_IDX}]="mirror ${MIRROR1} ${MIRROR2}"
+ let D_IDX=D_IDX+1
+ let M_IDX=M_IDX+1
+ done
+
+ msg ${CMDDIR}/zpool/zpool create -f ${ZPOOL_NAME} ${MIRRORS[*]}
+ ${CMDDIR}/zpool/zpool create -f ${ZPOOL_NAME} ${MIRRORS[*]} || exit 1
+}
+
+zpool_destroy() {
+ msg ${CMDDIR}/zpool/zpool destroy ${ZPOOL_NAME}
+ ${CMDDIR}/zpool/zpool destroy ${ZPOOL_NAME}
+}
diff --git a/scripts/zpool-config/x4550-raid10-3x16.sh b/scripts/zpool-config/x4550-raid10-3x16.sh
new file mode 100644
index 000000000..b458c2b5b
--- /dev/null
+++ b/scripts/zpool-config/x4550-raid10-3x16.sh
@@ -0,0 +1,46 @@
+#!/bin/bash
+#
+# Sun Fire x4550 (Thumper) Raid-10 Configuration (3x16 mirror)
+#
+
+DEVICES=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000`)
+DEVICES_02=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000\:02`)
+DEVICES_03=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000\:03`)
+DEVICES_04=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000\:04`)
+DEVICES_41=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000\:41`)
+DEVICES_42=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000\:42`)
+DEVICES_43=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000\:43`)
+
+M_IDX=0
+MIRRORS=()
+
+zpool_create() {
+
+ D_IDX=0
+ while [ ${D_IDX} -lt ${#DEVICES_02[@]} ]; do
+ MIRROR1=`readlink -f ${DEVICES_02[${D_IDX}]}`
+ MIRROR2=`readlink -f ${DEVICES_03[${D_IDX}]}`
+ MIRROR3=`readlink -f ${DEVICES_04[${D_IDX}]}`
+ MIRRORS[${M_IDX}]="mirror ${MIRROR1} ${MIRROR2} ${MIRROR3}"
+ let D_IDX=D_IDX+1
+ let M_IDX=M_IDX+1
+ done
+
+ D_IDX=0
+ while [ ${D_IDX} -lt ${#DEVICES_03[@]} ]; do
+ MIRROR1=`readlink -f ${DEVICES_41[${D_IDX}]}`
+ MIRROR2=`readlink -f ${DEVICES_42[${D_IDX}]}`
+ MIRROR3=`readlink -f ${DEVICES_43[${D_IDX}]}`
+ MIRRORS[${M_IDX}]="mirror ${MIRROR1} ${MIRROR2} ${MIRROR3}"
+ let D_IDX=D_IDX+1
+ let M_IDX=M_IDX+1
+ done
+
+ msg ${CMDDIR}/zpool/zpool create -f ${ZPOOL_NAME} ${MIRRORS[*]}
+ ${CMDDIR}/zpool/zpool create -f ${ZPOOL_NAME} ${MIRRORS[*]} || exit 1
+}
+
+zpool_destroy() {
+ msg ${CMDDIR}/zpool/zpool destroy ${ZPOOL_NAME}
+ ${CMDDIR}/zpool/zpool destroy ${ZPOOL_NAME}
+}
diff --git a/scripts/zpool-config/x4550-raid10-6x8.sh b/scripts/zpool-config/x4550-raid10-6x8.sh
new file mode 100644
index 000000000..fefbf3af8
--- /dev/null
+++ b/scripts/zpool-config/x4550-raid10-6x8.sh
@@ -0,0 +1,39 @@
+#!/bin/bash
+#
+# Sun Fire x4550 (Thumper) Raid-10 Configuration (6x8 mirror)
+#
+
+DEVICES=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000`)
+DEVICES_02=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000\:02`)
+DEVICES_03=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000\:03`)
+DEVICES_04=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000\:04`)
+DEVICES_41=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000\:41`)
+DEVICES_42=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000\:42`)
+DEVICES_43=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000\:43`)
+
+M_IDX=0
+MIRRORS=()
+
+zpool_create() {
+
+ D_IDX=0
+ while [ ${D_IDX} -lt ${#DEVICES_02[@]} ]; do
+ MIRROR1=`readlink -f ${DEVICES_02[${D_IDX}]}`
+ MIRROR2=`readlink -f ${DEVICES_03[${D_IDX}]}`
+ MIRROR3=`readlink -f ${DEVICES_04[${D_IDX}]}`
+ MIRROR4=`readlink -f ${DEVICES_41[${D_IDX}]}`
+ MIRROR5=`readlink -f ${DEVICES_42[${D_IDX}]}`
+ MIRROR6=`readlink -f ${DEVICES_43[${D_IDX}]}`
+ MIRRORS[${M_IDX}]="mirror ${MIRROR1} ${MIRROR2} ${MIRROR3} ${MIRROR4} ${MIRROR5} ${MIRROR6}"
+ let D_IDX=D_IDX+1
+ let M_IDX=M_IDX+1
+ done
+
+ msg ${CMDDIR}/zpool/zpool create -f ${ZPOOL_NAME} ${MIRRORS[*]}
+ ${CMDDIR}/zpool/zpool create -f ${ZPOOL_NAME} ${MIRRORS[*]} || exit 1
+}
+
+zpool_destroy() {
+ msg ${CMDDIR}/zpool/zpool destroy ${ZPOOL_NAME}
+ ${CMDDIR}/zpool/zpool destroy ${ZPOOL_NAME}
+}
diff --git a/scripts/zpool-config/x4550-raidz-12x4.sh b/scripts/zpool-config/x4550-raidz-12x4.sh
new file mode 100644
index 000000000..19a4b134b
--- /dev/null
+++ b/scripts/zpool-config/x4550-raidz-12x4.sh
@@ -0,0 +1,43 @@
+#!/bin/bash
+#
+# Sun Fire x4550 (Thumper) Raid-Z Configuration (12x4 stripe)
+#
+
+DEVICES=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000`)
+DEVICES_02=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000\:02`)
+DEVICES_03=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000\:03`)
+DEVICES_04=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000\:04`)
+DEVICES_41=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000\:41`)
+DEVICES_42=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000\:42`)
+DEVICES_43=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000\:43`)
+
+DEVICES_PER_CTRL=2
+Z_IDX=0
+RAIDZS=()
+
+zpool_create() {
+
+ D_IDX=0
+ while [ ${D_IDX} -lt ${#DEVICES_02[@]} ]; do
+ RAIDZ=""
+ for IDX in `seq 1 ${DEVICES_PER_CTRL}`; do
+ RAIDZ="${RAIDZ} `readlink -f ${DEVICES_02[${D_IDX}]}`"
+ RAIDZ="${RAIDZ} `readlink -f ${DEVICES_03[${D_IDX}]}`"
+ RAIDZ="${RAIDZ} `readlink -f ${DEVICES_04[${D_IDX}]}`"
+ RAIDZ="${RAIDZ} `readlink -f ${DEVICES_41[${D_IDX}]}`"
+ RAIDZ="${RAIDZ} `readlink -f ${DEVICES_42[${D_IDX}]}`"
+ RAIDZ="${RAIDZ} `readlink -f ${DEVICES_43[${D_IDX}]}`"
+ let D_IDX=D_IDX+1
+ done
+ RAIDZS[${Z_IDX}]="raidz ${RAIDZ}"
+ let Z_IDX=Z_IDX+1
+ done
+
+ msg ${CMDDIR}/zpool/zpool create -f ${ZPOOL_NAME} ${RAIDZS[*]}
+ ${CMDDIR}/zpool/zpool create -f ${ZPOOL_NAME} ${RAIDZS[*]} || exit 1
+}
+
+zpool_destroy() {
+ msg ${CMDDIR}/zpool/zpool destroy ${ZPOOL_NAME}
+ ${CMDDIR}/zpool/zpool destroy ${ZPOOL_NAME}
+}
diff --git a/scripts/zpool-config/x4550-raidz-6x8.sh b/scripts/zpool-config/x4550-raidz-6x8.sh
new file mode 100644
index 000000000..eaf3a9b1b
--- /dev/null
+++ b/scripts/zpool-config/x4550-raidz-6x8.sh
@@ -0,0 +1,43 @@
+#!/bin/bash
+#
+# Sun Fire x4550 (Thumper) Raid-Z Configuration (6x8 stripe)
+#
+
+DEVICES=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000`)
+DEVICES_02=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000\:02`)
+DEVICES_03=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000\:03`)
+DEVICES_04=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000\:04`)
+DEVICES_41=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000\:41`)
+DEVICES_42=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000\:42`)
+DEVICES_43=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000\:43`)
+
+DEVICES_PER_CTRL=1
+Z_IDX=0
+RAIDZS=()
+
+zpool_create() {
+
+ D_IDX=0
+ while [ ${D_IDX} -lt ${#DEVICES_02[@]} ]; do
+ RAIDZ=""
+ for IDX in `seq 1 ${DEVICES_PER_CTRL}`; do
+ RAIDZ="${RAIDZ} `readlink -f ${DEVICES_02[${D_IDX}]}`"
+ RAIDZ="${RAIDZ} `readlink -f ${DEVICES_03[${D_IDX}]}`"
+ RAIDZ="${RAIDZ} `readlink -f ${DEVICES_04[${D_IDX}]}`"
+ RAIDZ="${RAIDZ} `readlink -f ${DEVICES_41[${D_IDX}]}`"
+ RAIDZ="${RAIDZ} `readlink -f ${DEVICES_42[${D_IDX}]}`"
+ RAIDZ="${RAIDZ} `readlink -f ${DEVICES_43[${D_IDX}]}`"
+ let D_IDX=D_IDX+1
+ done
+ RAIDZS[${Z_IDX}]="raidz ${RAIDZ}"
+ let Z_IDX=Z_IDX+1
+ done
+
+ msg ${CMDDIR}/zpool/zpool create -f ${ZPOOL_NAME} ${RAIDZS[*]}
+ ${CMDDIR}/zpool/zpool create -f ${ZPOOL_NAME} ${RAIDZS[*]} || exit 1
+}
+
+zpool_destroy() {
+ msg ${CMDDIR}/zpool/zpool destroy ${ZPOOL_NAME}
+ ${CMDDIR}/zpool/zpool destroy ${ZPOOL_NAME}
+}
diff --git a/scripts/zpool-config/x4550-raidz2-12x4.sh b/scripts/zpool-config/x4550-raidz2-12x4.sh
new file mode 100644
index 000000000..2059d3c2c
--- /dev/null
+++ b/scripts/zpool-config/x4550-raidz2-12x4.sh
@@ -0,0 +1,43 @@
+#!/bin/bash
+#
+# Sun Fire x4550 (Thumper) Raid-Z2 Configuration (12x4 stripe)
+#
+
+DEVICES=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000`)
+DEVICES_02=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000\:02`)
+DEVICES_03=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000\:03`)
+DEVICES_04=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000\:04`)
+DEVICES_41=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000\:41`)
+DEVICES_42=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000\:42`)
+DEVICES_43=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000\:43`)
+
+DEVICES_PER_CTRL=2
+Z_IDX=0
+RAIDZ2S=()
+
+zpool_create() {
+
+ D_IDX=0
+ while [ ${D_IDX} -lt ${#DEVICES_02[@]} ]; do
+ RAIDZ2=""
+ for IDX in `seq 1 ${DEVICES_PER_CTRL}`; do
+ RAIDZ2="${RAIDZ2} `readlink -f ${DEVICES_02[${D_IDX}]}`"
+ RAIDZ2="${RAIDZ2} `readlink -f ${DEVICES_03[${D_IDX}]}`"
+ RAIDZ2="${RAIDZ2} `readlink -f ${DEVICES_04[${D_IDX}]}`"
+ RAIDZ2="${RAIDZ2} `readlink -f ${DEVICES_41[${D_IDX}]}`"
+ RAIDZ2="${RAIDZ2} `readlink -f ${DEVICES_42[${D_IDX}]}`"
+ RAIDZ2="${RAIDZ2} `readlink -f ${DEVICES_43[${D_IDX}]}`"
+ let D_IDX=D_IDX+1
+ done
+ RAIDZ2S[${Z_IDX}]="raidz2 ${RAIDZ2}"
+ let Z_IDX=Z_IDX+1
+ done
+
+ msg ${CMDDIR}/zpool/zpool create -f ${ZPOOL_NAME} ${RAIDZ2S[*]}
+ ${CMDDIR}/zpool/zpool create -f ${ZPOOL_NAME} ${RAIDZ2S[*]} || exit 1
+}
+
+zpool_destroy() {
+ msg ${CMDDIR}/zpool/zpool destroy ${ZPOOL_NAME}
+ ${CMDDIR}/zpool/zpool destroy ${ZPOOL_NAME}
+}
diff --git a/scripts/zpool-config/x4550-raidz2-6x8.sh b/scripts/zpool-config/x4550-raidz2-6x8.sh
new file mode 100644
index 000000000..3bdd582f0
--- /dev/null
+++ b/scripts/zpool-config/x4550-raidz2-6x8.sh
@@ -0,0 +1,43 @@
+#!/bin/bash
+#
+# Sun Fire x4550 (Thumper) Raid-Z2 Configuration (6x8 stripe)
+#
+
+DEVICES=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000`)
+DEVICES_02=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000\:02`)
+DEVICES_03=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000\:03`)
+DEVICES_04=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000\:04`)
+DEVICES_41=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000\:41`)
+DEVICES_42=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000\:42`)
+DEVICES_43=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000\:43`)
+
+DEVICES_PER_CTRL=1
+Z_IDX=0
+RAIDZ2S=()
+
+zpool_create() {
+
+ D_IDX=0
+ while [ ${D_IDX} -lt ${#DEVICES_02[@]} ]; do
+ RAIDZ2=""
+ for IDX in `seq 1 ${DEVICES_PER_CTRL}`; do
+ RAIDZ2="${RAIDZ2} `readlink -f ${DEVICES_02[${D_IDX}]}`"
+ RAIDZ2="${RAIDZ2} `readlink -f ${DEVICES_03[${D_IDX}]}`"
+ RAIDZ2="${RAIDZ2} `readlink -f ${DEVICES_04[${D_IDX}]}`"
+ RAIDZ2="${RAIDZ2} `readlink -f ${DEVICES_41[${D_IDX}]}`"
+ RAIDZ2="${RAIDZ2} `readlink -f ${DEVICES_42[${D_IDX}]}`"
+ RAIDZ2="${RAIDZ2} `readlink -f ${DEVICES_43[${D_IDX}]}`"
+ let D_IDX=D_IDX+1
+ done
+ RAIDZ2S[${Z_IDX}]="raidz2 ${RAIDZ2}"
+ let Z_IDX=Z_IDX+1
+ done
+
+ msg ${CMDDIR}/zpool/zpool create -f ${ZPOOL_NAME} ${RAIDZ2S[*]}
+ ${CMDDIR}/zpool/zpool create -f ${ZPOOL_NAME} ${RAIDZ2S[*]} || exit 1
+}
+
+zpool_destroy() {
+ msg ${CMDDIR}/zpool/zpool destroy ${ZPOOL_NAME}
+ ${CMDDIR}/zpool/zpool destroy ${ZPOOL_NAME}
+}