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}
9 # FILESET variable is used by sanity.sh to verify fileset
10 # feature, tests should pass even under subdirectory namespace.
11 FILESET=${FILESET:-""}
12 [[ -z "$FILESET" ]] || [[ "${FILESET:0:1}" = "/" ]] || FILESET="/$FILESET"
16 DAEMONSIZE=${DAEMONSIZE:-500}
17 MDSCOUNT=${MDSCOUNT:-1}
18 MDSDEVBASE=${MDSDEVBASE:-$TMP/${FSNAME}-mdt}
19 MDSSIZE=${MDSSIZE:-250000}
21 # Format options of facets can be specified with these variables:
25 # Arguments for "--mkfsoptions" shall be specified with these
28 # - <fstype>_MKFS_OPTS
29 # - <facet_type>_FS_MKFS_OPTS
31 # A number of other options have their own specific variables. See
35 MDS_FS_MKFS_OPTS=${MDS_FS_MKFS_OPTS:-}
36 MDS_MOUNT_OPTS=${MDS_MOUNT_OPTS:-}
37 # <facet_type>_MOUNT_FS_OPTS is the mount options specified when formatting
38 # the underlying device by argument "--mountfsoptions"
39 MDS_MOUNT_FS_OPTS=${MDS_MOUNT_FS_OPTS:-}
41 MGSSIZE=${MGSSIZE:-$MDSSIZE}
43 MGS_FS_MKFS_OPTS=${MGS_FS_MKFS_OPTS:-}
44 MGS_MOUNT_OPTS=${MGS_MOUNT_OPTS:-}
45 MGS_MOUNT_FS_OPTS=${MGS_MOUNT_FS_OPTS:-}
47 OSTCOUNT=${OSTCOUNT:-2}
48 OSTDEVBASE=${OSTDEVBASE:-$TMP/${FSNAME}-ost}
49 OSTSIZE=${OSTSIZE:-400000}
51 OST_FS_MKFS_OPTS=${OST_FS_MKFS_OPTS:-}
52 OST_MOUNT_OPTS=${OST_MOUNT_OPTS:-}
53 OST_MOUNT_FS_OPTS=${OST_MOUNT_FS_OPTS:-}
54 OST_INDEX_LIST=${OST_INDEX_LIST:-}
55 # Can specify individual ost devs with
57 # on specific hosts with
59 # ost1_JRN="/dev/sdb1"
61 # For ZFS, ost devices can be specified via either or both of the following:
62 # OSTZFSDEV1="${FSNAME}-ost1/ost1"
65 # OST indices can be specified as follows:
71 # OST_INDEX_LIST="[1,2,4-6,8]" # [n-m,l-k,...], where n < m and l < k, etc.
73 # The default index value of an individual OST is its facet number minus 1.
74 # More specific ones override more general ones. See facet_index().
76 NETTYPE=${NETTYPE:-tcp}
77 MGSNID=${MGSNID:-$(h2nettype $mgs_HOST)}
80 # Back end file system type(s) of facets can be specified with these
84 # 2. <facet_type>FSTYPE
87 # More specific ones override more general ones. See facet_fstype().
89 FSTYPE=${FSTYPE:-ldiskfs}
91 LDISKFS_MKFS_OPTS=${LDISKFS_MKFS_OPTS:-}
92 ZFS_MKFS_OPTS=${ZFS_MKFS_OPTS:-}
94 LOAD_MODULES_REMOTE=${LOAD_MODULES_REMOTE:-false}
96 DEF_STRIPE_SIZE=${DEF_STRIPE_SIZE:-} # filesystem default stripe size in bytes
97 DEF_STRIPE_COUNT=${DEF_STRIPE_COUNT:-} # filesystem default stripe count
98 TIMEOUT=${TIMEOUT:-20}
99 PTLDEBUG=${PTLDEBUG:-"vfstrace rpctrace dlmtrace neterror ha config \
101 SUBSYSTEM=${SUBSYSTEM:-"all"}
103 # promise 2MB for every cpu
104 if [ -f /sys/devices/system/cpu/possible ]; then
105 _debug_mb=$((($(cut -d "-" -f 2 /sys/devices/system/cpu/possible)+1)*2))
107 _debug_mb=$(($(getconf _NPROCESSORS_CONF)*2))
110 DEBUG_SIZE=${DEBUG_SIZE:-$_debug_mb}
112 TSTUSR=${TSTUSR:-"quota_usr"}
113 TSTUSR2=${TSTUSR2:-"quota_2usr"}
114 USER0=${USER0:-"sanityusr"}
115 USER1=${USER1:-"sanityusr1"}
117 ENABLE_QUOTA=${ENABLE_QUOTA:-""}
118 QUOTA_TYPE=${QUOTA_TYPE:-"ug3"}
119 QUOTA_USERS=${QUOTA_USERS:-"$TSTUSR $TSTUSR2 $USER0 $USER1"}
120 # "error: conf_param: No such device" issue in every test suite logs
121 # sanity-quota test_32 hash_lqs_cur_bits is not set properly
122 LQUOTAOPTS=${LQUOTAOPTS:-"hash_lqs_cur_bits=3"}
125 MOUNT=${MOUNT:-/mnt/${FSNAME}}
126 MOUNT1=${MOUNT1:-$MOUNT}
127 MOUNT2=${MOUNT2:-${MOUNT}2}
128 MOUNT3=${MOUNT3:-${MOUNT}3}
129 # Comma-separated option list used as "mount [...] -o $MOUNT_OPTS [...]"
130 MOUNT_OPTS=${MOUNT_OPTS:-"user_xattr,flock"}
131 # Mount flags (e.g. "-n") used as "mount [...] $MOUNT_FLAGS [...]"
132 MOUNT_FLAGS=${MOUNT_FLAGS:-""}
135 DIR2=${DIR2:-$MOUNT2}
136 DIR3=${DIR3:-$MOUNT3}
138 if [ $UID -ne 0 ]; then
139 log "running as non-root uid $UID"
141 RUNAS_GID=`id -g $USER`
144 RUNAS_ID=${RUNAS_ID:-500}
145 RUNAS_GID=${RUNAS_GID:-$RUNAS_ID}
146 RUNAS=${RUNAS:-"runas -u $RUNAS_ID -g $RUNAS_GID"}
150 FAILURE_MODE=${FAILURE_MODE:-SOFT} # or HARD
151 POWER_DOWN=${POWER_DOWN:-"powerman --off"}
152 POWER_UP=${POWER_UP:-"powerman --on"}
154 FAIL_ON_ERROR=${FAIL_ON_ERROR:-true}
156 MPIRUN=${MPIRUN:-$(which mpirun 2>/dev/null || true)}
157 MPIRUN_OPTIONS=${MPIRUN_OPTIONS:-"--oversubscribe"}
158 MPI_USER=${MPI_USER:-mpiuser}
159 SHARED_DIR_LOGS=${SHARED_DIR_LOGS:-""}
160 MACHINEFILE_OPTION=${MACHINEFILE_OPTION:-"-machinefile"}
162 # This is used by a small number of tests to share state between the client
163 # running the tests, or in some cases between the servers (e.g. lfsck.sh).
164 # It needs to be a non-lustre filesystem that is available on all the nodes.
165 SHARED_DIRECTORY=${SHARED_DIRECTORY:-$TMP} # bug 17839 comment 65
168 # In order to test multiple remote HSM agents, a new facet type named "AGT" and
169 # the following associated variables are added:
171 # AGTCOUNT: number of agents
172 # AGTDEV{N}: target HSM mount point (root path of the backend)
173 # agt{N}_HOST: hostname of the agent agt{N}
174 # SINGLEAGT: facet of the single agent
176 # Please refer to init_agt_vars() in sanity-hsm.sh for the default values of