Whamcloud - gitweb
LU-2216 mdt: remove obsolete DNE code
[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 mds1_HOST=${mds1_HOST:-$mds_HOST}
7 mds1failover_HOST=${mds1failover_HOST:-$mdsfailover_HOST}
8 mgs_HOST=${mgs_HOST:-$mds1_HOST}
9 ost_HOST=${ost_HOST:-`hostname`}
10 ostfailover_HOST=${ostfailover_HOST}
11 CLIENTS=""
12
13 TMP=${TMP:-/tmp}
14
15 DAEMONSIZE=${DAEMONSIZE:-500}
16 MDSCOUNT=${MDSCOUNT:-1}
17 [ $MDSCOUNT -gt 4 ] && MDSCOUNT=4
18 for num in $(seq $MDSCOUNT); do
19     eval mds${num}_HOST=\$\{mds${num}_HOST:-$mds_HOST\}
20     eval mds${num}failover_HOST=\$\{mds${num}failover_HOST:-$mdsfailover_HOST\}
21 done
22 MDSDEVBASE=${MDSDEVBASE:-$TMP/${FSNAME}-mdt}
23 MDSSIZE=${MDSSIZE:-200000}
24 #
25 # Format options of facets can be specified with these variables:
26 #
27 #   - <facet_type>OPT
28 #
29 # Arguments for "--mkfsoptions" shall be specified with these
30 # variables:
31 #
32 #   - <fstype>_MKFS_OPTS
33 #   - <facet_type>_FS_MKFS_OPTS
34 #
35 # A number of other options have their own specific variables.  See
36 # mkfs_opts().
37 #
38 MDSOPT=${MDSOPT:-}
39 MDS_FS_MKFS_OPTS=${MDS_FS_MKFS_OPTS:-}
40 MDS_MOUNT_OPTS=${MDS_MOUNT_OPTS:-}
41
42 MGSDEV=${MGSDEV:-$MDSDEV1}
43 MGSSIZE=${MGSSIZE:-$MDSSIZE}
44 MGSOPT=${MGSOPT:-}
45 MGS_FS_MKFS_OPTS=${MGS_FS_MKFS_OPTS:-}
46 MGS_MOUNT_OPTS=${MGS_MOUNT_OPTS:-}
47
48 OSTCOUNT=${OSTCOUNT:-2}
49 OSTDEVBASE=${OSTDEVBASE:-$TMP/${FSNAME}-ost}
50 OSTSIZE=${OSTSIZE:-200000}
51 OSTOPT=${OSTOPT:-}
52 OST_FS_MKFS_OPTS=${OST_FS_MKFS_OPTS:-}
53 OST_MOUNT_OPTS=${OST_MOUNT_OPTS:-}
54 # Can specify individual ost devs with
55 # OSTDEV1="/dev/sda"
56 # on specific hosts with
57 # ost1_HOST="uml2"
58
59 NETTYPE=${NETTYPE:-tcp}
60 MGSNID=${MGSNID:-`h2$NETTYPE $mgs_HOST`}
61
62 #
63 # Back end file system type(s) of facets can be specified with these
64 # variables:
65 #
66 #   1. <facet>_FSTYPE
67 #   2. <facet_type>FSTYPE
68 #   3. FSTYPE
69 #
70 # More specific ones override more general ones.  See facet_fstype().
71 #
72 FSTYPE=${FSTYPE:-ldiskfs}
73
74 LDISKFS_MKFS_OPTS=${LDISKFS_MKFS_OPTS:-}
75 ZFS_MKFS_OPTS=${ZFS_MKFS_OPTS:-}
76
77 #
78 # If any OST is "remote" and the non-default implementation (e.g.,
79 # current OFD) is desired, then make sure that either a)
80 # LOAD_MODULES_REMOTE is true or b) modprobe(8) is configured to
81 # blacklist the undesired (and aliased the other, if necessary).
82 #
83 USE_OFD=${USE_OFD:-yes}
84 LOAD_MODULES_REMOTE=${LOAD_MODULES_REMOTE:-true}
85
86 STRIPE_BYTES=${STRIPE_BYTES:-1048576}
87 STRIPES_PER_OBJ=${STRIPES_PER_OBJ:-0}
88 SINGLEMDS=${SINGLEMDS:-"mds1"}
89 TIMEOUT=${TIMEOUT:-20}
90 PTLDEBUG=${PTLDEBUG:-"vfstrace rpctrace dlmtrace neterror ha config ioctl super"}
91 SUBSYSTEM=${SUBSYSTEM:-"all -lnet -lnd -pinger"}
92
93 # promise 2MB for every cpu
94 if [ -f /sys/devices/system/cpu/possible ]; then
95     _debug_mb=$((($(cut -d "-" -f 2 /sys/devices/system/cpu/possible)+1)*2))
96 else
97     _debug_mb=$(($(getconf _NPROCESSORS_CONF)*2))
98 fi
99
100 DEBUG_SIZE=${DEBUG_SIZE:-$_debug_mb}
101
102 ENABLE_QUOTA=${ENABLE_QUOTA:-""}
103 QUOTA_TYPE="ug3"
104 QUOTA_USERS=${QUOTA_USERS:-"quota_usr quota_2usr sanityusr sanityusr1"}
105 LQUOTAOPTS=${LQUOTAOPTS:-"hash_lqs_cur_bits=3"}
106
107 #client
108 MOUNT=${MOUNT:-/mnt/${FSNAME}}
109 MOUNT1=${MOUNT1:-$MOUNT}
110 MOUNT2=${MOUNT2:-${MOUNT}2}
111 MOUNTOPT=${MOUNTOPT:-"-o user_xattr,flock"}
112 DIR=${DIR:-$MOUNT}
113 DIR1=${DIR:-$MOUNT1}
114 DIR2=${DIR2:-$MOUNT2}
115
116 if [ $UID -ne 0 ]; then
117         log "running as non-root uid $UID"
118         RUNAS_ID="$UID"
119         RUNAS_GID=`id -g $USER`
120         RUNAS=""
121 else
122         RUNAS_ID=${RUNAS_ID:-500}
123         RUNAS_GID=${RUNAS_GID:-$RUNAS_ID}
124         RUNAS=${RUNAS:-"runas -u $RUNAS_ID -g $RUNAS_GID"}
125 fi
126
127 PDSH=${PDSH:-no_dsh}
128 FAILURE_MODE=${FAILURE_MODE:-SOFT} # or HARD
129 POWER_DOWN=${POWER_DOWN:-"powerman --off"}
130 POWER_UP=${POWER_UP:-"powerman --on"}
131 SLOW=${SLOW:-no}
132 FAIL_ON_ERROR=${FAIL_ON_ERROR:-true}
133
134 MPIRUN=$(which mpirun 2>/dev/null) || true
135 MPI_USER=${MPI_USER:-mpiuser}
136 SHARED_DIR_LOGS=${SHARED_DIR_LOGS:-""}
137
138 # This is used by a small number of tests to share state between the client
139 # running the tests, or in some cases between the servers (e.g. lfsck.sh).
140 # It needs to be a non-lustre filesystem that is available on all the nodes.
141 SHARED_DIRECTORY=${SHARED_DIRECTORY:-""}        # bug 17839 comment 65