X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ceph%2Fdoc%2Fman%2F8%2Frbd.rst;h=c37ca44749815953cc098f78c69d14c5bd2da3b2;hb=c07f9fc5a4f48397831383549fb0482b93480643;hp=d821c3de4866bb4fc6defdd793faf3355fe55298;hpb=9439ae556f035e65c9c107ae13ddd09457dbbecd;p=ceph.git diff --git a/ceph/doc/man/8/rbd.rst b/ceph/doc/man/8/rbd.rst index d821c3de4..c37ca4474 100644 --- a/ceph/doc/man/8/rbd.rst +++ b/ceph/doc/man/8/rbd.rst @@ -181,7 +181,7 @@ Commands associated snapshots within the specified pool. It can also be used against individual images and snapshots. - If the RBD fast-diff feature isn't enabled on images, this operation will + If the RBD fast-diff feature is not enabled on images, this operation will require querying the OSDs for every potential object within the image. :command:`info` *image-spec* | *snap-spec* @@ -217,20 +217,20 @@ Commands This requires image format 2. :command:`resize` (-s | --size *size-in-M/G/T*) [--allow-shrink] *image-spec* - Resizes rbd image. The size parameter also needs to be specified. + Resize rbd image. The size parameter also needs to be specified. The --allow-shrink option lets the size be reduced. :command:`rm` *image-spec* - Deletes an rbd image (including all data blocks). If the image has + Delete an rbd image (including all data blocks). If the image has snapshots, this fails and nothing is deleted. :command:`export` [--export-format *format (1 or 2)*] (*image-spec* | *snap-spec*) [*dest-path*] - Exports image to dest path (use - for stdout). + Export image to dest path (use - for stdout). The --export-format accepts '1' or '2' currently. Format 2 allow us to export not only the content of image, but also the snapshots and other properties, such as image_order, features. :command:`import` [--export-format *format (1 or 2)*] [--image-format *format-id*] [--object-size *size-in-B/K/M*] [--stripe-unit *size-in-B/K/M* --stripe-count *num*] [--image-feature *feature-name*]... [--image-shared] *src-path* [*image-spec*] - Creates a new image and imports its data from path (use - for + Create a new image and imports its data from path (use - for stdin). The import operation will try to create sparse rbd images if possible. For import from stdin, the sparsification unit is the data block size of the destination image (object size). @@ -242,7 +242,7 @@ Commands of image, but also the snapshots and other properties, such as image_order, features. :command:`export-diff` [--from-snap *snap-name*] [--whole-object] (*image-spec* | *snap-spec*) *dest-path* - Exports an incremental diff for an image to dest path (use - for stdout). If + Export an incremental diff for an image to dest path (use - for stdout). If an initial snapshot is specified, only changes since that snapshot are included; otherwise, any regions of the image that contain data are included. The end snapshot is specified using the standard --snap option or @snap syntax (see below). The image diff format includes @@ -258,7 +258,7 @@ Commands currently only support the source incremental diff with stripe_count == 1 :command:`import-diff` *src-path* *image-spec* - Imports an incremental diff of an image and applies it to the current image. If the diff + Import an incremental diff of an image and applies it to the current image. If the diff was generated relative to a start snapshot, we verify that snapshot already exists before continuing. If there was an end snapshot we verify it does not already exist before applying the changes, and create the snapshot when we are done. @@ -270,11 +270,11 @@ Commands whether the region is known to be zeros or may contain other data. :command:`cp` (*src-image-spec* | *src-snap-spec*) *dest-image-spec* - Copies the content of a src-image into the newly created dest-image. + Copy the content of a src-image into the newly created dest-image. dest-image will have the same size, object size, and image format as src-image. :command:`mv` *src-image-spec* *dest-image-spec* - Renames an image. Note: rename across pools is not supported. + Rename an image. Note: rename across pools is not supported. :command:`image-meta list` *image-spec* Show metadata held on the image. The first column is the key @@ -290,24 +290,24 @@ Commands Remove metadata key with the value. :command:`object-map rebuild` *image-spec* | *snap-spec* - Rebuilds an invalid object map for the specified image. An image snapshot can be + Rebuild an invalid object map for the specified image. An image snapshot can be specified to rebuild an invalid object map for a snapshot. :command:`snap ls` *image-spec* - Dumps the list of snapshots inside a specific image. + Dump the list of snapshots inside a specific image. :command:`snap create` *snap-spec* - Creates a new snapshot. Requires the snapshot name parameter specified. + Create a new snapshot. Requires the snapshot name parameter specified. :command:`snap rollback` *snap-spec* Rollback image content to snapshot. This will iterate through the entire blocks array and update the data head content to the snapshotted version. :command:`snap rm` [--force] *snap-spec* - Removes the specified snapshot. + Remove the specified snapshot. :command:`snap purge` *image-spec* - Removes all snapshots from an image. + Remove all snapshots from an image. :command:`snap protect` *snap-spec* Protect a snapshot from deletion, so that clones can be made of it @@ -333,19 +333,19 @@ Commands an image. :command:`map` [-o | --options *krbd-options* ] [--read-only] *image-spec* | *snap-spec* - Maps the specified image to a block device via the rbd kernel module. + Map the specified image to a block device via the rbd kernel module. :command:`unmap` [-o | --options *krbd-options* ] *image-spec* | *snap-spec* | *device-path* - Unmaps the block device that was mapped via the rbd kernel module. + Unmap the block device that was mapped via the rbd kernel module. :command:`showmapped` Show the rbd images that are mapped via the rbd kernel module. :command:`nbd map` [--device *device-path*] [--read-only] *image-spec* | *snap-spec* - Maps the specified image to a block device via the rbd-nbd tool. + Map the specified image to a block device via the rbd-nbd tool. :command:`nbd unmap` *device-path* - Unmaps the block device that was mapped via the rbd-nbd tool. + Unmap the block device that was mapped via the rbd-nbd tool. :command:`nbd list` Show the list of used nbd devices via the rbd-nbd tool. @@ -354,11 +354,11 @@ Commands Show the status of the image, including which clients have it open. :command:`feature disable` *image-spec* *feature-name*... - Disables the specified feature on the specified image. Multiple features can + Disable the specified feature on the specified image. Multiple features can be specified. :command:`feature enable` *image-spec* *feature-name*... - Enables the specified feature on the specified image. Multiple features can + Enable the specified feature on the specified image. Multiple features can be specified. :command:`lock list` *image-spec* @@ -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 ============