Whamcloud - gitweb
class/obdcontrol: added "basedev" parameter to the attach command
[fs/lustre-release.git] / lustre / demos / snap3set.sh
1 #!/bin/sh
2 # Utility script for creating a third snapshot.
3 OBDDIR="`dirname $0`/.."
4 [ "$OBDDIR" = "" ] && OBDDIR=".."
5 . $OBDDIR/demos/config.sh
6
7 [ ! -d $MNTSNAP/lost+found ] && $OBDDIR/demos/snapsetup.sh
8
9 $OBDDIR/demos/snaptest.sh
10
11 sync
12 sleep 5 # let syslog logs get written 
13
14 plog log "CREATING /dev/obd3 snapshot"
15 $OBDDIR/class/obdcontrol -f << EOF
16 snaptable
17 $SNAPTABLE
18 a
19 3
20 now
21 q
22 y
23 snapset 0 $SNAPTABLE
24 device /dev/obd3
25 attach snap_obd 0 3 0
26 setup
27 quit
28 EOF
29
30 [ ! -d "$MNTSNAP2" ] && mkdir $MNTSNAP2
31 plog mount -t obdfs -oro,device=/dev/obd3 /dev/obd3 $MNTSNAP2