注意

本文档适用于 Ceph 开发版本。

rbd -- manage rados block device (RBD) images

概要

rbd[ -cceph.conf] [ -mmonaddr] [--clustercluster-name]pool] [命令… ]

描述

rbdis a utility for manipulating rados block device (RBD) images, used by the Linux rbd driver and the rbd storage driver for QEMU/KVM. RBD images are simple block devices that are striped over objects and stored in a RADOS object store. The size of the objects the image is striped over must be a power of two.

选项

-c ceph.conf, --conf ceph.conf

Use ceph.conf configuration file instead of the default /etc/ceph/ceph.conf to determine monitor addresses during startup.

-m monaddress[:port]

连接到指定的监控器(而不是通过 ceph.conf 查找)。

--cluster cluster-name

Use different cluster name as compared to default cluster nameceph.

-p 池名, --pool 池名

与指定的池交互。大多数命令都需要此选项。

--namespace namespace-name

Use a pre-defined image namespace within a pool

--no-progress

Do not output progress information (goes to standard error by default for some commands).

Parameters

--image-format format-id

Specifies which object layout to use. The default is 2.

  • format 1 - (deprecated) Use the original format for a new rbd image. This format is understood by all versions of librbd and the kernel rbd module, but does not support newer features like cloning.

  • format 2 - Use the second rbd format, which is supported by librbd since the Bobtail release and the kernel rbd module since kernel 3.10 (except for “fancy” striping, which is supported since kernel 4.17). This adds support for cloning and is more easily extensible to allow more features in the future.

-s size-in-M/G/T, --size size-in-M/G/T

Specifies the size of the new rbd image or the new size of the existing rbd image in M/G/T. If no suffix is given, unit M is assumed.

--object-size size-in-B/K/M

Specifies the object size in B/K/M. Object size will be rounded up the nearest power of two; if no suffix is given, unit B is assumed. The default object size is 4M, smallest is 4K and maximum is 32M.

The default value can be changed with the configuration optionrbd_default_order, which takes a power of two (default object size is2 ^ rbd_default_order搜索)。

--stripe-unit size-in-B/K/M

Specifies the stripe unit size in B/K/M. If no suffix is given, unit B is assumed. See striping section (below) for more details.

--stripe-count num

Specifies the number of objects to stripe over before looping back to the first object. See striping section (below) for more details.

--snap snap

Specifies the snapshot name for the specific operation.

--id username

Specifies the username (without theclient.prefix) to use with the map command.

--keyring filename

Specifies a keyring file containing a secret for the specified user to use with the map command. If not specified, the default keyring locations will be searched.

--keyfile filename

Specifies a file containing the secret key of--id userto use with the map command.--keyringif the latter is also specified.

--shared lock-tag

Option forlock addthat allows multiple clients to lock the

--format 格式

Specifies output formatting (default: plain, json, xml)

--pretty-format

Make json or xml formatted output more human-readable.

-o krbd-options, --options krbd-options

Specifies which options to use when mapping or unmapping an image via the

--只读

Map the image read-only. Equivalent to -o ro.

--image-feature feature-name

Specifies which RBD format 2 feature should be enabled when creating

  • layering: layering support

  • striping: striping v2 support

  • exclusive-lock: exclusive locking support

  • object-map: object map support (requires exclusive-lock)

  • fast-diff: fast diff calculations (requires object-map)

  • deep-flatten: snapshot flatten support

  • journaling: journaled IO support (requires exclusive-lock)

  • data-pool: erasure coded pool support

--image-shared

Specifies that the image will be used concurrently by multiple clients.

--whole-object

Specifies that the diff should be limited to the extents of a full object

--limit

Specifies the limit for the number of snapshots permitted.

命令

bench--io-type <read | write | readwrite | rw> [--io-sizesize-in-B/K/M/G/T] [--io-threadsnum_ios_in-flight] [--io-totalsize-in-B/K/M/G/T] [--io-pattern seq | rand] [--rw-mix-readread proportion in readwrite] 图像规格

Generate a series of IOs to the image and measure the IO throughput and

children 快照规格

List the clones of the image at the given snapshot. This checks

This requires image format 2.

clone[--object-sizesize-in-B/K/M] [--stripe-unitsize-in-B/K/M--stripe-countnum] [--image-featurefeature-name] [--image-shared]parent-snap-spec child-image-spec

