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 MDSCOUNT=${MDSCOUNT:-1}
17 [ $MDSCOUNT -gt 4 ] && MDSCOUNT=4
18 for num in $(seq $MDSCOUNT); do
19 eval mds${num}_HOST=\$\{mds${num}_HOST:-$mds_HOST\}
20 eval mds${num}failover_HOST=\$\{mds${num}failover_HOST:-$mdsfailover_HOST\}
22 MDSDEVBASE=${MDSDEVBASE:-$TMP/${FSNAME}-mdt}
23 MDSSIZE=${MDSSIZE:-100000}
24 MDSOPT=${MDSOPT:-"--mountfsoptions=acl"}
26 OSTCOUNT=${OSTCOUNT:-2}
27 OSTDEVBASE=${OSTDEVBASE:-$TMP/${FSNAME}-ost}
28 OSTSIZE=${OSTSIZE:-200000}
30 # Can specify individual ost devs with
32 # on specific hosts with
35 NETTYPE=${NETTYPE:-tcp}
36 MGSNID=${MGSNID:-`h2$NETTYPE $mgs_HOST`}
37 FSTYPE=${FSTYPE:-ldiskfs}
38 STRIPE_BYTES=${STRIPE_BYTES:-1048576}
39 STRIPES_PER_OBJ=${STRIPES_PER_OBJ:-0}
40 SINGLEMDS=${SINGLEMDS:-"mds1"}
41 TIMEOUT=${TIMEOUT:-20}
42 PTLDEBUG=${PTLDEBUG:-0x33f0404}
43 DEBUG_SIZE=${DEBUG_SIZE:-10}
44 SUBSYSTEM=${SUBSYSTEM:- 0xffb7e3ff}
47 [ "x$MDSJOURNALSIZE" != "x" ] &&
48 MKFSOPT=$MKFSOPT" -J size=$MDSJOURNALSIZE"
49 [ "x$MDSISIZE" != "x" ] &&
50 MKFSOPT=$MKFSOPT" -i $MDSISIZE"
51 [ "x$MKFSOPT" != "x" ] &&
52 MKFSOPT="--mkfsoptions=\\\"$MKFSOPT\\\""
53 [ "x$MDSCAPA" != "x" ] &&
54 MKFSOPT="--param mdt.capa=$MDSCAPA"
55 [ "x$mdsfailover_HOST" != "x" ] &&
56 MDSOPT=$MDSOPT" --failnode=`h2$NETTYPE $mdsfailover_HOST`"
57 [ "x$STRIPE_BYTES" != "x" ] &&
58 MDSOPT=$MDSOPT" --param lov.stripesize=$STRIPE_BYTES"
59 [ "x$STRIPES_PER_OBJ" != "x" ] &&
60 MDSOPT=$MDSOPT" --param lov.stripecount=$STRIPES_PER_OBJ"
61 [ "x$L_GETIDENTITY" != "x" ] &&
62 MDSOPT=$MDSOPT" --param mdt.identity_upcall=$L_GETIDENTITY"
63 MDSn_MKFS_OPTS=$MDS_MKFS_OPTS
64 MDS_MKFS_OPTS="--mgs --mdt --fsname=$FSNAME --device-size=$MDSSIZE --param sys.timeout=$TIMEOUT $MKFSOPT $MDSOPT $MDS_MKFS_OPTS"
65 MDSn_MKFS_OPTS="--mgsnode=$MGSNID --mdt --fsname=$FSNAME --device-size=$MDSSIZE --param sys.timeout=$TIMEOUT $MKFSOPT $MDSOPT $MDSn_MKFS_OPTS"
68 [ "x$OSTJOURNALSIZE" != "x" ] &&
69 MKFSOPT=$MKFSOPT" -J size=$OSTJOURNALSIZE"
70 [ "x$MKFSOPT" != "x" ] &&
71 MKFSOPT="--mkfsoptions=\\\"$MKFSOPT\\\""
72 [ "x$OSSCAPA" != "x" ] &&
73 MKFSOPT="--param ost.capa=$OSSCAPA"
74 [ "x$ostfailover_HOST" != "x" ] &&
75 OSTOPT=$OSTOPT" --failnode=`h2$NETTYPE $ostfailover_HOST`"
76 OST_MKFS_OPTS="--ost --fsname=$FSNAME --device-size=$OSTSIZE --mgsnode=$MGSNID --param sys.timeout=$TIMEOUT $MKFSOPT $OSTOPT $OST_MKFS_OPTS"
78 MDS_MOUNT_OPTS=${MDS_MOUNT_OPTS:-"-o loop,user_xattr,acl"}
79 OST_MOUNT_OPTS=${OST_MOUNT_OPTS:-"-o loop"}
82 MOUNT=${MOUNT:-/mnt/${FSNAME}}
83 MOUNT1=${MOUNT1:-$MOUNT}
84 MOUNT2=${MOUNT2:-${MOUNT}2}
85 MOUNTOPT=${MOUNTOPT:-"user_xattr,acl"}
86 [ "x$RMTCLIENT" != "x" ] &&
87 MOUNTOPT=$MOUNTOPT",remote_client"
92 if [ $UID -ne 0 ]; then
93 log "running as non-root uid $UID"
97 RUNAS_ID=${RUNAS_ID:-500}
98 RUNAS=${RUNAS:-"runas -u $RUNAS_ID"}
102 FAILURE_MODE=${FAILURE_MODE:-SOFT} # or HARD
103 POWER_DOWN=${POWER_DOWN:-"powerman --off"}
104 POWER_UP=${POWER_UP:-"powerman --on"}
106 FAIL_ON_ERROR=${FAIL_ON_ERROR:-true}