O'Reilly logo

Ceph Cookbook - Second Edition by Karan Singh, Michael Hackett, Vikhyat Umrao

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How to do it...

Let's see how a snapshot works with Ceph:

  1. To test the snapshot functionality of Ceph, let's create a file on the block device that we created earlier:

         # echo "Hello Ceph This is snapshot test"            > /mnt/ceph-disk1/snapshot_test_file
  1. Create a snapshot for the Ceph Block Device. Syntax for the same is as follows:
        # rbd snap create <pool name>/<image name>@<snap name>        # rbd snap create rbd/rbd1@snapshot1
  1. To list the snapshots of an image, use the following syntax:
        # rbd snap ls <pool name>/<image name>        # rbd snap ls rbd/rbd1
  1. To test the snapshot restore functionality of Ceph RBD, let's delete files from the filesystem: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required