Will create a clone (copy-on-write child) of the parent snapshot. Object size will be identical to that of the parent image unless

The parent snapshot must be protected (seerbd snap protect).

config global get config-entity key

Get a global-level configuration override.

config global list[--format plain | json | xml] [--pretty-format]config-entity

List global-level configuration overrides.

config global set config-entity key value

Set a global-level configuration override.

config global remove config-entity key

Remove a global-level configuration override.

config image get 图像规格 key

Get an image-level configuration override.

config image list[--format plain | json | xml] [--pretty-format]图像规格

List image-level configuration overrides.

config image set 图像规格 key value

Set an image-level configuration override.

config image remove 图像规格 key

Remove an image-level configuration override.

config pool get 池名 key

Get a pool-level configuration override.

config pool list[--format plain | json | xml] [--pretty-format]池名

List pool-level configuration overrides.

config pool set 池名 key value

Set a pool-level configuration override.

config pool remove 池名 key

Remove a pool-level configuration override.

cp (src-image-spec | src-snap-spec) dest-image-spec

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.deep cpcommand to include

create(-s | --sizesize-in-M/G/T) [--image-formatformat-id] [--object-sizesize-in-B/K/M] [--stripe-unitsize-in-B/K/M--stripe-countnum] [--thick-provision] [--no-progress] [--image-featurefeature-name]… [--image-shared]图像规格

Will create a new rbd image. You must also specify the size via --size. The --stripe-unit and --stripe-count arguments are optional, but must be used together.

deep cp (src-image-spec | src-snap-spec) dest-image-spec

Deep copy the content of a src-image into the newly created dest-image. Dest-image will have the same size, object size, image format, and snapshots as src-image.

device list[-t | --device-typedevice-type] [--format plain | json | xml] --pretty-format

Show the rbd images that are mapped via the rbd kernel module

device map[-t | --device-typedevice-type] [--cookiedevice-cookie] [--show-cookie] [--snap-id快照id] [--read-only] [--exclusive] [-o | --optionsdevice-options] 图像规格 | 快照规格

Map the specified image to a block device via the rbd kernel modulenbd or ubbdon Linux orggateon

The --options argument is a comma separated list of device type

device unmap[-t | --device-typedevice-type] [-o | --optionsdevice-options] [--快照id快照id] 图像规格 | 快照规格 | device-path

Unmap the block device that was mapped via the rbd kernel module

The --options argument is a comma separated list of device type

device attach[-t | --device-typedevice-type] --devicedevice-path[--cookiedevice-cookie] [--show-cookie] [--snap-id快照id] [--read-only] [--exclusive] [--force] [-o | --optionsdevice-options] 图像规格 | 快照规格

Attach the specified image to the specified block device (currently onlynbdon Linux). This operation is unsafe and should not be normally used.nbdkernel driver.

The --options argument is a comma separated list of device type

device detach[-t | --device-typedevice-type] [-o | --optionsdevice-options] [--快照id快照id] 图像规格 | 快照规格 | device-path

Detach the block device that was mapped or attached (currently onlynbdon Linux). This operation is unsafe and should not be normally used.

The --options argument is a comma separated list of device type

diff[--from-snap快照名] [--whole-object]图像规格 | 快照规格

Dump a list of byte extents in the image that have changed since the specified start

du[-p | --pool池名] [图像规格 | 快照规格] [--merge-snapshots]

Will calculate the provisioned and actual disk usage of all images and

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.

The --merge-snapshots will merge snapshots used space into their parent images.

encryption format 图像规格 格式 密码短语文件[--cipher-algalg]

Formats image to an encrypted format.luks1, luks2.aes-128, aes-256(default).

export[--export-formatformat (1 or 8fe401: 2)] (图像规格 | 快照规格) [dest-path]

Export image to dest path (use - for stdout).

export-diff[--from-snap快照名] [--whole-object] (图像规格 | 快照规格) dest-path

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,

feature disable 图像规格 feature-name

Disable the specified feature on the specified image. Multiple features can

feature enable 图像规格 feature-name

Enable the specified feature on the specified image. Multiple features can

flatten[--encryption-formatencryption-format--加密密码短语文件密码短语文件]…图像规格

If the image is a clone, copy all shared blocks from the parent snapshot and

This requires image format 2.

group create group-spec

