Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch
This commit is contained in:
commit
e8856c2879
|
@ -279,7 +279,7 @@ check_disk(const char *path, blkid_cache cache, int force,
|
|||
* label at the end of the device is intact. Rather than use this
|
||||
* label we should play it safe and treat this as a non efi device.
|
||||
*/
|
||||
if (vtoc->efi_flags & EFI_GPT_PRIMARY_CORRUPT) {
|
||||
if (!force && vtoc->efi_flags & EFI_GPT_PRIMARY_CORRUPT) {
|
||||
vdev_error(gettext(
|
||||
"%s contains a corrupt primary efi partition table. "
|
||||
"If you are\nsure you want to use this device use "
|
||||
|
@ -938,12 +938,7 @@ make_disks(zpool_handle_t *zhp, nvlist_t *nv)
|
|||
char *type, *path, *diskname;
|
||||
char buf[MAXPATHLEN];
|
||||
uint64_t wholedisk;
|
||||
int fd;
|
||||
int ret;
|
||||
#if defined(__sun__) || defined(__sun)
|
||||
ddi_devid_t devid;
|
||||
char *minor = NULL, *devid_str = NULL;
|
||||
#endif
|
||||
|
||||
verify(nvlist_lookup_string(nv, ZPOOL_CONFIG_TYPE, &type) == 0);
|
||||
|
||||
|
@ -983,50 +978,34 @@ make_disks(zpool_handle_t *zhp, nvlist_t *nv)
|
|||
return (-1);
|
||||
|
||||
/*
|
||||
* Fill in the devid, now that we've labeled the disk. We
|
||||
* attempt to open the new zfs slice first by appending the
|
||||
* slice number. If that fails this may be a Linux udev
|
||||
* path in which case the -part# convention is tried.
|
||||
* Now the we've labeled the disk and the partitions have
|
||||
* been created. We still need to wait for udev to create
|
||||
* the symlinks to those partitions. If we are accessing
|
||||
* the devices via a udev disk path, /dev/disk, then wait
|
||||
* for *-part# to be created. Otherwise just use the normal
|
||||
* syntax for devices in /dev.
|
||||
*/
|
||||
(void) snprintf(buf, sizeof (buf), "%s%s", path, FIRST_SLICE);
|
||||
if ((fd = open(buf, O_RDONLY)) < 0) {
|
||||
if (strncmp(path, UDISK_ROOT, strlen(UDISK_ROOT)) == 0)
|
||||
(void) snprintf(buf, sizeof (buf),
|
||||
"%s%s%s", path, "-part", FIRST_SLICE);
|
||||
else
|
||||
(void) snprintf(buf, sizeof (buf),
|
||||
"%s%s", path, FIRST_SLICE);
|
||||
|
||||
(void) snprintf(buf, sizeof (buf), "%s%s%s",
|
||||
path, "-part", FIRST_SLICE);
|
||||
if ((fd = open(buf, O_RDONLY)) < 0) {
|
||||
(void) fprintf(stderr,
|
||||
gettext("cannot open '%s': %s\n"),
|
||||
buf, strerror(errno));
|
||||
return (-1);
|
||||
}
|
||||
if ((ret = zpool_label_disk_wait(buf, 1000)) != 0) {
|
||||
(void) fprintf(stderr,
|
||||
gettext( "cannot resolve path '%s'\n"), buf);
|
||||
return (-1);
|
||||
}
|
||||
|
||||
#if defined(__sun__) || defined(__sun)
|
||||
if (devid_get(fd, &devid) == 0) {
|
||||
if (devid_get_minor_name(fd, &minor) == 0 &&
|
||||
(devid_str = devid_str_encode(devid, minor)) !=
|
||||
NULL) {
|
||||
verify(nvlist_add_string(nv,
|
||||
ZPOOL_CONFIG_DEVID, devid_str) == 0);
|
||||
}
|
||||
if (devid_str != NULL)
|
||||
devid_str_free(devid_str);
|
||||
if (minor != NULL)
|
||||
devid_str_free(minor);
|
||||
devid_free(devid);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Update the path to refer to the 's0' slice. The presence of
|
||||
* Update the path to refer to FIRST_SLICE. The presence of
|
||||
* the 'whole_disk' field indicates to the CLI that we should
|
||||
* chop off the slice number when displaying the device in
|
||||
* future output.
|
||||
*/
|
||||
verify(nvlist_add_string(nv, ZPOOL_CONFIG_PATH, buf) == 0);
|
||||
|
||||
(void) close(fd);
|
||||
|
||||
/* Just in case this partition already existed. */
|
||||
(void) zero_label(buf);
|
||||
|
||||
|
|
|
@ -52,6 +52,7 @@ LIBDIR=${LIBDIR}
|
|||
CMDDIR=${CMDDIR}
|
||||
MODDIR=${MODDIR}
|
||||
SCRIPTDIR=${SCRIPTDIR}
|
||||
UDEVDIR=\${TOPDIR}/scripts/udev-rules
|
||||
ZPOOLDIR=\${TOPDIR}/scripts/zpool-config
|
||||
ZPIOSDIR=\${TOPDIR}/scripts/zpios-test
|
||||
ZPIOSPROFILEDIR=\${TOPDIR}/scripts/zpios-profile
|
||||
|
|
|
@ -56,6 +56,7 @@ extern "C" {
|
|||
#if defined(__sun__) || defined(__sun)
|
||||
#define DISK_ROOT "/dev/dsk"
|
||||
#define RDISK_ROOT "/dev/rdsk"
|
||||
#define UDISK_ROOT RDISK_ROOT
|
||||
#define FIRST_SLICE "s0"
|
||||
#define BACKUP_SLICE "s2"
|
||||
#endif
|
||||
|
@ -63,6 +64,7 @@ extern "C" {
|
|||
#ifdef __linux__
|
||||
#define DISK_ROOT "/dev"
|
||||
#define RDISK_ROOT DISK_ROOT
|
||||
#define UDISK_ROOT "/dev/disk"
|
||||
#define FIRST_SLICE "1"
|
||||
#define BACKUP_SLICE ""
|
||||
#endif
|
||||
|
@ -253,6 +255,7 @@ extern nvlist_t *zpool_find_vdev(zpool_handle_t *, const char *, boolean_t *,
|
|||
boolean_t *, boolean_t *);
|
||||
extern nvlist_t *zpool_find_vdev_by_physpath(zpool_handle_t *, const char *,
|
||||
boolean_t *, boolean_t *, boolean_t *);
|
||||
extern int zpool_label_disk_wait(char *, int);
|
||||
extern int zpool_label_disk(libzfs_handle_t *, zpool_handle_t *, char *);
|
||||
|
||||
/*
|
||||
|
|
|
@ -3118,6 +3118,33 @@ find_start_block(nvlist_t *config)
|
|||
return (MAXOFFSET_T);
|
||||
}
|
||||
|
||||
int
|
||||
zpool_label_disk_wait(char *path, int timeout)
|
||||
{
|
||||
#if defined(__linux__)
|
||||
struct stat64 statbuf;
|
||||
int i;
|
||||
|
||||
/*
|
||||
* Wait timeout miliseconds for a newly created device to be available
|
||||
* from the given path. There is a small window when a /dev/ device
|
||||
* will exist and the udev link will not, so we must wait for the
|
||||
* symlink. Depending on the udev rules this may take a few seconds.
|
||||
*/
|
||||
for (i = 0; i < timeout; i++) {
|
||||
usleep(1000);
|
||||
|
||||
errno = 0;
|
||||
if ((stat64(path, &statbuf) == 0) && (errno == 0))
|
||||
return (0);
|
||||
}
|
||||
|
||||
return (ENOENT);
|
||||
#else
|
||||
return (0);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* Label an individual disk. The name provided is the short name,
|
||||
* stripped of any leading /dev path.
|
||||
|
@ -3132,10 +3159,7 @@ zpool_label_disk(libzfs_handle_t *hdl, zpool_handle_t *zhp, char *name)
|
|||
uint64_t slice_size;
|
||||
diskaddr_t start_block;
|
||||
char errbuf[1024];
|
||||
#if defined(__linux__)
|
||||
struct stat64 statbuf;
|
||||
int i;
|
||||
#endif
|
||||
|
||||
/* prepare an error message just in case */
|
||||
(void) snprintf(errbuf, sizeof (errbuf),
|
||||
dgettext(TEXT_DOMAIN, "cannot label '%s'"), name);
|
||||
|
@ -3235,23 +3259,13 @@ zpool_label_disk(libzfs_handle_t *hdl, zpool_handle_t *zhp, char *name)
|
|||
efi_free(vtoc);
|
||||
|
||||
#if defined(__linux__)
|
||||
/*
|
||||
* The efi partition table has been successfully written and the
|
||||
* kernel notified. However, it still may take a moment for udev
|
||||
* to notice the devfs update and properly populate /dev/. We will
|
||||
* wait up to 3 seconds which is far far far longer than needed.
|
||||
*/
|
||||
(void) snprintf(path, sizeof (path), "%s/%s%s", RDISK_ROOT, name,
|
||||
FIRST_SLICE);
|
||||
for (i = 0; i < 3000; i++) {
|
||||
if (stat64(path, &statbuf) == 0 || errno != ENOENT)
|
||||
break;
|
||||
|
||||
usleep(1000);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Wait for the first expected slice to appear */
|
||||
(void) snprintf(path, sizeof (path), "%s/%s%s",
|
||||
DISK_ROOT, name, FIRST_SLICE);
|
||||
return zpool_label_disk_wait(path, 3000);
|
||||
#else
|
||||
return (0);
|
||||
#endif
|
||||
}
|
||||
|
||||
static boolean_t
|
||||
|
|
|
@ -15,9 +15,17 @@ fi
|
|||
PROG="<define 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}
|
||||
ZPIOSDIR=${ZPIOSDIR:-/usr/libexec/zfs/zpios-test}
|
||||
ZPIOSPROFILEDIR=${ZPIOSPROFILEDIR:-/usr/libexec/zfs/zpios-profile}
|
||||
|
@ -63,12 +71,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
|
||||
}
|
||||
|
@ -189,3 +197,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/<CHANNEL><RANK>
|
||||
# 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
|
||||
}
|
||||
|
|
|
@ -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"
|
|
@ -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"
|
|
@ -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}
|
||||
}
|
|
@ -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}
|
||||
}
|
|
@ -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}
|
||||
}
|
|
@ -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}
|
||||
}
|
|
@ -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}
|
||||
}
|
|
@ -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}
|
||||
}
|
|
@ -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}
|
||||
}
|
|
@ -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() {
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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}
|
||||
}
|
||||
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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}
|
||||
}
|
|
@ -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}
|
||||
}
|
|
@ -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}
|
||||
}
|
|
@ -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}
|
||||
}
|
|
@ -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}
|
||||
}
|
|
@ -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}
|
||||
}
|
|
@ -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}
|
||||
}
|
|
@ -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}
|
||||
}
|
|
@ -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}
|
||||
}
|
|
@ -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}
|
||||
}
|
|
@ -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}
|
||||
}
|
|
@ -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}
|
||||
}
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue