diff options
author | Sebastian Wiedenroth <wiedi@frubar.net> | 2012-07-18 20:06:58 +0100 |
---|---|---|
committer | Daniel P. Berrange <berrange@redhat.com> | 2012-07-18 20:08:27 +0100 |
commit | 29bc4fe6460d80c2aca1b90e54faed1431efcfa7 (patch) | |
tree | 3398d4307271f7c22e9dc5e62b0525ea712f0ec7 /docs | |
parent | Mount all tmpfs filesystems with correct SELinux label (diff) | |
download | libvirt-29bc4fe6460d80c2aca1b90e54faed1431efcfa7.tar.gz libvirt-29bc4fe6460d80c2aca1b90e54faed1431efcfa7.tar.bz2 libvirt-29bc4fe6460d80c2aca1b90e54faed1431efcfa7.zip |
Add a sheepdog backend for the storage driver
This patch brings support to manage sheepdog pools and volumes to libvirt.
It uses the "collie" command-line utility that comes with sheepdog for that.
A sheepdog pool in libvirt maps to a sheepdog cluster.
It needs a host and port to connect to, which in most cases
is just going to be the default of localhost on port 7000.
A sheepdog volume in libvirt maps to a sheepdog vdi.
To create one specify the pool, a name and the capacity.
Volumes can also be resized later.
In the volume XML the vdi name has to be put into the <target><path>.
To use the volume as a disk source for virtual machines specify
the vdi name as "name" attribute of the <source>.
The host and port information from the pool are specified inside the host tag.
<disk type='network'>
...
<source protocol="sheepdog" name="vdi_name">
<host name="localhost" port="7000"/>
</source>
</disk>
To work right this patch parses the output of collie,
so it relies on the raw output option. There recently was a bug which caused
size information to be reported wrong. This is fixed upstream already and
will be in the next release.
Signed-off-by: Sebastian Wiedenroth <wiedi@frubar.net>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/drivers.html.in | 1 | ||||
-rw-r--r-- | docs/schemas/storagepool.rng | 17 | ||||
-rw-r--r-- | docs/schemas/storagevol.rng | 3 | ||||
-rw-r--r-- | docs/storage.html.in | 62 |
4 files changed, 82 insertions, 1 deletions
diff --git a/docs/drivers.html.in b/docs/drivers.html.in index 8ad2c3321..90b61962e 100644 --- a/docs/drivers.html.in +++ b/docs/drivers.html.in @@ -43,6 +43,7 @@ <li><strong><a href="storage.html#StorageBackendSCSI">SCSI backend</a></strong></li> <li><strong><a href="storage.html#StorageBackendMultipath">Multipath backend</a></strong></li> <li><strong><a href="storage.html#StorageBackendRBD">RBD (RADOS Block Device) backend</a></strong></li> + <li><strong><a href="storage.html#StorageBackendSheepdog">Sheepdog backend</a></strong></li> </ul> </body> </html> diff --git a/docs/schemas/storagepool.rng b/docs/schemas/storagepool.rng index 75b6b514b..039798a9b 100644 --- a/docs/schemas/storagepool.rng +++ b/docs/schemas/storagepool.rng @@ -20,6 +20,7 @@ <ref name='poolscsi'/> <ref name='poolmpath'/> <ref name='poolrbd'/> + <ref name='poolsheepdog'/> </choice> </element> </define> @@ -115,6 +116,15 @@ <ref name='sourcerbd'/> </define> + <define name='poolsheepdog'> + <attribute name='type'> + <value>sheepdog</value> + </attribute> + <ref name='commonmetadata'/> + <ref name='sizing'/> + <ref name='sourcesheepdog'/> + </define> + <define name='sourceinfovendor'> <optional> <element name='vendor'> @@ -496,6 +506,13 @@ </element> </define> + <define name='sourcesheepdog'> + <element name='source'> + <ref name='sourceinfohost'/> + <ref name='sourceinfoname'/> + </element> + </define> + <define name='name'> <data type='string'> <param name="pattern">[a-zA-Z0-9_\+\-]+</param> diff --git a/docs/schemas/storagevol.rng b/docs/schemas/storagevol.rng index 7a74331cd..0b9933d56 100644 --- a/docs/schemas/storagevol.rng +++ b/docs/schemas/storagevol.rng @@ -67,7 +67,7 @@ <element name='target'> <optional> <element name='path'> - <ref name='absFilePath'/> + <data type='anyURI'/> </element> </optional> <ref name='format'/> @@ -144,6 +144,7 @@ <define name='formatfile'> <choice> + <value>unknown</value> <value>raw</value> <value>dir</value> <value>bochs</value> diff --git a/docs/storage.html.in b/docs/storage.html.in index b3484e811..26a949a7d 100644 --- a/docs/storage.html.in +++ b/docs/storage.html.in @@ -110,6 +110,9 @@ <li> <a href="#StorageBackendRBD">RBD (RADOS Block Device) backend</a> </li> + <li> + <a href="#StorageBackendSheepdog">Sheepdog backend</a> + </li> </ul> <h2><a name="StorageBackendDir">Directory pool</a></h2> @@ -565,5 +568,64 @@ The RBD pool does not use the volume format type element. </p> + <h2><a name="StorageBackendSheepdog">Sheepdog pools</a></h2> + <p> + This provides a pool based on a Sheepdog Cluster. + Sheepdog is a distributed storage system for QEMU/KVM. + It provides highly available block level storage volumes that + can be attached to QEMU/KVM virtual machines. + + The cluster must already be formatted. + + <span class="since">Since 0.9.13</span> + </p> + + <h3>Example pool input</h3> + <pre> + <pool type="sheepdog"> + <name>mysheeppool</name> + <source> + <name>mysheeppool</name> + <host name='localhost' port='7000'/> + </source> + </pool></pre> + + <h3>Example volume output</h3> + <pre> + <volume> + <name>myvol</name> + <key>sheep/myvol</key> + <source> + </source> + <capacity unit='bytes'>53687091200</capacity> + <allocation unit='bytes'>53687091200</allocation> + <target> + <path>sheepdog:myvol</path> + <format type='unknown'/> + <permissions> + <mode>00</mode> + <owner>0</owner> + <group>0</group> + </permissions> + </target> + </volume></pre> + + <h3>Example disk attachment</h3> + <p>Sheepdog images can be attached to Qemu guests. + Information about attaching a Sheepdog image to a + guest can be found + at the <a href="formatdomain.html#elementsDisks">format domain</a> + page.</p> + + <h3>Valid pool format types</h3> + <p> + The Sheepdog pool does not use the pool format type element. + </p> + + <h3>Valid volume format types</h3> + <p> + The Sheepdog pool does not use the volume format type element. + </p> + </body> </html> |