Whamcloud - gitweb
1135e8b67b593e6b95248142bdbc8f127236ce20
[fs/lustre-release.git] / lustre / tests / README
1 A variety of tests can be run or environments set up. 
2
3 1. runregression-net
4
5 Usage on server:
6    llsetup.sh  marcus-echo-server.cfg
7
8 with marcus-echo-server.cfg:
9
10    NETWORK=elan
11    LOCALHOST=4
12    SERVER=4
13    SETUP_OST=y
14    OSTTYPE=obdecho
15
16
17 Usage on client: 
18 runregression-net  marcus-echo-client.cfg
19
20 with marcus-echo-client.cfg:
21
22    NETWORK=elan
23    LOCALHOST=5
24    SERVER=4
25    SETUP_OSC=y
26
27 If things are alright it goes through all the tests single threaded,
28 multithreaded, getattr and brw (both read and write).
29
30 2. How to build .cfg scripts:
31 The various .cfg scripts in the tests/ directory can be used as building
32 blocks for full configurations.  For example, the above configurations are:
33
34    cat elan-server.cfg obdecho.cfg > marcus-echo-server.cfg
35    cat elan-client.cfg client-echo.cfg > marcus-echo-client.cfg
36
37 You _could_ specify multiple .cfg files as the parameters to llsetup if
38 you are doing something uncommon, but it is probably just easer to build
39 a whole config file in one shot, edit it as needed, and use that file instead.
40
41 For a loopback setup with a mounted filesystem, you could do something like:
42
43    cat net-local.cfg mds.cfg obdext2.cfg client-mount.cfg > uml.cfg
44
45 The order of the specified .cfg files does not matter.
46
47 Since the .cfg script is a shell script, you can add conditional setup in
48 case you want to avoid changing your configuration if you need to run on
49 a different host.  You could, for example, have marcus-echo-server.cfg:
50
51    NETWORK=elan
52    HOST=`hostname | sed "s/\..*//"`
53    case $HOST in
54    dev*) LOCALHOST=`echo $HOST | sed "s/dev//"`
55          SERVER=$LOCALHOST
56          NETWORK=elan ;;
57    *)    LOCALHOST=$HOST
58          SERVER=$LOCALHOST
59          NETWORK=tcp ;;
60    esac
61    SETUP_OST=y
62    OSTTYPE=obdecho
63
64 You would, of course, need a marcus-echo-client.cfg to match.
65
66 3. runtests
67
68 The runtests script does a series of simple file-based tests using
69 a filesystem.  You need to use a configuration which includes a real
70 OST and MDS setup, and an OSC mount.  For example, a configuration
71 marcus-obd-server.cfg:
72
73    SETUP_MDS=y
74    NETWORK=elan
75    LOCALHOST=4
76    SERVER=4
77    MDSFS=ext3
78    MDSDEV=/tmp/mds
79    MDSSIZE=10000
80    OSTDEV=/tmp/ost
81    OSTSIZE=10000
82    OSTFS=ext2
83    OSTTYPE=obdext2
84    SETUP_OST=y
85
86 As with the echo test, you run "sh llsetup.sh marcus-obd-server.cfg" on
87 the server to configure it.
88
89 For marcus-obd-client.cfg you only need to include the client data:
90
91    NETWORK=elan
92    LOCALHOST=5
93    SERVER=4
94    SETUP_OSC=y
95    OSCMT=/mnt/lustre
96    SETUP_MOUNT=y
97
98 You run the test via "sh runtests marcus-obd-client.cfg".