Whamcloud - gitweb
LU-17814 utils: implement real pfind
[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 # FILESET variable is used by sanity.sh to verify fileset
10 # feature, tests should pass even under subdirectory namespace.
11 FILESET=${FILESET:-""}
12 [[ -z "$FILESET" ]] || [[ "${FILESET:0:1}" = "/" ]] || FILESET="/$FILESET"
13
14 TMP=${TMP:-/tmp}
15
16 DAEMONSIZE=${DAEMONSIZE:-500}
17 MDSCOUNT=${MDSCOUNT:-1}
18 MDSDEVBASE=${MDSDEVBASE:-$TMP/${FSNAME}-mdt}
19 MDSSIZE=${MDSSIZE:-250000}
20 #
21 # Format options of facets can be specified with these variables:
22 #
23 #   - <facet_type>OPT
24 #
25 # Arguments for "--mkfsoptions" shall be specified with these
26 # variables:
27 #
28 #   - <fstype>_MKFS_OPTS
29 #   - <facet_type>_FS_MKFS_OPTS
30 #
31 # A number of other options have their own specific variables.  See
32 # mkfs_opts().
33 #
34 MDSOPT=${MDSOPT:-}
35 MDS_FS_MKFS_OPTS=${MDS_FS_MKFS_OPTS:-}
36 MDS_MOUNT_OPTS=${MDS_MOUNT_OPTS:-}
37 # <facet_type>_MOUNT_FS_OPTS is the mount options specified when formatting
38 # the underlying device by argument "--mountfsoptions"
39 MDS_MOUNT_FS_OPTS=${MDS_MOUNT_FS_OPTS:-}
40
41 MGSSIZE=${MGSSIZE:-$MDSSIZE}
42 MGSOPT=${MGSOPT:-}
43 MGS_FS_MKFS_OPTS=${MGS_FS_MKFS_OPTS:-}
44 MGS_MOUNT_OPTS=${MGS_MOUNT_OPTS:-}
45 MGS_MOUNT_FS_OPTS=${MGS_MOUNT_FS_OPTS:-}
46
47 OSTCOUNT=${OSTCOUNT:-2}
48 OSTDEVBASE=${OSTDEVBASE:-$TMP/${FSNAME}-ost}
49 OSTSIZE=${OSTSIZE:-400000}
50 OSTOPT=${OSTOPT:-}
51 OSTSEQWIDTH=${OSTSEQWIDTH:-0x20000}
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 FORCE_LARGE_NID=${FORCE_LARGE_NID:-false}
78 NETTYPE=${NETTYPE:-tcp}
79 MGSNID=${MGSNID:-$(h2nettype $mgs_HOST)}
80
81 #
82 # Back end file system type(s) of facets can be specified with these
83 # variables:
84 #
85 #   1. <facet>_FSTYPE
86 #   2. <facet_type>FSTYPE
87 #   3. FSTYPE
88 #
89 # More specific ones override more general ones.  See facet_fstype().
90 #
91 FSTYPE=${FSTYPE:-ldiskfs}
92
93 LDISKFS_MKFS_OPTS=${LDISKFS_MKFS_OPTS:-}
94 ZFS_MKFS_OPTS=${ZFS_MKFS_OPTS:-}
95
96 LOAD_MODULES_REMOTE=${LOAD_MODULES_REMOTE:-false}
97
98 DEF_STRIPE_SIZE=${DEF_STRIPE_SIZE:-}   # filesystem default stripe size in bytes
99 DEF_STRIPE_COUNT=${DEF_STRIPE_COUNT:-} # filesystem default stripe count
100 TIMEOUT=${TIMEOUT:-20}
101 PTLDEBUG=${PTLDEBUG:-"vfstrace rpctrace dlmtrace neterror ha config \
102                       ioctl super lfsck"}
103 DEBUG_SIZE=${DEBUG_SIZE:-}
104 SUBSYSTEM=${SUBSYSTEM:-"all"}
105
106 TSTUSR=${TSTUSR:-"quota_usr"}
107 TSTUSR2=${TSTUSR2:-"quota_2usr"}
108 USER0=${USER0:-"sanityusr"}
109 USER1=${USER1:-"sanityusr1"}
110 NOBODY_UID=${NOBODY_UID:-65534}
111
112 ENABLE_QUOTA=${ENABLE_QUOTA:-""}
113 QUOTA_TYPE=${QUOTA_TYPE:-"ug3"}
114 QUOTA_USERS=${QUOTA_USERS:-"$TSTUSR $TSTUSR2 $USER0 $USER1"}
115 # "error: conf_param: No such device" issue in every test suite logs
116 # sanity-quota test_32 hash_lqs_cur_bits is not set properly
117 LQUOTAOPTS=${LQUOTAOPTS:-"hash_lqs_cur_bits=3"}
118
119 #client
120 MOUNT=${MOUNT:-/mnt/${FSNAME}}
121 MOUNT1=${MOUNT1:-$MOUNT}
122 MOUNT2=${MOUNT2:-${MOUNT}2}
123 MOUNT3=${MOUNT3:-${MOUNT}3}
124 # Comma-separated option list used as "mount [...] -o $MOUNT_OPTS [...]"
125 MOUNT_OPTS=${MOUNT_OPTS:-"user_xattr,flock"}
126 # Mount flags (e.g. "-n") used as "mount [...] $MOUNT_FLAGS [...]"
127 MOUNT_FLAGS=${MOUNT_FLAGS:-""}
128 DIR=${DIR:-$MOUNT}
129 DIR1=${DIR:-$MOUNT1}
130 DIR2=${DIR2:-$MOUNT2}
131 DIR3=${DIR3:-$MOUNT3}
132
133 if [ $UID -ne 0 ]; then
134         log "running as non-root uid $UID"
135         RUNAS_ID="$UID"
136         RUNAS_GID=`id -g $USER`
137         RUNAS=""
138 else
139         RUNAS_ID=${RUNAS_ID:-500}
140         RUNAS_GID=${RUNAS_GID:-$RUNAS_ID}
141         RUNAS=${RUNAS:-"runas -u $RUNAS_ID -g $RUNAS_GID"}
142 fi
143
144 PDSH=${PDSH:-no_dsh}
145 FAILURE_MODE=${FAILURE_MODE:-SOFT} # or HARD
146 POWER_DOWN=${POWER_DOWN:-"powerman --off"}
147 POWER_UP=${POWER_UP:-"powerman --on"}
148 SLOW=${SLOW:-no}
149 FAIL_ON_ERROR=${FAIL_ON_ERROR:-true}
150
151 MDTEST=${MDTEST:-$(which mdtest 2>/dev/null || true)}
152 MPIRUN=${MPIRUN:-$(which mpirun 2>/dev/null || true)}
153 MPIRUN_OPTIONS=${MPIRUN_OPTIONS:-"--oversubscribe"}
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 #