From 07890aace68b35e3d0c1f0b9bb8853c2293a4181 Mon Sep 17 00:00:00 2001 From: Humble Chirammal Date: Sat, 8 Aug 2020 13:19:02 +0530 Subject: [PATCH] doc: correct rbd snap-clone doc Signed-off-by: Humble Chirammal --- docs/design/proposals/rbd-snap-clone.md | 36 ++++++++++++------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/docs/design/proposals/rbd-snap-clone.md b/docs/design/proposals/rbd-snap-clone.md index 10e65cc0c..ba860da27 100644 --- a/docs/design/proposals/rbd-snap-clone.md +++ b/docs/design/proposals/rbd-snap-clone.md @@ -2,7 +2,7 @@ - [Steps and RBD CLI commands for RBD snapshot and clone operations](#steps-and-rbd-cli-commands-for-rbd-snapshot-and-clone-operations) - [Create a snapshot from PVC](#create-a-snapshot-from-pvc) - - [steps to creating a snapshot](#steps-to-creating-a-snapshot) + - [steps to create a snapshot](#steps-to-create-a-snapshot) - [RBD CLI commands to create snapshot](#rbd-cli-commands-to-create-snapshot) - [Create PVC from a snapshot (datasource snapshot)](#create-pvc-from-a-snapshot-datasource-snapshot) - [steps to create a pvc from snapshot](#steps-to-create-a-pvc-from-snapshot) @@ -18,25 +18,25 @@ - [RBD CLI commands to create a Volume from Volume](#rbd-cli-commands-to-create-a-volume-from-volume) This document outlines the command used to create RBD snapshot, delete RBD -snapshot Restore RBD snapshot and Create New RBD image from RBD image. +snapshot, Restore RBD snapshot and Create new RBD image from existing RBD image. ## Create a snapshot from PVC Refer [snapshot](https://kubernetes.io/docs/concepts/storage/volume-snapshots/) for more information realted to Volume cloning in kubernetes. -### steps to creating a snapshot +### steps to create a snapshot - Check if the parent image has more snapshots than the configured value, if - its has more snapshot Add tasks to flatten all the temporary cloned images + it has more snapshot, add tasks to flatten all the temporary cloned images and return ResourceExhausted error message - Create a temporary snapshot from the parent image - Clone a new image from a temporary snapshot with options - --rbd-default-clone-format 2 --image-feature layering,deep-flatten + `--rbd-default-clone-format 2 --image-feature layering,deep-flatten` - Delete temporary snapshot created -- Check the image chain depth, if the Softlimit is reached Add a task Flatten - the cloned image and return success. If the depth is reached hardlimit Add a - task Flatten the cloned image and return snapshot status ready as false +- Check the image chain depth, if the `softlimit` is reached add a task to flatten + the cloned image and return success. If the depth is reached `hardlimit` add a + task flatten the cloned image and return snapshot status ready as `false` ### RBD CLI commands to create snapshot @@ -44,16 +44,16 @@ for more information realted to Volume cloning in kubernetes. [$] rbd snap ls --all // If the parent has more snapshots than the configured `maxsnapshotsonimage` add backgound tasks to flatten the temporary cloned images( temporary cloned -images name will be same as snapshot names) +image names will be same as snapshot names) [$] ceph rbd task add flatten [$] rbd snap create @ [$] rbd clone --rbd-default-clone-format 2 --image-feature layering,deep-flatten @ [$] rbd snap rm @ -[$] rbd snap create @ -// check the depth,if the depth is greater than configured hardlimit add a -// task to flatten the cloned image return snapshot status ready as false, +[$] rbd snap create @ +// check the depth, if the depth is greater than configured hardlimit add a +// task to flatten the cloned image, return snapshot status ready as `false`, // if the depth is greater than softlimit add a task to flatten the image // and return success [$] ceph rbd task add flatten @@ -63,14 +63,14 @@ images name will be same as snapshot names) ### steps to create a pvc from snapshot -- Check the depth(n) of the cloned image if n>=(hardlimit -2) Add task to +- Check the depth(n) of the cloned image if `n>=(hardlimit -2)`, add task to flatten the image and return ABORT (to avoid image leak) - Clone a new image from the snapshot with user-provided options ### RBD CLI commands to create clone from snapshot ```bash -// check the depth,if the depth is greater than configured (hardlimit) +// check the depth, if the depth is greater than configured (hardlimit) // Add a task to value flatten the cloned image [$] ceph rbd task add flatten [$] rbd clone --rbd-default-clone-format 2 --image-feature @@ -101,8 +101,8 @@ images name will be same as snapshot names) ## Delete a Volume (PVC) With earlier implementation to delete the image we used to add a task to remove -the image with new changes this cannot be done as the image may contains -snapshots or linking.so we will be following below steps to delete an +the image. With new changes this cannot be done as the image may contains +snapshots or linking, so we will be following below steps to delete an image(this will be applicable for both normal image and cloned image) ### steps to delete a volume @@ -125,8 +125,8 @@ for more information realted to Volume cloning in kubernetes. ### steps to create a Volume from Volume -- Check the depth(n) of the cloned image if n>=((hard limit) -2) Add task to - flatten the image and return about (to avoid image leak) +- Check the depth(n) of the cloned image if `n>=((hard limit) -2)`, add task to + flatten the image and return ABORT (to avoid image leak) - Create snapshot of rbd image - Clone the snapshot (temp clone) - Delete the snapshot