3 # Test case for 2 different filesystems mounted on the same client.
7 LMC=${LMC-../utils/lmc}
8 LCONF=${LCONF-../utils/lconf}
10 LLMOUNT=${LLMOUNT:-../utils/llmount}
11 config=${config:-local_clone.xml}
13 MDSDEV=${MDSDEV:-$TMP/mds1-`hostname`}
14 MDS_BACKDEV=${MDS_BACKDEV:-$TMP/mds1-`hostname`}
16 OSTDEV=${OSTDEV:-$TMP/ost1-`hostname`}
17 OST_BACKDEV=${OST_BACKDEV:-$TMP/ost1-`hostname`}
19 MOUNT=${MOUNT:-/mnt/lustre}
20 MOUNT_CLONE=${MOUNT_CLONE:-/mnt/clone}
22 FSTYPE=${FSTYPE:-smfs}
23 BACKFSTYPE=${BACKFSTYPE:-ext3}
25 MDS_MOUNT_OPTS=${MDS_MOUNT_OPTS:-"kml,snap"}
26 OST_MOUNT_OPTS=${OST_MOUNT_OPTS:-"kml,snap"}
28 CLIENT_MOUNT_OPTS=${CLIENT_MOUNT_OPTS:-"clone=1"}
30 STRIPE_BYTES=${STRIPE_BYTES:-"65536"}
31 STRIPE_CNT=${STRIPE_CNT:-"1"}
33 NETWORKTYPE=${NETWORKTYPE:-tcp}
42 ${LMC} -m $config --add node --node localhost || exit 10
43 ${LMC} -m $config --add node --node client || exit 10
44 ${LMC} -m $config --add net --node localhost --nid `hostname` --nettype $NETWORKTYPE || exit 11
45 ${LMC} -m $config --add net --node client --nid '*' --nettype $NETWORKTYPE || exit 12
47 [ "x$MDS_MOUNT_OPTS" != "x" ] &&
48 MDS_MOUNT_OPTS="--mountfsoptions $MDS_MOUNT_OPTS"
50 [ "x$OST_MOUNT_OPTS" != "x" ] &&
51 OST_MOUNT_OPTS="--mountfsoptions $OST_MOUNT_OPTS"
53 # configure mds server
54 ${LMC} -m $config --add mds --node localhost --mds mds --fstype $FSTYPE \
55 --backfstype $BACKFSTYPE --dev $MDSDEV --backdev $MDS_BACKDEV \
56 $MDS_MOUNT_OPTS --size $MDSSIZE || exit 20
59 ${LMC} -m $config --add lov --lov lov --mds mds --stripe_sz $STRIPE_BYTES \
60 --stripe_cnt $STRIPE_CNT --stripe_pattern 0 || exit 20
62 ${LMC} -m $config --add ost --node localhost --lov lov \
63 --fstype $FSTYPE --backfstype $BACKFSTYPE --dev $OSTDEV \
64 --backdev $OST_BACKDEV $OST_MOUNT_OPTS --size $OSTSIZE || exit 30
66 ${LMC} -m $config --add mtpt --node client --mds mds --lov lov --path $MOUNT
71 $LCONF --reformat -v $config
73 $LCONF --nosetup --node client $config
75 $LLMOUNT `hostname`:/mds/client $MOUNT -o nettype=$NETWORKTYPE
77 $LLMOUNT `hostname`:/mds/client $MOUNT_CLONE -o nettype=$NETWORKTYPE,clone=1