3 ceph mds set allow_new_snaps true --yes-i-really-mean-it
5 echo "Create dir 100 to 199 ..."
6 for i in $(seq 100 199); do
9 for y in $(seq 10 20); do
10 echo "This is a test file before any snapshot was taken." >"$i/$y"
14 echo "Take first snapshot .snap/test1"
17 echo "Create dir 200 to 299 ..."
18 for i in $(seq 200 299); do
21 for y in $(seq 20 29); do
22 echo "This is a test file. Created after .snap/test1" >"$i/$y"
26 echo "Create a snapshot in every first level dir ..."
28 echo " create $dir/.snap/snap-subdir-test"
29 mkdir "$dir/.snap/snap-subdir-test"
30 for y in $(seq 30 39); do
31 echo " create $dir/$y file after the snapshot"
32 echo "This is a test file. Created after $dir/.snap/snap-subdir-test" >"$dir/$y"
36 echo "Take second snapshot .snap/test2"
39 echo "Copy content of .snap/test1 to copyofsnap1 ..."
41 cp -Rv .snap/test1 copyofsnap1/
44 echo "Take third snapshot .snap/test3"
47 echo "Delete the snapshots..."
49 find ./ -type d -print | \
50 xargs -I% -n1 find %/.snap -mindepth 1 -maxdepth 1 \
51 \( ! -name "_*" \) -print 2>/dev/null
53 find ./ -type d -print | \
54 xargs -I% -n1 find %/.snap -mindepth 1 -maxdepth 1 \
55 \( ! -name "_*" \) -print 2>/dev/null | \
58 echo "Delete all the files and directories ..."