Whamcloud - gitweb
b=19481
[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:-100000}
25 MDSOPT=${MDSOPT:-"--mountfsoptions=acl"}
26
27 OSTCOUNT=${OSTCOUNT:-2}
28 OSTDEVBASE=${OSTDEVBASE:-$TMP/${FSNAME}-ost}
29 OSTSIZE=${OSTSIZE:-200000}
30 OSTOPT=""
31 # Can specify individual ost devs with
32 # OSTDEV1="/dev/sda"
33 # on specific hosts with
34 # ost1_HOST="uml2"
35
36 NETTYPE=${NETTYPE:-tcp}
37 MGSNID=${MGSNID:-`h2$NETTYPE $mgs_HOST`}
38 FSTYPE=${FSTYPE:-ldiskfs}
39 STRIPE_BYTES=${STRIPE_BYTES:-1048576}
40 STRIPES_PER_OBJ=${STRIPES_PER_OBJ:-0}
41 SINGLEMDS=${SINGLEMDS:-"mds1"}
42 TIMEOUT=${TIMEOUT:-20}
43 PTLDEBUG=${PTLDEBUG:-0x33f0404}
44 DEBUG_SIZE=${DEBUG_SIZE:-10}
45 SUBSYSTEM=${SUBSYSTEM:- 0xffb7e3ff}
46
47 ENABLE_QUOTA=${ENABLE_QUOTA:-""}
48 QUOTA_TYPE="ug"
49 QUOTA_USERS=${QUOTA_USERS:-"quota_usr quota_2usr sanityusr sanityusr1"}
50
51 MKFSOPT=""
52 [ "x$MDSJOURNALSIZE" != "x" ] &&
53     MKFSOPT=$MKFSOPT" -J size=$MDSJOURNALSIZE"
54 [ "x$MDSISIZE" != "x" ] &&
55     MKFSOPT=$MKFSOPT" -i $MDSISIZE"
56 [ "x$MKFSOPT" != "x" ] &&
57     MKFSOPT="--mkfsoptions=\\\"$MKFSOPT\\\""
58 [ "x$SECLEVEL" != "x" ] &&
59     MKFSOPT=$MKFSOPT" --param mdt.sec_level=$SECLEVEL"
60 [ "x$MDSCAPA" != "x" ] &&
61     MKFSOPT=$MKFSOPT" --param mdt.capa=$MDSCAPA"
62 [ "x$mdsfailover_HOST" != "x" ] &&
63     MDSOPT=$MDSOPT" --failnode=`h2$NETTYPE $mdsfailover_HOST`"
64 [ "x$STRIPE_BYTES" != "x" ] &&
65     MDSOPT=$MDSOPT" --param lov.stripesize=$STRIPE_BYTES"
66 [ "x$STRIPES_PER_OBJ" != "x" ] &&
67     MDSOPT=$MDSOPT" --param lov.stripecount=$STRIPES_PER_OBJ"
68 [ "x$L_GETIDENTITY" != "x" ] &&
69     MDSOPT=$MDSOPT" --param mdt.identity_upcall=$L_GETIDENTITY"
70 MDSn_MKFS_OPTS=$MDS_MKFS_OPTS
71 MDS_MKFS_OPTS="--mgs --mdt --fsname=$FSNAME --device-size=$MDSSIZE --param sys.timeout=$TIMEOUT $MKFSOPT $MDSOPT $MDS_MKFS_OPTS"
72 MDSn_MKFS_OPTS="--mgsnode=$MGSNID --mdt --fsname=$FSNAME --device-size=$MDSSIZE --param sys.timeout=$TIMEOUT $MKFSOPT $MDSOPT $MDSn_MKFS_OPTS"
73
74 MKFSOPT=""
75 [ "x$OSTJOURNALSIZE" != "x" ] &&
76     MKFSOPT=$MKFSOPT" -J size=$OSTJOURNALSIZE"
77 [ "x$MKFSOPT" != "x" ] &&
78     MKFSOPT="--mkfsoptions=\\\"$MKFSOPT\\\""
79 [ "x$SECLEVEL" != "x" ] &&
80     MKFSOPT=$MKFSOPT" --param ost.sec_level=$SECLEVEL"
81 [ "x$OSSCAPA" != "x" ] &&
82     MKFSOPT=$MKFSOPT" --param ost.capa=$OSSCAPA"
83 [ "x$ostfailover_HOST" != "x" ] &&
84     OSTOPT=$OSTOPT" --failnode=`h2$NETTYPE $ostfailover_HOST`"
85 OST_MKFS_OPTS="--ost --fsname=$FSNAME --device-size=$OSTSIZE --mgsnode=$MGSNID --param sys.timeout=$TIMEOUT $MKFSOPT $OSTOPT $OST_MKFS_OPTS"
86
87 MDS_MOUNT_OPTS=${MDS_MOUNT_OPTS:-"-o loop,user_xattr,acl"}
88 OST_MOUNT_OPTS=${OST_MOUNT_OPTS:-"-o loop"}
89
90 #client
91 MOUNT=${MOUNT:-/mnt/${FSNAME}}
92 MOUNT1=${MOUNT1:-$MOUNT}
93 MOUNT2=${MOUNT2:-${MOUNT}2}
94 MOUNTOPT=${MOUNTOPT:-"user_xattr,acl,flock"}
95 DIR=${DIR:-$MOUNT}
96 DIR1=${DIR:-$MOUNT1}
97 DIR2=${DIR2:-$MOUNT2}
98
99 if [ $UID -ne 0 ]; then
100         log "running as non-root uid $UID"
101         RUNAS_ID="$UID"
102         RUNAS=""
103 else
104         RUNAS_ID=${RUNAS_ID:-500}
105         RUNAS=${RUNAS:-"runas -u $RUNAS_ID"}
106 fi
107
108 PDSH=${PDSH:-no_dsh}
109 FAILURE_MODE=${FAILURE_MODE:-SOFT} # or HARD
110 POWER_DOWN=${POWER_DOWN:-"powerman --off"}
111 POWER_UP=${POWER_UP:-"powerman --on"}
112 SLOW=${SLOW:-no}
113 FAIL_ON_ERROR=${FAIL_ON_ERROR:-true}