From 5bf14d3400191ea949fdadd2ecbd47ed4566dfda Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 21 Oct 2009 11:38:51 -0700 Subject: Update zpool-configs to be udev aware. To simplify creation and management of test configurations the dragon and x4550 configureis have been integrated with udev. Our current best guess as to how we'll actually manage the disks in these systems is with a udev mapping scheme. The current leading scheme is to map each drive to a simpe id. In this mapping each CHANNEL is represented by the letters a-z, and the RANK is represented by the numbers 1-n. A CHANNEL should identify a group of RANKS which are all attached to a single controller, each RANK represents a disk. This provides a nice mechanism to locate a specific drive given a known hardware configuration. Various hardware vendors use a similar scheme. A nice side effect of these changes is it allowed me to make the raid0/raid10/raidz/raidz2 setup functions generic. This makes adding new test configs easy, you just need to create a udev rules file for your test config which conforms to the naming scheme. --- scripts/common.sh | 121 ++++++++++- scripts/udev-rules/99-zpool.rules.dragon | 331 +++++++++++++++++++++++++++++ scripts/udev-rules/99-zpool.rules.x4550 | 115 ++++++++++ scripts/zpool-config/dragon-raid0-1x120.sh | 26 --- scripts/zpool-config/dragon-raid0-1x70.sh | 20 ++ scripts/zpool-config/dragon-raid10-35x2.sh | 20 ++ scripts/zpool-config/dragon-raidz-15x8.sh | 46 ---- scripts/zpool-config/dragon-raidz-7x10.sh | 20 ++ scripts/zpool-config/dragon-raidz2-15x8.sh | 46 ---- scripts/zpool-config/dragon-raidz2-7x10.sh | 20 ++ scripts/zpool-config/file-raid0.sh | 4 +- scripts/zpool-config/file-raid10.sh | 4 +- scripts/zpool-config/file-raidz.sh | 4 +- scripts/zpool-config/file-raidz2.sh | 4 +- scripts/zpool-config/hda-raid0.sh | 4 +- scripts/zpool-config/lo-raid0.sh | 4 +- scripts/zpool-config/lo-raid10.sh | 4 +- scripts/zpool-config/lo-raidz.sh | 4 +- scripts/zpool-config/lo-raidz2.sh | 4 +- scripts/zpool-config/sda-raid0.sh | 4 +- scripts/zpool-config/x4550-raid0-1x48.sh | 20 ++ scripts/zpool-config/x4550-raid0.sh | 26 --- scripts/zpool-config/x4550-raid10-24x2.sh | 20 ++ scripts/zpool-config/x4550-raid10-2x24.sh | 53 ----- scripts/zpool-config/x4550-raid10-3x16.sh | 46 ---- scripts/zpool-config/x4550-raid10-6x8.sh | 39 ---- scripts/zpool-config/x4550-raidz-12x4.sh | 43 ---- scripts/zpool-config/x4550-raidz-6x8.sh | 43 ---- scripts/zpool-config/x4550-raidz-8x6.sh | 20 ++ scripts/zpool-config/x4550-raidz2-12x4.sh | 43 ---- scripts/zpool-config/x4550-raidz2-6x8.sh | 43 ---- scripts/zpool-config/x4550-raidz2-8x6.sh | 20 ++ scripts/zpool-create.sh | 8 +- 33 files changed, 750 insertions(+), 479 deletions(-) create mode 100644 scripts/udev-rules/99-zpool.rules.dragon create mode 100644 scripts/udev-rules/99-zpool.rules.x4550 delete mode 100644 scripts/zpool-config/dragon-raid0-1x120.sh create mode 100644 scripts/zpool-config/dragon-raid0-1x70.sh create mode 100644 scripts/zpool-config/dragon-raid10-35x2.sh delete mode 100644 scripts/zpool-config/dragon-raidz-15x8.sh create mode 100644 scripts/zpool-config/dragon-raidz-7x10.sh delete mode 100644 scripts/zpool-config/dragon-raidz2-15x8.sh create mode 100644 scripts/zpool-config/dragon-raidz2-7x10.sh create mode 100644 scripts/zpool-config/x4550-raid0-1x48.sh delete mode 100644 scripts/zpool-config/x4550-raid0.sh create mode 100644 scripts/zpool-config/x4550-raid10-24x2.sh delete mode 100644 scripts/zpool-config/x4550-raid10-2x24.sh delete mode 100644 scripts/zpool-config/x4550-raid10-3x16.sh delete mode 100644 scripts/zpool-config/x4550-raid10-6x8.sh delete mode 100644 scripts/zpool-config/x4550-raidz-12x4.sh delete mode 100644 scripts/zpool-config/x4550-raidz-6x8.sh create mode 100644 scripts/zpool-config/x4550-raidz-8x6.sh delete mode 100644 scripts/zpool-config/x4550-raidz2-12x4.sh delete mode 100644 scripts/zpool-config/x4550-raidz2-6x8.sh create mode 100644 scripts/zpool-config/x4550-raidz2-8x6.sh (limited to 'scripts') diff --git a/scripts/common.sh b/scripts/common.sh index 9548a97b1..a5cfb5380 100755 --- a/scripts/common.sh +++ b/scripts/common.sh @@ -15,9 +15,17 @@ fi PROG="" VERBOSE= VERBOSE_FLAG= +FORCE= +FORCE_FLAG= DUMP_LOG= ERROR= +UPATH="/dev/disk/zpool" +RAID0S=() +RAID10S=() +RAIDZS=() +RAIDZ2S=() +UDEVDIR=${UDEVDIR:-/usr/libexec/zfs/udev-rules} ZPOOLDIR=${ZPOOLDIR:-/usr/libexec/zfs/zpool-config} ZDB=${ZDB:-/usr/sbin/zdb} @@ -58,12 +66,12 @@ fail() { } spl_dump_log() { - ${SYSCTL} -w kernel.spl.debug.dump=1 &>/dev/null + ${SYSCTL} -w kernel.spl.debug.dump=1 &>/dev/null local NAME=`dmesg | tail -n 1 | cut -f5 -d' '` - ${SPLBUILD}/cmd/spl ${NAME} >${NAME}.log + ${SPLBUILD}/cmd/spl ${NAME} >${NAME}.log echo - echo "Dumped debug log: ${NAME}.log" - tail -n1 ${NAME}.log + echo "Dumped debug log: ${NAME}.log" + tail -n1 ${NAME}.log echo return 0 } @@ -184,3 +192,108 @@ unused_loop_device() { die "Error: Unable to find unused loopback device" } + +# +# The following udev helper functions assume that the provided +# udev rules file will create a /dev/disk/zpool/ +# disk mapping. In this mapping each CHANNEL is represented by +# the letters a-z, and the RANK is represented by the numbers +# 1-n. A CHANNEL should identify a group of RANKS which are all +# attached to a single controller, each RANK represents a disk. +# This provides a simply mechanism to locate a specific drive +# given a known hardware configuration. +# +udev_setup() { + local SRC_PATH=$1 + local DST_FILE=`basename ${SRC_PATH} | cut -f1-2 -d'.'` + local DST_PATH=/etc/udev/rules.d/${DST_FILE} + + cp -f ${SRC_PATH} ${DST_PATH} + + udevadm trigger + udevadm settle + + return 0 +} + +udev_cr2d() { + local CHANNEL=`echo "obase=16; $1+96" | bc` + local RANK=$2 + + printf "\x${CHANNEL}${RANK}" +} + +udev_raid0_setup() { + local RANKS=$1 + local CHANNELS=$2 + local IDX=0 + + RAID0S=() + for RANK in `seq 1 ${RANKS}`; do + for CHANNEL in `seq 1 ${CHANNELS}`; do + DISK=`udev_cr2d ${CHANNEL} ${RANK}` + RAID0S[${IDX}]="${UPATH}/${DISK}" + let IDX=IDX+1 + done + done + + return 0 +} + +udev_raid10_setup() { + local RANKS=$1 + local CHANNELS=$2 + local IDX=0 + + RAID10S=() + for RANK in `seq 1 ${RANKS}`; do + for CHANNEL1 in `seq 1 2 ${CHANNELS}`; do + let CHANNEL2=CHANNEL1+1 + DISK1=`udev_cr2d ${CHANNEL1} ${RANK}` + DISK2=`udev_cr2d ${CHANNEL2} ${RANK}` + GROUP="${UPATH}/${DISK1} ${UPATH}/${DISK2}" + RAID10S[${IDX}]="mirror ${GROUP}" + let IDX=IDX+1 + done + done + + return 0 +} + +udev_raidz_setup() { + local RANKS=$1 + local CHANNELS=$2 + + RAIDZS=() + for RANK in `seq 1 ${RANKS}`; do + RAIDZ=("raidz") + + for CHANNEL in `seq 1 ${CHANNELS}`; do + DISK=`udev_cr2d ${CHANNEL} ${RANK}` + RAIDZ[${CHANNEL}]="${UPATH}/${DISK}" + done + + RAIDZS[${RANK}]="${RAIDZ[*]}" + done + + return 0 +} + +udev_raidz2_setup() { + local RANKS=$1 + local CHANNELS=$2 + + RAIDZ2S=() + for RANK in `seq 1 ${RANKS}`; do + RAIDZ2=("raidz2") + + for CHANNEL in `seq 1 ${CHANNELS}`; do + DISK=`udev_cr2d ${CHANNEL} ${RANK}` + RAIDZ2[${CHANNEL}]="${UPATH}/${DISK}" + done + + RAIDZ2S[${RANK}]="${RAIDZ2[*]}" + done + + return 0 +} diff --git a/scripts/udev-rules/99-zpool.rules.dragon b/scripts/udev-rules/99-zpool.rules.dragon new file mode 100644 index 000000000..7c589f595 --- /dev/null +++ b/scripts/udev-rules/99-zpool.rules.dragon @@ -0,0 +1,331 @@ +# +# /etc/udev/rules.d/99-zpool.rules +# + +ENV{DEVTYPE}=="disk", IMPORT{program}="path_id %p" + +# Full devices (*:pci*port:*:id*) +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*0:*:3*", SYMLINK+="disk/zpool/a1" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*0:*:4*", SYMLINK+="disk/zpool/a2" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*0:*:5*", SYMLINK+="disk/zpool/a3" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*0:*:6*", SYMLINK+="disk/zpool/a4" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*0:*:7*", SYMLINK+="disk/zpool/a5" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*0:*:8*", SYMLINK+="disk/zpool/a6" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*0:*:9*", SYMLINK+="disk/zpool/a7" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*0:*:10*", SYMLINK+="disk/zpool/a8" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*0:*:11*", SYMLINK+="disk/zpool/a9" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*0:*:12*", SYMLINK+="disk/zpool/a10" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*0:*:13*", SYMLINK+="disk/zpool/a11" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*0:*:14*", SYMLINK+="disk/zpool/a12" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*0:*:15*", SYMLINK+="disk/zpool/a13" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*0:*:16*", SYMLINK+="disk/zpool/a14" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*0:*:17*", SYMLINK+="disk/zpool/a15" + +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*4:*:3*", SYMLINK+="disk/zpool/b1" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*4:*:4*", SYMLINK+="disk/zpool/b2" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*4:*:5*", SYMLINK+="disk/zpool/b3" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*4:*:6*", SYMLINK+="disk/zpool/b4" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*4:*:7*", SYMLINK+="disk/zpool/b5" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*4:*:8*", SYMLINK+="disk/zpool/b6" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*4:*:9*", SYMLINK+="disk/zpool/b7" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*4:*:10*", SYMLINK+="disk/zpool/b8" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*4:*:11*", SYMLINK+="disk/zpool/b9" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*4:*:12*", SYMLINK+="disk/zpool/b10" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*4:*:13*", SYMLINK+="disk/zpool/b11" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*4:*:14*", SYMLINK+="disk/zpool/b12" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*4:*:15*", SYMLINK+="disk/zpool/b13" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*4:*:16*", SYMLINK+="disk/zpool/b14" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*4:*:17*", SYMLINK+="disk/zpool/b15" + +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*0:*:3*", SYMLINK+="disk/zpool/c1" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*0:*:4*", SYMLINK+="disk/zpool/c2" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*0:*:5*", SYMLINK+="disk/zpool/c3" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*0:*:6*", SYMLINK+="disk/zpool/c4" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*0:*:7*", SYMLINK+="disk/zpool/c5" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*0:*:8*", SYMLINK+="disk/zpool/c6" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*0:*:9*", SYMLINK+="disk/zpool/c7" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*0:*:10*", SYMLINK+="disk/zpool/c8" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*0:*:11*", SYMLINK+="disk/zpool/c9" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*0:*:12*", SYMLINK+="disk/zpool/c10" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*0:*:13*", SYMLINK+="disk/zpool/c11" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*0:*:14*", SYMLINK+="disk/zpool/c12" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*0:*:15*", SYMLINK+="disk/zpool/c13" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*0:*:16*", SYMLINK+="disk/zpool/c14" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*0:*:17*", SYMLINK+="disk/zpool/c15" + +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*4:*:3*", SYMLINK+="disk/zpool/d1" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*4:*:4*", SYMLINK+="disk/zpool/d2" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*4:*:5*", SYMLINK+="disk/zpool/d3" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*4:*:6*", SYMLINK+="disk/zpool/d4" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*4:*:7*", SYMLINK+="disk/zpool/d5" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*4:*:8*", SYMLINK+="disk/zpool/d6" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*4:*:9*", SYMLINK+="disk/zpool/d7" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*4:*:10*", SYMLINK+="disk/zpool/d8" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*4:*:11*", SYMLINK+="disk/zpool/d9" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*4:*:12*", SYMLINK+="disk/zpool/d10" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*4:*:13*", SYMLINK+="disk/zpool/d11" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*4:*:14*", SYMLINK+="disk/zpool/d12" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*4:*:15*", SYMLINK+="disk/zpool/d13" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*4:*:16*", SYMLINK+="disk/zpool/d14" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*4:*:17*", SYMLINK+="disk/zpool/d15" + +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*0:*:3*", SYMLINK+="disk/zpool/e1" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*0:*:4*", SYMLINK+="disk/zpool/e2" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*0:*:5*", SYMLINK+="disk/zpool/e3" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*0:*:6*", SYMLINK+="disk/zpool/e4" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*0:*:7*", SYMLINK+="disk/zpool/e5" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*0:*:8*", SYMLINK+="disk/zpool/e6" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*0:*:9*", SYMLINK+="disk/zpool/e7" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*0:*:10*", SYMLINK+="disk/zpool/e8" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*0:*:11*", SYMLINK+="disk/zpool/e9" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*0:*:12*", SYMLINK+="disk/zpool/e10" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*0:*:13*", SYMLINK+="disk/zpool/e11" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*0:*:14*", SYMLINK+="disk/zpool/e12" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*0:*:15*", SYMLINK+="disk/zpool/e13" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*0:*:16*", SYMLINK+="disk/zpool/e14" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*0:*:17*", SYMLINK+="disk/zpool/e15" + +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*4:*:3*", SYMLINK+="disk/zpool/f1" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*4:*:4*", SYMLINK+="disk/zpool/f2" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*4:*:5*", SYMLINK+="disk/zpool/f3" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*4:*:6*", SYMLINK+="disk/zpool/f4" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*4:*:7*", SYMLINK+="disk/zpool/f5" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*4:*:8*", SYMLINK+="disk/zpool/f6" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*4:*:9*", SYMLINK+="disk/zpool/f7" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*4:*:10*", SYMLINK+="disk/zpool/f8" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*4:*:11*", SYMLINK+="disk/zpool/f9" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*4:*:12*", SYMLINK+="disk/zpool/f10" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*4:*:13*", SYMLINK+="disk/zpool/f11" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*4:*:14*", SYMLINK+="disk/zpool/f12" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*4:*:15*", SYMLINK+="disk/zpool/f13" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*4:*:16*", SYMLINK+="disk/zpool/f14" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:84:00.0*4:*:17*", SYMLINK+="disk/zpool/f15" + +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*0:*:3*", SYMLINK+="disk/zpool/g1" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*0:*:4*", SYMLINK+="disk/zpool/g2" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*0:*:5*", SYMLINK+="disk/zpool/g3" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*0:*:6*", SYMLINK+="disk/zpool/g4" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*0:*:7*", SYMLINK+="disk/zpool/g5" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*0:*:8*", SYMLINK+="disk/zpool/g6" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*0:*:9*", SYMLINK+="disk/zpool/g7" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*0:*:10*", SYMLINK+="disk/zpool/g8" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*0:*:11*", SYMLINK+="disk/zpool/g9" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*0:*:12*", SYMLINK+="disk/zpool/g10" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*0:*:13*", SYMLINK+="disk/zpool/g11" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*0:*:14*", SYMLINK+="disk/zpool/g12" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*0:*:15*", SYMLINK+="disk/zpool/g13" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*0:*:16*", SYMLINK+="disk/zpool/g14" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*0:*:17*", SYMLINK+="disk/zpool/g15" + +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*4:*:3*", SYMLINK+="disk/zpool/h1" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*4:*:4*", SYMLINK+="disk/zpool/h2" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*4:*:5*", SYMLINK+="disk/zpool/h3" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*4:*:6*", SYMLINK+="disk/zpool/h4" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*4:*:7*", SYMLINK+="disk/zpool/h5" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*4:*:8*", SYMLINK+="disk/zpool/h6" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*4:*:9*", SYMLINK+="disk/zpool/h7" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*4:*:10*", SYMLINK+="disk/zpool/h8" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*4:*:11*", SYMLINK+="disk/zpool/h9" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*4:*:12*", SYMLINK+="disk/zpool/h10" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*4:*:13*", SYMLINK+="disk/zpool/h11" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*4:*:14*", SYMLINK+="disk/zpool/h12" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*4:*:15*", SYMLINK+="disk/zpool/h13" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*4:*:16*", SYMLINK+="disk/zpool/h14" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:85:00.0*4:*:17*", SYMLINK+="disk/zpool/h15" + +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*0:*:0*", SYMLINK+="disk/zpool/i1" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*0:*:1*", SYMLINK+="disk/zpool/i2" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*0:*:2*", SYMLINK+="disk/zpool/i3" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*0:*:3*", SYMLINK+="disk/zpool/i4" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*0:*:4*", SYMLINK+="disk/zpool/i5" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*0:*:5*", SYMLINK+="disk/zpool/i6" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*0:*:6*", SYMLINK+="disk/zpool/i7" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*0:*:7*", SYMLINK+="disk/zpool/i8" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*0:*:8*", SYMLINK+="disk/zpool/i9" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*0:*:9*", SYMLINK+="disk/zpool/i10" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*0:*:10*", SYMLINK+="disk/zpool/i11" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*0:*:11*", SYMLINK+="disk/zpool/i12" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*0:*:12*", SYMLINK+="disk/zpool/i13" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*0:*:13*", SYMLINK+="disk/zpool/i14" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*0:*:14*", SYMLINK+="disk/zpool/i15" +#ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*0:*:15*", SYMLINK+="disk/zpool/i16" + +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*4:*:0*", SYMLINK+="disk/zpool/j1" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*4:*:1*", SYMLINK+="disk/zpool/j2" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*4:*:2*", SYMLINK+="disk/zpool/j3" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*4:*:3*", SYMLINK+="disk/zpool/j4" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*4:*:4*", SYMLINK+="disk/zpool/j5" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*4:*:5*", SYMLINK+="disk/zpool/j6" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*4:*:6*", SYMLINK+="disk/zpool/j7" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*4:*:7*", SYMLINK+="disk/zpool/j8" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*4:*:8*", SYMLINK+="disk/zpool/j9" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*4:*:9*", SYMLINK+="disk/zpool/j10" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*4:*:10*", SYMLINK+="disk/zpool/j11" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*4:*:11*", SYMLINK+="disk/zpool/j12" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*4:*:12*", SYMLINK+="disk/zpool/j13" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*4:*:13*", SYMLINK+="disk/zpool/j14" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*4:*:14*", SYMLINK+="disk/zpool/j15" +#ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:83:00.0*4:*:15*", SYMLINK+="disk/zpool/j16" + +# Partitions (*:pci*port:*:id*) +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*0:*:3*", SYMLINK+="disk/zpool/a1-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*0:*:4*", SYMLINK+="disk/zpool/a2-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*0:*:5*", SYMLINK+="disk/zpool/a3-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*0:*:6*", SYMLINK+="disk/zpool/a4-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*0:*:7*", SYMLINK+="disk/zpool/a5-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*0:*:8*", SYMLINK+="disk/zpool/a6-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*0:*:9*", SYMLINK+="disk/zpool/a7-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*0:*:10*", SYMLINK+="disk/zpool/a8-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*0:*:11*", SYMLINK+="disk/zpool/a9-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*0:*:12*", SYMLINK+="disk/zpool/a10-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*0:*:13*", SYMLINK+="disk/zpool/a11-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*0:*:14*", SYMLINK+="disk/zpool/a12-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*0:*:15*", SYMLINK+="disk/zpool/a13-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*0:*:16*", SYMLINK+="disk/zpool/a14-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*0:*:17*", SYMLINK+="disk/zpool/a15-part%n" + +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*4:*:3*", SYMLINK+="disk/zpool/b1-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*4:*:4*", SYMLINK+="disk/zpool/b2-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*4:*:5*", SYMLINK+="disk/zpool/b3-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*4:*:6*", SYMLINK+="disk/zpool/b4-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*4:*:7*", SYMLINK+="disk/zpool/b5-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*4:*:8*", SYMLINK+="disk/zpool/b6-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*4:*:9*", SYMLINK+="disk/zpool/b7-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*4:*:10*", SYMLINK+="disk/zpool/b8-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*4:*:11*", SYMLINK+="disk/zpool/b9-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*4:*:12*", SYMLINK+="disk/zpool/b10-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*4:*:13*", SYMLINK+="disk/zpool/b11-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*4:*:14*", SYMLINK+="disk/zpool/b12-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*4:*:15*", SYMLINK+="disk/zpool/b13-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*4:*:16*", SYMLINK+="disk/zpool/b14-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*4:*:17*", SYMLINK+="disk/zpool/b15-part%n" + +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*0:*:3*", SYMLINK+="disk/zpool/c1-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*0:*:4*", SYMLINK+="disk/zpool/c2-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*0:*:5*", SYMLINK+="disk/zpool/c3-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*0:*:6*", SYMLINK+="disk/zpool/c4-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*0:*:7*", SYMLINK+="disk/zpool/c5-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*0:*:8*", SYMLINK+="disk/zpool/c6-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*0:*:9*", SYMLINK+="disk/zpool/c7-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*0:*:10*", SYMLINK+="disk/zpool/c8-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*0:*:11*", SYMLINK+="disk/zpool/c9-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*0:*:12*", SYMLINK+="disk/zpool/c10-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*0:*:13*", SYMLINK+="disk/zpool/c11-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*0:*:14*", SYMLINK+="disk/zpool/c12-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*0:*:15*", SYMLINK+="disk/zpool/c13-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*0:*:16*", SYMLINK+="disk/zpool/c14-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*0:*:17*", SYMLINK+="disk/zpool/c15-part%n" + +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*4:*:3*", SYMLINK+="disk/zpool/d1-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*4:*:4*", SYMLINK+="disk/zpool/d2-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*4:*:5*", SYMLINK+="disk/zpool/d3-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*4:*:6*", SYMLINK+="disk/zpool/d4-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*4:*:7*", SYMLINK+="disk/zpool/d5-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*4:*:8*", SYMLINK+="disk/zpool/d6-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*4:*:9*", SYMLINK+="disk/zpool/d7-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*4:*:10*", SYMLINK+="disk/zpool/d8-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*4:*:11*", SYMLINK+="disk/zpool/d9-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*4:*:12*", SYMLINK+="disk/zpool/d10-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*4:*:13*", SYMLINK+="disk/zpool/d11-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*4:*:14*", SYMLINK+="disk/zpool/d12-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*4:*:15*", SYMLINK+="disk/zpool/d13-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*4:*:16*", SYMLINK+="disk/zpool/d14-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*4:*:17*", SYMLINK+="disk/zpool/d15-part%n" + +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*0:*:3*", SYMLINK+="disk/zpool/e1-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*0:*:4*", SYMLINK+="disk/zpool/e2-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*0:*:5*", SYMLINK+="disk/zpool/e3-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*0:*:6*", SYMLINK+="disk/zpool/e4-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*0:*:7*", SYMLINK+="disk/zpool/e5-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*0:*:8*", SYMLINK+="disk/zpool/e6-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*0:*:9*", SYMLINK+="disk/zpool/e7-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*0:*:10*", SYMLINK+="disk/zpool/e8-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*0:*:11*", SYMLINK+="disk/zpool/e9-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*0:*:12*", SYMLINK+="disk/zpool/e10-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*0:*:13*", SYMLINK+="disk/zpool/e11-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*0:*:14*", SYMLINK+="disk/zpool/e12-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*0:*:15*", SYMLINK+="disk/zpool/e13-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*0:*:16*", SYMLINK+="disk/zpool/e14-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*0:*:17*", SYMLINK+="disk/zpool/e15-part%n" + +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*4:*:3*", SYMLINK+="disk/zpool/f1-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*4:*:4*", SYMLINK+="disk/zpool/f2-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*4:*:5*", SYMLINK+="disk/zpool/f3-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*4:*:6*", SYMLINK+="disk/zpool/f4-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*4:*:7*", SYMLINK+="disk/zpool/f5-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*4:*:8*", SYMLINK+="disk/zpool/f6-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*4:*:9*", SYMLINK+="disk/zpool/f7-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*4:*:10*", SYMLINK+="disk/zpool/f8-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*4:*:11*", SYMLINK+="disk/zpool/f9-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*4:*:12*", SYMLINK+="disk/zpool/f10-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*4:*:13*", SYMLINK+="disk/zpool/f11-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*4:*:14*", SYMLINK+="disk/zpool/f12-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*4:*:15*", SYMLINK+="disk/zpool/f13-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*4:*:16*", SYMLINK+="disk/zpool/f14-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:84:00.0*4:*:17*", SYMLINK+="disk/zpool/f15-part%n" + +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*0:*:3*", SYMLINK+="disk/zpool/g1-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*0:*:4*", SYMLINK+="disk/zpool/g2-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*0:*:5*", SYMLINK+="disk/zpool/g3-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*0:*:6*", SYMLINK+="disk/zpool/g4-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*0:*:7*", SYMLINK+="disk/zpool/g5-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*0:*:8*", SYMLINK+="disk/zpool/g6-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*0:*:9*", SYMLINK+="disk/zpool/g7-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*0:*:10*", SYMLINK+="disk/zpool/g8-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*0:*:11*", SYMLINK+="disk/zpool/g9-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*0:*:12*", SYMLINK+="disk/zpool/g10-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*0:*:13*", SYMLINK+="disk/zpool/g11-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*0:*:14*", SYMLINK+="disk/zpool/g12-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*0:*:15*", SYMLINK+="disk/zpool/g13-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*0:*:16*", SYMLINK+="disk/zpool/g14-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*0:*:17*", SYMLINK+="disk/zpool/g15-part%n" + +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*4:*:3*", SYMLINK+="disk/zpool/h1-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*4:*:4*", SYMLINK+="disk/zpool/h2-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*4:*:5*", SYMLINK+="disk/zpool/h3-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*4:*:6*", SYMLINK+="disk/zpool/h4-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*4:*:7*", SYMLINK+="disk/zpool/h5-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*4:*:8*", SYMLINK+="disk/zpool/h6-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*4:*:9*", SYMLINK+="disk/zpool/h7-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*4:*:10*", SYMLINK+="disk/zpool/h8-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*4:*:11*", SYMLINK+="disk/zpool/h9-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*4:*:12*", SYMLINK+="disk/zpool/h10-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*4:*:13*", SYMLINK+="disk/zpool/h11-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*4:*:14*", SYMLINK+="disk/zpool/h12-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*4:*:15*", SYMLINK+="disk/zpool/h13-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*4:*:16*", SYMLINK+="disk/zpool/h14-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:85:00.0*4:*:17*", SYMLINK+="disk/zpool/h15-part%n" + +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*0:*:0*", SYMLINK+="disk/zpool/i1-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*0:*:1*", SYMLINK+="disk/zpool/i2-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*0:*:2*", SYMLINK+="disk/zpool/i3-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*0:*:3*", SYMLINK+="disk/zpool/i4-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*0:*:4*", SYMLINK+="disk/zpool/i5-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*0:*:5*", SYMLINK+="disk/zpool/i6-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*0:*:6*", SYMLINK+="disk/zpool/i7-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*0:*:7*", SYMLINK+="disk/zpool/i8-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*0:*:8*", SYMLINK+="disk/zpool/i9-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*0:*:9*", SYMLINK+="disk/zpool/i10-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*0:*:10*", SYMLINK+="disk/zpool/i11-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*0:*:11*", SYMLINK+="disk/zpool/i12-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*0:*:12*", SYMLINK+="disk/zpool/i13-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*0:*:13*", SYMLINK+="disk/zpool/i14-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*0:*:14*", SYMLINK+="disk/zpool/i15-part%n" +#ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*0:*:15*", SYMLINK+="disk/zpool/i16-part%n" + +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*4:*:0*", SYMLINK+="disk/zpool/j1-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*4:*:1*", SYMLINK+="disk/zpool/j2-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*4:*:2*", SYMLINK+="disk/zpool/j3-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*4:*:3*", SYMLINK+="disk/zpool/j4-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*4:*:4*", SYMLINK+="disk/zpool/j5-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*4:*:5*", SYMLINK+="disk/zpool/j6-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*4:*:6*", SYMLINK+="disk/zpool/j7-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*4:*:7*", SYMLINK+="disk/zpool/j8-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*4:*:8*", SYMLINK+="disk/zpool/j9-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*4:*:9*", SYMLINK+="disk/zpool/j10-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*4:*:10*", SYMLINK+="disk/zpool/j11-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*4:*:11*", SYMLINK+="disk/zpool/j12-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*4:*:12*", SYMLINK+="disk/zpool/j13-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*4:*:13*", SYMLINK+="disk/zpool/j14-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*4:*:14*", SYMLINK+="disk/zpool/j15-part%n" +#ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:83:00.0*4:*:15*", SYMLINK+="disk/zpool/j16-part%n" diff --git a/scripts/udev-rules/99-zpool.rules.x4550 b/scripts/udev-rules/99-zpool.rules.x4550 new file mode 100644 index 000000000..b2b99513d --- /dev/null +++ b/scripts/udev-rules/99-zpool.rules.x4550 @@ -0,0 +1,115 @@ +# +# /etc/udev/rules.d/99-zpool.rules +# + +ENV{DEVTYPE}=="disk", IMPORT{program}="path_id %p" + +# Full devices (*:pci*port:*:id*) +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:02:00.0*0:*:0*", SYMLINK+="disk/zpool/a1" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:02:00.0*0:*:1*", SYMLINK+="disk/zpool/a2" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:02:00.0*0:*:2*", SYMLINK+="disk/zpool/a3" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:02:00.0*0:*:3*", SYMLINK+="disk/zpool/a4" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:02:00.0*0:*:4*", SYMLINK+="disk/zpool/a5" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:02:00.0*0:*:5*", SYMLINK+="disk/zpool/a6" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:02:00.0*0:*:6*", SYMLINK+="disk/zpool/a7" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:02:00.0*0:*:7*", SYMLINK+="disk/zpool/a8" + +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*0:*:0*", SYMLINK+="disk/zpool/b1" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*0:*:1*", SYMLINK+="disk/zpool/b2" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*0:*:2*", SYMLINK+="disk/zpool/b3" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*0:*:3*", SYMLINK+="disk/zpool/b4" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*0:*:4*", SYMLINK+="disk/zpool/b5" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*0:*:5*", SYMLINK+="disk/zpool/b6" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*0:*:6*", SYMLINK+="disk/zpool/b7" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:03:00.0*0:*:7*", SYMLINK+="disk/zpool/b8" + +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*0:*:0*", SYMLINK+="disk/zpool/c1" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*0:*:1*", SYMLINK+="disk/zpool/c2" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*0:*:2*", SYMLINK+="disk/zpool/c3" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*0:*:3*", SYMLINK+="disk/zpool/c4" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*0:*:4*", SYMLINK+="disk/zpool/c5" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*0:*:5*", SYMLINK+="disk/zpool/c6" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*0:*:6*", SYMLINK+="disk/zpool/c7" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:04:00.0*0:*:7*", SYMLINK+="disk/zpool/c8" + +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:41:00.0*0:*:0*", SYMLINK+="disk/zpool/d1" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:41:00.0*0:*:1*", SYMLINK+="disk/zpool/d2" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:41:00.0*0:*:2*", SYMLINK+="disk/zpool/d3" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:41:00.0*0:*:3*", SYMLINK+="disk/zpool/d4" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:41:00.0*0:*:4*", SYMLINK+="disk/zpool/d5" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:41:00.0*0:*:5*", SYMLINK+="disk/zpool/d6" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:41:00.0*0:*:6*", SYMLINK+="disk/zpool/d7" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:41:00.0*0:*:7*", SYMLINK+="disk/zpool/d8" + +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:42:00.0*0:*:0*", SYMLINK+="disk/zpool/e1" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:42:00.0*0:*:1*", SYMLINK+="disk/zpool/e2" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:42:00.0*0:*:2*", SYMLINK+="disk/zpool/e3" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:42:00.0*0:*:3*", SYMLINK+="disk/zpool/e4" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:42:00.0*0:*:4*", SYMLINK+="disk/zpool/e5" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:42:00.0*0:*:5*", SYMLINK+="disk/zpool/e6" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:42:00.0*0:*:6*", SYMLINK+="disk/zpool/e7" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:42:00.0*0:*:7*", SYMLINK+="disk/zpool/e8" + +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:43:00.0*0:*:0*", SYMLINK+="disk/zpool/f1" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:43:00.0*0:*:1*", SYMLINK+="disk/zpool/f2" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:43:00.0*0:*:2*", SYMLINK+="disk/zpool/f3" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:43:00.0*0:*:3*", SYMLINK+="disk/zpool/f4" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:43:00.0*0:*:4*", SYMLINK+="disk/zpool/f5" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:43:00.0*0:*:5*", SYMLINK+="disk/zpool/f6" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:43:00.0*0:*:6*", SYMLINK+="disk/zpool/f7" +ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="*:43:00.0*0:*:7*", SYMLINK+="disk/zpool/f8" + +# Partitions (*:pci*port:*:id*) +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:02:00.0*0:*:0*", SYMLINK+="disk/zpool/a1-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:02:00.0*0:*:1*", SYMLINK+="disk/zpool/a2-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:02:00.0*0:*:2*", SYMLINK+="disk/zpool/a3-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:02:00.0*0:*:3*", SYMLINK+="disk/zpool/a4-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:02:00.0*0:*:4*", SYMLINK+="disk/zpool/a5-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:02:00.0*0:*:5*", SYMLINK+="disk/zpool/a6-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:02:00.0*0:*:6*", SYMLINK+="disk/zpool/a7-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:02:00.0*0:*:7*", SYMLINK+="disk/zpool/a8-part%n" + +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*0:*:0*", SYMLINK+="disk/zpool/b1-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*0:*:1*", SYMLINK+="disk/zpool/b2-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*0:*:2*", SYMLINK+="disk/zpool/b3-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*0:*:3*", SYMLINK+="disk/zpool/b4-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*0:*:4*", SYMLINK+="disk/zpool/b5-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*0:*:5*", SYMLINK+="disk/zpool/b6-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*0:*:6*", SYMLINK+="disk/zpool/b7-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:03:00.0*0:*:7*", SYMLINK+="disk/zpool/b8-part%n" + +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*0:*:0*", SYMLINK+="disk/zpool/c1-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*0:*:1*", SYMLINK+="disk/zpool/c2-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*0:*:2*", SYMLINK+="disk/zpool/c3-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*0:*:3*", SYMLINK+="disk/zpool/c4-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*0:*:4*", SYMLINK+="disk/zpool/c5-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*0:*:5*", SYMLINK+="disk/zpool/c6-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*0:*:6*", SYMLINK+="disk/zpool/c7-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:04:00.0*0:*:7*", SYMLINK+="disk/zpool/c8-part%n" + +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:41:00.0*0:*:0*", SYMLINK+="disk/zpool/d1-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:41:00.0*0:*:1*", SYMLINK+="disk/zpool/d2-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:41:00.0*0:*:2*", SYMLINK+="disk/zpool/d3-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:41:00.0*0:*:3*", SYMLINK+="disk/zpool/d4-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:41:00.0*0:*:4*", SYMLINK+="disk/zpool/d5-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:41:00.0*0:*:5*", SYMLINK+="disk/zpool/d6-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:41:00.0*0:*:6*", SYMLINK+="disk/zpool/d7-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:41:00.0*0:*:7*", SYMLINK+="disk/zpool/d8-part%n" + +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:42:00.0*0:*:0*", SYMLINK+="disk/zpool/e1-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:42:00.0*0:*:1*", SYMLINK+="disk/zpool/e2-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:42:00.0*0:*:2*", SYMLINK+="disk/zpool/e3-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:42:00.0*0:*:3*", SYMLINK+="disk/zpool/e4-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:42:00.0*0:*:4*", SYMLINK+="disk/zpool/e5-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:42:00.0*0:*:5*", SYMLINK+="disk/zpool/e6-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:42:00.0*0:*:6*", SYMLINK+="disk/zpool/e7-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:42:00.0*0:*:7*", SYMLINK+="disk/zpool/e8-part%n" + +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:43:00.0*0:*:0*", SYMLINK+="disk/zpool/f1-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:43:00.0*0:*:1*", SYMLINK+="disk/zpool/f2-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:43:00.0*0:*:2*", SYMLINK+="disk/zpool/f3-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:43:00.0*0:*:3*", SYMLINK+="disk/zpool/f4-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:43:00.0*0:*:4*", SYMLINK+="disk/zpool/f5-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:43:00.0*0:*:5*", SYMLINK+="disk/zpool/f6-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:43:00.0*0:*:6*", SYMLINK+="disk/zpool/f7-part%n" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="*:43:00.0*0:*:7*", SYMLINK+="disk/zpool/f8-part%n" diff --git a/scripts/zpool-config/dragon-raid0-1x120.sh b/scripts/zpool-config/dragon-raid0-1x120.sh deleted file mode 100644 index 5b9475166..000000000 --- a/scripts/zpool-config/dragon-raid0-1x120.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/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-raid0-1x70.sh b/scripts/zpool-config/dragon-raid0-1x70.sh new file mode 100644 index 000000000..8caffc4c4 --- /dev/null +++ b/scripts/zpool-config/dragon-raid0-1x70.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# +# Dragon (White Box) Raid-0 Configuration (1x70) +# + +RANKS=7 +CHANNELS=10 + +zpool_create() { + udev_setup ${UDEVDIR}/99-zpool.rules.dragon + udev_raid0_setup ${RANKS} ${CHANNELS} + + msg ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} ${RAID0S[*]} + ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} ${RAID0S[*]} || exit 1 +} + +zpool_destroy() { + msg ${ZPOOL} destroy ${ZPOOL_NAME} + ${ZPOOL} destroy ${ZPOOL_NAME} +} diff --git a/scripts/zpool-config/dragon-raid10-35x2.sh b/scripts/zpool-config/dragon-raid10-35x2.sh new file mode 100644 index 000000000..f197136fe --- /dev/null +++ b/scripts/zpool-config/dragon-raid10-35x2.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# +# Dragon (White Box) Raid-10 Configuration (35x2(1+1)) +# + +RANKS=7 +CHANNELS=10 + +zpool_create() { + udev_setup ${UDEVDIR}/99-zpool.rules.dragon + udev_raid10_setup ${RANKS} ${CHANNELS} + + msg ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} ${RAID10S[*]} + ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} ${RAID10S[*]} || 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 deleted file mode 100644 index 04c17e05f..000000000 --- a/scripts/zpool-config/dragon-raidz-15x8.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/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-raidz-7x10.sh b/scripts/zpool-config/dragon-raidz-7x10.sh new file mode 100644 index 000000000..e7d793d3c --- /dev/null +++ b/scripts/zpool-config/dragon-raidz-7x10.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# +# Dragon (White Box) Raid-Z Configuration (7x10(9+1)) +# + +RANKS=7 +CHANNELS=10 + +zpool_create() { + udev_setup ${UDEVDIR}/99-zpool.rules.dragon + udev_raidz_setup ${RANKS} ${CHANNELS} + + msg ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} ${RAIDZS[*]} + ${ZPOOL} create ${FORCE_FLAG} ${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 deleted file mode 100644 index cc3800e7b..000000000 --- a/scripts/zpool-config/dragon-raidz2-15x8.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/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} -} diff --git a/scripts/zpool-config/dragon-raidz2-7x10.sh b/scripts/zpool-config/dragon-raidz2-7x10.sh new file mode 100644 index 000000000..a3a2ef58b --- /dev/null +++ b/scripts/zpool-config/dragon-raidz2-7x10.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# +# Dragon (White Box) Raid-Z2 Configuration (7x10(8+2)) +# + +RANKS=7 +CHANNELS=10 + +zpool_create() { + udev_setup ${UDEVDIR}/99-zpool.rules.dragon + udev_raidz2_setup ${RANKS} ${CHANNELS} + + msg ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} ${RAIDZ2S[*]} + ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} ${RAIDZ2S[*]} || exit 1 +} + +zpool_destroy() { + msg ${ZPOOL} destroy ${ZPOOL_NAME} + ${ZPOOL} destroy ${ZPOOL_NAME} +} diff --git a/scripts/zpool-config/file-raid0.sh b/scripts/zpool-config/file-raid0.sh index 67f85d751..14429c43d 100644 --- a/scripts/zpool-config/file-raid0.sh +++ b/scripts/zpool-config/file-raid0.sh @@ -16,8 +16,8 @@ zpool_create() { die "Error $? creating ${FILE}" done - msg ${ZPOOL} create ${ZPOOL_NAME} ${FILES} - ${ZPOOL} create ${ZPOOL_NAME} ${FILES} || exit 1 + msg ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} ${FILES} + ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} ${FILES} || exit 1 } zpool_destroy() { diff --git a/scripts/zpool-config/file-raid10.sh b/scripts/zpool-config/file-raid10.sh index ad635f597..a632a4f4c 100644 --- a/scripts/zpool-config/file-raid10.sh +++ b/scripts/zpool-config/file-raid10.sh @@ -17,9 +17,9 @@ zpool_create() { die "Error $? creating ${FILE}" done - msg ${ZPOOL} create ${ZPOOL_NAME} \ + msg ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} \ mirror ${FILES_M1} mirror ${FILES_M2} - ${ZPOOL} create ${ZPOOL_NAME} \ + ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} \ mirror ${FILES_M1} mirror ${FILES_M2} || exit 1 } diff --git a/scripts/zpool-config/file-raidz.sh b/scripts/zpool-config/file-raidz.sh index 8689f323a..9302c85e9 100644 --- a/scripts/zpool-config/file-raidz.sh +++ b/scripts/zpool-config/file-raidz.sh @@ -16,8 +16,8 @@ zpool_create() { die "Error $? creating ${FILE}" done - msg ${ZPOOL} create ${ZPOOL_NAME} raidz ${FILES} - ${ZPOOL} create ${ZPOOL_NAME} raidz ${FILES} || exit 1 + msg ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} raidz ${FILES} + ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} raidz ${FILES} || exit 1 } zpool_destroy() { diff --git a/scripts/zpool-config/file-raidz2.sh b/scripts/zpool-config/file-raidz2.sh index 8a78e9e7e..681352783 100644 --- a/scripts/zpool-config/file-raidz2.sh +++ b/scripts/zpool-config/file-raidz2.sh @@ -16,8 +16,8 @@ zpool_create() { die "Error $? creating ${FILE}" done - msg ${ZPOOL} create ${ZPOOL_NAME} raidz2 ${FILES} - ${ZPOOL} create ${ZPOOL_NAME} raidz2 ${FILES} || exit 1 + msg ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} raidz2 ${FILES} + ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} raidz2 ${FILES} || exit 1 } zpool_destroy() { diff --git a/scripts/zpool-config/hda-raid0.sh b/scripts/zpool-config/hda-raid0.sh index 70b631e56..fb743fae5 100644 --- a/scripts/zpool-config/hda-raid0.sh +++ b/scripts/zpool-config/hda-raid0.sh @@ -6,8 +6,8 @@ DEVICES="/dev/hda" zpool_create() { - msg ${ZPOOL} create -f ${ZPOOL_NAME} ${DEVICES} - ${ZPOOL} create -f ${ZPOOL_NAME} ${DEVICES} || exit 1 + msg ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} ${DEVICES} + ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} ${DEVICES} || exit 1 } zpool_destroy() { diff --git a/scripts/zpool-config/lo-raid0.sh b/scripts/zpool-config/lo-raid0.sh index 3270469bb..d37d5138f 100644 --- a/scripts/zpool-config/lo-raid0.sh +++ b/scripts/zpool-config/lo-raid0.sh @@ -21,8 +21,8 @@ zpool_create() { DEVICES="${DEVICES} ${DEVICE}" done - msg ${ZPOOL} create ${ZPOOL_NAME} ${DEVICES} - ${ZPOOL} create ${ZPOOL_NAME} ${DEVICES} || exit 1 + msg ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} ${DEVICES} + ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} ${DEVICES} || exit 1 } zpool_destroy() { diff --git a/scripts/zpool-config/lo-raid10.sh b/scripts/zpool-config/lo-raid10.sh index 9215eb8e0..8d3672dd1 100644 --- a/scripts/zpool-config/lo-raid10.sh +++ b/scripts/zpool-config/lo-raid10.sh @@ -34,9 +34,9 @@ zpool_create() { DEVICES_M2="${DEVICES_M2} ${DEVICE}" done - msg ${ZPOOL} create ${ZPOOL_NAME} \ + msg ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} \ mirror ${DEVICES_M1} mirror ${DEVICES_M2} - ${ZPOOL} create ${ZPOOL_NAME} \ + ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} \ mirror ${DEVICES_M1} mirror ${DEVICES_M2} } diff --git a/scripts/zpool-config/lo-raidz.sh b/scripts/zpool-config/lo-raidz.sh index 5f968d4b5..6efcd1041 100644 --- a/scripts/zpool-config/lo-raidz.sh +++ b/scripts/zpool-config/lo-raidz.sh @@ -21,8 +21,8 @@ zpool_create() { DEVICES="${DEVICES} ${DEVICE}" done - msg ${ZPOOL} create ${ZPOOL_NAME} raidz ${DEVICES} - ${ZPOOL} create ${ZPOOL_NAME} raidz ${DEVICES} || exit 1 + msg ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} raidz ${DEVICES} + ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} raidz ${DEVICES} || exit 1 } zpool_destroy() { diff --git a/scripts/zpool-config/lo-raidz2.sh b/scripts/zpool-config/lo-raidz2.sh index f6a5127b5..f59c7f2d6 100644 --- a/scripts/zpool-config/lo-raidz2.sh +++ b/scripts/zpool-config/lo-raidz2.sh @@ -21,8 +21,8 @@ zpool_create() { DEVICES="${DEVICES} ${DEVICE}" done - msg ${ZPOOL} create ${ZPOOL_NAME} raidz2 ${DEVICES} - ${ZPOOL} create ${ZPOOL_NAME} raidz2 ${DEVICES} || exit 1 + msg ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} raidz2 ${DEVICES} + ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} raidz2 ${DEVICES} || exit 1 } zpool_destroy() { diff --git a/scripts/zpool-config/sda-raid0.sh b/scripts/zpool-config/sda-raid0.sh index 8ca58b129..b11092466 100644 --- a/scripts/zpool-config/sda-raid0.sh +++ b/scripts/zpool-config/sda-raid0.sh @@ -6,8 +6,8 @@ DEVICES="/dev/sda" zpool_create() { - msg ${ZPOOL} create -f ${ZPOOL_NAME} ${DEVICES} - ${ZPOOL} create -f ${ZPOOL_NAME} ${DEVICES} || exit 1 + msg ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} ${DEVICES} + ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} ${DEVICES} || exit 1 } zpool_destroy() { diff --git a/scripts/zpool-config/x4550-raid0-1x48.sh b/scripts/zpool-config/x4550-raid0-1x48.sh new file mode 100644 index 000000000..8082fea20 --- /dev/null +++ b/scripts/zpool-config/x4550-raid0-1x48.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# +# Sun Fire x4550 (Thumper/Thor) Raid-0 Configuration (1x48) +# + +RANKS=8 +CHANNELS=6 + +zpool_create() { + udev_setup ${UDEVDIR}/99-zpool.rules.x4550 + udev_raid0_setup ${RANKS} ${CHANNELS} + + msg ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} ${RAID0S[*]} + ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} ${RAID0S[*]} || exit 1 +} + +zpool_destroy() { + msg ${ZPOOL} destroy ${ZPOOL_NAME} + ${ZPOOL} destroy ${ZPOOL_NAME} +} diff --git a/scripts/zpool-config/x4550-raid0.sh b/scripts/zpool-config/x4550-raid0.sh deleted file mode 100644 index 7bb87bc07..000000000 --- a/scripts/zpool-config/x4550-raid0.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -# -# Sun Fire x4550 (Thumper) Raid-0 Configuration -# - -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/x4550-raid10-24x2.sh b/scripts/zpool-config/x4550-raid10-24x2.sh new file mode 100644 index 000000000..fb323716d --- /dev/null +++ b/scripts/zpool-config/x4550-raid10-24x2.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# +# Sun Fire x4550 (Thumper/Thor) Raid-10 Configuration (24x2(1+1)) +# + +RANKS=8 +CHANNELS=6 + +zpool_create() { + udev_setup ${UDEVDIR}/99-zpool.rules.x4550 + udev_raid10_setup ${RANKS} ${CHANNELS} + + msg ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} ${RAID10S[*]} + ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} ${RAID10S[*]} || exit 1 +} + +zpool_destroy() { + msg ${ZPOOL} destroy ${ZPOOL_NAME} + ${ZPOOL} destroy ${ZPOOL_NAME} +} diff --git a/scripts/zpool-config/x4550-raid10-2x24.sh b/scripts/zpool-config/x4550-raid10-2x24.sh deleted file mode 100644 index 678880424..000000000 --- a/scripts/zpool-config/x4550-raid10-2x24.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/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 ${ZPOOL} create -f ${ZPOOL_NAME} ${MIRRORS[*]} - ${ZPOOL} create -f ${ZPOOL_NAME} ${MIRRORS[*]} || exit 1 -} - -zpool_destroy() { - msg ${ZPOOL} destroy ${ZPOOL_NAME} - ${ZPOOL} destroy ${ZPOOL_NAME} -} diff --git a/scripts/zpool-config/x4550-raid10-3x16.sh b/scripts/zpool-config/x4550-raid10-3x16.sh deleted file mode 100644 index 799aef2c4..000000000 --- a/scripts/zpool-config/x4550-raid10-3x16.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/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 ${ZPOOL} create -f ${ZPOOL_NAME} ${MIRRORS[*]} - ${ZPOOL} create -f ${ZPOOL_NAME} ${MIRRORS[*]} || exit 1 -} - -zpool_destroy() { - msg ${ZPOOL} destroy ${ZPOOL_NAME} - ${ZPOOL} destroy ${ZPOOL_NAME} -} diff --git a/scripts/zpool-config/x4550-raid10-6x8.sh b/scripts/zpool-config/x4550-raid10-6x8.sh deleted file mode 100644 index d8050727f..000000000 --- a/scripts/zpool-config/x4550-raid10-6x8.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/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 ${ZPOOL} create -f ${ZPOOL_NAME} ${MIRRORS[*]} - ${ZPOOL} create -f ${ZPOOL_NAME} ${MIRRORS[*]} || exit 1 -} - -zpool_destroy() { - msg ${ZPOOL} destroy ${ZPOOL_NAME} - ${ZPOOL} destroy ${ZPOOL_NAME} -} diff --git a/scripts/zpool-config/x4550-raidz-12x4.sh b/scripts/zpool-config/x4550-raidz-12x4.sh deleted file mode 100644 index fd6ea8f0d..000000000 --- a/scripts/zpool-config/x4550-raidz-12x4.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/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 ${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/x4550-raidz-6x8.sh b/scripts/zpool-config/x4550-raidz-6x8.sh deleted file mode 100644 index 67f67df73..000000000 --- a/scripts/zpool-config/x4550-raidz-6x8.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/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 ${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/x4550-raidz-8x6.sh b/scripts/zpool-config/x4550-raidz-8x6.sh new file mode 100644 index 000000000..d92974cff --- /dev/null +++ b/scripts/zpool-config/x4550-raidz-8x6.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# +# Sun Fire x4550 (Thumper/Thor) Raid-Z Configuration (8x6(5+1)) +# + +RANKS=8 +CHANNELS=6 + +zpool_create() { + udev_setup ${UDEVDIR}/99-zpool.rules.x4550 + udev_raidz_setup ${RANKS} ${CHANNELS} + + msg ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} ${RAIDZS[*]} + ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} ${RAIDZS[*]} || exit 1 +} + +zpool_destroy() { + msg ${ZPOOL} destroy ${ZPOOL_NAME} + ${ZPOOL} destroy ${ZPOOL_NAME} +} diff --git a/scripts/zpool-config/x4550-raidz2-12x4.sh b/scripts/zpool-config/x4550-raidz2-12x4.sh deleted file mode 100644 index 2af7cccf2..000000000 --- a/scripts/zpool-config/x4550-raidz2-12x4.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/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 ${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} -} diff --git a/scripts/zpool-config/x4550-raidz2-6x8.sh b/scripts/zpool-config/x4550-raidz2-6x8.sh deleted file mode 100644 index f45a496e9..000000000 --- a/scripts/zpool-config/x4550-raidz2-6x8.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/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 ${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} -} diff --git a/scripts/zpool-config/x4550-raidz2-8x6.sh b/scripts/zpool-config/x4550-raidz2-8x6.sh new file mode 100644 index 000000000..4b75ba222 --- /dev/null +++ b/scripts/zpool-config/x4550-raidz2-8x6.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# +# Sun Fire x4550 (Thumper/Thor) Raid-Z Configuration (8x6(4+2)) +# + +RANKS=8 +CHANNELS=6 + +zpool_create() { + udev_setup ${UDEVDIR}/99-zpool.rules.x4550 + udev_raidz2_setup ${RANKS} ${CHANNELS} + + msg ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} ${RAIDZ2S[*]} + ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} ${RAIDZ2S[*]} || exit 1 +} + +zpool_destroy() { + msg ${ZPOOL} destroy ${ZPOOL_NAME} + ${ZPOOL} destroy ${ZPOOL_NAME} +} diff --git a/scripts/zpool-create.sh b/scripts/zpool-create.sh index 16f829cf6..2853f7d4e 100755 --- a/scripts/zpool-create.sh +++ b/scripts/zpool-create.sh @@ -25,6 +25,7 @@ OPTIONS: -c Configuration for zpool -p Name for zpool -d Destroy zpool (default create) + -f Force everything -l Additional zpool options -s Additional zfs options @@ -54,7 +55,7 @@ ZPOOL_DESTROY= ZPOOL_OPTIONS="" ZFS_OPTIONS="" -while getopts 'hvc:p:dl:s:' OPTION; do +while getopts 'hvfc:p:dl:s:' OPTION; do case $OPTION in h) usage @@ -62,6 +63,11 @@ while getopts 'hvc:p:dl:s:' OPTION; do ;; v) VERBOSE=1 + VERBOSE_FLAG="-v" + ;; + f) + FORCE=1 + FORCE_FLAG="-f" ;; c) ZPOOL_CONFIG=${ZPOOLDIR}/${OPTARG}.sh -- cgit v1.2.3