rbd-mirror

Manage RBD mirroring for RBD pools. To configure RBD mirroring, first start an RBD mirror service on the cluster that data should be mirrored to. Then use this API to enable mirroring on pools with the same name on both clusters. To connect the two clusters, generate a bootstrap token on one of the pools, and import the token on the same pool on the other cluster.

get /pools/{pool}/rbd-mirror

Get a pool's mirroring settings for all namespaces.

Parameters

pool string path Required
The pool to get mirror settings of.
namespace string query
Optional RBD namespace, or the default namespace if null.

Responses

default response
default response
object
RBD mirroring details and status of an RBD pool+namespace.

Examples

No request body required
patch /pools/{pool}/rbd-mirror

Update a pool's mirroring settings.

Parameters

pool string path Required
The pool to update.
namespace string query
The namespace to operate on (optional). Only in Ceph Octopus or later.
body object
Request to update mirroring settings of an RBD pool

Responses

default response
default response
object

Examples

Request Body

{
  "poolMirrorMode": "disabled"
}
get /pools/rbd-mirror/all-infos

Get mirror infos on all pools.

Responses

default response
default response
array
Array of RbdMirrorPoolInfo objects - RBD mirroring details and status of an RBD pool+namespace.

Examples

No request body required
get /pools/rbd-mirror/schedules

Get mirror snapshot schedules of the image, or an empty list if snapshot mode is not enabled.

Responses

default response
default response
array
Array of RbdMirrorSnapshotSchedule objects - Mirror snapshot schedule information for RBD images in snapshot mode.

Examples

No request body required
post /pools/rbd-mirror/schedules

Add a new schedule for rbd mirror snapshots.

Parameters

body object
Mirror snapshot schedule information for RBD images in snapshot mode.

Examples

Request Body

{
  "rbd": "string",
  "pool": "string",
  "interval": "string",
  "namespace": "string",
  "startTime": "string"
}
delete /pools/rbd-mirror/schedules

Delete a schedule for RBD mirror snapshots. Call this endpoint with the same request body as when adding a schedule (via POST). The task returned by this endpoint will not provide information on whether or not a schedule was removed. To check if deletion was successful, request the list of schedules and check for any changes.

Parameters

body object
Mirror snapshot schedule information for RBD images in snapshot mode.

Examples

Request Body

{
  "rbd": "string",
  "pool": "string",
  "interval": "string",
  "namespace": "string",
  "startTime": "string"
}
post /pools/{pool}/rbd-mirror/peers

Add a pool peer using the bootstrap token from a remote cluster.

Parameters

pool string path Required
The pool for which to add a peer.
body object
Request to create a new peer using a bootstrap token

Responses

default response
default response
object

Examples

Request Body

{
  "siteName": "string",
  "direction": "rx-tx",
  "peerToken": "string",
  "localSiteName": "string"
}
get /pools/{pool}/rbd-mirror/token

Get the bootstrap token to set up a peer for the pool. This token can be imported on a peer cluster to automatically set up a connection between the two clusters to mirror the pool. Note that the token contains sensitive information about your cluster! Will return null if anything fails while trying to create the token (e.g. mirroring is not enabled on the pool).

Parameters

pool string path Required
The pool for which to generate a token for.

Responses

default response
default response
string

Examples

No request body required
patch /pools/{pool}/rbd-mirror/token

Change the site name of the pool.

Parameters

pool string path Required
The pool for which to set the site name.
body object
Request to update the site name of a pool.

Examples

Request Body

{
  "siteName": "string"
}
post /pools/{pool}/rbd-mirror/journaling

Enable/Disable journaling for all images not in snapshot mode in the pool.

Parameters

pool string path Required
The pool with the images.
namespace string query
The namespace to operate on (optional).
body object
Request to enable/disable journaling on all images

Responses

default response
default response
object

Examples

Request Body

{
  "enableJournaling": true
}
patch /pools/{pool}/rbd-mirror/peers/{id}

Change pool peer settings. These changes only take effect after restarting the rbd-mirror daemon service.

Parameters

pool string path Required
The pool for which to add a peer.
id string path Required
The global ID of the peer to update.
body object
Request to update mirroring settings of a mirror peer

Responses

default response
default response
object

Examples

Request Body

{
  "client": "string",
  "monHosts": "string",
  "siteName": "string",
  "direction": "rx-tx"
}
delete /pools/{pool}/rbd-mirror/peers/{id}

Delete a specific peer mirroring cluster from a pool.

Parameters

pool string path Required
The pool containing the peer.
id string path Required
The global ID of the peer to delete.

Responses

default response
default response
object

Examples

No request body required
patch /pools/{pool}/rbds/{rbd}/rbd-mirror

Update RBD mirroring settings for the image.

Parameters

pool string path Required
The pool containing the image.
rbd string path Required
The image to update.
namespace string query
The namespace to operate on (optional). Only in Ceph Octopus or later.
body object
Request to update mirroring settings of an RBD image

Responses

default response
default response
object

Examples

Request Body

{
  "primary": true,
  "journaling": true,
  "imageMirrorMode": "disabled"
}
post /pools/{pool}/rbds/{rbd}/rbd-mirror/resync

Force a RBD mirroring resync on the image. Note that this only flags the image, it's up to the rbd-mirror daemon to execute the resync.

Parameters

pool string path Required
The pool containing the image.
rbd string path Required
The image to resync.
namespace string query
The namespace to operate on (optional). Only in Ceph Octopus or later.

Examples

No request body required
get /pools/{pool}/rbds/{rbd}/rbd-mirror/snapshots

Get mirror snapshots of the image, or an empty list if snapshot mode is not enabled.

Parameters

pool string path Required
The pool containing the image.
rbd string path Required
The image with snapshots.
namespace string query
The namespace to operate on (optional). Only in Ceph Octopus or later.

Responses

default response
default response
array
Array of RbdMirrorSnapshot objects - Mirror snapshot information for RBD images in snapshot mode.

Examples

No request body required
post /pools/{pool}/rbds/{rbd}/rbd-mirror/snapshots

Create a mirror snapshot of the image

Parameters

pool string path Required
The pool containing the image.
rbd string path Required
The image with snapshots.
namespace string query
The namespace to operate on (optional). Only in Ceph Octopus or later.

Examples

No request body required