Whamcloud - gitweb
class/obdcontrol: added "basedev" parameter to the attach command
[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 # If LOOPDEV is empty (""), then no loopback device will be configured.
8 # If TMPFILE is empty (""), then no temporary file will be created for loop.
9 TMPFILE="/tmp/obdfs.tmpfile"
10 LOOPDEV="/dev/loop0"
11
12 # If LOOPDEV is empty, then it is assumed that BASEDEV is a real block device
13 # that doesn't mind being overwritten - don't use a partition with data on it!!
14 BASEDEV="$LOOPDEV"
15
16 # The following are mount points for the filesystems during the test.
17 MNTOBD="/mnt/obd"
18 MNTSNAP="/mnt/snap"
19 MNTSNAP2="/mnt/snap2"
20
21 # This is where the snapshot table will be stored:
22 SNAPTABLE="/tmp/obdfs.snaptable"
23
24 # A simple routine called by most of the scripts to help debugging.  The
25 # kernel code has a lot of debugging statements, so this helps us keep
26 # track of what is going on in user-land to generate the kernel messages.
27 plog () {
28     LOGMETH="kern.debug"
29     if [ "$1" = "log" ]; then
30         logger -p $LOGMETH "******** $* **********"
31         shift
32         echo "$*"
33     else
34         logger -p $LOGMETH "****start**** $* *****"
35         echo "$*"
36         $*
37         sleep 3
38         logger -p $LOGMETH "*****end***** $* *****"
39     fi
40 }
41