mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
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>
This commit is contained in:
committed by
Daniel P. Berrange
parent
e00184291e
commit
29bc4fe646
@@ -69,19 +69,24 @@
|
||||
%define with_xenapi 0%{!?_without_xenapi:1}
|
||||
|
||||
# Then the secondary host drivers, which run inside libvirtd
|
||||
%define with_network 0%{!?_without_network:%{server_drivers}}
|
||||
%define with_storage_fs 0%{!?_without_storage_fs:%{server_drivers}}
|
||||
%define with_storage_lvm 0%{!?_without_storage_lvm:%{server_drivers}}
|
||||
%define with_storage_iscsi 0%{!?_without_storage_iscsi:%{server_drivers}}
|
||||
%define with_storage_disk 0%{!?_without_storage_disk:%{server_drivers}}
|
||||
%define with_storage_mpath 0%{!?_without_storage_mpath:%{server_drivers}}
|
||||
%define with_network 0%{!?_without_network:%{server_drivers}}
|
||||
%define with_storage_fs 0%{!?_without_storage_fs:%{server_drivers}}
|
||||
%define with_storage_lvm 0%{!?_without_storage_lvm:%{server_drivers}}
|
||||
%define with_storage_iscsi 0%{!?_without_storage_iscsi:%{server_drivers}}
|
||||
%define with_storage_disk 0%{!?_without_storage_disk:%{server_drivers}}
|
||||
%define with_storage_mpath 0%{!?_without_storage_mpath:%{server_drivers}}
|
||||
%if 0%{?fedora} >= 16
|
||||
%define with_storage_rbd 0%{!?_without_storage_rbd:%{server_drivers}}
|
||||
%define with_storage_rbd 0%{!?_without_storage_rbd:%{server_drivers}}
|
||||
%else
|
||||
%define with_storage_rbd 0
|
||||
%define with_storage_rbd 0
|
||||
%endif
|
||||
%define with_numactl 0%{!?_without_numactl:%{server_drivers}}
|
||||
%define with_selinux 0%{!?_without_selinux:%{server_drivers}}
|
||||
%if 0%{?fedora} >= 17
|
||||
%define with_storage_sheepdog 0%{!?_without_storage_sheepdog:%{server_drivers}}
|
||||
%else
|
||||
%define with_storage_sheepdog 0
|
||||
%endif
|
||||
%define with_numactl 0%{!?_without_numactl:%{server_drivers}}
|
||||
%define with_selinux 0%{!?_without_selinux:%{server_drivers}}
|
||||
|
||||
# A few optional bits off by default, we enable later
|
||||
%define with_polkit 0%{!?_without_polkit:0}
|
||||
@@ -224,6 +229,7 @@
|
||||
%define with_storage_iscsi 0
|
||||
%define with_storage_mpath 0
|
||||
%define with_storage_rbd 0
|
||||
%define with_storage_sheepdog 0
|
||||
%define with_storage_disk 0
|
||||
%endif
|
||||
|
||||
@@ -603,6 +609,10 @@ Requires: device-mapper
|
||||
# For RBD support
|
||||
Requires: ceph
|
||||
%endif
|
||||
%if %{with_storage_sheepdog}
|
||||
# For Sheepdog support
|
||||
Requires: sheepdog
|
||||
%endif
|
||||
%if %{with_cgconfig}
|
||||
Requires: libcgroup
|
||||
%endif
|
||||
@@ -1080,6 +1090,10 @@ of recent versions of Linux (and other OSes).
|
||||
%define _without_storage_rbd --without-storage-rbd
|
||||
%endif
|
||||
|
||||
%if ! %{with_storage_sheepdog}
|
||||
%define _without_storage_sheepdog --without-storage-sheepdog
|
||||
%endif
|
||||
|
||||
%if ! %{with_numactl}
|
||||
%define _without_numactl --without-numactl
|
||||
%endif
|
||||
@@ -1178,6 +1192,7 @@ autoreconf -if
|
||||
%{?_without_storage_disk} \
|
||||
%{?_without_storage_mpath} \
|
||||
%{?_without_storage_rbd} \
|
||||
%{?_without_storage_sheepdog} \
|
||||
%{?_without_numactl} \
|
||||
%{?_without_numad} \
|
||||
%{?_without_capng} \
|
||||
|
||||
Reference in New Issue
Block a user