1 FSNAME=${FSNAME:-lustre}
4 mds_HOST=${mds_HOST:-`hostname`}
5 mdsfailover_HOST=${mdsfailover_HOST}
6 mds1_HOST=${mds1_HOST:-$mds_HOST}
7 mds1failover_HOST=${mds1failover_HOST:-$mdsfailover_HOST}
8 mgs_HOST=${mgs_HOST:-$mds1_HOST}
9 ost_HOST=${ost_HOST:-`hostname`}
10 ostfailover_HOST=${ostfailover_HOST}
15 DAEMONSIZE=${DAEMONSIZE:-500}
16 MDSCOUNT=${MDSCOUNT:-1}
17 [ $MDSCOUNT -gt 4 ] && MDSCOUNT=4
18 [ $MDSCOUNT -gt 1 ] && IAMDIR=yes
19 for num in $(seq $MDSCOUNT); do
20 eval mds${num}_HOST=\$\{mds${num}_HOST:-$mds_HOST\}
21 eval mds${num}failover_HOST=\$\{mds${num}failover_HOST:-$mdsfailover_HOST\}
23 MDSDEVBASE=${MDSDEVBASE:-$TMP/${FSNAME}-mdt}
24 MDSSIZE=${MDSSIZE:-200000}
26 # Format options of facets can be specified with these variables:
30 # Arguments for "--mkfsoptions" shall be specified with these
33 # - <fstype>_MKFS_OPTS
34 # - <facet_type>_FS_MKFS_OPTS
36 # A number of other options have their own specific variables. See
40 MDS_FS_MKFS_OPTS=${MDS_FS_MKFS_OPTS:-}
41 MDS_MOUNT_OPTS=${MDS_MOUNT_OPTS:-}
43 MGSDEV=${MGSDEV:-$MDSDEV1}
44 MGSSIZE=${MGSSIZE:-$MDSSIZE}
46 MGS_FS_MKFS_OPTS=${MGS_FS_MKFS_OPTS:-}
47 MGS_MOUNT_OPTS=${MGS_MOUNT_OPTS:-}
49 OSTCOUNT=${OSTCOUNT:-2}
50 OSTDEVBASE=${OSTDEVBASE:-$TMP/${FSNAME}-ost}
51 OSTSIZE=${OSTSIZE:-200000}
53 OST_FS_MKFS_OPTS=${OST_FS_MKFS_OPTS:-}
54 OST_MOUNT_OPTS=${OST_MOUNT_OPTS:-}
55 # Can specify individual ost devs with
57 # on specific hosts with
60 NETTYPE=${NETTYPE:-tcp}
61 MGSNID=${MGSNID:-`h2$NETTYPE $mgs_HOST`}
64 # Back end file system type(s) of facets can be specified with these
68 # 2. <facet_type>FSTYPE
71 # More specific ones override more general ones. See facet_fstype().
73 FSTYPE=${FSTYPE:-ldiskfs}
75 LDISKFS_MKFS_OPTS=${LDISKFS_MKFS_OPTS:-}
76 ZFS_MKFS_OPTS=${ZFS_MKFS_OPTS:-}
79 # If any OST is "remote" and the non-default implementation (e.g.,
80 # current OFD) is desired, then make sure that either a)
81 # LOAD_MODULES_REMOTE is true or b) modprobe(8) is configured to
82 # blacklist the undesired (and aliased the other, if necessary).
84 USE_OFD=${USE_OFD:-no}
86 STRIPE_BYTES=${STRIPE_BYTES:-1048576}
87 STRIPES_PER_OBJ=${STRIPES_PER_OBJ:-0}
88 SINGLEMDS=${SINGLEMDS:-"mds1"}
89 TIMEOUT=${TIMEOUT:-20}
90 PTLDEBUG=${PTLDEBUG:-"vfstrace rpctrace dlmtrace neterror ha config ioctl super"}
91 SUBSYSTEM=${SUBSYSTEM:-"all -lnet -lnd -pinger"}
93 # promise 2MB for every cpu
94 if [ -f /sys/devices/system/cpu/possible ]; then
95 _debug_mb=$((($(cut -d "-" -f 2 /sys/devices/system/cpu/possible)+1)*2))
97 _debug_mb=$(($(getconf _NPROCESSORS_CONF)*2))
100 DEBUG_SIZE=${DEBUG_SIZE:-$_debug_mb}
102 ENABLE_QUOTA=${ENABLE_QUOTA:-""}
104 QUOTA_USERS=${QUOTA_USERS:-"quota_usr quota_2usr sanityusr sanityusr1"}
105 LQUOTAOPTS=${LQUOTAOPTS:-"hash_lqs_cur_bits=3"}
108 MOUNT=${MOUNT:-/mnt/${FSNAME}}
109 MOUNT1=${MOUNT1:-$MOUNT}
110 MOUNT2=${MOUNT2:-${MOUNT}2}
111 MOUNTOPT=${MOUNTOPT:-"-o user_xattr,flock"}
114 DIR2=${DIR2:-$MOUNT2}
116 if [ $UID -ne 0 ]; then
117 log "running as non-root uid $UID"
119 RUNAS_GID=`id -g $USER`
122 RUNAS_ID=${RUNAS_ID:-500}
123 RUNAS_GID=${RUNAS_GID:-$RUNAS_ID}
124 RUNAS=${RUNAS:-"runas -u $RUNAS_ID -g $RUNAS_GID"}
128 FAILURE_MODE=${FAILURE_MODE:-SOFT} # or HARD
129 POWER_DOWN=${POWER_DOWN:-"powerman --off"}
130 POWER_UP=${POWER_UP:-"powerman --on"}
132 FAIL_ON_ERROR=${FAIL_ON_ERROR:-true}
134 MPIRUN=$(which mpirun 2>/dev/null) || true
135 MPI_USER=${MPI_USER:-mpiuser}
136 SHARED_DIR_LOGS=${SHARED_DIR_LOGS:-""}
138 # This is used by a small number of tests to share state between the client
139 # running the tests, or in some cases between the servers (e.g. lfsck.sh).
140 # It needs to be a non-lustre filesystem that is available on all the nodes.
141 SHARED_DIRECTORY=${SHARED_DIRECTORY:-""} # bug 17839 comment 65