1 FSNAME=${FSNAME:-lustre}
4 mds_HOST=${mds_HOST:-$(hostname)}
5 mdsfailover_HOST=${mdsfailover_HOST}
6 mgs_HOST=${mgs_HOST:-$mds_HOST}
7 ost_HOST=${ost_HOST:-$(hostname)}
8 ostfailover_HOST=${ostfailover_HOST}
10 # FILESET variable is used by sanity.sh to verify fileset
11 # feature, tests should pass even under subdirectory namespace.
12 FILESET=${FILESET:-""}
13 [[ -z "$FILESET" ]] || [[ "${FILESET:0:1}" = "/" ]] || FILESET="/$FILESET"
17 DAEMONSIZE=${DAEMONSIZE:-500}
18 MDSCOUNT=${MDSCOUNT:-1}
19 MDSDEVBASE=${MDSDEVBASE:-$TMP/${FSNAME}-mdt}
20 MDSSIZE=${MDSSIZE:-200000}
22 # Format options of facets can be specified with these variables:
26 # Arguments for "--mkfsoptions" shall be specified with these
29 # - <fstype>_MKFS_OPTS
30 # - <facet_type>_FS_MKFS_OPTS
32 # A number of other options have their own specific variables. See
36 MDS_FS_MKFS_OPTS=${MDS_FS_MKFS_OPTS:-}
37 MDS_MOUNT_OPTS=${MDS_MOUNT_OPTS:-}
39 MGSSIZE=${MGSSIZE:-$MDSSIZE}
41 MGS_FS_MKFS_OPTS=${MGS_FS_MKFS_OPTS:-}
42 MGS_MOUNT_OPTS=${MGS_MOUNT_OPTS:-}
44 OSTCOUNT=${OSTCOUNT:-2}
45 OSTDEVBASE=${OSTDEVBASE:-$TMP/${FSNAME}-ost}
46 OSTSIZE=${OSTSIZE:-400000}
48 OST_FS_MKFS_OPTS=${OST_FS_MKFS_OPTS:-}
49 OST_MOUNT_OPTS=${OST_MOUNT_OPTS:-}
50 OST_INDEX_LIST=${OST_INDEX_LIST:-}
51 # Can specify individual ost devs with
53 # on specific hosts with
55 # ost1_JRN="/dev/sdb1"
57 # For ZFS, ost devices can be specified via either or both of the following:
58 # OSTZFSDEV1="${FSNAME}-ost1/ost1"
61 # OST indices can be specified as follows:
67 # OST_INDEX_LIST="[1,2,4-6,8]" # [n-m,l-k,...], where n < m and l < k, etc.
69 # The default index value of an individual OST is its facet number minus 1.
70 # More specific ones override more general ones. See facet_index().
72 NETTYPE=${NETTYPE:-tcp}
73 MGSNID=${MGSNID:-$(h2$NETTYPE $mgs_HOST)}
76 # Back end file system type(s) of facets can be specified with these
80 # 2. <facet_type>FSTYPE
83 # More specific ones override more general ones. See facet_fstype().
85 FSTYPE=${FSTYPE:-ldiskfs}
87 LDISKFS_MKFS_OPTS=${LDISKFS_MKFS_OPTS:-}
88 ZFS_MKFS_OPTS=${ZFS_MKFS_OPTS:-}
90 LOAD_MODULES_REMOTE=${LOAD_MODULES_REMOTE:-false}
92 STRIPE_BYTES=${STRIPE_BYTES:-1048576}
93 STRIPES_PER_OBJ=${STRIPES_PER_OBJ:-0}
94 SINGLEMDS=${SINGLEMDS:-"mds1"}
95 TIMEOUT=${TIMEOUT:-20}
96 PTLDEBUG=${PTLDEBUG:-"vfstrace rpctrace dlmtrace neterror ha config \
98 SUBSYSTEM=${SUBSYSTEM:-"all -lnet -lnd -pinger"}
100 # promise 2MB for every cpu
101 if [ -f /sys/devices/system/cpu/possible ]; then
102 _debug_mb=$((($(cut -d "-" -f 2 /sys/devices/system/cpu/possible)+1)*2))
104 _debug_mb=$(($(getconf _NPROCESSORS_CONF)*2))
107 DEBUG_SIZE=${DEBUG_SIZE:-$_debug_mb}
109 ENABLE_QUOTA=${ENABLE_QUOTA:-""}
111 QUOTA_USERS=${QUOTA_USERS:-"quota_usr quota_2usr sanityusr sanityusr1"}
112 # "error: conf_param: No such device" issue in every test suite logs
113 # sanity-quota test_32 hash_lqs_cur_bits is not set properly
114 LQUOTAOPTS=${LQUOTAOPTS:-"hash_lqs_cur_bits=3"}
117 MOUNT=${MOUNT:-/mnt/${FSNAME}}
118 MOUNT1=${MOUNT1:-$MOUNT}
119 MOUNT2=${MOUNT2:-${MOUNT}2}
120 MOUNT3=${MOUNT3:-${MOUNT}3}
121 # Comma-separated option list used as "mount [...] -o $MOUNT_OPTS [...]"
122 MOUNT_OPTS=${MOUNT_OPTS:-"user_xattr,flock"}
123 # Mount flags (e.g. "-n") used as "mount [...] $MOUNT_FLAGS [...]"
124 MOUNT_FLAGS=${MOUNT_FLAGS:-""}
127 DIR2=${DIR2:-$MOUNT2}
128 DIR3=${DIR3:-$MOUNT3}
130 if [ $UID -ne 0 ]; then
131 log "running as non-root uid $UID"
133 RUNAS_GID=`id -g $USER`
136 RUNAS_ID=${RUNAS_ID:-500}
137 RUNAS_GID=${RUNAS_GID:-$RUNAS_ID}
138 RUNAS=${RUNAS:-"runas -u $RUNAS_ID -g $RUNAS_GID"}
142 FAILURE_MODE=${FAILURE_MODE:-SOFT} # or HARD
143 POWER_DOWN=${POWER_DOWN:-"powerman --off"}
144 POWER_UP=${POWER_UP:-"powerman --on"}
146 FAIL_ON_ERROR=${FAIL_ON_ERROR:-true}
148 MPIRUN=${MPIRUN:-$(which mpirun 2>/dev/null || true)}
149 MPI_USER=${MPI_USER:-mpiuser}
150 SHARED_DIR_LOGS=${SHARED_DIR_LOGS:-""}
151 MACHINEFILE_OPTION=${MACHINEFILE_OPTION:-"-machinefile"}
153 # This is used by a small number of tests to share state between the client
154 # running the tests, or in some cases between the servers (e.g. lfsck.sh).
155 # It needs to be a non-lustre filesystem that is available on all the nodes.
156 SHARED_DIRECTORY=${SHARED_DIRECTORY:-$TMP} # bug 17839 comment 65
159 # In order to test multiple remote HSM agents, a new facet type named "AGT" and
160 # the following associated variables are added:
162 # AGTCOUNT: number of agents
163 # AGTDEV{N}: target HSM mount point (root path of the backend)
164 # agt{N}_HOST: hostname of the agent agt{N}
165 # SINGLEAGT: facet of the single agent
167 # Please refer to init_agt_vars() in sanity-hsm.sh for the default values of