summaryrefslogtreecommitdiffstats
path: root/qa/rbd/krbd_get_features.t
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 18:24:20 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 18:24:20 +0000
commit483eb2f56657e8e7f419ab1a4fab8dce9ade8609 (patch)
treee5d88d25d870d5dedacb6bbdbe2a966086a0a5cf /qa/rbd/krbd_get_features.t
parentInitial commit. (diff)
downloadceph-upstream.tar.xz
ceph-upstream.zip
Adding upstream version 14.2.21.upstream/14.2.21upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'qa/rbd/krbd_get_features.t')
-rw-r--r--qa/rbd/krbd_get_features.t31
1 files changed, 31 insertions, 0 deletions
diff --git a/qa/rbd/krbd_get_features.t b/qa/rbd/krbd_get_features.t
new file mode 100644
index 00000000..b3abf3ce
--- /dev/null
+++ b/qa/rbd/krbd_get_features.t
@@ -0,0 +1,31 @@
+
+journaling makes the image only unwritable, rather than both unreadable
+and unwritable:
+
+ $ rbd create --size 1 --image-feature layering,exclusive-lock,journaling img
+ $ rbd snap create img@snap
+ $ rbd snap protect img@snap
+ $ rbd clone --image-feature layering,exclusive-lock,journaling img@snap cloneimg
+
+ $ DEV=$(sudo rbd map img)
+ rbd: sysfs write failed
+ rbd: map failed: (6) No such device or address
+ [6]
+ $ DEV=$(sudo rbd map --read-only img)
+ $ blockdev --getro $DEV
+ 1
+ $ sudo rbd unmap $DEV
+
+ $ DEV=$(sudo rbd map cloneimg)
+ rbd: sysfs write failed
+ rbd: map failed: (6) No such device or address
+ [6]
+ $ DEV=$(sudo rbd map --read-only cloneimg)
+ $ blockdev --getro $DEV
+ 1
+ $ sudo rbd unmap $DEV
+
+ $ rbd rm --no-progress cloneimg
+ $ rbd snap unprotect img@snap
+ $ rbd snap rm --no-progress img@snap
+ $ rbd rm --no-progress img