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