From adc7bb76f25d07e745d79a35117953113c4707d6 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 18 Aug 2009 10:40:30 -0700 Subject: [PATCH] Add 3 dragon drawer test configurations (raid0, raidz, raidz2). The current test rig consists of two 60 disk dragon drawers in configured in 4-x15 mode. Each drawer has 4 SAS connections to my node for a total of 8 SAS connections spread over 4 dual-port LSI SAS adapters. The configures are as follows: - raid0: All 120 drives in a single pool. - raidz: 15 RAIDZ groups of 7+1. - raidz2: 15 RAIDZ2 groups of 6+2. --- scripts/zpool-config/dragon-raid0-1x120.sh | 26 ++++++++++++ scripts/zpool-config/dragon-raidz-15x8.sh | 46 ++++++++++++++++++++++ scripts/zpool-config/dragon-raidz2-15x8.sh | 46 ++++++++++++++++++++++ 3 files changed, 118 insertions(+) create mode 100644 scripts/zpool-config/dragon-raid0-1x120.sh create mode 100644 scripts/zpool-config/dragon-raidz-15x8.sh create mode 100644 scripts/zpool-config/dragon-raidz2-15x8.sh diff --git a/scripts/zpool-config/dragon-raid0-1x120.sh b/scripts/zpool-config/dragon-raid0-1x120.sh new file mode 100644 index 0000000000..5b9475166a --- /dev/null +++ b/scripts/zpool-config/dragon-raid0-1x120.sh @@ -0,0 +1,26 @@ +#!/bin/bash +# +# Dragon (White Box) Raid-0 Configuration (1x120) +# + +DEVICES=(`ls /dev/disk/by-path/* | grep -v part | grep pci-0000`) + +S_IDX=0 +STRIPES=() + +zpool_create() { + + while [ ${S_IDX} -lt ${#DEVICES[@]} ]; do + STRIPE=`readlink -f ${DEVICES[${S_IDX}]}` + STRIPES[${S_IDX}]="${STRIPE}" + let S_IDX=S_IDX+1 + done + + msg ${ZPOOL} create -f ${ZPOOL_NAME} ${STRIPES[*]} + ${ZPOOL} create -f ${ZPOOL_NAME} ${STRIPES[*]} || exit 1 +} + +zpool_destroy() { + msg ${ZPOOL} destroy ${ZPOOL_NAME} + ${ZPOOL} destroy ${ZPOOL_NAME} +} diff --git a/scripts/zpool-config/dragon-raidz-15x8.sh b/scripts/zpool-config/dragon-raidz-15x8.sh new file mode 100644 index 0000000000..04c17e05fa --- /dev/null +++ b/scripts/zpool-config/dragon-raidz-15x8.sh @@ -0,0 +1,46 @@ +#!/bin/bash +# +# Dragon (White Box) Raid-Z Configuration (15x8 stripes) +# + +DEVICES_A=(`ls /dev/disk/by-path/* | grep pci-0000\:03 | head -15`) +DEVICES_B=(`ls /dev/disk/by-path/* | grep pci-0000\:03 | tail -15`) +DEVICES_C=(`ls /dev/disk/by-path/* | grep pci-0000\:04 | head -15`) +DEVICES_D=(`ls /dev/disk/by-path/* | grep pci-0000\:04 | tail -15`) +DEVICES_E=(`ls /dev/disk/by-path/* | grep pci-0000\:83 | head -15`) +DEVICES_F=(`ls /dev/disk/by-path/* | grep pci-0000\:83 | tail -15`) +DEVICES_G=(`ls /dev/disk/by-path/* | grep pci-0000\:84 | head -15`) +DEVICES_H=(`ls /dev/disk/by-path/* | grep pci-0000\:84 | tail -15`) + +DEVICES_PER_CTRL=1 +RAIDZ_GROUPS=15 +RAIDZS=() +Z_IDX=0 + +zpool_create() { + D_IDX=0 + for i in `seq 1 ${RAIDZ_GROUPS}`; do + RAIDZ="" + for IDX in `seq 1 ${DEVICES_PER_CTRL}`; do + RAIDZ="${RAIDZ} `readlink -f ${DEVICES_A[${D_IDX}]}`" + RAIDZ="${RAIDZ} `readlink -f ${DEVICES_B[${D_IDX}]}`" + RAIDZ="${RAIDZ} `readlink -f ${DEVICES_C[${D_IDX}]}`" + RAIDZ="${RAIDZ} `readlink -f ${DEVICES_D[${D_IDX}]}`" + RAIDZ="${RAIDZ} `readlink -f ${DEVICES_E[${D_IDX}]}`" + RAIDZ="${RAIDZ} `readlink -f ${DEVICES_F[${D_IDX}]}`" + RAIDZ="${RAIDZ} `readlink -f ${DEVICES_G[${D_IDX}]}`" + RAIDZ="${RAIDZ} `readlink -f ${DEVICES_H[${D_IDX}]}`" + let D_IDX=D_IDX+1 + done + RAIDZS[${Z_IDX}]="raidz ${RAIDZ}" + let Z_IDX=Z_IDX+1 + done + + msg ${ZPOOL} create -f ${ZPOOL_NAME} ${RAIDZS[*]} + ${ZPOOL} create -f ${ZPOOL_NAME} ${RAIDZS[*]} || exit 1 +} + +zpool_destroy() { + msg ${ZPOOL} destroy ${ZPOOL_NAME} + ${ZPOOL} destroy ${ZPOOL_NAME} +} diff --git a/scripts/zpool-config/dragon-raidz2-15x8.sh b/scripts/zpool-config/dragon-raidz2-15x8.sh new file mode 100644 index 0000000000..cc3800e7b4 --- /dev/null +++ b/scripts/zpool-config/dragon-raidz2-15x8.sh @@ -0,0 +1,46 @@ +#!/bin/bash +# +# Dragon (White Box) Raid-Z2 Configuration (15x8 stripes) +# + +DEVICES_A=(`ls /dev/disk/by-path/* | grep pci-0000\:03 | head -15`) +DEVICES_B=(`ls /dev/disk/by-path/* | grep pci-0000\:03 | tail -15`) +DEVICES_C=(`ls /dev/disk/by-path/* | grep pci-0000\:04 | head -15`) +DEVICES_D=(`ls /dev/disk/by-path/* | grep pci-0000\:04 | tail -15`) +DEVICES_E=(`ls /dev/disk/by-path/* | grep pci-0000\:83 | head -15`) +DEVICES_F=(`ls /dev/disk/by-path/* | grep pci-0000\:83 | tail -15`) +DEVICES_G=(`ls /dev/disk/by-path/* | grep pci-0000\:84 | head -15`) +DEVICES_H=(`ls /dev/disk/by-path/* | grep pci-0000\:84 | tail -15`) + +DEVICES_PER_CTRL=1 +RAIDZ2_GROUPS=15 +RAIDZ2S=() +Z_IDX=0 + +zpool_create() { + D_IDX=0 + for i in `seq 1 ${RAIDZ2_GROUPS}`; do + RAIDZ2="" + for IDX in `seq 1 ${DEVICES_PER_CTRL}`; do + RAIDZ2="${RAIDZ2} `readlink -f ${DEVICES_A[${D_IDX}]}`" + RAIDZ2="${RAIDZ2} `readlink -f ${DEVICES_B[${D_IDX}]}`" + RAIDZ2="${RAIDZ2} `readlink -f ${DEVICES_C[${D_IDX}]}`" + RAIDZ2="${RAIDZ2} `readlink -f ${DEVICES_D[${D_IDX}]}`" + RAIDZ2="${RAIDZ2} `readlink -f ${DEVICES_E[${D_IDX}]}`" + RAIDZ2="${RAIDZ2} `readlink -f ${DEVICES_F[${D_IDX}]}`" + RAIDZ2="${RAIDZ2} `readlink -f ${DEVICES_G[${D_IDX}]}`" + RAIDZ2="${RAIDZ2} `readlink -f ${DEVICES_H[${D_IDX}]}`" + let D_IDX=D_IDX+1 + done + RAIDZ2S[${Z_IDX}]="raidz2 ${RAIDZ2}" + let Z_IDX=Z_IDX+1 + done + + msg ${ZPOOL} create -f ${ZPOOL_NAME} ${RAIDZ2S[*]} + ${ZPOOL} create -f ${ZPOOL_NAME} ${RAIDZ2S[*]} || exit 1 +} + +zpool_destroy() { + msg ${ZPOOL} destroy ${ZPOOL_NAME} + ${ZPOOL} destroy ${ZPOOL_NAME} +}