Whamcloud - gitweb
- ext2_obd.c --- fix the bugs in read/write for Linux 2.4.3
[fs/lustre-release.git] / lustre / demos / snap3set.sh
1 #!/bin/sh
2 # Utility script for creating a third snapshot.
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 [ ! -d $MNTSNAP/lost+found ] && $OBDDIR/demos/snapsetup.sh
13
14 $OBDDIR/demos/snaptest.sh
15
16 sync
17 sleep 5 # let syslog logs get written 
18
19 plog log "CREATING /dev/obd3 snapshot"
20 $OBDDIR/class/obdcontrol -f << EOF
21 snaptable
22 $SNAPTABLE
23 a
24 3
25 now
26 q
27 y
28 snapset 0 $SNAPTABLE
29 device /dev/obd3
30 attach obdsnap 0 3 0
31 setup
32 quit
33 EOF
34
35 [ ! -d "$MNTSNAP2" ] && mkdir $MNTSNAP2
36 plog mount -t obdfs -oro,device=/dev/obd3 none $MNTSNAP2