X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Ftests%2Fcfg%2Flocal.sh;h=3f056d786c6b409f0fbe4deecc0946f95cabde33;hp=3f1d81fb2433ede276746f004f3e13d584fb3b6c;hb=e0063a5db5289d1433476112410e942e036b76a4;hpb=26bb579a96efced8825b63b84465334368ecc382 diff --git a/lustre/tests/cfg/local.sh b/lustre/tests/cfg/local.sh index 3f1d81f..3f056d7 100644 --- a/lustre/tests/cfg/local.sh +++ b/lustre/tests/cfg/local.sh @@ -22,15 +22,36 @@ for num in $(seq $MDSCOUNT); do done MDSDEVBASE=${MDSDEVBASE:-$TMP/${FSNAME}-mdt} MDSSIZE=${MDSSIZE:-200000} -MDSOPT=${MDSOPT:-"--mountfsoptions=user_xattr"} +# +# Format options of facets can be specified with these variables: +# +# - OPT +# +# Arguments for "--mkfsoptions" shall be specified with these +# variables: +# +# - _MKFS_OPTS +# - _FS_MKFS_OPTS +# +# A number of other options have their own specific variables. See +# mkfs_opts(). +# +MDSOPT=${MDSOPT:-} +MDS_FS_MKFS_OPTS=${MDS_FS_MKFS_OPTS:-} +MDS_MOUNT_OPTS=${MDS_MOUNT_OPTS:-} MGSDEV=${MGSDEV:-$MDSDEV1} MGSSIZE=${MGSSIZE:-$MDSSIZE} +MGSOPT=${MGSOPT:-} +MGS_FS_MKFS_OPTS=${MGS_FS_MKFS_OPTS:-} +MGS_MOUNT_OPTS=${MGS_MOUNT_OPTS:-} OSTCOUNT=${OSTCOUNT:-2} OSTDEVBASE=${OSTDEVBASE:-$TMP/${FSNAME}-ost} OSTSIZE=${OSTSIZE:-200000} -OSTOPT="" +OSTOPT=${OSTOPT:-} +OST_FS_MKFS_OPTS=${OST_FS_MKFS_OPTS:-} +OST_MOUNT_OPTS=${OST_MOUNT_OPTS:-} # Can specify individual ost devs with # OSTDEV1="/dev/sda" # on specific hosts with @@ -38,7 +59,31 @@ OSTOPT="" NETTYPE=${NETTYPE:-tcp} MGSNID=${MGSNID:-`h2$NETTYPE $mgs_HOST`} + +# +# Back end file system type(s) of facets can be specified with these +# variables: +# +# 1. _FSTYPE +# 2. FSTYPE +# 3. FSTYPE +# +# More specific ones override more general ones. See facet_fstype(). +# FSTYPE=${FSTYPE:-ldiskfs} + +LDISKFS_MKFS_OPTS=${LDISKFS_MKFS_OPTS:-} +ZFS_MKFS_OPTS=${ZFS_MKFS_OPTS:-} + +# +# If any OST is "remote" and the non-default implementation (e.g., +# current OFD) is desired, then make sure that either a) +# LOAD_MODULES_REMOTE is true or b) modprobe(8) is configured to +# blacklist the undesired (and aliased the other, if necessary). +# +USE_OFD=${USE_OFD:-yes} +LOAD_MODULES_REMOTE=${LOAD_MODULES_REMOTE:-true} + STRIPE_BYTES=${STRIPE_BYTES:-1048576} STRIPES_PER_OBJ=${STRIPES_PER_OBJ:-0} SINGLEMDS=${SINGLEMDS:-"mds1"} @@ -47,13 +92,10 @@ PTLDEBUG=${PTLDEBUG:-"vfstrace rpctrace dlmtrace neterror ha config ioctl super" SUBSYSTEM=${SUBSYSTEM:-"all -lnet -lnd -pinger"} # promise 2MB for every cpu -_debug_mb=$((($(cut -d "-" -f 2 /sys/devices/system/cpu/possible)+1)*2)) - -# but not less then 10Mb, and limited by 512Mb in libcfs -if (( _debug_mb < 10 )); then - _debug_mb=10 -elif ((_debug_mb > 512 )); then - _debug_mb=512 +if [ -f /sys/devices/system/cpu/possible ]; then + _debug_mb=$((($(cut -d "-" -f 2 /sys/devices/system/cpu/possible)+1)*2)) +else + _debug_mb=$(($(getconf _NPROCESSORS_CONF)*2)) fi DEBUG_SIZE=${DEBUG_SIZE:-$_debug_mb} @@ -63,51 +105,6 @@ QUOTA_TYPE="ug3" QUOTA_USERS=${QUOTA_USERS:-"quota_usr quota_2usr sanityusr sanityusr1"} LQUOTAOPTS=${LQUOTAOPTS:-"hash_lqs_cur_bits=3"} -MKFSOPT="" -[ "x$MDSJOURNALSIZE" != "x" ] && - MKFSOPT=$MKFSOPT" -J size=$MDSJOURNALSIZE" -[ "x$MDSISIZE" != "x" ] && - MKFSOPT=$MKFSOPT" -i $MDSISIZE" -[ "x$MKFSOPT" != "x" ] && - MKFSOPT="--mkfsoptions=\\\"$MKFSOPT\\\"" -[ "x$SECLEVEL" != "x" ] && - MKFSOPT=$MKFSOPT" --param mdt.sec_level=$SECLEVEL" -[ "x$MDSCAPA" != "x" ] && - MKFSOPT=$MKFSOPT" --param mdt.capa=$MDSCAPA" -[ "x$mdsfailover_HOST" != "x" ] && - MDSOPT=$MDSOPT" --failnode=`h2$NETTYPE $mdsfailover_HOST`" -[ "x$STRIPE_BYTES" != "x" ] && - MDSOPT=$MDSOPT" --param lov.stripesize=$STRIPE_BYTES" -[ "x$STRIPES_PER_OBJ" != "x" ] && - MDSOPT=$MDSOPT" --param lov.stripecount=$STRIPES_PER_OBJ" -[ "x$L_GETIDENTITY" != "x" ] && - MDSOPT=$MDSOPT" --param mdt.identity_upcall=$L_GETIDENTITY" - -MDS_MKFS_OPTS="--mdt --fsname=$FSNAME --device-size=$MDSSIZE --param sys.timeout=$TIMEOUT $MKFSOPT $MDSOPT $MDS_MKFS_OPTS" -if [[ $mds1_HOST == $mgs_HOST ]] && [[ $MDSDEV1 == $MGSDEV ]]; then - MDS_MKFS_OPTS="--mgs $MDS_MKFS_OPTS" -else - MDS_MKFS_OPTS="--mgsnode=$MGSNID $MDS_MKFS_OPTS" - MGS_MKFS_OPTS="--mgs --device-size=$MGSSIZE" -fi - -MKFSOPT="" -[ "x$OSTJOURNALSIZE" != "x" ] && - MKFSOPT=$MKFSOPT" -J size=$OSTJOURNALSIZE" -[ "x$MKFSOPT" != "x" ] && - MKFSOPT="--mkfsoptions=\\\"$MKFSOPT\\\"" -[ "x$SECLEVEL" != "x" ] && - MKFSOPT=$MKFSOPT" --param ost.sec_level=$SECLEVEL" -[ "x$OSSCAPA" != "x" ] && - MKFSOPT=$MKFSOPT" --param ost.capa=$OSSCAPA" -[ "x$ostfailover_HOST" != "x" ] && - OSTOPT=$OSTOPT" --failnode=`h2$NETTYPE $ostfailover_HOST`" -OST_MKFS_OPTS="--ost --fsname=$FSNAME --device-size=$OSTSIZE --mgsnode=$MGSNID --param sys.timeout=$TIMEOUT $MKFSOPT $OSTOPT $OST_MKFS_OPTS" - -MDS_MOUNT_OPTS=${MDS_MOUNT_OPTS:-"-o loop,user_xattr"} -OST_MOUNT_OPTS=${OST_MOUNT_OPTS:-"-o loop"} -MGS_MOUNT_OPTS=${MGS_MOUNT_OPTS:-$MDS_MOUNT_OPTS} - #client MOUNT=${MOUNT:-/mnt/${FSNAME}} MOUNT1=${MOUNT1:-$MOUNT}