1 FSNAME=${FSNAME:-lustre}
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}
15 DAEMONSIZE=${DAEMONSIZE:-500}
16 MDSDEV=${MDSDEV:-$TMP/${FSNAME}-mdt1}
17 MDSCOUNT=${MDSCOUNT:-1}
18 MDSDEVBASE=${MDSDEVBASE:-$TMP/${FSNAME}-mdt}
19 MDSSIZE=${MDSSIZE:-100000}
20 MDSOPT=${MDSOPT:-"--mountfsoptions=acl"}
22 OSTCOUNT=${OSTCOUNT:-2}
23 OSTDEVBASE=${OSTDEVBASE:-$TMP/${FSNAME}-ost}
24 OSTSIZE=${OSTSIZE:-200000}
26 # Can specify individual ost devs with
28 # on specific hosts with
31 NETTYPE=${NETTYPE:-tcp}
32 MGSNID=${MGSNID:-`h2$NETTYPE $mgs_HOST`}
33 FSTYPE=${FSTYPE:-ldiskfs}
34 STRIPE_BYTES=${STRIPE_BYTES:-1048576}
35 STRIPES_PER_OBJ=${STRIPES_PER_OBJ:-0}
36 SINGLEMDS=${SINGLEMDS:-"mds1"}
37 TIMEOUT=${TIMEOUT:-20}
38 PTLDEBUG=${PTLDEBUG:-0x33f0404}
39 DEBUG_SIZE=${DEBUG_SIZE:-10}
40 SUBSYSTEM=${SUBSYSTEM:- 0xffb7e3ff}
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 MDSOPT=$MDSOPT" --failnode=`h2$NETTYPE $mdsfailover_HOST`"
53 [ "x$STRIPE_BYTES" != "x" ] &&
54 MDSOPT=$MDSOPT" --param lov.stripesize=$STRIPE_BYTES"
55 [ "x$STRIPES_PER_OBJ" != "x" ] &&
56 MDSOPT=$MDSOPT" --param lov.stripecount=$STRIPES_PER_OBJ"
57 [ "x$L_GETIDENTITY" != "x" ] &&
58 MDSOPT=$MDSOPT" --param mdt.identity_upcall=$L_GETIDENTITY"
59 MDS_MKFS_OPTS="--mgs --mdt --fsname=$FSNAME --device-size=$MDSSIZE --param sys.timeout=$TIMEOUT $MKFSOPT $MDSOPT $MDS_MKFS_OPTS"
62 [ "x$OSTJOURNALSIZE" != "x" ] &&
63 MKFSOPT=$MKFSOPT" -J size=$OSTJOURNALSIZE"
64 [ "x$MKFSOPT" != "x" ] &&
65 MKFSOPT="--mkfsoptions=\\\"$MKFSOPT\\\""
66 [ "x$OSSCAPA" != "x" ] &&
67 MKFSOPT="--param ost.capa=$OSSCAPA"
68 [ "x$ostfailover_HOST" != "x" ] &&
69 OSTOPT=$OSTOPT" --failnode=`h2$NETTYPE $ostfailover_HOST`"
70 OST_MKFS_OPTS="--ost --fsname=$FSNAME --device-size=$OSTSIZE --mgsnode=$MGSNID --param sys.timeout=$TIMEOUT $MKFSOPT $OSTOPT $OST_MKFS_OPTS"
72 MDS_MOUNT_OPTS=${MDS_MOUNT_OPTS:-"-o loop,user_xattr,acl"}
73 OST_MOUNT_OPTS=${OST_MOUNT_OPTS:-"-o loop"}
76 MOUNT=${MOUNT:-/mnt/${FSNAME}}
77 MOUNT1=${MOUNT1:-$MOUNT}
78 MOUNT2=${MOUNT2:-${MOUNT}2}
79 MOUNTOPT=${MOUNTOPT:-"user_xattr,acl"}
80 [ "x$RMTCLIENT" != "x" ] &&
81 MOUNTOPT=$MOUNTOPT",remote_client"
86 if [ $UID -ne 0 ]; then
87 log "running as non-root uid $UID"
91 RUNAS_ID=${RUNAS_ID:-500}
92 RUNAS=${RUNAS:-"runas -u $RUNAS_ID"}
96 FAILURE_MODE=${FAILURE_MODE:-SOFT} # or HARD
97 POWER_DOWN=${POWER_DOWN:-"powerman --off"}
98 POWER_UP=${POWER_UP:-"powerman --on"}
100 FAIL_ON_ERROR=${FAIL_ON_ERROR:-true}