Create a group.

group image add group-spec 图像规格

Add an image to a group.

group image list group-spec

List images in a group.

group image remove group-spec 图像规格

Remove an image from a group.

group ls[-p | --pool池名]

List rbd groups.

group rename src-group-spec dest-group-spec

Rename a group. Note: rename across pools is not supported.

group rm group-spec

Delete a group.

group snap create group-snap-spec

Make a snapshot of a group.

group snap list group-spec

List snapshots of a group.

group snap info group-snap-spec

Get information about a snapshot of a group.

group snap rm group-snap-spec

Remove a snapshot from a group.

group snap rename group-snap-spec 快照名

Rename group’s snapshot.

group snap rollback group-snap-spec

Rollback group to snapshot.

image-meta get 图像规格 key

Get metadata value with the key.

image-meta list 图像规格

Show metadata held on the image. The first column is the key

image-meta remove 图像规格 key

Remove metadata key with the value.

image-meta set 图像规格 key value

Set metadata key with the value. They will displayed inimage-meta list.

import[--export-formatformat (1 or 8fe401: 2)] [--image-formatformat-id] [--object-sizesize-in-B/K/M] [--stripe-unitsize-in-B/K/M--stripe-countnum] [--image-featurefeature-name]… [--image-shared]src-path [图像规格]

