I'm using a combination of Debian Linux and XEN virtualization, and they work fine togeth4er. FreeSWITCH team maintains Debian packages, so that you don't need to build from sources. Also XEN hypervisor provides the VM access to hardware clock, which is very important for conferences and transcoding.
Well I was wondering about the usage and mechanism of CephFS snapshot and the search results brought me here.
Firstly, snapshot in CephFS is available, but not yet stable. With allow_new_snaps
set, snapshot will be enabled in CephFS, and making snapshots is as easy as creating a directory. Besides being not stable, what I've found is that files in snapshots still seem to be changing as the files in filesystem change, but haven't got a clue about this.
Snapshotting the pool seems to be a reliable way to do backups, but keep in mind that you gotta snapshot both the data pool and the metadata pool, and both snapshots need to be taken at the same time, in order to get a consistent snapshot of the filesystem. What's worse, you will need to combine both snapshots and make a new filesystem with them in order to get a single file or directory from the snapshot, but multi-fs
is not yet implemented, AFAIK, in ceph. So your only way to do a recover may be overwriting the current filesystem with the snapshot entirely.
I'm using the allow_new_snaps
way which seems to be more promising.
Best Answer
You can easily transfer images in and out of Ceph RADOS with the
rbd
command. I am currently using libvirt to manage my KVM images, so my paths may be different.The libvirt configuration for one of my virtual machines uses an RBD disk image located at
data/vm-www
. To see that RBD pool, I can use therbd ls -p data
command. For any other command, such as getting information about the image, you can use a shortened form:rbd info data/vm-www
, instead of the longerrbd info -p data vm-www
.Now that you have verified you can find the image, use this command to save it to a local file:
rbd export data/vm-www www.raw
.www.raw
is now a file that contains your virtual machine's disk, and you can tell your libvirt or qemu-kvm command to use it directly as a raw file. Alternatively, you can use qemu-img to convert it to a different format, such as qcow2.I do not have experience with RBD snapshots, but the
rbd export
command lists a "--snap" option, presumably to be used with information that you can get fromrbd snap ls data/vm-www
.Hope this helps!