]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
doc: add rbd new trash cli in rbd.rst
authorsongweibin <song.weibin@zte.com.cn>
Sat, 22 Jul 2017 02:21:33 +0000 (10:21 +0800)
committersongweibin <song.weibin@zte.com.cn>
Sat, 22 Jul 2017 08:18:11 +0000 (16:18 +0800)
Signed-off-by: songweibin <song.weibin@zte.com.cn>
doc/man/8/rbd.rst

index d821c3de4866bb4fc6defdd793faf3355fe55298..132a22f1532d6602bc3e590ce0180dc4000e4953 100644 (file)
@@ -383,6 +383,21 @@ Commands
   --io-total.  Defaults are: --io-size 4096, --io-threads 16, --io-total 1G,
   --io-pattern seq.
 
+:command:`trash ls` [*pool-name*]
+  List all entries from trash.
+
+:command:`trash mv` *image-spec*
+  Move an image to the trash. Images, even ones actively in-use by 
+  clones, can be moved to the trash and deleted at a later time.
+
+:command:`trash rm` *image-id* 
+  Delete an image from trash. If image deferment time has not expired
+  you can not removed it unless use force. But an actively in-use by clones 
+  or has snapshots can not be removed.
+
+:command:`trash restore` *image-id*  
+  Restore an image from trash.
+
 Image and snap specs
 ====================
 
@@ -561,6 +576,30 @@ To release a lock::
 
        rbd lock remove mypool/myimage mylockid client.2485
 
+To list images from trash::
+
+       rbd trash ls mypool
+
+To defer delete an image (use *--delay* to set delay-time, default is 0)::
+
+       rbd trash mv mypool/myimage
+
+To delete an image from trash (be careful!)::
+
+       rbd trash rm mypool/myimage-id
+
+To force delete an image from trash (be careful!)::
+
+       rbd trash rm mypool/myimage-id  --force
+
+To restore an image from trash::
+
+       rbd trash restore mypool/myimage-id
+
+To restore an image from trash and rename it::
+
+       rbd trash restore mypool/myimage-id --image mynewimage
+
 
 Availability
 ============