Whamcloud - gitweb
baa7d1826402aa7695838dd3625e1b5c8c8d7343
[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:-200000}
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:-$(h2$NETTYPE $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 STRIPE_BYTES=${STRIPE_BYTES:-1048576}
98 STRIPES_PER_OBJ=${STRIPES_PER_OBJ:-0}
99 SINGLEMDS=${SINGLEMDS:-"mds1"}
100 TIMEOUT=${TIMEOUT:-20}
101 PTLDEBUG=${PTLDEBUG:-"vfstrace rpctrace dlmtrace neterror ha config \
102                       ioctl super lfsck"}
103 SUBSYSTEM=${SUBSYSTEM:-"all"}
104
105 # promise 2MB for every cpu
106 if [ -f /sys/devices/system/cpu/possible ]; then
107     _debug_mb=$((($(cut -d "-" -f 2 /sys/devices/system/cpu/possible)+1)*2))
108 else
109     _debug_mb=$(($(getconf _NPROCESSORS_CONF)*2))
110 fi
111
112 DEBUG_SIZE=${DEBUG_SIZE:-$_debug_mb}
113
114 ENABLE_QUOTA=${ENABLE_QUOTA:-""}
115 QUOTA_TYPE="ug3"
116 QUOTA_USERS=${QUOTA_USERS:-"quota_usr quota_2usr sanityusr sanityusr1"}
117 # "error: conf_param: No such device" issue in every test suite logs
118 # sanity-quota test_32 hash_lqs_cur_bits is not set properly
119 LQUOTAOPTS=${LQUOTAOPTS:-"hash_lqs_cur_bits=3"}
120
121 #client
122 MOUNT=${MOUNT:-/mnt/${FSNAME}}
123 MOUNT1=${MOUNT1:-$MOUNT}
124 MOUNT2=${MOUNT2:-${MOUNT}2}
125 MOUNT3=${MOUNT3:-${MOUNT}3}
126 # Comma-separated option list used as "mount [...] -o $MOUNT_OPTS [...]"
127 MOUNT_OPTS=${MOUNT_OPTS:-"user_xattr,flock"}
128 # Mount flags (e.g. "-n") used as "mount [...] $MOUNT_FLAGS [...]"
129 MOUNT_FLAGS=${MOUNT_FLAGS:-""}
130 DIR=${DIR:-$MOUNT}
131 DIR1=${DIR:-$MOUNT1}
132 DIR2=${DIR2:-$MOUNT2}
133 DIR3=${DIR3:-$MOUNT3}
134
135 if [ $UID -ne 0 ]; then
136         log "running as non-root uid $UID"
137         RUNAS_ID="$UID"
138         RUNAS_GID=`id -g $USER`
139         RUNAS=""
140 else
141         RUNAS_ID=${RUNAS_ID:-500}
142         RUNAS_GID=${RUNAS_GID:-$RUNAS_ID}
143         RUNAS=${RUNAS:-"runas -u $RUNAS_ID -g $RUNAS_GID"}
144 fi
145
146 PDSH=${PDSH:-no_dsh}
147 FAILURE_MODE=${FAILURE_MODE:-SOFT} # or HARD
148 POWER_DOWN=${POWER_DOWN:-"powerman --off"}
149 POWER_UP=${POWER_UP:-"powerman --on"}
150 SLOW=${SLOW:-no}
151 FAIL_ON_ERROR=${FAIL_ON_ERROR:-true}
152
153 MPIRUN=${MPIRUN:-$(which mpirun 2>/dev/null || true)}
154 MPI_USER=${MPI_USER:-mpiuser}
155 SHARED_DIR_LOGS=${SHARED_DIR_LOGS:-""}
156 MACHINEFILE_OPTION=${MACHINEFILE_OPTION:-"-machinefile"}
157
158 # This is used by a small number of tests to share state between the client
159 # running the tests, or in some cases between the servers (e.g. lfsck.sh).
160 # It needs to be a non-lustre filesystem that is available on all the nodes.
161 SHARED_DIRECTORY=${SHARED_DIRECTORY:-$TMP}      # bug 17839 comment 65
162
163 #
164 # In order to test multiple remote HSM agents, a new facet type named "AGT" and
165 # the following associated variables are added:
166 #
167 # AGTCOUNT: number of agents
168 # AGTDEV{N}: target HSM mount point (root path of the backend)
169 # agt{N}_HOST: hostname of the agent agt{N}
170 # SINGLEAGT: facet of the single agent
171 #
172 # Please refer to init_agt_vars() in sanity-hsm.sh for the default values of
173 # these variables.
174 #