Whamcloud - gitweb
Update copyright and license information.
[fs/lustre-release.git] / lustre / demos / obdfssetup.sh
1 #! /bin/bash
2 # Utility script for configuring a simple OBDFS mount
3 #
4 # Copyright (C) 2001  Cluster File Systems, Inc.
5 #
6 # This code is issued under the GNU General Public License.
7 # See the file COPYING in this distribution
8
9 OBDDIR="`dirname $0`/.."
10 .  $OBDDIR/demos/config.sh
11
12 $OBDDIR/demos/basesetup.sh
13 #losetup /dev/loop0 /tmp/obdfs.tmpfile
14
15 if [ x$? != x0 ]; then 
16     echo "Error running basesetup.sh"
17     exit 4;
18 fi
19
20 #insmod $OBDDIR/class/obdclass.o
21 #insmod $OBDDIR/ext2obd/obdext2.o
22 #insmod $OBDDIR/obdfs/obdfs.o
23
24 plog log "ATTACHING /dev/obd0, SETUP $BASEDEV"
25 $OBDDIR/class/obdcontrol -f << EOF
26 device /dev/obd0
27 attach obdext2
28 setup $BASEDEV
29 quit
30 EOF
31
32 [ ! -d "$MNTOBD" ] &&  mkdir $MNTOBD
33 plog mount -t obdfs -odevice=/dev/obd0 none $MNTOBD