]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
doc/rbd: refine "Removing a Block Device Image" 49357/head
authorZac Dover <zac.dover@gmail.com>
Fri, 9 Dec 2022 01:16:27 +0000 (11:16 +1000)
committerZac Dover <zac.dover@gmail.com>
Fri, 9 Dec 2022 07:05:09 +0000 (17:05 +1000)
Refine and add unselectable prompts to "Removing a Block Device Image"
in doc/rbd/rados-rbd-cmds.

https://tracker.ceph.com/issues/57001

Signed-off-by: Zac Dover <zac.dover@gmail.com>
(cherry picked from commit 3a6284a49bf41030bb20a5714b0dfce92928438b)

doc/rbd/rados-rbd-cmds.rst

index bfd75c09fe44784de795d22441953d40c340132d..1e68fbf7b48ac977d30d44773646ceebef6b6728 100644 (file)
@@ -199,53 +199,82 @@ Decreasing the Size of a Block Device Image
 Removing a Block Device Image
 =============================
 
-To remove a block device, execute the following, but replace ``{image-name}``
-with the name of the image you want to remove:: 
+To remove a block device, run the following command, but replace
+``{image-name}`` with the name of the image you want to remove:
 
-       rbd rm {image-name}
+.. prompt:: bash $
+
+   rbd rm {image-name}
+
+For example:
+
+.. prompt:: bash $
+
+   rbd rm foo
+
+Removing a Block Device from a Pool
+-----------------------------------
+
+To remove a block device from a pool, run the following command but replace
+``{image-name}`` with the name of the image to be removed, and replace
+``{pool-name}`` with the name of the pool from which the image is to be
+removed:
+
+.. prompt:: bash $
+
+   rbd rm {pool-name}/{image-name}
+
+For example:
 
-For example:: 
+.. prompt:: bash $
 
-       rbd rm foo
-To remove a block device from a pool, execute the following, but replace 
-``{image-name}`` with the name of the image to remove and replace 
-``{pool-name}`` with the name of the pool:: 
+   rbd rm swimmingpool/bar
 
-       rbd rm {pool-name}/{image-name}
+"Defer Deleting" a Block Device from a Pool
+-------------------------------------------
 
-For example:: 
+To defer delete a block device from a pool (which entails moving it to the
+"trash" and deleting it later), run the following command but replace
+``{image-name}`` with the name of the image to be moved to the trash and
+replace ``{pool-name}`` with the name of the pool:
 
-       rbd rm swimmingpool/bar
+.. prompt:: bash $
 
-To defer delete a block device from a pool, execute the following, but 
-replace ``{image-name}`` with the name of the image to move and replace 
-``{pool-name}`` with the name of the pool:: 
+   rbd trash mv {pool-name}/{image-name}
 
-        rbd trash mv {pool-name}/{image-name}
+For example:
 
-For example:: 
+.. prompt:: bash $
 
-        rbd trash mv swimmingpool/bar
+   rbd trash mv swimmingpool/bar
 
-To remove a deferred block device from a pool, execute the following, but 
-replace ``{image-id}`` with the id of the image to remove and replace 
-``{pool-name}`` with the name of the pool:: 
+Removing a Deferred Block Device from a Pool
+--------------------------------------------
 
-        rbd trash rm {pool-name}/{image-id}
+To remove a deferred block device from a pool, run the following command but
+replace ``{image-}`` with the ID of the image to be removed, and replace
+``{pool-name}`` with the name of the pool from which the image is to be
+removed:
 
-For example:: 
+.. prompt:: bash $
+
+   rbd trash rm {pool-name}/{image-}
+
+For example:
 
-        rbd trash rm swimmingpool/2bf4474b0dc51
+.. prompt:: bash $
+   
+   rbd trash rm swimmingpool/2bf4474b0dc51
 
 .. note::
 
-  * You can move an image to the trash even it has snapshot(s) or actively 
-    in-use by clones, but can not be removed from trash.
+  * You can move an image to the trash even if it has snapshot(s) or is
+    actively in use by clones. However, you cannot remove it from the trash
+    under those conditions.
 
-  * You can use *--expires-at* to set the defer time (default is ``now``), 
-    and if its deferment time has not expired, it can not be removed unless 
-    you use *--force*.
+  * You can use ``--expires-at`` to set the deferment time (default is
+    ``now``). If the deferment time has not yet arrived, you cannot remove the
+    image unless you use ``--force``.
 
 Restoring a Block Device Image
 ==============================