From e7b3766a69a7c00d123039a35422549063353317 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 11 Mar 2010 13:56:20 -0800 Subject: [PATCH 1/2] Remove udev dependency when running in-tree After much contemplation I can't see a clean way to use udev entirely in-tree for testing. This patch removed a horrible horrible hack which would copy the needed udev bits in to place on your system to make it work. That however is simply not acceptable, nothing you in in-tree should ever ever ever install something on your system. Since I could not come up with a clean way to use udev in-tree. The fix is to simply parse the zdev config file and create the needed symlinks in a sub-diretory or your working tree. This is not as clean as using udev but it does work perfectly well for in-tree testing. --- config/zfs-build.m4 | 2 + scripts/common.sh | 88 +++++++++++++--------- scripts/zpool-config/dragon-raid0-1x70.sh | 1 + scripts/zpool-config/dragon-raid10-35x2.sh | 1 + scripts/zpool-config/dragon-raidz-7x10.sh | 1 + scripts/zpool-config/dragon-raidz2-7x10.sh | 1 + scripts/zpool-config/promise-raid0-1x16.sh | 1 + scripts/zpool-config/promise-raid10-8x2.sh | 1 + scripts/zpool-config/promise-raidz-2x8.sh | 1 + scripts/zpool-config/promise-raidz2-2x8.sh | 1 + scripts/zpool-config/x4550-raid0-1x48.sh | 1 + scripts/zpool-config/x4550-raid10-24x2.sh | 1 + scripts/zpool-config/x4550-raidz-8x6.sh | 1 + scripts/zpool-config/x4550-raidz2-8x6.sh | 1 + 14 files changed, 66 insertions(+), 36 deletions(-) diff --git a/config/zfs-build.m4 b/config/zfs-build.m4 index a10fd2e1ef..232736498a 100644 --- a/config/zfs-build.m4 +++ b/config/zfs-build.m4 @@ -49,6 +49,7 @@ CMDDIR=${CMDDIR} MODDIR=${MODDIR} SCRIPTDIR=${SCRIPTDIR} ETCDIR=\${TOPDIR}/etc +DEVDIR=\${TOPDIR}/dev ZPOOLDIR=\${TOPDIR}/scripts/zpool-config ZDB=\${CMDDIR}/zdb/zdb @@ -62,6 +63,7 @@ COMMON_SH=\${SCRIPTDIR}/common.sh ZFS_SH=\${SCRIPTDIR}/zfs.sh ZPOOL_CREATE_SH=\${SCRIPTDIR}/zpool-create.sh +INTREE=1 LDMOD=/sbin/insmod KERNEL_MODULES=( \\ diff --git a/scripts/common.sh b/scripts/common.sh index 3c6e8a5ec7..b7406b257e 100755 --- a/scripts/common.sh +++ b/scripts/common.sh @@ -21,13 +21,13 @@ FORCE= FORCE_FLAG= DUMP_LOG= ERROR= -UPATH="/dev/disk/zpool" RAID0S=() RAID10S=() RAIDZS=() RAIDZ2S=() ETCDIR=${ETCDIR:-/etc} +DEVDIR=${DEVDIR:-/dev/disk/zpool} ZPOOLDIR=${ZPOOLDIR:-/usr/libexec/zfs/zpool-config} ZDB=${ZDB:-/usr/sbin/zdb} @@ -48,6 +48,7 @@ INFOMOD=${INFOMOD:-/sbin/modinfo} LOSETUP=${LOSETUP:-/sbin/losetup} SYSCTL=${SYSCTL:-/sbin/sysctl} UDEVADM=${UDEVADM:-/sbin/udevadm} +AWK=${AWK:-/bin/awk} die() { echo -e "${PROG}: $1" >&2 @@ -163,7 +164,7 @@ unload_module() { unload_modules() { local MODULES_REVERSE=( $(echo ${MODULES[@]} | - awk '{for (i=NF;i>=1;i--) printf $i" "} END{print ""}') ) + ${AWK} '{for (i=NF;i>=1;i--) printf $i" "} END{print ""}') ) for MOD in ${MODULES_REVERSE[*]}; do local NAME=`basename ${MOD} .ko` @@ -209,38 +210,53 @@ unused_loop_device() { # udev_setup() { local SRC_PATH=$1 - local SRC_RULES=${ETCDIR}/udev/rules.d/99-zpool.rules - local DST_RULES=/etc/udev/rules.d/99-zpool.rules - local DST_ZPOOL_ID=/usr/bin/zpool_id - local DST_FILE=`basename ${SRC_PATH} | cut -f1-2 -d'.'` - local DST_PATH=/etc/zfs/${DST_FILE} - # XXX: Copy files from source tree to installed system. - # This should be avoided if at all possible, however at - # the moment I see no clean way to add a udev rules file - # which is not in the default udevd search paths. On - # top of the the rules file we add will need to find - # the zpool_id support utility and the zdef.conf file. - - cp -f ${SRC_PATH} ${DST_PATH} - - if [ ! -f ${DST_ZPOOL_ID} ]; then - cp ${ZPOOL_ID} ${DST_ZPOOL_ID} - chmod 755 ${DST_ZPOOL_ID} - fi - - if [ ! -f ${DST_RULES} ]; then - cp ${SRC_RULES} ${DST_RULES} - chmod 644 ${DST_RULES} - fi - - - if [ -f ${UDEVADM} ]; then - ${UDEVADM} trigger - ${UDEVADM} settle + # When running in tree manually contruct symlinks in tree to + # the proper devices. Symlinks are installed for all entires + # in the config file regardless of if that device actually + # exists. When installed as a package udev can be relied on for + # this and it will only create links for devices which exist. + if [ ${INTREE} ]; then + PWD=`pwd` + mkdir -p ${DEVDIR}/ + cd ${DEVDIR}/ + ${AWK} '!/^#/ && /./ { system( \ + "ln -f -s /dev/disk/by-path/"$2" "$1";" \ + "ln -f -s /dev/disk/by-path/"$2"-part1 "$1"p1;" \ + "ln -f -s /dev/disk/by-path/"$2"-part9 "$1"p9;" \ + ) }' $SRC_PATH + cd ${PWD} else - /sbin/udevtrigger - /sbin/udevsettle + DST_FILE=`basename ${SRC_PATH} | cut -f1-2 -d'.'` + DST_PATH=/etc/zfs/${DST_FILE} + + if [ -e ${DST_PATH} ]; then + die "Error: Config ${DST_PATH} already exists" + fi + + cp ${SRC_PATH} ${DST_PATH} + + if [ -f ${UDEVADM} ]; then + ${UDEVADM} trigger + ${UDEVADM} settle + else + /sbin/udevtrigger + /sbin/udevsettle + fi + fi + + return 0 +} + +udev_cleanup() { + local SRC_PATH=$1 + + if [ ${INTREE} ]; then + PWD=`pwd` + cd ${DEVDIR}/ + ${AWK} '!/^#/ && /./ { system( \ + "rm -f "$1" "$1"p1 "$1"p9") }' $SRC_PATH + cd ${PWD} fi return 0 @@ -262,7 +278,7 @@ udev_raid0_setup() { for RANK in `seq 1 ${RANKS}`; do for CHANNEL in `seq 1 ${CHANNELS}`; do DISK=`udev_cr2d ${CHANNEL} ${RANK}` - RAID0S[${IDX}]="${UPATH}/${DISK}" + RAID0S[${IDX}]="${DEVDIR}/${DISK}" let IDX=IDX+1 done done @@ -281,7 +297,7 @@ udev_raid10_setup() { let CHANNEL2=CHANNEL1+1 DISK1=`udev_cr2d ${CHANNEL1} ${RANK}` DISK2=`udev_cr2d ${CHANNEL2} ${RANK}` - GROUP="${UPATH}/${DISK1} ${UPATH}/${DISK2}" + GROUP="${DEVDIR}/${DISK1} ${DEVDIR}/${DISK2}" RAID10S[${IDX}]="mirror ${GROUP}" let IDX=IDX+1 done @@ -300,7 +316,7 @@ udev_raidz_setup() { for CHANNEL in `seq 1 ${CHANNELS}`; do DISK=`udev_cr2d ${CHANNEL} ${RANK}` - RAIDZ[${CHANNEL}]="${UPATH}/${DISK}" + RAIDZ[${CHANNEL}]="${DEVDIR}/${DISK}" done RAIDZS[${RANK}]="${RAIDZ[*]}" @@ -319,7 +335,7 @@ udev_raidz2_setup() { for CHANNEL in `seq 1 ${CHANNELS}`; do DISK=`udev_cr2d ${CHANNEL} ${RANK}` - RAIDZ2[${CHANNEL}]="${UPATH}/${DISK}" + RAIDZ2[${CHANNEL}]="${DEVDIR}/${DISK}" done RAIDZ2S[${RANK}]="${RAIDZ2[*]}" diff --git a/scripts/zpool-config/dragon-raid0-1x70.sh b/scripts/zpool-config/dragon-raid0-1x70.sh index 6690cb9f6e..dda9957002 100644 --- a/scripts/zpool-config/dragon-raid0-1x70.sh +++ b/scripts/zpool-config/dragon-raid0-1x70.sh @@ -17,4 +17,5 @@ zpool_create() { zpool_destroy() { msg ${ZPOOL} destroy ${ZPOOL_NAME} ${ZPOOL} destroy ${ZPOOL_NAME} + udev_cleanup ${ETCDIR}/zfs/zdev.conf.dragon.example } diff --git a/scripts/zpool-config/dragon-raid10-35x2.sh b/scripts/zpool-config/dragon-raid10-35x2.sh index 7a3d0c3801..37f2a539ac 100644 --- a/scripts/zpool-config/dragon-raid10-35x2.sh +++ b/scripts/zpool-config/dragon-raid10-35x2.sh @@ -17,4 +17,5 @@ zpool_create() { zpool_destroy() { msg ${ZPOOL} destroy ${ZPOOL_NAME} ${ZPOOL} destroy ${ZPOOL_NAME} + udev_cleanup ${ETCDIR}/zfs/zdev.conf.dragon.example } diff --git a/scripts/zpool-config/dragon-raidz-7x10.sh b/scripts/zpool-config/dragon-raidz-7x10.sh index deefedb594..9857cf1c02 100644 --- a/scripts/zpool-config/dragon-raidz-7x10.sh +++ b/scripts/zpool-config/dragon-raidz-7x10.sh @@ -17,4 +17,5 @@ zpool_create() { zpool_destroy() { msg ${ZPOOL} destroy ${ZPOOL_NAME} ${ZPOOL} destroy ${ZPOOL_NAME} + udev_cleanup ${ETCDIR}/zfs/zdev.conf.dragon.example } diff --git a/scripts/zpool-config/dragon-raidz2-7x10.sh b/scripts/zpool-config/dragon-raidz2-7x10.sh index d87fef272c..0dd07a19bd 100644 --- a/scripts/zpool-config/dragon-raidz2-7x10.sh +++ b/scripts/zpool-config/dragon-raidz2-7x10.sh @@ -17,4 +17,5 @@ zpool_create() { zpool_destroy() { msg ${ZPOOL} destroy ${ZPOOL_NAME} ${ZPOOL} destroy ${ZPOOL_NAME} + udev_cleanup ${ETCDIR}/zfs/zdev.conf.dragon.example } diff --git a/scripts/zpool-config/promise-raid0-1x16.sh b/scripts/zpool-config/promise-raid0-1x16.sh index 1bb1136542..9a2bede66e 100644 --- a/scripts/zpool-config/promise-raid0-1x16.sh +++ b/scripts/zpool-config/promise-raid0-1x16.sh @@ -17,4 +17,5 @@ zpool_create() { zpool_destroy() { msg ${ZPOOL} destroy ${ZPOOL_NAME} ${ZPOOL} destroy ${ZPOOL_NAME} + udev_cleanup ${ETCDIR}/zfs/zdev.conf.promise.example } diff --git a/scripts/zpool-config/promise-raid10-8x2.sh b/scripts/zpool-config/promise-raid10-8x2.sh index 49639aef27..e6fc6c4f69 100644 --- a/scripts/zpool-config/promise-raid10-8x2.sh +++ b/scripts/zpool-config/promise-raid10-8x2.sh @@ -17,4 +17,5 @@ zpool_create() { zpool_destroy() { msg ${ZPOOL} destroy ${ZPOOL_NAME} ${ZPOOL} destroy ${ZPOOL_NAME} + udev_cleanup ${ETCDIR}/zfs/zdev.conf.promise.example } diff --git a/scripts/zpool-config/promise-raidz-2x8.sh b/scripts/zpool-config/promise-raidz-2x8.sh index f12f6813aa..85bba2a781 100644 --- a/scripts/zpool-config/promise-raidz-2x8.sh +++ b/scripts/zpool-config/promise-raidz-2x8.sh @@ -17,4 +17,5 @@ zpool_create() { zpool_destroy() { msg ${ZPOOL} destroy ${ZPOOL_NAME} ${ZPOOL} destroy ${ZPOOL_NAME} + udev_cleanup ${ETCDIR}/zfs/zdev.conf.promise.example } diff --git a/scripts/zpool-config/promise-raidz2-2x8.sh b/scripts/zpool-config/promise-raidz2-2x8.sh index b5d0eb6fd6..d2ef24810a 100644 --- a/scripts/zpool-config/promise-raidz2-2x8.sh +++ b/scripts/zpool-config/promise-raidz2-2x8.sh @@ -17,4 +17,5 @@ zpool_create() { zpool_destroy() { msg ${ZPOOL} destroy ${ZPOOL_NAME} ${ZPOOL} destroy ${ZPOOL_NAME} + udev_cleanup ${ETCDIR}/zfs/zdev.conf.promise.example } diff --git a/scripts/zpool-config/x4550-raid0-1x48.sh b/scripts/zpool-config/x4550-raid0-1x48.sh index ed2dc2cafe..16156aa097 100644 --- a/scripts/zpool-config/x4550-raid0-1x48.sh +++ b/scripts/zpool-config/x4550-raid0-1x48.sh @@ -17,4 +17,5 @@ zpool_create() { zpool_destroy() { msg ${ZPOOL} destroy ${ZPOOL_NAME} ${ZPOOL} destroy ${ZPOOL_NAME} + udev_cleanup ${ETCDIR}/zfs/zdev.conf.x4550.example } diff --git a/scripts/zpool-config/x4550-raid10-24x2.sh b/scripts/zpool-config/x4550-raid10-24x2.sh index f5fedb5364..ec91f43e6e 100644 --- a/scripts/zpool-config/x4550-raid10-24x2.sh +++ b/scripts/zpool-config/x4550-raid10-24x2.sh @@ -17,4 +17,5 @@ zpool_create() { zpool_destroy() { msg ${ZPOOL} destroy ${ZPOOL_NAME} ${ZPOOL} destroy ${ZPOOL_NAME} + udev_cleanup ${ETCDIR}/zfs/zdev.conf.x4550.example } diff --git a/scripts/zpool-config/x4550-raidz-8x6.sh b/scripts/zpool-config/x4550-raidz-8x6.sh index 01c78ea6d4..ed31a80e6b 100644 --- a/scripts/zpool-config/x4550-raidz-8x6.sh +++ b/scripts/zpool-config/x4550-raidz-8x6.sh @@ -17,4 +17,5 @@ zpool_create() { zpool_destroy() { msg ${ZPOOL} destroy ${ZPOOL_NAME} ${ZPOOL} destroy ${ZPOOL_NAME} + udev_cleanup ${ETCDIR}/zfs/zdev.conf.x4550.example } diff --git a/scripts/zpool-config/x4550-raidz2-8x6.sh b/scripts/zpool-config/x4550-raidz2-8x6.sh index 0ea80dfbb2..45ccd7474a 100644 --- a/scripts/zpool-config/x4550-raidz2-8x6.sh +++ b/scripts/zpool-config/x4550-raidz2-8x6.sh @@ -17,4 +17,5 @@ zpool_create() { zpool_destroy() { msg ${ZPOOL} destroy ${ZPOOL_NAME} ${ZPOOL} destroy ${ZPOOL_NAME} + udev_cleanup ${ETCDIR}/zfs/zdev.conf.x4550.example } From feee765f99da518076b6a238de07d9dd5983606d Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 11 Mar 2010 14:04:12 -0800 Subject: [PATCH 2/2] Remove promise example config replace with a supermicro config The promise config never worked quite right. I'm replacing it with a Supermicro config which does and which I've tested on a real test system. --- etc/zfs/zdev.conf.promise.example | 26 ---------------- etc/zfs/zdev.conf.supermicro.example | 30 +++++++++++++++++++ ...raid0-1x16.sh => supermicro-raid0-1x16.sh} | 10 +++---- ...raid10-8x2.sh => supermicro-raid10-8x2.sh} | 10 +++---- ...e-raidz-2x8.sh => supermicro-raidz-4x4.sh} | 10 +++---- ...raidz2-2x8.sh => supermicro-raidz2-4x4.sh} | 10 +++---- 6 files changed, 50 insertions(+), 46 deletions(-) delete mode 100644 etc/zfs/zdev.conf.promise.example create mode 100644 etc/zfs/zdev.conf.supermicro.example rename scripts/zpool-config/{promise-raid0-1x16.sh => supermicro-raid0-1x16.sh} (61%) rename scripts/zpool-config/{promise-raid10-8x2.sh => supermicro-raid10-8x2.sh} (61%) rename scripts/zpool-config/{promise-raidz-2x8.sh => supermicro-raidz-4x4.sh} (61%) rename scripts/zpool-config/{promise-raidz2-2x8.sh => supermicro-raidz2-4x4.sh} (61%) diff --git a/etc/zfs/zdev.conf.promise.example b/etc/zfs/zdev.conf.promise.example deleted file mode 100644 index 8b068f89d0..0000000000 --- a/etc/zfs/zdev.conf.promise.example +++ /dev/null @@ -1,26 +0,0 @@ -# -# Custom by-path mapping for large JBOD configurations -# -# Example Config: -# Single promise JBOD for RHEL6 -# - -# Channel A: PCI Bus 7, Enclosure 0x500304800027367f -a1 pci-0000:07:00.0-sas-0x500304800027367f-0 -a2 pci-0000:07:00.0-sas-0x500304800027367f-1 -a3 pci-0000:07:00.0-sas-0x500304800027367f-2 -a4 pci-0000:07:00.0-sas-0x500304800027367f-3 -a5 pci-0000:07:00.0-sas-0x500304800027367f-4 -a6 pci-0000:07:00.0-sas-0x500304800027367f-5 -a7 pci-0000:07:00.0-sas-0x500304800027367f-6 -a8 pci-0000:07:00.0-sas-0x500304800027367f-7 - -# Channel B: PCI Bus 7, Enclosure 0x500304800027367f -b1 pci-0000:07:00.0-sas-0x500304800027367f-8 -b2 pci-0000:07:00.0-sas-0x500304800027367f-9 -b3 pci-0000:07:00.0-sas-0x500304800027367f-10 -b4 pci-0000:07:00.0-sas-0x500304800027367f-11 -b5 pci-0000:07:00.0-sas-0x500304800027367f-12 -b6 pci-0000:07:00.0-sas-0x500304800027367f-13 -b7 pci-0000:07:00.0-sas-0x500304800027367f-14 -b8 pci-0000:07:00.0-sas-0x500304800027367f-15 diff --git a/etc/zfs/zdev.conf.supermicro.example b/etc/zfs/zdev.conf.supermicro.example new file mode 100644 index 0000000000..f20dcc081e --- /dev/null +++ b/etc/zfs/zdev.conf.supermicro.example @@ -0,0 +1,30 @@ +# +# Custom by-path mapping for large JBOD configurations +# +# Example Config: +# Single Supermicro JBOD for RHEL6 +# + +# Channel A: PCI Bus 7, Enclosure 0x500304800027367f +a1 pci-0000:07:00.0-sas-0x500304800027367f-0 +a2 pci-0000:07:00.0-sas-0x500304800027367f-1 +a3 pci-0000:07:00.0-sas-0x500304800027367f-2 +a4 pci-0000:07:00.0-sas-0x500304800027367f-3 + +# Channel B: PCI Bus 7, Enclosure 0x500304800027367f +b1 pci-0000:07:00.0-sas-0x500304800027367f-4 +b2 pci-0000:07:00.0-sas-0x500304800027367f-5 +b3 pci-0000:07:00.0-sas-0x500304800027367f-6 +b4 pci-0000:07:00.0-sas-0x500304800027367f-7 + +# Channel C: PCI Bus 7, Enclosure 0x500304800027367f +c1 pci-0000:07:00.0-sas-0x500304800027367f-8 +c2 pci-0000:07:00.0-sas-0x500304800027367f-9 +c3 pci-0000:07:00.0-sas-0x500304800027367f-10 +c4 pci-0000:07:00.0-sas-0x500304800027367f-11 + +# Channel D: PCI Bus 7, Enclosure 0x500304800027367f +d1 pci-0000:07:00.0-sas-0x500304800027367f-12 +d2 pci-0000:07:00.0-sas-0x500304800027367f-13 +d3 pci-0000:07:00.0-sas-0x500304800027367f-14 +d4 pci-0000:07:00.0-sas-0x500304800027367f-15 diff --git a/scripts/zpool-config/promise-raid0-1x16.sh b/scripts/zpool-config/supermicro-raid0-1x16.sh similarity index 61% rename from scripts/zpool-config/promise-raid0-1x16.sh rename to scripts/zpool-config/supermicro-raid0-1x16.sh index 9a2bede66e..efe48459df 100644 --- a/scripts/zpool-config/promise-raid0-1x16.sh +++ b/scripts/zpool-config/supermicro-raid0-1x16.sh @@ -1,13 +1,13 @@ #!/bin/bash # -# Flash (White Box) Raid-0 Configuration (1x16) +# Supermicro (White Box) Raid-0 Configuration (1x16) # -RANKS=8 -CHANNELS=2 +RANKS=4 +CHANNELS=4 zpool_create() { - udev_setup ${ETCDIR}/zfs/zdev.conf.promise.example + udev_setup ${ETCDIR}/zfs/zdev.conf.supermicro.example udev_raid0_setup ${RANKS} ${CHANNELS} msg ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} ${RAID0S[*]} @@ -17,5 +17,5 @@ zpool_create() { zpool_destroy() { msg ${ZPOOL} destroy ${ZPOOL_NAME} ${ZPOOL} destroy ${ZPOOL_NAME} - udev_cleanup ${ETCDIR}/zfs/zdev.conf.promise.example + udev_cleanup ${ETCDIR}/zfs/zdev.conf.supermicro.example } diff --git a/scripts/zpool-config/promise-raid10-8x2.sh b/scripts/zpool-config/supermicro-raid10-8x2.sh similarity index 61% rename from scripts/zpool-config/promise-raid10-8x2.sh rename to scripts/zpool-config/supermicro-raid10-8x2.sh index e6fc6c4f69..a6e6be6c02 100644 --- a/scripts/zpool-config/promise-raid10-8x2.sh +++ b/scripts/zpool-config/supermicro-raid10-8x2.sh @@ -1,13 +1,13 @@ #!/bin/bash # -# Flash (White Box) Raid-10 Configuration (10x2(1+1)) +# Supermicro (White Box) Raid-10 Configuration (8x2(1+1)) # -RANKS=8 -CHANNELS=2 +RANKS=4 +CHANNELS=4 zpool_create() { - udev_setup ${ETCDIR}/zfs/zdev.conf.promise.example + udev_setup ${ETCDIR}/zfs/zdev.conf.supermicro.example udev_raid10_setup ${RANKS} ${CHANNELS} msg ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} ${RAID10S[*]} @@ -17,5 +17,5 @@ zpool_create() { zpool_destroy() { msg ${ZPOOL} destroy ${ZPOOL_NAME} ${ZPOOL} destroy ${ZPOOL_NAME} - udev_cleanup ${ETCDIR}/zfs/zdev.conf.promise.example + udev_cleanup ${ETCDIR}/zfs/zdev.conf.supermicro.example } diff --git a/scripts/zpool-config/promise-raidz-2x8.sh b/scripts/zpool-config/supermicro-raidz-4x4.sh similarity index 61% rename from scripts/zpool-config/promise-raidz-2x8.sh rename to scripts/zpool-config/supermicro-raidz-4x4.sh index 85bba2a781..9ed2780e9d 100644 --- a/scripts/zpool-config/promise-raidz-2x8.sh +++ b/scripts/zpool-config/supermicro-raidz-4x4.sh @@ -1,13 +1,13 @@ #!/bin/bash # -# Flash (White Box) Raid-Z Configuration (2x8(7+1)) +# Supermicro (White Box) Raid-Z Configuration (4x4(3+1)) # -RANKS=8 -CHANNELS=2 +RANKS=4 +CHANNELS=4 zpool_create() { - udev_setup ${ETCDIR}/zfs/zdev.conf.promise.example + udev_setup ${ETCDIR}/zfs/zdev.conf.supermicro.example udev_raidz_setup ${RANKS} ${CHANNELS} msg ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} ${RAIDZS[*]} @@ -17,5 +17,5 @@ zpool_create() { zpool_destroy() { msg ${ZPOOL} destroy ${ZPOOL_NAME} ${ZPOOL} destroy ${ZPOOL_NAME} - udev_cleanup ${ETCDIR}/zfs/zdev.conf.promise.example + udev_cleanup ${ETCDIR}/zfs/zdev.conf.supermicro.example } diff --git a/scripts/zpool-config/promise-raidz2-2x8.sh b/scripts/zpool-config/supermicro-raidz2-4x4.sh similarity index 61% rename from scripts/zpool-config/promise-raidz2-2x8.sh rename to scripts/zpool-config/supermicro-raidz2-4x4.sh index d2ef24810a..ed3eedfdf0 100644 --- a/scripts/zpool-config/promise-raidz2-2x8.sh +++ b/scripts/zpool-config/supermicro-raidz2-4x4.sh @@ -1,13 +1,13 @@ #!/bin/bash # -# Flash (White Box) Raid-Z2 Configuration (2x8(6+2)) +# Supermicro (White Box) Raid-Z2 Configuration (4x4(2+2)) # -RANKS=8 -CHANNELS=2 +RANKS=4 +CHANNELS=4 zpool_create() { - udev_setup ${ETCDIR}/zfs/zdev.conf.promise.example + udev_setup ${ETCDIR}/zfs/zdev.conf.supermicro.example udev_raidz2_setup ${RANKS} ${CHANNELS} msg ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} ${RAIDZ2S[*]} @@ -17,5 +17,5 @@ zpool_create() { zpool_destroy() { msg ${ZPOOL} destroy ${ZPOOL_NAME} ${ZPOOL} destroy ${ZPOOL_NAME} - udev_cleanup ${ETCDIR}/zfs/zdev.conf.promise.example + udev_cleanup ${ETCDIR}/zfs/zdev.conf.supermicro.example }