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