1

What is the difference between using a rados block device in libvirt qemu with disk type='network' and disk type='block'? The ceph guide tells me to do the following:

<disk type='network' device='disk'>
        <source protocol='rbd' name='libvirt-pool/new-libvirt-image'>
                <host name='{monitor-host}' port='6789'/>
        </source>
        <target dev='vda' bus='virtio'/>
</disk>

http://ceph.com/docs/master/rbd/libvirt/

But right now I'm just using the rbd directly like:

<disk type='block' device='disk'>
  <driver name='qemu' type='raw' cache='none' io='native'/>
  <source dev='/dev/rbd/rbd/testvm'/>
  <target dev='vda' bus='virtio'/>
  <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
</disk>

Are there any downsides in using it directly?

0

When you use a Linux RBD device you use the Ceph RBD layer indirectly. The Linux device does talk with the Ceph RBD layer. So when using the type=network protocol=rbd disk you are removing one indirection layer. Also the RBD (ram) cache is not available with the kernel driver (but the page cache is used). So generally it is a good idea to use the first option.

1
  • That's what I did in the end. There are several advantages in using librbd/qemu directly. Thanks! – devnull Aug 26 '15 at 7:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.