mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
storage: ZFS support
Implement ZFS storage backend driver. Currently supported
only on FreeBSD because of ZFS limitations on Linux.
Features supported:
- pool-start, pool-stop
- pool-info
- vol-list
- vol-create / vol-delete
Pool definition looks like that:
<pool type='zfs'>
<name>myzfspool</name>
<source>
<name>actualpoolname</name>
</source>
</pool>
The 'actualpoolname' value is a name of the pool on the system,
such as shown by 'zpool list' command. Target makes no sense
here because volumes path is always /dev/zvol/$poolname/$volname.
User has to create a pool on his own, this driver doesn't
support pool creation currently.
A volume could be used with Qemu by adding an entry like this:
<disk type='volume' device='disk'>
<driver name='qemu' type='raw'/>
<source pool='myzfspool' volume='vol5'/>
<target dev='hdc' bus='ide'/>
</disk>
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
<ref name='poolrbd'/>
|
||||
<ref name='poolsheepdog'/>
|
||||
<ref name='poolgluster'/>
|
||||
<ref name='poolzfs'/>
|
||||
</choice>
|
||||
</element>
|
||||
</define>
|
||||
@@ -157,6 +158,17 @@
|
||||
</interleave>
|
||||
</define>
|
||||
|
||||
<define name='poolzfs'>
|
||||
<attribute name='type'>
|
||||
<value>zfs</value>
|
||||
</attribute>
|
||||
<interleave>
|
||||
<ref name='commonmetadata'/>
|
||||
<ref name='sizing'/>
|
||||
<ref name='sourcezfs'/>
|
||||
</interleave>
|
||||
</define>
|
||||
|
||||
<define name='sourceinfovendor'>
|
||||
<interleave>
|
||||
<optional>
|
||||
@@ -370,6 +382,14 @@
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name='sourcezfs'>
|
||||
<element name='source'>
|
||||
<interleave>
|
||||
<ref name='sourceinfoname'/>
|
||||
</interleave>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
<define name='sourcefmtfs'>
|
||||
<optional>
|
||||
<element name='format'>
|
||||
|
||||
@@ -117,6 +117,9 @@
|
||||
<li>
|
||||
<a href="#StorageBackendGluster">Gluster backend</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#StorageBackendZFS">ZFS backend</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h2><a name="StorageBackendDir">Directory pool</a></h2>
|
||||
@@ -743,5 +746,36 @@
|
||||
pool type.
|
||||
</p>
|
||||
|
||||
<h2><a name="StorageBackendZFS">ZFS pools</a></h2>
|
||||
<p>
|
||||
This provides a pool based on the ZFS filesystem. It is currently
|
||||
supported on FreeBSD only.
|
||||
|
||||
A pool has to be created before libvirt could start using it. That
|
||||
could be done using <code>zpool create</code> command. Please refer to
|
||||
the ZFS documentation for details on a pool creation.
|
||||
|
||||
<span class="since">Since 1.2.8</span>
|
||||
</p>
|
||||
|
||||
<h3>Example pool input</h3>
|
||||
<pre>
|
||||
<pool type="zfs">
|
||||
<name>myzfspool</name>
|
||||
<source>
|
||||
<name>zpoolname</name>
|
||||
</source>
|
||||
</pool></pre>
|
||||
|
||||
<h3>Valid pool format types</h3>
|
||||
<p>
|
||||
The ZFS volume pool does not use the pool format type element.
|
||||
</p>
|
||||
|
||||
<h3>Valid pool format types</h3>
|
||||
<p>
|
||||
The ZFS volume pool does not use the volume format type element.
|
||||
</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user