mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
storage: optional 'refresh' elemement on pool
The new 'refresh' element can override the default refresh operations
for a storage pool. The only currently supported override is to set
the volume allocation size to the volume capacity. This can be specified
by adding the following snippet:
<pool>
...
<refresh>
<volume allocation='capacity'/>
</refresh>
...
</pool>
This is useful for certain backends where computing the actual allocation
of a volume might be an expensive operation.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
committed by
Michal Privoznik
parent
21deeaf02f
commit
669018bc9c
@@ -0,0 +1,15 @@
|
||||
<pool type='rbd'>
|
||||
<name>ceph</name>
|
||||
<uuid>47c1faee-0207-e741-f5ae-d9b019b98fe2</uuid>
|
||||
<source>
|
||||
<name>rbd</name>
|
||||
<host name='localhost' port='6789'/>
|
||||
<host name='localhost' port='6790'/>
|
||||
<auth username='admin' type='ceph'>
|
||||
<secret uuid='2ec115d7-3a88-3ceb-bc12-0ac909a6fd87'/>
|
||||
</auth>
|
||||
</source>
|
||||
<refresh>
|
||||
<volume allocation='capacity'/>
|
||||
</refresh>
|
||||
</pool>
|
||||
@@ -0,0 +1,18 @@
|
||||
<pool type='rbd'>
|
||||
<name>ceph</name>
|
||||
<uuid>47c1faee-0207-e741-f5ae-d9b019b98fe2</uuid>
|
||||
<capacity unit='bytes'>0</capacity>
|
||||
<allocation unit='bytes'>0</allocation>
|
||||
<available unit='bytes'>0</available>
|
||||
<source>
|
||||
<host name='localhost' port='6789'/>
|
||||
<host name='localhost' port='6790'/>
|
||||
<name>rbd</name>
|
||||
<auth type='ceph' username='admin'>
|
||||
<secret uuid='2ec115d7-3a88-3ceb-bc12-0ac909a6fd87'/>
|
||||
</auth>
|
||||
</source>
|
||||
<refresh>
|
||||
<volume allocation='capacity'/>
|
||||
</refresh>
|
||||
</pool>
|
||||
@@ -95,6 +95,7 @@ mymain(void)
|
||||
DO_TEST("pool-zfs-sourcedev");
|
||||
DO_TEST("pool-rbd");
|
||||
#ifdef WITH_STORAGE_RBD
|
||||
DO_TEST("pool-rbd-refresh-volume-allocation");
|
||||
DO_TEST("pool-rbd-ns-configopts");
|
||||
#endif
|
||||
DO_TEST("pool-vstorage");
|
||||
|
||||
Reference in New Issue
Block a user