mirror of
https://github.com/ceph/ceph
synced 2024-12-26 13:33:57 +00:00
a232d273c1
... filesystems other than 'cephfs'. It is not required to set 'allow_new_snaps' to True to allow snapshot to be created on a filesystem. Remove that setting. Remove 'fs/snaps/snaptest-0.sh' that is racy when running in parallel on an another client that mounted the same file system. Include a similar test in qa/tasks/cephfs/test_snapshots.py Signed-off-by: Ramana Raja <rraja@redhat.com>
32 lines
388 B
Bash
Executable File
32 lines
388 B
Bash
Executable File
#!/bin/sh -x
|
|
|
|
set -e
|
|
|
|
mkdir -p 1/a
|
|
exec 3<> 1/a/file1
|
|
|
|
echo -n a >&3
|
|
|
|
mkdir 1/.snap/s1
|
|
|
|
echo -n b >&3
|
|
|
|
mkdir 2
|
|
# create new snaprealm at dir a, file1's cap should be attached to the new snaprealm
|
|
mv 1/a 2
|
|
|
|
mkdir 2/.snap/s2
|
|
|
|
echo -n c >&3
|
|
|
|
exec 3>&-
|
|
|
|
grep '^a$' 1/.snap/s1/a/file1
|
|
grep '^ab$' 2/.snap/s2/a/file1
|
|
grep '^abc$' 2/a/file1
|
|
|
|
rmdir 1/.snap/s1
|
|
rmdir 2/.snap/s2
|
|
rm -rf 1 2
|
|
echo OK
|