initial code repo
[stor4nfv.git] / src / ceph / qa / client / 30_subdir_mount.sh
diff --git a/src/ceph/qa/client/30_subdir_mount.sh b/src/ceph/qa/client/30_subdir_mount.sh
new file mode 100755 (executable)
index 0000000..00f4f02
--- /dev/null
@@ -0,0 +1,22 @@
+#!/bin/bash -x
+
+basedir=`echo $0 | sed 's/[^/]*$//g'`.
+. $basedir/common.sh
+
+client_mount
+mkdir -p $mnt/sub
+echo sub > $mnt/sub/file
+client_umount
+
+mkdir -p $mnt/1
+mkdir -p $mnt/2
+/bin/mount -t ceph $monhost:/sub $mnt/1
+grep sub $mnt/1/file
+
+/bin/mount -t ceph $monhost:/ $mnt/2
+grep sub $mnt/2/sub/file
+
+/bin/umount $mnt/1
+grep sub $mnt/2/sub/file
+
+/bin/umount $mnt/2