Create a new image and import its data from path (use - for

The --stripe-unit and --stripe-count arguments are optional, but must be

The --export-format accepts ‘1’ or ‘2’ currently. Format 8fe401: 2 allow us to import not only the content

import-diff src-path 图像规格

Import an incremental diff of an image and apply it to the current image. If the diff

info 图像规格 | 快照规格

Will dump information (such as size and object size) about a specific rbd image.

journal client disconnect journal-spec

Flag image journal client as disconnected.

journal export[--verbose] [--no-error]src-journal-spec path-name

Export image journal to path (use - for stdout). It can be make a backup

Note that this command may not always work if the journal is badly corrupted.

journal import[--verbose] [--no-error]path-name dest-journal-spec

Import image journal from path (use - for stdin).

journal info journal-spec

Show information about image journal.

journal inspect[--verbose]journal-spec

Inspect and report image journal for structural errors.

journal reset journal-spec

Reset image journal.

journal status journal-spec

Show status of image journal.

lock add[--sharedlock-tag] 图像规格 lock-id

Lock an image. The lock-id is an arbitrary name for the user’s

lock ls 图像规格

Show locks held on the image. The first column is the lockerlock removecommand.

lock rm 图像规格 lock-id locker

Release a lock on an image. The lock id and locker are

ls[-l | --long] [池名]

Will list all rbd images listed in the rbd_directory object. With

merge-diff first-diff-path second-diff-path merged-diff-path

Merge two continuous incremental diffs of an image into one single diff. The

migration abort 图像规格

Cancel image migration. This step may be run after successful or

migration commit 图像规格

Commit image migration. This step is run after successful migration prepare and migration execute steps and removes the source image data.

migration execute 图像规格

Execute image migration. This step is run after a successful migration prepare step and copies image data to the destination.

migration prepare[--orderorder] [--object-sizeobject-size] [--image-featureimage-feature] [--image-shared] [--stripe-unitstripe-unit] [--stripe-countstripe-count] [--data-pooldata-pool] [--import-only] [--source-specjson] [--source-spec-pathpath] src-image-spec [dest-image-spec]

Prepare image migration. This is the first step when migrating andest-image-speccan be omitted.

An image can also be migrated from a read-only import source by adding the--import-onlyoptional and providing a JSON-encoded--source-specor a--source-spec-pathoptionals.

mirror image demote 图像规格

Demote a primary image to non-primary for RBD mirroring.

mirror image disable[--force]图像规格

Disable RBD mirroring for an image. If the mirroring isimagemode for the image’s pool, then it

mirror image enable 图像规格 模式

Enable RBD mirroring for an image. If the mirroring isimagemode for the image’s pool, then it

The mirror image mode can either bejournal(default) orsnapshot. Thejournalmode requires the RBD journaling feature.

mirror image promote[--force]图像规格

Promote a non-primary image to primary for RBD mirroring.

mirror image resync 图像规格

Force resync to primary image for RBD mirroring.

mirror image status 图像规格

Show RBD mirroring status for an image.

mirror pool demote [池名]

Demote all primary images within a pool or namespace to non-primary.

mirror pool disable [池名]

Disable RBD mirroring within a pool or namespace. When mirroring

mirror pool enable 池名 模式[--remote-namespaceremote-namespace-name]

Enable RBD mirroring within a pool or namespace.pool or image.poolmode, all images in the pool or namespace with the journaling feature enabled are mirrored.imagemode, mirroring needs to bemirror image enableexplicitly enabled (by--remote-namespaceoption.

mirror pool info [池名]

Show information about the pool or namespace mirroring configuration.

mirror pool peer add [池名] remote-cluster-spec

Add a mirroring peer to a pool.remote-cluster-spec是 [remote client name@]remote cluster name.

默认的remote client nameis “client.admin”.

This requires mirroring to be enabled on the pool.

mirror pool peer remove [池名] uuid

Remove a mirroring peer from a pool. The peer UUID is availablemirror pool infocommand.

mirror pool peer set [池名] uuid key value

Update mirroring peer settings.client or cluster, and the value

mirror pool promote[--force] [池名]

Promote all non-primary images within a pool or namespace to primary.

mirror pool status[--verbose] [池名]

Show status for all mirrored images in the pool or namespace.--verbose, show additional output status

mirror snapshot schedule add[-p | --poolpool] [--namespacenamespace] [--imageimage] interval [start-time]

Add mirror snapshot schedule. Theintervalcan be specified instart-timeis a time string in ISO 8601 format. Not providing the--pool, --namespace--imageoptions creates a global

mirror snapshot schedule list[-R | --recursive] [--format格式] [--pretty-format] [-p | --poolpool] [--namespacenamespace] [--imageimage]

List mirror snapshot schedule.

mirror snapshot schedule remove[-p | --poolpool] [--namespacenamespace] [--imageimage] interval [start-time]

Remove mirror snapshot schedule.

mirror snapshot schedule status[-p | --poolpool] [--format格式] [--pretty-format] [--namespacenamespace] [--imageimage]

Show mirror snapshot schedule status.

mv src-image-spec dest-image-spec

Rename an image. Note: rename across pools is not supported.

namespace create 池名/namespace-name

Create a new image namespace within the pool.

namespace list 池名

List image namespaces defined within the pool.

namespace remove 池名/namespace-name

Remove an empty image namespace from the pool.

object-map check 图像规格 | 快照规格

Verify the object map is correct.

object-map rebuild 图像规格 | 快照规格

Rebuild an invalid object map for the specified image. An image snapshot can be

pool init [池名] [--force]

Initialize pool for use by RBD. Newly created pools must be initialized

resize(-s | --sizesize-in-M/G/T) [--allow-shrink] [--encryption-formatencryption-format--加密密码短语文件密码短语文件]…图像规格

Resize rbd image. The size parameter also needs to be specified.

rm 图像规格

Delete an rbd image (including all data blocks). If the image has

snap create 快照规格

Create a new snapshot. Requires the snapshot name parameter to be specified.

snap limit clear 图像规格

Remove any previously set limit on the number of snapshots allowed on

snap limit set[--limit]限制 图像规格

Set a limit for the number of snapshots allowed on an image.

snap ls 图像规格

Dump the list of snapshots of a specific image.

snap protect 快照规格

Protect a snapshot from deletion, so that clones can be made of itrbd clone). Snapshots must be protected before clones are made; protection implies that there exist dependent cloned children thatrbd clonewill fail on a nonprotected

This requires image format 2.

snap purge 图像规格

Remove all unprotected snapshots from an image.

snap rename src-snap-spec dest-snap-spec

Rename a snapshot. Note: rename across pools and images is not supported.

snap rm[--force]快照规格

Remove the specified snapshot.

snap rollback 快照规格

Rollback image content to snapshot. This will iterate through the entire blocks array and update the data head content to the snapshotted version.

snap unprotect 快照规格

Unprotect a snapshot from deletion (undosnap protect). If clonedsnap unprotectfails. (Note that clones may exist

This requires image format 2.

sparsify[--sparse-sizesparse-size] 图像规格

Reclaim space for zeroed image extents. The default sparse size is

status 图像规格

Show the status of the image, including which clients have it open.

trash ls [池名]

List all entries from trash.

trash mv[--expires-at <expires-at>]图像规格

Move an image to the trash. Images, even ones actively in-use by--expires-atto set the expiration time of an image after which

trash purge [池名]

Remove all expired images from trash.

trash restore image-id

Restore an image from trash.

trash rm[--force]image-id

Delete an image from trash. If the image deferment time has not expired--force. An image that is actively in-use by clones

trash purge schedule add[-p | --poolpool] [--namespacenamespace] interval [start-time]

Add trash purge schedule.

trash purge schedule list[-R | --recursive] [--format格式] [--pretty-format] [-p | --poolpool] [--namespacenamespace]

List trash purge schedule.

trash purge schedule remove[-p | --poolpool] [--namespacenamespace] interval [start-time]

Remove trash purge schedule.

trash purge schedule status[-p | --poolpool] [--format格式] [--pretty-format] [--namespacenamespace]

Show trash purge schedule status.

watch 图像规格

Watch events on image.

Image, snap, group and journal specs

图像规格是 [池名/[namespace-name/]]图像名
快照规格是 [池名/[namespace-name/]]图像名@快照名
group-spec是 [池名/[namespace-name/]]group-name
group-snap-spec是 [池名/[namespace-name/]]group-name@快照名
journal-spec是 [池名/[namespace-name/]]journal-name

默认的池名is “rbd” andnamespace-nameis “”. If an image name contains a slash character (‘/’),池名 is required.

Thejournal-nameisimage-id.

You may specify each name individually, using --pool, --namespace, --image, and

Striping

RBD images are striped over many objects, which are then stored by the

The striping is controlled by three parameters:

object-size

The size of objects we stripe over is a power of two. It will be rounded up the nearest power of two.

stripe-unit

Each [stripe-unit] contiguous bytes are stored adjacently in the same object, before we move on

stripe-count

After we write [stripe-unit] bytes to [stripe-count] objects, we loop back to the initial object and write another stripe, until the object reaches its maximum size. At that point,stripe-count] objects.

By default, [stripe-unit] is the same as the object size and [stripe-count] is 1. Specifying a differentstripe-unit] and/or [stripe-count] is often referred to as using “fancy” striping and requires format 2.

