Whamcloud - gitweb
obdsyncd: removed from CVS
[fs/lustre-release.git] / lustre / demos / config.sh
1 #!/bin/sh
2 # File which holds configuation parameters in a single place to avoid any
3 # mismatch between scripts (especially the cleanup scripts, which are
4 # destructive).
5 #set -vx
6
7 # Major number for OBD devices
8 OBDMAJ=186
9
10 # If LOOPDEV is empty (""), then no loopback device will be configured.
11 # If TMPFILE is empty (""), then no temporary file will be created for loop.
12 TMPFILE="/tmp/obdfs.tmpfile"
13 LOOPDEV="/dev/loop0"
14
15 # If LOOPDEV is empty, then it is assumed that BASEDEV is a real block device
16 # that doesn't mind being overwritten - don't use a partition with data on it!!
17 BASEDEV="$LOOPDEV"
18
19 # The following are mount points for the filesystems during the test.
20 MNTOBD="/mnt/obd"
21 MNTSNAP="/mnt/snap"
22 MNTSNAP2="/mnt/snap2"
23
24 # This is where the snapshot table will be stored:
25 SNAPTABLE="/tmp/obdfs.snaptable"
26
27 # A simple routine called by most of the scripts to help debugging.  The
28 # kernel code has a lot of debugging statements, so this helps us keep
29 # track of what is going on in user-land to generate the kernel messages.
30 # We append directly to the messages file instead of using logger so that
31 # our checkpoints are not lost when the syslogd is very busy.
32 plog () {
33     if [ "$1" = "log" ]; then
34         shift
35         echo "******** $* **********" >> /var/log/messages
36         echo "$*"
37     else
38         echo "****start**** $* *****" >> /var/log/messages
39         echo "$*"
40         $*
41         # sleep 3 # to allow messages to be flushed
42         echo "*****end***** $* *****" >> /var/log/messages
43     fi
44 }
45