mirror of
https://github.com/libvirt/libvirt.git
synced 2026-09-03 20:53:04 -05:00
storage backend: Add RBD (RADOS Block Device) support
This patch adds support for a new storage backend with RBD support. RBD is the RADOS Block Device and is part of the Ceph distributed storage system. It comes in two flavours: Qemu-RBD and Kernel RBD, this storage backend only supports Qemu-RBD, thus limiting the use of this storage driver to Qemu only. To function this backend relies on librbd and librados being present on the local system. The backend also supports Cephx authentication for safe authentication with the Ceph cluster. For storing credentials it uses the built-in secret mechanism of libvirt. Signed-off-by: Wido den Hollander <wido@widodh.nl>
This commit is contained in:
committed by
Eric Blake
parent
b8e6021e7b
commit
74951eadef
@@ -107,6 +107,9 @@
|
||||
<li>
|
||||
<a href="#StorageBackendMultipath">Multipath backend</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#StorageBackendRBD">RBD (RADOS Block Device) backend</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h2><a name="StorageBackendDir">Directory pool</a></h2>
|
||||
@@ -491,6 +494,76 @@
|
||||
The Multipath volume pool does not use the volume format type element.
|
||||
</p>
|
||||
|
||||
<h2><a name="StorageBackendRBD">RBD pools</a></h2>
|
||||
<p>
|
||||
This storage driver provides a pool which contains all RBD
|
||||
images in a RADOS pool. RBD (RADOS Block Device) is part
|
||||
of the Ceph distributed storage project.<br/>
|
||||
This backend <i>only</i> supports Qemu with RBD support. Kernel RBD
|
||||
which exposes RBD devices as block devices in /dev is <i>not</i>
|
||||
supported. RBD images created with this storage backend
|
||||
can be accessed through kernel RBD if configured manually, but
|
||||
this backend does not provide mapping for these images.<br/>
|
||||
Images created with this backend can be attached to Qemu guests
|
||||
when Qemu is build with RBD support (Since Qemu 0.14.0). The
|
||||
backend supports cephx authentication for communication with the
|
||||
Ceph cluster. Storing the cephx authentication key is done with
|
||||
the libvirt secret mechanism. The UUID in the example pool input
|
||||
refers to the UUID of the stored secret.
|
||||
<span class="since">Since 0.9.13</span>
|
||||
</p>
|
||||
|
||||
<h3>Example pool input</h3>
|
||||
<pre>
|
||||
<pool type="rbd">
|
||||
<name>myrbdpool</name>
|
||||
<source>
|
||||
<name>rbdpool</name>
|
||||
<host name='1.2.3.4' port='6789'/>
|
||||
<host name='my.ceph.monitor' port='6789'/>
|
||||
<host name='third.ceph.monitor' port='6789'/>
|
||||
<auth username='admin' type='ceph'>
|
||||
<secret uuid='2ec115d7-3a88-3ceb-bc12-0ac909a6fd87'/>
|
||||
</auth>
|
||||
</source>
|
||||
</pool></pre>
|
||||
|
||||
<h3>Example volume output</h3>
|
||||
<pre>
|
||||
<volume>
|
||||
<name>myvol</name>
|
||||
<key>rbd/myvol</key>
|
||||
<source>
|
||||
</source>
|
||||
<capacity unit='bytes'>53687091200</capacity>
|
||||
<allocation unit='bytes'>53687091200</allocation>
|
||||
<target>
|
||||
<path>rbd:rbd/myvol</path>
|
||||
<format type='unknown'/>
|
||||
<permissions>
|
||||
<mode>00</mode>
|
||||
<owner>0</owner>
|
||||
<group>0</group>
|
||||
</permissions>
|
||||
</target>
|
||||
</volume></pre>
|
||||
|
||||
<h3>Example disk attachement</h3>
|
||||
<p>RBD images can be attached to Qemu guests when Qemu is built
|
||||
with RBD support. Information about attaching a RBD image to a
|
||||
guest can be found
|
||||
at <a href="formatdomain.html#elementsDisks">format domain</a>
|
||||
page.</p>
|
||||
|
||||
<h3>Valid pool format types</h3>
|
||||
<p>
|
||||
The RBD pool does not use the pool format type element.
|
||||
</p>
|
||||
|
||||
<h3>Valid volume format types</h3>
|
||||
<p>
|
||||
The RBD pool does not use the volume format type element.
|
||||
</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user