Kernel rbd (krbd) options

Most of these options are useful mainly for debugging and benchmarking. The

Per client instancerbd device mapoptions:

  • fsid=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee - FSID that should be assumed by

  • ip=a.b.c.d[:p] - IP and, optionally, port the client should use.

  • share - Enable sharing of client instances with other mappings (default).

  • noshare - Disable sharing of client instances with other mappings.

  • crc - Enable CRC32C checksumming for msgr1 on-the-wire protocol (default).

  • nocrc - Disable CRC32C checksumming for msgr1 on-the-wire protocol. Note

  • cephx_require_signatures - Require msgr1 message signing feature (since 3.19, default). This option is deprecated and will be removed in the future as the

  • nocephx_require_signatures - Don’t require msgr1 message signing feature

  • tcp_nodelay - Disable Nagle’s algorithm on client sockets (since 4.0, default).

  • notcp_nodelay - Enable Nagle’s algorithm on client sockets (since 4.0).

  • cephx_sign_messages - Enable message signing for msgr1 on-the-wire protocol

  • nocephx_sign_messages - Disable message signing for msgr1 on-the-wire protocol

  • mount_timeout=x - A timeout on various steps inrbd device maprbd device unmapsequences (default is 60 seconds). In particular,rbd device unmapeventually

  • osdkeepalive=x - OSD keepalive timeout (default is 5 seconds).

  • osd_idle_ttl=x - OSD idle TTL (default is 60 seconds).

