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