Merge branch 'linux-zpios' into refs/top-bases/linux-zfs-branch
This commit is contained in:
commit
8d58e9ee45
|
@ -53,16 +53,21 @@ CMDDIR=${CMDDIR}
|
||||||
MODDIR=${MODDIR}
|
MODDIR=${MODDIR}
|
||||||
SCRIPTDIR=${SCRIPTDIR}
|
SCRIPTDIR=${SCRIPTDIR}
|
||||||
ZPOOLDIR=\${TOPDIR}/scripts/zpool-config
|
ZPOOLDIR=\${TOPDIR}/scripts/zpool-config
|
||||||
|
ZPIOSDIR=\${TOPDIR}/scripts/zpios-test
|
||||||
|
ZPIOSPROFILEDIR=\${TOPDIR}/scripts/zpios-profile
|
||||||
|
|
||||||
ZDB=\${CMDDIR}/zdb/zdb
|
ZDB=\${CMDDIR}/zdb/zdb
|
||||||
ZFS=\${CMDDIR}/zfs/zfs
|
ZFS=\${CMDDIR}/zfs/zfs
|
||||||
ZINJECT=\${CMDDIR}/zinject/zinject
|
ZINJECT=\${CMDDIR}/zinject/zinject
|
||||||
ZPOOL=\${CMDDIR}/zpool/zpool
|
ZPOOL=\${CMDDIR}/zpool/zpool
|
||||||
ZTEST=\${CMDDIR}/ztest/ztest
|
ZTEST=\${CMDDIR}/ztest/ztest
|
||||||
|
ZPIOS=\${CMDDIR}/zpios/zpios
|
||||||
|
|
||||||
COMMON_SH=\${SCRIPTDIR}/common.sh
|
COMMON_SH=\${SCRIPTDIR}/common.sh
|
||||||
ZFS_SH=\${SCRIPTDIR}/zfs.sh
|
ZFS_SH=\${SCRIPTDIR}/zfs.sh
|
||||||
ZPOOL_CREATE_SH=\${SCRIPTDIR}/zpool-create.sh
|
ZPOOL_CREATE_SH=\${SCRIPTDIR}/zpool-create.sh
|
||||||
|
ZPIOS_SH=\${SCRIPTDIR}/zpios.sh
|
||||||
|
ZPIOS_SURVEY_SH=\${SCRIPTDIR}/zpios-survey.sh
|
||||||
|
|
||||||
LDMOD=/sbin/insmod
|
LDMOD=/sbin/insmod
|
||||||
|
|
||||||
|
@ -82,6 +87,10 @@ ZFS_MODULES=( \\
|
||||||
\${MODDIR}/zfs/zfs.ko \\
|
\${MODDIR}/zfs/zfs.ko \\
|
||||||
)
|
)
|
||||||
|
|
||||||
|
ZPIOS_MODULES=( \\
|
||||||
|
\${MODDIR}/zpios/zpios.ko \\
|
||||||
|
)
|
||||||
|
|
||||||
MODULES=( \\
|
MODULES=( \\
|
||||||
\${KERNEL_MODULES[[*]]} \\
|
\${KERNEL_MODULES[[*]]} \\
|
||||||
\${SPL_MODULES[[*]]} \\
|
\${SPL_MODULES[[*]]} \\
|
||||||
|
|
|
@ -3,6 +3,10 @@ nobase_pkglibexec_SCRIPTS = common.sh
|
||||||
nobase_pkglibexec_SCRIPTS += zfs.sh
|
nobase_pkglibexec_SCRIPTS += zfs.sh
|
||||||
nobase_pkglibexec_SCRIPTS += zpool-create.sh
|
nobase_pkglibexec_SCRIPTS += zpool-create.sh
|
||||||
nobase_pkglibexec_SCRIPTS += zpool-config/*
|
nobase_pkglibexec_SCRIPTS += zpool-config/*
|
||||||
|
nobase_pkglibexec_SCRIPTS += zpios.sh
|
||||||
|
nobase_pkglibexec_SCRIPTS += zpios-survey.sh
|
||||||
|
nobase_pkglibexec_SCRIPTS += zpios-test/*
|
||||||
|
nobase_pkglibexec_SCRIPTS += zpios-profile/*
|
||||||
EXTRA_DIST = zfs-update.sh $(nobase_pkglibexec_SCRIPTS)
|
EXTRA_DIST = zfs-update.sh $(nobase_pkglibexec_SCRIPTS)
|
||||||
|
|
||||||
ZFS=${top_srcdir}/scripts/zfs.sh
|
ZFS=${top_srcdir}/scripts/zfs.sh
|
||||||
|
|
|
@ -19,16 +19,21 @@ DUMP_LOG=
|
||||||
ERROR=
|
ERROR=
|
||||||
|
|
||||||
ZPOOLDIR=${ZPOOLDIR:-/usr/libexec/zfs/zpool-config}
|
ZPOOLDIR=${ZPOOLDIR:-/usr/libexec/zfs/zpool-config}
|
||||||
|
ZPIOSDIR=${ZPIOSDIR:-/usr/libexec/zfs/zpios-test}
|
||||||
|
ZPIOSPROFILEDIR=${ZPIOSPROFILEDIR:-/usr/libexec/zfs/zpios-profile}
|
||||||
|
|
||||||
ZDB=${ZDB:-/usr/sbin/zdb}
|
ZDB=${ZDB:-/usr/sbin/zdb}
|
||||||
ZFS=${ZFS:-/usr/sbin/zfs}
|
ZFS=${ZFS:-/usr/sbin/zfs}
|
||||||
ZINJECT=${ZINJECT:-/usr/sbin/zinject}
|
ZINJECT=${ZINJECT:-/usr/sbin/zinject}
|
||||||
ZPOOL=${ZPOOL:-/usr/sbin/zpool}
|
ZPOOL=${ZPOOL:-/usr/sbin/zpool}
|
||||||
ZTEST=${ZTEST:-/usr/sbin/ztest}
|
ZTEST=${ZTEST:-/usr/sbin/ztest}
|
||||||
|
ZPIOS=${ZPIOS:-/usr/sbin/zpios}
|
||||||
|
|
||||||
COMMON_SH=${COMMON_SH:-/usr/libexec/zfs/common.sh}
|
COMMON_SH=${COMMON_SH:-/usr/libexec/zfs/common.sh}
|
||||||
ZFS_SH=${ZFS_SH:-/usr/libexec/zfs/zfs.sh}
|
ZFS_SH=${ZFS_SH:-/usr/libexec/zfs/zfs.sh}
|
||||||
ZPOOL_CREATE_SH=${ZPOOL_CREATE_SH:-/usr/libexec/zfs/zpool-create.sh}
|
ZPOOL_CREATE_SH=${ZPOOL_CREATE_SH:-/usr/libexec/zfs/zpool-create.sh}
|
||||||
|
ZPIOS_SH=${ZPIOS_SH:-/usr/libexec/zfs/zpios.sh}
|
||||||
|
ZPIOS_SURVEY_SH=${ZPIOS_SURVEY_SH:-/usr/libexec/zfs/zpios-survey.sh}
|
||||||
|
|
||||||
LDMOD=${LDMOD:-/sbin/modprobe}
|
LDMOD=${LDMOD:-/sbin/modprobe}
|
||||||
LSMOD=${LSMOD:-/sbin/lsmod}
|
LSMOD=${LSMOD:-/sbin/lsmod}
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
EXTRA_DIST = *.sh
|
|
|
@ -3,7 +3,15 @@
|
||||||
# Wrapper script for easily running a survey of zpios based tests
|
# Wrapper script for easily running a survey of zpios based tests
|
||||||
#
|
#
|
||||||
|
|
||||||
. ./common.sh
|
SCRIPT_COMMON=common.sh
|
||||||
|
if [ -f ./${SCRIPT_COMMON} ]; then
|
||||||
|
. ./${SCRIPT_COMMON}
|
||||||
|
elif [ -f /usr/libexec/zfs/${SCRIPT_COMMON} ]; then
|
||||||
|
. /usr/libexec/zfs/${SCRIPT_COMMON}
|
||||||
|
else
|
||||||
|
echo "Missing helper script ${SCRIPT_COMMON}" && exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
PROG=zpios-survey.sh
|
PROG=zpios-survey.sh
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
|
@ -40,11 +48,11 @@ zpios_survey_base() {
|
||||||
TEST_NAME="${ZPOOL_CONFIG}+${ZPIOS_TEST}+baseline"
|
TEST_NAME="${ZPOOL_CONFIG}+${ZPIOS_TEST}+baseline"
|
||||||
print_header ${TEST_NAME}
|
print_header ${TEST_NAME}
|
||||||
|
|
||||||
./zfs.sh ${VERBOSE_FLAG} | \
|
${ZFS_SH} ${VERBOSE_FLAG} | \
|
||||||
tee -a ${ZPIOS_SURVEY_LOG}
|
tee -a ${ZPIOS_SURVEY_LOG}
|
||||||
./zpios.sh ${VERBOSE_FLAG} -c ${ZPOOL_CONFIG} -t ${ZPIOS_TEST} | \
|
${ZPIOS_SH} ${VERBOSE_FLAG} -c ${ZPOOL_CONFIG} -t ${ZPIOS_TEST} | \
|
||||||
tee -a ${ZPIOS_SURVEY_LOG}
|
tee -a ${ZPIOS_SURVEY_LOG}
|
||||||
./zfs.sh -u ${VERBOSE_FLAG} | \
|
${ZFS_SH} -u ${VERBOSE_FLAG} | \
|
||||||
tee -a ${ZPIOS_SURVEY_LOG}
|
tee -a ${ZPIOS_SURVEY_LOG}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,12 +64,12 @@ zpios_survey_prefetch() {
|
||||||
TEST_NAME="${ZPOOL_CONFIG}+${ZPIOS_TEST}+prefetch"
|
TEST_NAME="${ZPOOL_CONFIG}+${ZPIOS_TEST}+prefetch"
|
||||||
print_header ${TEST_NAME}
|
print_header ${TEST_NAME}
|
||||||
|
|
||||||
./zfs.sh ${VERBOSE_FLAG} \
|
${ZFS_SH} ${VERBOSE_FLAG} \
|
||||||
tee -a ${ZPIOS_SURVEY_LOG}
|
tee -a ${ZPIOS_SURVEY_LOG}
|
||||||
./zpios.sh ${VERBOSE_FLAG} -c ${ZPOOL_CONFIG} -t ${ZPIOS_TEST} \
|
${ZPIOS_SH} ${VERBOSE_FLAG} -c ${ZPOOL_CONFIG} -t ${ZPIOS_TEST} \
|
||||||
-o "--noprefetch" | \
|
-o "--noprefetch" | \
|
||||||
tee -a ${ZPIOS_SURVEY_LOG}
|
tee -a ${ZPIOS_SURVEY_LOG}
|
||||||
./zfs.sh -u ${VERBOSE_FLAG} | \
|
${ZFS_SH} -u ${VERBOSE_FLAG} | \
|
||||||
tee -a ${ZPIOS_SURVEY_LOG}
|
tee -a ${ZPIOS_SURVEY_LOG}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,12 +79,12 @@ zpios_survey_zerocopy() {
|
||||||
TEST_NAME="${ZPOOL_CONFIG}+${ZPIOS_TEST}+zerocopy"
|
TEST_NAME="${ZPOOL_CONFIG}+${ZPIOS_TEST}+zerocopy"
|
||||||
print_header ${TEST_NAME}
|
print_header ${TEST_NAME}
|
||||||
|
|
||||||
./zfs.sh ${VERBOSE_FLAG} | \
|
${ZFS_SH} ${VERBOSE_FLAG} | \
|
||||||
tee -a ${ZPIOS_SURVEY_LOG}
|
tee -a ${ZPIOS_SURVEY_LOG}
|
||||||
./zpios.sh ${VERBOSE_FLAG} -c ${ZPOOL_CONFIG} -t ${ZPIOS_TEST} \
|
${ZPIOS_SH} ${VERBOSE_FLAG} -c ${ZPOOL_CONFIG} -t ${ZPIOS_TEST} \
|
||||||
-o "--zerocopy" | \
|
-o "--zerocopy" | \
|
||||||
tee -a ${ZPIOS_SURVEY_LOG}
|
tee -a ${ZPIOS_SURVEY_LOG}
|
||||||
./zfs.sh -u ${VERBOSE_FLAG} | \
|
${ZFS_SH} -u ${VERBOSE_FLAG} | \
|
||||||
tee -a ${ZPIOS_SURVEY_LOG}
|
tee -a ${ZPIOS_SURVEY_LOG}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -86,12 +94,12 @@ zpios_survey_checksum() {
|
||||||
TEST_NAME="${ZPOOL_CONFIG}+${ZPIOS_TEST}+checksum"
|
TEST_NAME="${ZPOOL_CONFIG}+${ZPIOS_TEST}+checksum"
|
||||||
print_header ${TEST_NAME}
|
print_header ${TEST_NAME}
|
||||||
|
|
||||||
./zfs.sh ${VERBOSE_FLAG} | \
|
${ZFS_SH} ${VERBOSE_FLAG} | \
|
||||||
tee -a ${ZPIOS_SURVEY_LOG}
|
tee -a ${ZPIOS_SURVEY_LOG}
|
||||||
./zpios.sh ${VERBOSE_FLAG} -c ${ZPOOL_CONFIG} -t ${ZPIOS_TEST} \
|
${ZPIOS_SH} ${VERBOSE_FLAG} -c ${ZPOOL_CONFIG} -t ${ZPIOS_TEST} \
|
||||||
-s "set checksum=off" | \
|
-s "set checksum=off" | \
|
||||||
tee -a ${ZPIOS_SURVEY_LOG}
|
tee -a ${ZPIOS_SURVEY_LOG}
|
||||||
./zfs.sh -u ${VERBOSE_FLAG} | \
|
${ZFS_SH} -u ${VERBOSE_FLAG} | \
|
||||||
tee -a ${ZPIOS_SURVEY_LOG}
|
tee -a ${ZPIOS_SURVEY_LOG}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,12 +111,12 @@ zpios_survey_pending() {
|
||||||
TEST_NAME="${ZPOOL_CONFIG}+${ZPIOS_TEST}+pending"
|
TEST_NAME="${ZPOOL_CONFIG}+${ZPIOS_TEST}+pending"
|
||||||
print_header ${TEST_NAME}
|
print_header ${TEST_NAME}
|
||||||
|
|
||||||
./zfs.sh ${VERBOSE_FLAG} \
|
${ZFS_SH} ${VERBOSE_FLAG} \
|
||||||
zfs="zfs_vdev_max_pending=1024" | \
|
zfs="zfs_vdev_max_pending=1024" | \
|
||||||
tee -a ${ZPIOS_SURVEY_LOG}
|
tee -a ${ZPIOS_SURVEY_LOG}
|
||||||
./zpios.sh ${VERBOSE_FLAG} -c ${ZPOOL_CONFIG} -t ${ZPIOS_TEST} | \
|
${ZPIOS_SH} ${VERBOSE_FLAG} -c ${ZPOOL_CONFIG} -t ${ZPIOS_TEST} | \
|
||||||
tee -a ${ZPIOS_SURVEY_LOG}
|
tee -a ${ZPIOS_SURVEY_LOG}
|
||||||
./zfs.sh -u ${VERBOSE_FLAG} | \
|
${ZFS_SH} -u ${VERBOSE_FLAG} | \
|
||||||
tee -a ${ZPIOS_SURVEY_LOG}
|
tee -a ${ZPIOS_SURVEY_LOG}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -129,12 +137,12 @@ zpios_survey_kmem() {
|
||||||
TEST_NAME="${ZPOOL_CONFIG}+${ZPIOS_TEST}+kmem"
|
TEST_NAME="${ZPOOL_CONFIG}+${ZPIOS_TEST}+kmem"
|
||||||
print_header ${TEST_NAME}
|
print_header ${TEST_NAME}
|
||||||
|
|
||||||
./zfs.sh ${VERBOSE_FLAG} \
|
${ZFS_SH} ${VERBOSE_FLAG} \
|
||||||
zfs="zio_bulk_flags=0x100" | \
|
zfs="zio_bulk_flags=0x100" | \
|
||||||
tee -a ${ZPIOS_SURVEY_LOG}
|
tee -a ${ZPIOS_SURVEY_LOG}
|
||||||
./zpios.sh ${VERBOSE_FLAG} -c ${ZPOOL_CONFIG} -t ${ZPIOS_TEST} | \
|
${ZPIOS_SH} ${VERBOSE_FLAG} -c ${ZPOOL_CONFIG} -t ${ZPIOS_TEST} | \
|
||||||
tee -a ${ZPIOS_SURVEY_LOG}
|
tee -a ${ZPIOS_SURVEY_LOG}
|
||||||
./zfs.sh -u ${VERBOSE_FLAG} | \
|
${ZFS_SH} -u ${VERBOSE_FLAG} | \
|
||||||
tee -a ${ZPIOS_SURVEY_LOG}
|
tee -a ${ZPIOS_SURVEY_LOG}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -143,15 +151,15 @@ zpios_survey_all() {
|
||||||
TEST_NAME="${ZPOOL_CONFIG}+${ZPIOS_TEST}+all"
|
TEST_NAME="${ZPOOL_CONFIG}+${ZPIOS_TEST}+all"
|
||||||
print_header ${TEST_NAME}
|
print_header ${TEST_NAME}
|
||||||
|
|
||||||
./zfs.sh ${VERBOSE_FLAG} \
|
${ZFS_SH} ${VERBOSE_FLAG} \
|
||||||
zfs="zfs_vdev_max_pending=1024" \
|
zfs="zfs_vdev_max_pending=1024" \
|
||||||
zfs="zio_bulk_flags=0x100" | \
|
zfs="zio_bulk_flags=0x100" | \
|
||||||
tee -a ${ZPIOS_SURVEY_LOG}
|
tee -a ${ZPIOS_SURVEY_LOG}
|
||||||
./zpios.sh ${VERBOSE_FLAG} -c ${ZPOOL_CONFIG} -t ${ZPIOS_TEST} \
|
${ZPIOS_SH} ${VERBOSE_FLAG} -c ${ZPOOL_CONFIG} -t ${ZPIOS_TEST} \
|
||||||
-o "--noprefetch --zerocopy" \
|
-o "--noprefetch --zerocopy" \
|
||||||
-s "set checksum=off" | \
|
-s "set checksum=off" | \
|
||||||
tee -a ${ZPIOS_SURVEY_LOG}
|
tee -a ${ZPIOS_SURVEY_LOG}
|
||||||
./zfs.sh -u ${VERBOSE_FLAG} | \
|
${ZFS_SH} -u ${VERBOSE_FLAG} | \
|
||||||
tee -a ${ZPIOS_SURVEY_LOG}
|
tee -a ${ZPIOS_SURVEY_LOG}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
# --verbose -v =increase verbosity
|
# --verbose -v =increase verbosity
|
||||||
# --help -? =this help
|
# --help -? =this help
|
||||||
|
|
||||||
ZPIOS_CMD="${CMDDIR}/zpios/zpios \
|
ZPIOS_CMD="${ZPIOS} \
|
||||||
--load=dmuio \
|
--load=dmuio \
|
||||||
--pool=${ZPOOL_NAME} \
|
--pool=${ZPOOL_NAME} \
|
||||||
--name=${ZPOOL_CONFIG} \
|
--name=${ZPOOL_CONFIG} \
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
# --help -? =this help
|
# --help -? =this help
|
||||||
|
|
||||||
|
|
||||||
ZPIOS_CMD="${CMDDIR}/zpios/zpios \
|
ZPIOS_CMD="${ZPIOS} \
|
||||||
--load=dmuio \
|
--load=dmuio \
|
||||||
--pool=${ZPOOL_NAME} \
|
--pool=${ZPOOL_NAME} \
|
||||||
--name=${ZPOOL_CONFIG} \
|
--name=${ZPOOL_CONFIG} \
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
# --verbose -v =increase verbosity
|
# --verbose -v =increase verbosity
|
||||||
# --help -? =this help
|
# --help -? =this help
|
||||||
|
|
||||||
ZPIOS_CMD="${CMDDIR}/zpios/zpios \
|
ZPIOS_CMD="${ZPIOS} \
|
||||||
--load=dmuio \
|
--load=dmuio \
|
||||||
--pool=${ZPOOL_NAME} \
|
--pool=${ZPOOL_NAME} \
|
||||||
--name=${ZPOOL_CONFIG} \
|
--name=${ZPOOL_CONFIG} \
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
# --verbose -v =increase verbosity
|
# --verbose -v =increase verbosity
|
||||||
# --help -? =this help
|
# --help -? =this help
|
||||||
|
|
||||||
ZPIOS_CMD="${CMDDIR}/zpios/zpios \
|
ZPIOS_CMD="${ZPIOS} \
|
||||||
--load=dmuio \
|
--load=dmuio \
|
||||||
--pool=${ZPOOL_NAME} \
|
--pool=${ZPOOL_NAME} \
|
||||||
--name=${ZPOOL_CONFIG} \
|
--name=${ZPOOL_CONFIG} \
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
# --verbose -v =increase verbosity
|
# --verbose -v =increase verbosity
|
||||||
# --help -? =this help
|
# --help -? =this help
|
||||||
|
|
||||||
ZPIOS_CMD="${CMDDIR}/zpios/zpios \
|
ZPIOS_CMD="${ZPIOS} \
|
||||||
--load=dmuio \
|
--load=dmuio \
|
||||||
--pool=${ZPOOL_NAME} \
|
--pool=${ZPOOL_NAME} \
|
||||||
--name=${ZPOOL_CONFIG} \
|
--name=${ZPOOL_CONFIG} \
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
EXTRA_DIST = *.sh
|
|
|
@ -3,13 +3,22 @@
|
||||||
# Wrapper script for easily running zpios based tests
|
# Wrapper script for easily running zpios based tests
|
||||||
#
|
#
|
||||||
|
|
||||||
. ./common.sh
|
SCRIPT_COMMON=common.sh
|
||||||
|
if [ -f ./${SCRIPT_COMMON} ]; then
|
||||||
|
. ./${SCRIPT_COMMON}
|
||||||
|
elif [ -f /usr/libexec/zfs/${SCRIPT_COMMON} ]; then
|
||||||
|
. /usr/libexec/zfs/${SCRIPT_COMMON}
|
||||||
|
else
|
||||||
|
echo "Missing helper script ${SCRIPT_COMMON}" && exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
PROG=zpios.sh
|
PROG=zpios.sh
|
||||||
DATE=`date +%Y%m%d-%H%M%S`
|
DATE=`date +%Y%m%d-%H%M%S`
|
||||||
|
if [ "${ZPIOS_MODULES}" ]; then
|
||||||
MODULES=( \
|
MODULES=(${ZPIOS_MODULES[*]})
|
||||||
${MODDIR}/zpios/zpios.ko \
|
else
|
||||||
)
|
MODULES=(zpios)
|
||||||
|
fi
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
cat << EOF
|
cat << EOF
|
||||||
|
@ -43,7 +52,7 @@ print_header() {
|
||||||
|
|
||||||
print_spl_info() {
|
print_spl_info() {
|
||||||
echo --------------------- SPL Tunings ------------------------------
|
echo --------------------- SPL Tunings ------------------------------
|
||||||
sysctl -A | grep spl
|
${SYSCTL} -A | grep spl
|
||||||
|
|
||||||
if [ -d /sys/module/spl/parameters ]; then
|
if [ -d /sys/module/spl/parameters ]; then
|
||||||
grep [0-9] /sys/module/spl/parameters/*
|
grep [0-9] /sys/module/spl/parameters/*
|
||||||
|
@ -56,7 +65,7 @@ print_spl_info() {
|
||||||
|
|
||||||
print_zfs_info() {
|
print_zfs_info() {
|
||||||
echo --------------------- ZFS Tunings ------------------------------
|
echo --------------------- ZFS Tunings ------------------------------
|
||||||
sysctl -A | grep zfs
|
${SYSCTL} -A | grep zfs
|
||||||
|
|
||||||
if [ -d /sys/module/zfs/parameters ]; then
|
if [ -d /sys/module/zfs/parameters ]; then
|
||||||
grep [0-9] /sys/module/zfs/parameters/*
|
grep [0-9] /sys/module/zfs/parameters/*
|
||||||
|
@ -69,7 +78,7 @@ print_zfs_info() {
|
||||||
|
|
||||||
print_stats() {
|
print_stats() {
|
||||||
echo ---------------------- Statistics -------------------------------
|
echo ---------------------- Statistics -------------------------------
|
||||||
sysctl -A | grep spl | grep stack_max
|
${SYSCTL} -A | grep spl | grep stack_max
|
||||||
|
|
||||||
if [ -d /proc/spl/kstat/ ]; then
|
if [ -d /proc/spl/kstat/ ]; then
|
||||||
if [ -f /proc/spl/kstat/zfs/arcstats ]; then
|
if [ -f /proc/spl/kstat/zfs/arcstats ]; then
|
||||||
|
@ -100,7 +109,7 @@ check_test() {
|
||||||
local NAME=`basename ${ZPIOS_TEST} .sh`
|
local NAME=`basename ${ZPIOS_TEST} .sh`
|
||||||
ERROR="Unknown test '${NAME}', available tests are:\n"
|
ERROR="Unknown test '${NAME}', available tests are:\n"
|
||||||
|
|
||||||
for TST in `ls ${TOPDIR}/scripts/zpios-test/`; do
|
for TST in `ls ${ZPIOSDIR}/ | grep ".sh"`; do
|
||||||
local NAME=`basename ${TST} .sh`
|
local NAME=`basename ${TST} .sh`
|
||||||
ERROR="${ERROR}${NAME}\n"
|
ERROR="${ERROR}${NAME}\n"
|
||||||
done
|
done
|
||||||
|
@ -118,18 +127,18 @@ cat > ${PROFILE_DIR}/zpios-config.sh << EOF
|
||||||
#
|
#
|
||||||
|
|
||||||
PROFILE_DIR=/tmp/zpios/${ZPOOL_CONFIG}+${ZPIOS_TEST_ARG}+${DATE}
|
PROFILE_DIR=/tmp/zpios/${ZPOOL_CONFIG}+${ZPIOS_TEST_ARG}+${DATE}
|
||||||
PROFILE_PRE=${TOPDIR}/scripts/zpios-profile/zpios-profile-pre.sh
|
PROFILE_PRE=${ZPIOSPROFILEDIR}/zpios-profile-pre.sh
|
||||||
PROFILE_POST=${TOPDIR}/scripts/zpios-profile/zpios-profile-post.sh
|
PROFILE_POST=${ZPIOSPROFILEDIR}/zpios-profile-post.sh
|
||||||
PROFILE_USER=${TOPDIR}/scripts/zpios-profile/zpios-profile.sh
|
PROFILE_USER=${ZPIOSPROFILEDIR}/zpios-profile.sh
|
||||||
PROFILE_PIDS=${TOPDIR}/scripts/zpios-profile/zpios-profile-pids.sh
|
PROFILE_PIDS=${ZPIOSPROFILEDIR}/zpios-profile-pids.sh
|
||||||
PROFILE_DISK=${TOPDIR}/scripts/zpios-/profile/zpios-profile-disk.sh
|
PROFILE_DISK=${ZPIOSPROFILEDIR}/zpios-profile-disk.sh
|
||||||
PROFILE_ARC_PROC=/proc/spl/kstat/zfs/arcstats
|
PROFILE_ARC_PROC=/proc/spl/kstat/zfs/arcstats
|
||||||
PROFILE_VDEV_CACHE_PROC=/proc/spl/kstat/zfs/vdev_cache_stats
|
PROFILE_VDEV_CACHE_PROC=/proc/spl/kstat/zfs/vdev_cache_stats
|
||||||
|
|
||||||
OPROFILE_KERNEL="/boot/vmlinux-`uname -r`"
|
OPROFILE_KERNEL="/boot/vmlinux-`uname -r`"
|
||||||
OPROFILE_KERNEL_DIR="/lib/modules/`uname -r`/kernel/"
|
OPROFILE_KERNEL_DIR="/lib/modules/`uname -r`/kernel/"
|
||||||
OPROFILE_SPL_DIR="${SPLBUILD}/module/"
|
OPROFILE_SPL_DIR=${SPLBUILD}/module/
|
||||||
OPROFILE_ZFS_DIR="${TOPDIR}/module/"
|
OPROFILE_ZFS_DIR=${MODDIR}
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
@ -180,7 +189,7 @@ while getopts 'hvpc:t:o:l:s:' OPTION; do
|
||||||
;;
|
;;
|
||||||
t)
|
t)
|
||||||
ZPIOS_TEST_ARG=${OPTARG}
|
ZPIOS_TEST_ARG=${OPTARG}
|
||||||
ZPIOS_TEST=${TOPDIR}/scripts/zpios-test/${OPTARG}.sh
|
ZPIOS_TEST=${ZPIOSDIR}/${OPTARG}.sh
|
||||||
;;
|
;;
|
||||||
o)
|
o)
|
||||||
ZPIOS_OPTIONS=${OPTARG}
|
ZPIOS_OPTIONS=${OPTARG}
|
||||||
|
@ -226,7 +235,7 @@ if [ ${VERBOSE} ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Create the zpool configuration
|
# Create the zpool configuration
|
||||||
./zpool-create.sh ${VERBOSE_FLAG} -p ${ZPOOL_NAME} -c ${ZPOOL_CONFIG} \
|
${ZPOOL_CREATE_SH} ${VERBOSE_FLAG} -p ${ZPOOL_NAME} -c ${ZPOOL_CONFIG} \
|
||||||
-l "${ZPOOL_OPTIONS}" -s "${ZFS_OPTIONS}" || exit 1
|
-l "${ZPOOL_OPTIONS}" -s "${ZFS_OPTIONS}" || exit 1
|
||||||
|
|
||||||
if [ ${PROFILE} ]; then
|
if [ ${PROFILE} ]; then
|
||||||
|
@ -245,7 +254,8 @@ if [ ${VERBOSE} ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Destroy the zpool configuration
|
# Destroy the zpool configuration
|
||||||
./zpool-create.sh ${VERBOSE_FLAG} -p ${ZPOOL_NAME} -c ${ZPOOL_CONFIG} -d || exit 1
|
${ZPOOL_CREATE_SH} ${VERBOSE_FLAG} -p ${ZPOOL_NAME} \
|
||||||
|
-c ${ZPOOL_CONFIG} -d || exit 1
|
||||||
|
|
||||||
# Unload the test module stack and wait for device removal
|
# Unload the test module stack and wait for device removal
|
||||||
unload_modules
|
unload_modules
|
||||||
|
|
Loading…
Reference in New Issue