This bug was initially created as a copy of Bug #2064834 I am copying this bug because: The content that needs to be added to both 4.x and 5.x guide and content is slightly different. Describe the issue: Transparent Image Clones (clone v2) feature has been added into 4.x which needs to be documented. Chapter/Section Number and Title: Existing chapters with title - 5.11. Protecting a block device snapshot 5.12. Cloning a block device snapshot Can be modified Product Version: 4x Environment Details: NA Any other versions of this document that also needs this update: 5x Additional information:
1) In 4.x guide we have a note regarding this feature - >>`By default, you must protect the snapshot before you can clone it. To avoid having to protect the snapshot before you clone it, set ceph osd set-require-min-compat-client mimic. You can set it to higher versions than mimic as well.` We need to add it to 5.x guide also 2) information on --rbd-default-clone-format is that if user has not set set-require-min-compat-client to greater than or equal to mimic, user can use `--rbd-default-clone-format 2` with rbd clone command to create clone of version 2 but using --rbd-default-clone-format per image basis is not recommended - Ref - https://bugzilla.redhat.com/show_bug.cgi?id=2065592#c1 3) in protecting snapshot section, we need to mention that snapshot need not to be protected to be able to create clone as clone v2 is doesn't need snapshot to be protected. 4) We need to mention that is set-require-min-compat-client is greater than or equal to mimic, by default clone v2 would be created. but clients older than mimic won't be able to access those RBD images.
working steps for this feature for reference- we can assess what needs to be documented and list the steps in the doc accordingly [ceph: root@magna021 /]# ceph osd pool create test1 128 pool 'test1' created [ceph: root@magna021 /]# ceph osd pool application enable test1 rbd enabled application 'rbd' on pool 'test1' [ceph: root@magna021 /]# rbd pool init -p test1 [ceph: root@magna021 /]# rbd create --size 1024 test1/image1 --thick-provision --debug-rbd 0 Thick provisioning: 100% complete...done. [ceph: root@magna021 /]# ceph osd lspools 1 .rgw.root 2 device_health_metrics 4 pmem 5 nonpmem 6 test_io 8 pmem1 16 replicapool 17 pmem2 22 rbd-mirror_rep_pool 23 smaple_pool 24 iscsipool 25 test 26 test1 [ceph: root@magna021 /]# rbd snap create test1/image1@snap --debug-rbd 0 Creating snap: 100% complete...done. [ceph: root@magna021 /]# ceph osd set-require-min-compat-client mimic set require_min_compat_client to mimic [ceph: root@magna021 /]# ceph config set client rbd_move_parent_to_trash_on_remove true (diable if rbd_move_to_trash_on_remove is enabled in client)-not compatible [ceph: root@magna021 /]# ceph config get client WHO MASK LEVEL OPTION VALUE RO global basic container_image registry-proxy.engineering.redhat.com/rh-osbs/rhceph@sha256:141e439ccbca0d3ed3cd4be9332f09575f6450e04cef5127d625d403fdfbb3cb * client advanced debug_rbd 30/30 client advanced debug_rbd_mirror 30/30 client basic log_file /var/log/ceph/client.log * client basic log_to_file true client basic rbd_move_parent_to_trash_on_remove true client basic rbd_move_to_trash_on_remove true client advanced rbd_persistent_cache_size 1073741824 [ceph: root@magna021 /]# rbd clone test1/image1@snap test1/child --debug-rbd 0 [ceph: root@magna021 /]# rbd snap rm test1/image1@snap --debug-rbd 0 [ceph: root@magna021 /]# rbd rm test1/image1 --debug-rbd 0 Removing image: 100% complete...done. [ceph: root@magna021 /]# rbd trash list test1 --debug-rbd 0 13b99caee1fdb7 image1 [ceph: root@magna021 /]# rbd flatten test1/child --debug-rbd 0 Image flatten: 100% complete...done. [ceph: root@magna021 /]# rbd trash list test1 --debug-rbd 0 [ceph: root@magna021 /]#
Content looks good to me. Moving to verified state.