Per mapping (block device)rbd device mapoptions:

  • rw - Map the image read-write (default). Overridden by --read-only.

  • ro - Map the image read-only. Equivalent to --read-only.

  • queue_depth=x - queue depth (since 4.2, default is 128 requests).

  • lock_on_read - Acquire exclusive lock on reads, in addition to writes and

  • exclusive - Disable automatic exclusive lock transitions (since 4.12).

  • lock_timeout=x - A timeout on waiting for the acquisition of exclusive lock

  • notrim - Turn off discard and write zeroes offload support to avoid

  • abort_on_full - Fail write requests with -ENOSPC when the cluster is full or the data pool reaches its quota (since 5.0). The default behaviour is to

  • alloc_size - Minimum allocation unit of the underlying OSD object store

  • crush_location=x - Specify the location of the client in terms of CRUSH

    crush_location=rack:myrack|datacenter:mydc|region:myregion
    

    Each key-value pair stands on its own: “myrack” doesn’t need to reside in

    crush_location=rack:myrack1|rack:myrack2|datacenter:mydc
    
  • read_from_replica=no - Disable replica reads, always pick the primary OSD

  • read_from_replica=balance - When issued a read on a replicated pool, pick

    This mode is safe for general use only since Octopus (i.e. after “ceph osd

  • read_from_replica=localize - When issued a read on a replicated pool, pick

    This mode is safe for general use only since Octopus (i.e. after “ceph osd

  • compression_hint=none - Don’t set compression hints (since 5.8, default).

  • compression_hint=compressible - Hint to the underlying OSD object store

  • compression_hint=incompressible - Hint to the underlying OSD object store

  • ms_mode=legacy - Use msgr1 on-the-wire protocol (since 5.11, default).

  • ms_mode=crc - Use msgr2.1 on-the-wire protocol, select ‘crc’ mode, also

  • ms_mode=secure - Use msgr2.1 on-the-wire protocol, select ‘secure’ mode

  • ms_mode=prefer-crc - Use msgr2.1 on-the-wire protocol, select ‘crc’ mode (since 5.11). If the daemon denies ‘crc’ mode in favor of ‘secure’ mode, agree to ‘secure’ mode.

  • ms_mode=prefer-secure - Use msgr2.1 on-the-wire protocol, select ‘secure’ mode (since 5.11). If the daemon denies ‘secure’ mode in favor of ‘crc’ mode, agree to ‘crc’ mode.

  • rxbounce - Use a bounce buffer when receiving data (since 5.17). The default

  • udev - Wait for udev device manager to finish executing all matching

  • noudev - Don’t wait for udev device manager. When enabled, the device may

rbd device unmapoptions:

  • force - Force the unmapping of a block device that is open (since 4.9). The

  • udev - Wait for udev device manager to finish executing all matching

  • noudev - Don’t wait for udev device manager.

示例

To create a new rbd image that is 100 GB:

rbd create mypool/myimage --size 102400

To use a non-default object size (8 MB):

rbd create mypool/myimage --size 102400 --object-size 8M

To delete an rbd image (be careful!):

rbd rm mypool/myimage

To create a new snapshot:

rbd snap create mypool/myimage@mysnap

To create a copy-on-write clone of a protected snapshot:

rbd clone mypool/myimage@mysnap otherpool/cloneimage

To see which clones of a snapshot exist:

rbd children mypool/myimage@mysnap

To delete a snapshot:

rbd snap rm mypool/myimage@mysnap

To map an image via the kernel with cephx enabled:

rbd device map mypool/myimage --id admin --keyfile secretfile

To map an image via the kernel with different cluster name other than defaultceph:

rbd device map mypool/myimage --cluster cluster-name

To unmap an image:

rbd device unmap /dev/rbd0

To create an image and a clone from it:

rbd import --image-format 2 image mypool/parent
rbd snap create mypool/parent@snap
rbd snap protect mypool/parent@snap
rbd clone mypool/parent@snap otherpool/child

To create an image with a smaller stripe-unit (to better distribute small writes in some workloads):

rbd create mypool/myimage --size 102400 --stripe-unit 65536B --stripe-count 16

To change an image from one image format to another, export it and then

rbd export mypool/myimage@snap /tmp/img
rbd import --image-format 2 /tmp/img mypool/myimage2

To lock an image for exclusive use:

rbd lock add mypool/myimage mylockid

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--expires-atto set expiration time, default is now):

rbd trash mv mypool/myimage --expires-at "tomorrow"

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

To create a mirror snapshot schedule for an image:

rbd mirror snapshot schedule add --pool mypool --image myimage 12h 14:00:00-05:00

可用性

rbd是 Ceph 的一部分,Ceph 是一个可扩展性极强的、开源的分布式存储系统。有关更多信息,请参阅 Ceph 文档https://docs.ceph.com

参见

ceph(8),rados(8)

由 Ceph 基金会提供

Ceph 文档是一个由非盈利Ceph 基金会资助和托管的社会资源。。如果您想支持此项目和其他工作,请考虑现在加入.