Whamcloud - gitweb
9d638684ee0375ce4dc0451659d0c01c2886000b
[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:-200000}
43 OSTOPT=${OSTOPT:-}
44 OST_FS_MKFS_OPTS=${OST_FS_MKFS_OPTS:-}
45 OST_MOUNT_OPTS=${OST_MOUNT_OPTS:-}
46 # Can specify individual ost devs with
47 # OSTDEV1="/dev/sda"
48 # on specific hosts with
49 # ost1_HOST="uml2"
50
51 NETTYPE=${NETTYPE:-tcp}
52 MGSNID=${MGSNID:-`h2$NETTYPE $mgs_HOST`}
53
54 #
55 # Back end file system type(s) of facets can be specified with these
56 # variables:
57 #
58 #   1. <facet>_FSTYPE
59 #   2. <facet_type>FSTYPE
60 #   3. FSTYPE
61 #
62 # More specific ones override more general ones.  See facet_fstype().
63 #
64 FSTYPE=${FSTYPE:-ldiskfs}
65
66 LDISKFS_MKFS_OPTS=${LDISKFS_MKFS_OPTS:-}
67 ZFS_MKFS_OPTS=${ZFS_MKFS_OPTS:-}
68
69 #
70 # If any OST is "remote" and the non-default implementation (e.g.,
71 # current OFD) is desired, then make sure that either a)
72 # LOAD_MODULES_REMOTE is true or b) modprobe(8) is configured to
73 # blacklist the undesired (and aliased the other, if necessary).
74 #
75 LOAD_MODULES_REMOTE=${LOAD_MODULES_REMOTE:-false}
76
77 STRIPE_BYTES=${STRIPE_BYTES:-1048576}
78 STRIPES_PER_OBJ=${STRIPES_PER_OBJ:-0}
79 SINGLEMDS=${SINGLEMDS:-"mds1"}
80 TIMEOUT=${TIMEOUT:-20}
81 PTLDEBUG=${PTLDEBUG:-"vfstrace rpctrace dlmtrace neterror ha config ioctl super"}
82 SUBSYSTEM=${SUBSYSTEM:-"all -lnet -lnd -pinger"}
83
84 # promise 2MB for every cpu
85 if [ -f /sys/devices/system/cpu/possible ]; then
86     _debug_mb=$((($(cut -d "-" -f 2 /sys/devices/system/cpu/possible)+1)*2))
87 else
88     _debug_mb=$(($(getconf _NPROCESSORS_CONF)*2))
89 fi
90
91 DEBUG_SIZE=${DEBUG_SIZE:-$_debug_mb}
92
93 ENABLE_QUOTA=${ENABLE_QUOTA:-""}
94 QUOTA_TYPE="ug3"
95 QUOTA_USERS=${QUOTA_USERS:-"quota_usr quota_2usr sanityusr sanityusr1"}
96 LQUOTAOPTS=${LQUOTAOPTS:-"hash_lqs_cur_bits=3"}
97
98 #client
99 MOUNT=${MOUNT:-/mnt/${FSNAME}}
100 MOUNT1=${MOUNT1:-$MOUNT}
101 MOUNT2=${MOUNT2:-${MOUNT}2}
102 MOUNTOPT=${MOUNTOPT:-"-o user_xattr,flock"}
103 DIR=${DIR:-$MOUNT}
104 DIR1=${DIR:-$MOUNT1}
105 DIR2=${DIR2:-$MOUNT2}
106
107 if [ $UID -ne 0 ]; then
108         log "running as non-root uid $UID"
109         RUNAS_ID="$UID"
110         RUNAS_GID=`id -g $USER`
111         RUNAS=""
112 else
113         RUNAS_ID=${RUNAS_ID:-500}
114         RUNAS_GID=${RUNAS_GID:-$RUNAS_ID}
115         RUNAS=${RUNAS:-"runas -u $RUNAS_ID -g $RUNAS_GID"}
116 fi
117
118 PDSH=${PDSH:-no_dsh}
119 FAILURE_MODE=${FAILURE_MODE:-SOFT} # or HARD
120 POWER_DOWN=${POWER_DOWN:-"powerman --off"}
121 POWER_UP=${POWER_UP:-"powerman --on"}
122 SLOW=${SLOW:-no}
123 FAIL_ON_ERROR=${FAIL_ON_ERROR:-true}
124
125 MPIRUN=$(which mpirun 2>/dev/null) || true
126 MPI_USER=${MPI_USER:-mpiuser}
127 SHARED_DIR_LOGS=${SHARED_DIR_LOGS:-""}
128 MACHINEFILE_OPTION=${MACHINEFILE_OPTION:-"-machinefile"}
129
130 # This is used by a small number of tests to share state between the client
131 # running the tests, or in some cases between the servers (e.g. lfsck.sh).
132 # It needs to be a non-lustre filesystem that is available on all the nodes.
133 SHARED_DIRECTORY=${SHARED_DIRECTORY:-""}        # bug 17839 comment 65