5 ceph mds set allow_new_snaps true --yes-i-really-mean-it
7 echo "making directory tree and files"
9 echo "i'm file1" > 1/a/file1
10 echo "i'm file2" > 1/a/b/file2
11 echo "i'm file3" > 1/a/b/c/file3
13 mkdir 1/.snap/foosnap1
17 echo "checking snapshot contains tree..."
18 dir1=`find 1/.snap/foosnap1 | wc -w`
19 dir2=`find 2/ | wc -w`
20 #diff $dir1 $dir2 && echo "Success!"
21 test $dir1==$dir2 && echo "Success!"
22 echo "adding folder and file to tree..."
24 echo "i'm file 4!" > 2/a/b/c/d/file4
25 echo "snapshotting tree 2"
26 mkdir 2/.snap/barsnap2
27 echo "comparing snapshots"
28 dir1=`find 1/.snap/foosnap1/ -maxdepth 2 | wc -w`
29 dir2=`find 2/.snap/barsnap2/ -maxdepth 2 | wc -w`
30 #diff $dir1 $dir2 && echo "Success!"
31 test $dir1==$dir2 && echo "Success!"
32 echo "moving subtree to first folder"
34 echo "comparing snapshots and new tree"
35 dir1=`find 1/ | wc -w`
36 dir2=`find 2/.snap/barsnap2/a/b/c | wc -w`
37 #diff $dir1 $dir2 && echo "Success!"
38 test $dir1==$dir2 && echo "Sucess!"