cleanup: stick to standards when using dollar-sign in md

MD014 - Dollar signs used before commands without showing output
The dollar signs are unnecessary, it is easier to copy and paste and
less noisy if the dollar signs are omitted. Especially when the
command doesn't list the output, but if the command follows output
we can use `$ ` (dollar+space) mainly to differentiate between
command and its ouput.

scenario 1: when command doesn't follow output
```console
cd ~/work
```

scenario 2: when command follow output (use dollar+space)
```console
$ ls ~/work
file1 file2 dir1 dir2 ...
```

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
This commit is contained in:
Prasanna Kumar Kalever
2020-11-11 12:52:54 +05:30
committed by mergify[bot]
parent fcaa332921
commit 2945f7b669
10 changed files with 159 additions and 104 deletions

View File

@ -40,23 +40,26 @@ for more information realted to Volume cloning in kubernetes.
### RBD CLI commands to create snapshot
```bash
[$] rbd snap ls <RBD image for src k8s volume> --all
```
rbd snap ls <RBD image for src k8s volume> --all
// If the parent has more snapshots than the configured `maxsnapshotsonimage`
add backgound tasks to flatten the temporary cloned images( temporary cloned
image names will be same as snapshot names)
[$] ceph rbd task add flatten <RBD image for temporary snap images>
[$] rbd snap create <RBD image for src k8s volume>@<random snap name>
[$] rbd clone --rbd-default-clone-format 2 --image-feature
// add backgound tasks to flatten the temporary cloned images (temporary cloned
// image names will be same as snapshot names)
ceph rbd task add flatten <RBD image for temporary snap images>
rbd snap create <RBD image for src k8s volume>@<random snap name>
rbd clone --rbd-default-clone-format 2 --image-feature
layering,deep-flatten <RBD image for src k8s volume>@<random snap>
<RBD image for temporary snap image>
[$] rbd snap rm <RBD image for src k8s volume>@<random snap name>
[$] rbd snap create <RBD image for temporary snap image>@<random snap name>
rbd snap rm <RBD image for src k8s volume>@<random snap name>
rbd snap create <RBD image for temporary snap image>@<random snap name>
// 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 <RBD image for temporary snap image>
ceph rbd task add flatten <RBD image for temporary snap image>
```
## Create PVC from a snapshot (datasource snapshot)
@ -69,17 +72,18 @@ image names will be same as snapshot names)
### RBD CLI commands to create clone from snapshot
```bash
```
// 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 image for temporary snap image>
[$] rbd clone --rbd-default-clone-format 2 --image-feature <k8s dst vol config>
ceph rbd task add flatten <RBD image for temporary snap image>
rbd clone --rbd-default-clone-format 2 --image-feature <k8s dst vol config>
<RBD image for temporary snap image>@<random snap name>
<RBD image for k8s dst vol>
// check the depth,if the depth is greater than configured hardlimit add a task
// to flatten the cloned image return ABORT error, if the depth is greater than
// softlimit add a task to flatten the image and return success
[$] ceph rbd task add flatten <RBD image for k8s dst vol>
ceph rbd task add flatten <RBD image for k8s dst vol>
```
## Delete a snapshot
@ -92,10 +96,10 @@ image names will be same as snapshot names)
### RBD CLI commands to delete a snapshot
```bash
[$] rbd snap create <RBD image for temporary snap image>@<random snap name>
[$] rbd trash mv <RBD image for temporary snap image>
[$] ceph rbd task trash remove <RBD image for temporary snap image ID>
```
rbd snap create <RBD image for temporary snap image>@<random snap name>
rbd trash mv <RBD image for temporary snap image>
ceph rbd task trash remove <RBD image for temporary snap image ID>
```
## Delete a Volume (PVC)
@ -112,7 +116,7 @@ image(this will be applicable for both normal image and cloned image)
### RBD CLI commands to delete a volume
```bash
```
1) rbd trash mv <image>
2) ceph rbd task trash remove <image>
```
@ -136,19 +140,20 @@ for more information realted to Volume cloning in kubernetes.
### RBD CLI commands to create a Volume from Volume
```bash
```
// check the image depth of the parent image if flatten required add a
// task to flatten image and return ABORT to avoid leak(same hardlimit and
// softlimit check will be done)
[$] ceph rbd task add flatten <RBD image for src k8s volume>
[$] rbd snap create <RBD image for src k8s volume>@<random snap name>
[$] rbd clone --rbd-default-clone-format 2 --image-feature
ceph rbd task add flatten <RBD image for src k8s volume>
rbd snap create <RBD image for src k8s volume>@<random snap name>
rbd clone --rbd-default-clone-format 2 --image-feature
layering,deep-flatten <RBD image for src k8s volume>@<random snap>
<RBD image for temporary snap image>
[$] rbd snap rm <RBD image for src k8s volume>@<random snap name>
[$] rbd snap create <RBD image for temporary snap image>@<random snap name>
[$] rbd clone --rbd-default-clone-format 2 --image-feature <k8s dst vol config>
rbd snap rm <RBD image for src k8s volume>@<random snap name>
rbd snap create <RBD image for temporary snap image>@<random snap name>
rbd clone --rbd-default-clone-format 2 --image-feature <k8s dst vol config>
<RBD image for temporary snap image>@<random snap name>
<RBD image for k8s dst vol>
[$] rbd snap rm <RBD image for src k8s volume>@<random snap name>
rbd snap rm <RBD image for src k8s volume>@<random snap name>
```