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