On Github nirs / devconf-2016
For more information on the Cinder integration, see Maor Lipchuk's talk from FOSDEM 2016 Managing Ceph through Cinder using oVirt.
A VG, special LVs for metadata, locking, messaging.
# lvs -o name,attr,size 6acaac02-7e7d-...-70e07d96581d LV Attr LSize 56b25c4a-085f-406e-8a2e-acb06a03d0cc -wi-a----- 128.00m 78f22775-916c-4e72-8c5b-9917734b26da -wi-a----- 4.50g c00fd591-f85e-4572-b82e-35c542e383a7 -wi-a----- 128.00m ids -wi-ao---- 128.00m inbox -wi-a----- 128.00m leases -wi-a----- 2.00g master -wi-ao---- 1.00g metadata -wi-a----- 512.00m outbox -wi-a----- 128.00m
A directory on a mounted filesystem
# ls -lh /rhev/data-center/mnt/example.com:_export_data/869...783 total 4.0K drwxr-xr-x. 2 vdsm kvm 69 Jan 28 22:56 dom_md drwxr-xr-x. 7 vdsm kvm 4.0K Jan 23 19:13 images drwxr-xr-x. 2 vdsm kvm 6 Jan 28 22:56 master
Files in the image directory
# ls -lh /rhev/data-center/mnt/example.com:_export_data/869...783/images/24c...57c total 1.7G -rw-rw----. 1 vdsm kvm 1.7G Dec 4 15:52 1f6...e06 -rw-rw----. 1 vdsm kvm 1.0M Dec 4 15:49 1f6...e06.lease -rw-r--r--. 1 vdsm kvm 309 Dec 4 15:52 1f6...e06.meta
(file system handles it)
It's QCOW all the way down
Extremely complicated - we will not talk about it.
See Adam Litke's talk "Thanks for Live Snapshots, Where's Live Merge?" from KVM Forum 2014.
(No dependency on the SPM)
<disk type='network' device='disk'>
<source protocol='rbd' name='pool/volume'>
<host name='10.0.1.1' port='6789'/>
<host name='10.0.1.2' port='6789'/>
<host name='10.0.1.3' port='6789'/>
</source>
<auth username="cinder">
<secret type="ceph" uuid="ec5...236"/>
</auth>
</disk>
(Nothing to do)
(No such thing, just delete a snapshot)
# cat /etc/ceph/ceph.client.admin.keyring [client.admin] key = AQCj2YpRiAe6CxAA7/ETt7Hcl9IyxyYciVs47w==
We need a more secure way to deploy the key
<secret ephemeral="yes" private="yes">
<uuid>3a27b133-abb2-...-bd0a4032866f</uuid>
<usage type="ceph">
<name>ovirt/3a27b133-abb2-...-bd0a4032866f</name>
</usage>
</secret>
What if Libvirt crashed or restarted?
## # @Host.registerSecrets: # # Register secrets with libvirt # # @secrets: List of secrets to register # # @clear: #optional If true, unregister other # registered secrets # # Since: 4.17.0 ##
## # @Host.unregisterSecrets: # # Unregister secrets registered for given uuids # # @uuids: List of UUIDs # # Since: 4.17.0 ##
Requires qemu-guest-agent on Linux, VSS on Windows
Freezing too late!
Freeze guest file systems before creating Ceph disk snapshot
New verb using Libvirt's virDomainFSFreeze
## # @VM.freeze: # # Freeze mounted filesystems within the guest (hence # guest agent may be required depending on hypervisor # used). # # @vmID: The UUID of the VM # # Since: 4.17.0 ##
New frozen flag
## # @VM.snapshot: # # Create a live snapshot of a VM's disks. # ... # @frozen: #optional Boolean value set to true if # the vm is frozen and does not need to # be freezed during the snapshot. # (new in version 4.17.0) # # Since: 4.10.0 ##
New verb using Libvirt's virDomainFSThaw
## # @VM.thaw: # # Thaw mounted filesystems within the guest (hence # guest agent may be required depending on hypervisor # used). # # @vmID: The UUID of the VM # # Since: 4.17.0 ##
Engine now controls the entire flow
Freeze VM via Vdsm Create disk snapshot via Cinder Take VM snapshot via Vdsm (frozen=True) Thaw VM via VdsmHard to modify, easy to break