Whamcloud - gitweb
b=14330
[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:-$mds_HOST}
9 ost_HOST=${ost_HOST:-`hostname`}
10 ostfailover_HOST=${ostfailover_HOST}
11
12 TMP=${TMP:-/tmp}
13
14 DAEMONSIZE=${DAEMONSIZE:-500}
15 MDSDEV=${MDSDEV:-$TMP/${FSNAME}-mdt1}
16 MDSCOUNT=${MDSCOUNT:-1}
17 MDSDEVBASE=${MDSDEVBASE:-$TMP/${FSNAME}-mdt}
18 MDSSIZE=${MDSSIZE:-100000}
19 MDSOPT=${MDSOPT:-"--mountfsoptions=acl"}
20
21 OSTCOUNT=${OSTCOUNT:-2}
22 OSTDEVBASE=${OSTDEVBASE:-$TMP/${FSNAME}-ost}
23 OSTSIZE=${OSTSIZE:-200000}
24 OSTOPT=""
25 # Can specify individual ost devs with
26 # OSTDEV1="/dev/sda"
27 # on specific hosts with
28 # ost1_HOST="uml2"
29
30 NETTYPE=${NETTYPE:-tcp}
31 MGSNID=${MGSNID:-`h2$NETTYPE $mgs_HOST`}
32 FSTYPE=${FSTYPE:-ldiskfs}
33 STRIPE_BYTES=${STRIPE_BYTES:-1048576}
34 STRIPES_PER_OBJ=${STRIPES_PER_OBJ:-0}
35 SINGLEMDS=${SINGLEMDS:-"mds1"}
36 TIMEOUT=${TIMEOUT:-20}
37 PTLDEBUG=${PTLDEBUG:-0x33f0404}
38 DEBUG_SIZE=${DEBUG_SIZE:-10}
39 SUBSYSTEM=${SUBSYSTEM:- 0xffb7e3ff}
40
41 MKFSOPT=""
42 MOUNTOPT=""
43 [ "x$MDSJOURNALSIZE" != "x" ] &&
44     MKFSOPT=$MKFSOPT" -J size=$MDSJOURNALSIZE"
45 [ "x$MDSISIZE" != "x" ] &&
46     MKFSOPT=$MKFSOPT" -i $MDSISIZE"
47 [ "x$MKFSOPT" != "x" ] &&
48     MKFSOPT="--mkfsoptions=\\\"$MKFSOPT\\\""
49 [ "x$MDSCAPA" != "x" ] &&
50     MKFSOPT="--param mdt.capa=$MDSCAPA"
51 [ "x$mdsfailover_HOST" != "x" ] &&
52     MOUNTOPT=$MOUNTOPT" --failnode=`h2$NETTYPE $mdsfailover_HOST`"
53 [ "x$STRIPE_BYTES" != "x" ] &&
54     MOUNTOPT=$MOUNTOPT" --param lov.stripesize=$STRIPE_BYTES"
55 [ "x$STRIPES_PER_OBJ" != "x" ] &&
56     MOUNTOPT=$MOUNTOPT" --param lov.stripecount=$STRIPES_PER_OBJ"
57 [ "x$L_GETIDENTITY" != "x" ] &&
58     MOUNTOPT=$MOUNTOPT" --param mdt.identity_upcall=$L_GETIDENTITY"
59 MDS_MKFS_OPTS="--mgs --mdt --fsname=$FSNAME --device-size=$MDSSIZE --param sys.timeout=$TIMEOUT $MKFSOPT $MOUNTOPT $MDSOPT"
60
61 MKFSOPT=""
62 MOUNTOPT=""
63 [ "x$OSTJOURNALSIZE" != "x" ] &&
64     MKFSOPT=$MKFSOPT" -J size=$OSTJOURNALSIZE"
65 [ "x$MKFSOPT" != "x" ] &&
66     MKFSOPT="--mkfsoptions=\"$MKFSOPT\""
67 [ "x$OSSCAPA" != "x" ] &&
68     MKFSOPT="--param ost.capa=$OSSCAPA"
69 [ "x$ostfailover_HOST" != "x" ] &&
70     MOUNTOPT=$MOUNTOPT" --failnode=`h2$NETTYPE $ostfailover_HOST`"
71 OST_MKFS_OPTS="--ost --fsname=$FSNAME --device-size=$OSTSIZE --mgsnode=$MGSNID --param sys.timeout=$TIMEOUT $MKFSOPT $MOUNTOPT $OSTOPT"
72
73 MDS_MOUNT_OPTS=${MDS_MOUNT_OPTS:-"-o loop,user_xattr,acl"}
74 OST_MOUNT_OPTS=${OST_MOUNT_OPTS:-"-o loop"}
75
76 #client
77 MOUNT=${MOUNT:-/mnt/${FSNAME}}
78 MOUNT1=${MOUNT1:-$MOUNT}
79 MOUNT2=${MOUNT2:-${MOUNT}2}
80 MOUNTOPT=${MOUNTOPT:-"user_xattr,acl"}
81 [ "x$RMTCLIENT" != "x" ] &&
82         MOUNTOPT=$MOUNTOPT",remote_client"
83 DIR=${DIR:-$MOUNT}
84 DIR1=${DIR:-$MOUNT1}
85 DIR2=${DIR2:-$MOUNT2}
86
87 if [ $UID -ne 0 ]; then
88         log "running as non-root uid $UID"
89         RUNAS_ID="$UID"
90         RUNAS=""
91 else
92         RUNAS_ID=${RUNAS_ID:-500}
93         RUNAS=${RUNAS:-"runas -u $RUNAS_ID"}
94 fi
95
96 PDSH=${PDSH:-no_dsh}
97 FAILURE_MODE=${FAILURE_MODE:-SOFT} # or HARD
98 POWER_DOWN=${POWER_DOWN:-"powerman --off"}
99 POWER_UP=${POWER_UP:-"powerman --on"}