mirror of
https://github.com/ceph/ceph
synced 2025-01-03 01:22:53 +00:00
doc: Cleaned up rbd snapshots.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
This commit is contained in:
parent
14ec778263
commit
6bb19e74c0
@ -11,6 +11,13 @@ To map an RBD image to a kernel object, first load the Ceph RBD module::
|
||||
|
||||
modprobe rbd
|
||||
|
||||
Get a List of RBD Images
|
||||
------------------------
|
||||
|
||||
To mount an RBD image, first return a list of the images. ::
|
||||
|
||||
rbd list
|
||||
|
||||
Map a Block Device with ``rbd``
|
||||
-------------------------------
|
||||
|
||||
@ -70,11 +77,13 @@ provides the following functions:
|
||||
+------------------+------------------------------------------------------------+
|
||||
|
||||
|
||||
List Block Devices
|
||||
------------------
|
||||
To list RBD block devices with the ``rbd`` command, specify the ``list`` option. ::
|
||||
Show Mapped Block Devices
|
||||
-------------------------
|
||||
|
||||
rbd list
|
||||
To show RBD images mapped to kernel block devices with the ``rbd`` command,
|
||||
specify the ``showmapped`` option. ::
|
||||
|
||||
sudo rbd showmapped
|
||||
|
||||
Images are mounted as devices sequentially starting from ``0``. To list all
|
||||
devices mapped to kernel objects, execute the following::
|
||||
|
@ -1,6 +1,7 @@
|
||||
==================
|
||||
RBD Snapshotting
|
||||
==================
|
||||
|
||||
One of the advanced features of RADOS block devices is that you can create
|
||||
snapshots of the images to retain a history of an image's state. Ceph supports
|
||||
RBD snapshots from the ``rbd`` command, from a kernel object, from a
|
||||
@ -14,23 +15,54 @@ the snapshots.
|
||||
If the image contains a filesystem, the filesystem should be in a
|
||||
consistent state before snapshotting too.
|
||||
|
||||
|
||||
Create Snapshot
|
||||
---------------
|
||||
<placeholder>
|
||||
|
||||
You can take snapshots of RBD images.
|
||||
To create a snapshot with ``rbd``, specify the ``snap create`` option,
|
||||
the pool name, the image name and the username. If you use ``cephx`` for
|
||||
authentication, you must also specify a key or a secret file. ::
|
||||
|
||||
rbd --name {user-name} --keyfile=/path/to/secret --pool {pool-name} snap create --snap {snap-name} {image-name}
|
||||
|
||||
For example::
|
||||
|
||||
rbd --name client.admin --pool rbd snap create --snap foo.snapname foo
|
||||
|
||||
List Snapshots
|
||||
--------------
|
||||
<placeholder>
|
||||
|
||||
To list snapshots of an image, specify the pool name, the image name, and
|
||||
the username. If you use ``cephx`` for authentication, you must also
|
||||
specify a key or a secret file. ::
|
||||
|
||||
rbd --name {user-name} --keyfile=/path/to/secret --pool {pool-name} snap ls {image-name}
|
||||
|
||||
For example::
|
||||
|
||||
rbd --name client.admin --pool rbd snap ls foo
|
||||
|
||||
Rollback Snapshot
|
||||
-----------------
|
||||
<placeholder>
|
||||
|
||||
To rollback a snapshot with ``rbd``, specify the ``snap rollback`` option,
|
||||
the pool name, the image name and the username. If you use ``cephx`` for
|
||||
authentication, you must also specify a key or a secret file. ::
|
||||
|
||||
rbd --name {user-name} --keyfile=/path/to/secret --pool {pool-name} snap rollback --snap {snap-name} {image-name}
|
||||
|
||||
For example::
|
||||
|
||||
rbd --name client.admin --pool rbd snap rollback --snap foo.snapname foo
|
||||
|
||||
|
||||
Delete a Snapshot
|
||||
-----------------
|
||||
<placeholder>
|
||||
To delete a snapshot with ``rbd``, specify the ``snap rm`` option,
|
||||
the pool name, the image name and the username. If you use ``cephx`` for
|
||||
authentication, you must also specify a key or a secret file. ::
|
||||
|
||||
rbd --name {user-name} --keyfile=/path/to/secret --pool {pool-name} snap rm --snap {snap-name} {image-name}
|
||||
|
||||
For example::
|
||||
|
||||
rbd --name client.admin --pool rbd snap rm --snap foo.snapname foo
|
||||
|
Loading…
Reference in New Issue
Block a user