Whamcloud - gitweb
df6c5c3d293a4a7a07325d92a92f84ac9b5a8593
[fs/lustre-release.git] / lustre / tests / cfg / local.sh
1 FSNAME=${FSNAME:-lustre}
2
3 # facet hosts
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 CLIENTS=""
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"
14
15 TMP=${TMP:-/tmp}
16
17 DAEMONSIZE=${DAEMONSIZE:-500}
18 MDSCOUNT=${MDSCOUNT:-1}
19 MDSDEVBASE=${MDSDEVBASE:-$TMP/${FSNAME}-mdt}
20 MDSSIZE=${MDSSIZE:-250000}
21 #
22 # Format options of facets can be specified with these variables:
23 #
24 #   - <facet_type>OPT
25 #
26 # Arguments for "--mkfsoptions" shall be specified with these
27 # variables:
28 #
29 #   - <fstype>_MKFS_OPTS
30 #   - <facet_type>_FS_MKFS_OPTS
31 #
32 # A number of other options have their own specific variables.  See
33 # mkfs_opts().
34 #
35 MDSOPT=${MDSOPT:-}
36 MDS_FS_MKFS_OPTS=${MDS_FS_MKFS_OPTS:-}
37 MDS_MOUNT_OPTS=${MDS_MOUNT_OPTS:-}
38 # <facet_type>_MOUNT_FS_OPTS is the mount options specified when formatting
39 # the underlying device by argument "--mountfsoptions"
40 MDS_MOUNT_FS_OPTS=${MDS_MOUNT_FS_OPTS:-}
41
42 MGSSIZE=${MGSSIZE:-$MDSSIZE}
43 MGSOPT=${MGSOPT:-}
44 MGS_FS_MKFS_OPTS=${MGS_FS_MKFS_OPTS:-}
45 MGS_MOUNT_OPTS=${MGS_MOUNT_OPTS:-}
46 MGS_MOUNT_FS_OPTS=${MGS_MOUNT_FS_OPTS:-}
47
48 OSTCOUNT=${OSTCOUNT:-2}
49 OSTDEVBASE=${OSTDEVBASE:-$TMP/${FSNAME}-ost}
50 OSTSIZE=${OSTSIZE:-400000}
51 OSTOPT=${OSTOPT:-}
52 OST_FS_MKFS_OPTS=${OST_FS_MKFS_OPTS:-}
53 OST_MOUNT_OPTS=${OST_MOUNT_OPTS:-}
54 OST_MOUNT_FS_OPTS=${OST_MOUNT_FS_OPTS:-}
55 OST_INDEX_LIST=${OST_INDEX_LIST:-}
56 # Can specify individual ost devs with
57 # OSTDEV1="/dev/sda"
58 # on specific hosts with
59 # ost1_HOST="uml2"
60 # ost1_JRN="/dev/sdb1"
61 #
62 # For ZFS, ost devices can be specified via either or both of the following:
63 # OSTZFSDEV1="${FSNAME}-ost1/ost1"
64 # OSTDEV1="/dev/sdb1"
65 #
66 # OST indices can be specified as follows:
67 # OSTINDEX1="1"
68 # OSTINDEX2="2"
69 # OSTINDEX3="4"
70 # ......
71 # or
72 # OST_INDEX_LIST="[1,2,4-6,8]"  # [n-m,l-k,...], where n < m and l < k, etc.
73 #
74 # The default index value of an individual OST is its facet number minus 1.
75 # More specific ones override more general ones. See facet_index().
76
77 NETTYPE=${NETTYPE:-tcp}
78 MGSNID=${MGSNID:-$(h2nettype $mgs_HOST)}
79
80 #
81 # Back end file system type(s) of facets can be specified with these
82 # variables:
83 #
84 #   1. <facet>_FSTYPE
85 #   2. <facet_type>FSTYPE
86 #   3. FSTYPE
87 #
88 # More specific ones override more general ones.  See facet_fstype().
89 #
90 FSTYPE=${FSTYPE:-ldiskfs}
91
92 LDISKFS_MKFS_OPTS=${LDISKFS_MKFS_OPTS:-}
93 ZFS_MKFS_OPTS=${ZFS_MKFS_OPTS:-}
94
95 LOAD_MODULES_REMOTE=${LOAD_MODULES_REMOTE:-false}
96
97 DEF_STRIPE_SIZE=${DEF_STRIPE_SIZE:-}   # filesystem default stripe size in bytes
98 DEF_STRIPE_COUNT=${DEF_STRIPE_COUNT:-} # filesystem default stripe count
99 TIMEOUT=${TIMEOUT:-20}
100 PTLDEBUG=${PTLDEBUG:-"vfstrace rpctrace dlmtrace neterror ha config \
101                       ioctl super lfsck"}
102 SUBSYSTEM=${SUBSYSTEM:-"all"}
103
104 # promise 2MB for every cpu
105 if [ -f /sys/devices/system/cpu/possible ]; then
106     _debug_mb=$((($(cut -d "-" -f 2 /sys/devices/system/cpu/possible)+1)*2))
107 else
108     _debug_mb=$(($(getconf _NPROCESSORS_CONF)*2))
109 fi
110
111 DEBUG_SIZE=${DEBUG_SIZE:-$_debug_mb}
112
113 ENABLE_QUOTA=${ENABLE_QUOTA:-""}
114 QUOTA_TYPE="ug3"
115 QUOTA_USERS=${QUOTA_USERS:-"quota_usr quota_2usr sanityusr sanityusr1"}
116 # "error: conf_param: No such device" issue in every test suite logs
117 # sanity-quota test_32 hash_lqs_cur_bits is not set properly
118 LQUOTAOPTS=${LQUOTAOPTS:-"hash_lqs_cur_bits=3"}
119
120 #client
121 MOUNT=${MOUNT:-/mnt/${FSNAME}}
122 MOUNT1=${MOUNT1:-$MOUNT}
123 MOUNT2=${MOUNT2:-${MOUNT}2}
124 MOUNT3=${MOUNT3:-${MOUNT}3}
125 # Comma-separated option list used as "mount [...] -o $MOUNT_OPTS [...]"
126 MOUNT_OPTS=${MOUNT_OPTS:-"user_xattr,flock"}
127 # Mount flags (e.g. "-n") used as "mount [...] $MOUNT_FLAGS [...]"
128 MOUNT_FLAGS=${MOUNT_FLAGS:-""}
129 DIR=${DIR:-$MOUNT}
130 DIR1=${DIR:-$MOUNT1}
131 DIR2=${DIR2:-$MOUNT2}
132 DIR3=${DIR3:-$MOUNT3}
133
134 if [ $UID -ne 0 ]; then
135         log "running as non-root uid $UID"
136         RUNAS_ID="$UID"
137         RUNAS_GID=`id -g $USER`
138         RUNAS=""
139 else
140         RUNAS_ID=${RUNAS_ID:-500}
141         RUNAS_GID=${RUNAS_GID:-$RUNAS_ID}
142         RUNAS=${RUNAS:-"runas -u $RUNAS_ID -g $RUNAS_GID"}
143 fi
144
145 PDSH=${PDSH:-no_dsh}
146 FAILURE_MODE=${FAILURE_MODE:-SOFT} # or HARD
147 POWER_DOWN=${POWER_DOWN:-"powerman --off"}
148 POWER_UP=${POWER_UP:-"powerman --on"}
149 SLOW=${SLOW:-no}
150 FAIL_ON_ERROR=${FAIL_ON_ERROR:-true}
151
152 MPIRUN=${MPIRUN:-$(which mpirun 2>/dev/null || true)}
153 MPI_USER=${MPI_USER:-mpiuser}
154 SHARED_DIR_LOGS=${SHARED_DIR_LOGS:-""}
155 MACHINEFILE_OPTION=${MACHINEFILE_OPTION:-"-machinefile"}
156
157 # This is used by a small number of tests to share state between the client
158 # running the tests, or in some cases between the servers (e.g. lfsck.sh).
159 # It needs to be a non-lustre filesystem that is available on all the nodes.
160 SHARED_DIRECTORY=${SHARED_DIRECTORY:-$TMP}      # bug 17839 comment 65
161
162 #
163 # In order to test multiple remote HSM agents, a new facet type named "AGT" and
164 # the following associated variables are added:
165 #
166 # AGTCOUNT: number of agents
167 # AGTDEV{N}: target HSM mount point (root path of the backend)
168 # agt{N}_HOST: hostname of the agent agt{N}
169 # SINGLEAGT: facet of the single agent
170 #
171 # Please refer to init_agt_vars() in sanity-hsm.sh for the default values of
172 # these variables.
173 #