Skip to content
Mohamed Elsakhawy, PhD
  • Mohamed Elsakhawy, Ph.D
  • Talks
  • Technical Blog

Ceph RBD snapshots for an attached volume

21 June 2017 0 comments Article Technical Blog

You might find yourself in a scenario where you need to backup a CEPH volume attached to an Openstack Instance. CEPH snapshots come automatically to mind as the “state-in-time” solution. Once you take a CEPH snapshot, you can export it and backup the volume either as a physical file or at the file system level, possibly by mounting it.

Openstack allows you to use cinder to initiate the volume snapshots. The other option is to initiate CEPH snapshots yourself using the “rbd snap create” command. In either cases, taking a CEPH snapshot allows you to get the volume in-time state which you can later export using “rbd  export”. The one drawback with snapshotting a volume attached to a running VM is that the snapshot happens without the VM knowing about it. This inheritely might cause file system consistency issues in the backup snapshot and can cause the VM to freeze as the volume becomes briefly unavailable during the snapshot taking.

The solution to the VM freezing issue is to instruct libvirt to enable RBD caching. This can be achieved by adding the following line under the libvirt section in nova.conf on the compute node.

disk_cachemodes=”network=writeback”

You will need to restart nova services on the compute host, after that RBD caching will be enabled for nova on the compute host and will prevent the VM from freezing after the snapshot is taken. You can find more on RBD caching configuration options in:

https://www.sebastien-han.fr/blog/2013/08/22/configure-rbd-caching-on-nova/

 

 

Tags: CEPH

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • My talk at SCaLE 22x
  • SCALE 22x
  • My talk at OpenInfra Days North America
  • Paper Accepted in ATC USENIX
  • Paper accepted at WoSC ‘7

Recent Comments

  1. Hung on Neutron: How a VM communicates
  2. hungpq on Neutron: How a VM communicates
  3. Atul on VM to VM communication: different networks
  4. mohamed on Traffic flows from an Openstack VM
  5. Amit Pawar on Traffic flows from an Openstack VM

Copyright Mohamed Elsakhawy, PhD 2026 | Theme by ThemeinProgress | Proudly powered by WordPress