1Sys::Virt::StoragePool(U3s)er Contributed Perl DocumentatSiyosn::Virt::StoragePool(3)
2
3
4

NAME

6       Sys::Virt::StoragePool - Represent & manage a libvirt storage pool
7

DESCRIPTION

9       The "Sys::Virt::StoragePool" module represents a storage pool managed
10       by libvirt. There are a variety of storage pool implementations for
11       LVM, Local directories/filesystems, network filesystems, disk
12       partitioning, iSCSI, and SCSI.
13

METHODS

15       my $uuid = $pool->get_uuid()
16           Returns a 16 byte long string containing the raw globally unique
17           identifier (UUID) for the storage pool.
18
19       my $uuid = $pool->get_uuid_string()
20           Returns a printable string representation of the raw UUID, in the
21           format 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'.
22
23       my $name = $pool->get_name()
24           Returns a string with a locally unique name of the storage pool
25
26       $pool->is_active()
27           Returns a true value if the storage pool is currently running
28
29       $pool->is_persistent()
30           Returns a true value if the storage pool has a persistent
31           configuration file defined
32
33       my $xml = $pool->get_xml_description()
34           Returns an XML document containing a complete description of the
35           storage pool's configuration
36
37       $pool->create()
38           Start a storage pool whose configuration was previously defined
39           using the "define_storage_pool" method in Sys::Virt.
40
41       $pool->undefine()
42           Remove the configuration associated with a storage pool previously
43           defined with the "define_storage pool" method in Sys::Virt. If the
44           storage pool is running, you probably want to use the "shutdown" or
45           "destroy" methods instead.
46
47       $pool->destroy()
48           Immediately terminate the machine, and remove it from the virtual
49           machine monitor. The $pool handle is invalid after this call
50           completes and should not be used again.
51
52       $flag = $pool->get_autostart();
53           Return a true value if the storage pool is configured to
54           automatically start upon boot. Return false, otherwise
55
56       $pool->set_autostart($flag)
57           Set the state of the autostart flag, which determines whether the
58           storage pool will automatically start upon boot of the host OS
59
60       $pool->refresh([$flags]);
61           Refresh the storage pool state. Typically this will rescan the list
62           of storage volumes. The $flags parameter is currently unused and if
63           omitted defaults to zero.
64
65       $pool->build([$flags]);
66           Construct the storage pool if it does not exist. As an example, for
67           a disk based storage pool this would ensure a partition table
68           exists.  The $flags parameter allows control over the build
69           operation and if omitted defaults to zero.
70
71       $pool->delete([$flags]);
72           Delete the storage pool. The $flags parameter allows the data to be
73           optionally wiped during delete and if omitted defaults to zero.
74
75       $info = $pool->get_info()
76           Retrieve information about the current storage pool state. The
77           returned hash reference has the following keys
78
79           state
80               The current status of the storage pool. See constants later.
81
82           capacity
83               The total logical size of the storage pool
84
85           allocation
86               The current physical allocation of the storage pool
87
88           available
89               The available space for creation of new volumes. This may be
90               less than the difference between capacity & allocation if there
91               are sizing / metadata constraints for volumes
92
93       my $nnames = $pool->num_of_storage_volumes()
94           Return the number of running volumes in this storage pool. The
95           value can be used as the "maxnames" parameter to
96           "list_storage_vol_names".
97
98       my @volNames = $pool->list_storage_vol_names($maxnames)
99           Return a list of all volume names in this storage pool. The names
100           can be used with the "get_volume_by_name" method.
101
102       my @vols = $pool->list_volumes()
103           Return a list of all volumes in the storage pool.  The elements in
104           the returned list are instances of the Sys::Virt::StorageVol class.
105           This method requires O(n) RPC calls, so the "list_all_volumes"
106           method is recommended as a more efficient alternative.
107
108       my @volumes = $pool->list_all_volumes($flags)
109           Return a list of all storage volumes associated with this pool.
110           The elements in the returned list are instances of the
111           Sys::Virt::StorageVol class. The $flags parameter can be used to
112           filter the list of return storage volumes.
113
114       my $vol = $pool->get_volume_by_name($name)
115           Return the volume with a name of $name. The returned object is an
116           instance of the Sys::Virt::StorageVol class.
117
118       my $vol = $pool->create_volume($xml)
119           Create a new volume based on the XML description passed into the
120           $xml parameter. The returned object is an instance of the
121           Sys::Virt::StorageVol class. If the optional "clonevol" is
122           provided, data will be copied from that source volume
123
124       my $vol = $pool->clone_volume($xml, $clonevol);
125           Create a new volume based on the XML description passed into the
126           $xml parameter. The returned object is an instance of the
127           Sys::Virt::StorageVol class. The new volume will be populated with
128           data from the specified clone source volume.
129

CONSTANTS

131       The following sets of constants may be useful in dealing with some of
132       the methods in this package
133
134   POOL STATES
135       The following constants are useful for interpreting the "state" key
136       value in the hash returned by "get_info"
137
138       Sys::Virt::StoragePool::STATE_INACTIVE
139           The storage pool is not currently active
140
141       Sys::Virt::StoragePool::STATE_BUILDING
142           The storage pool is still being constructed and is not ready for
143           use yet.
144
145       Sys::Virt::StoragePool::STATE_RUNNING
146           The storage pool is running and can be queried for volumes
147
148       Sys::Virt::StoragePool::STATE_DEGRADED
149           The storage pool is running, but its operation is degraded due to a
150           failure.
151
152       Sys::Virt::StoragePool::STATE_INACCESSIBLE
153           The storage pool is not currently accessible
154
155   DELETION MODES
156       Sys::Virt::StoragePool::DELETE_NORMAL
157           Delete the pool without any attempt to scrub data
158
159       Sys::Virt::StoragePool::DELETE_ZEROED
160           Fill the allocated storage with zeros when deleting
161
162   BUILD MODES
163       Sys::Virt::StoragePool::BUILD_NEW
164           Construct a new storage pool from constituent bits
165
166       Sys::Virt::StoragePool::BUILD_RESIZE
167           Resize an existing built storage pool preserving data where
168           appropriate
169
170       Sys::Virt::StoragePool::BUILD_REPAIR
171           Repair an existing storage pool operating in degraded mode
172
173       Sys::Virt::StoragePool::BUILD_NO_OVERWRITE
174           Do not overwrite existing storage pool data
175
176       Sys::Virt::StoragePool::BUILD_OVERWRITE
177           Overwrite existing storage pool data
178
179   XML DOCUMENTS
180       The following constants are useful when requesting XML for storage
181       pools
182
183       Sys::Virt::StoragePool::XML_INACTIVE
184           Return XML describing the inactive state of the storage pool.
185

LIST FILTERING

187       The following constants are used to filter object lists
188
189       Sys::Virt::StoragePool::LIST_ACTIVE
190           Include storage pools which are active
191
192       Sys::Virt::StoragePool::LIST_INACTIVE
193           Include storage pools which are inactive
194
195       Sys::Virt::StoragePool::LIST_AUTOSTART
196           Include storage pools which are marked for autostart
197
198       Sys::Virt::StoragePool::LIST_NO_AUTOSTART
199           Include storage pools which are not marked for autostart
200
201       Sys::Virt::StoragePool::LIST_PERSISTENT
202           Include storage pools which are persistent
203
204       Sys::Virt::StoragePool::LIST_TRANSIENT
205           Include storage pools which are transient
206
207       Sys::Virt::StoragePool::LIST_DIR
208           Include directory storage pools
209
210       Sys::Virt::StoragePool::LIST_DISK
211           Include disk storage pools
212
213       Sys::Virt::StoragePool::LIST_FS
214           Include filesytem storage pools
215
216       Sys::Virt::StoragePool::LIST_ISCSI
217           Include iSCSI storage pools
218
219       Sys::Virt::StoragePool::LIST_LOGICAL
220           Include LVM storage pools
221
222       Sys::Virt::StoragePool::LIST_MPATH
223           Include multipath storage pools
224
225       Sys::Virt::StoragePool::LIST_NETFS
226           Include network filesystem storage pools
227
228       Sys::Virt::StoragePool::LIST_RBD
229           Include RBD storage pools
230
231       Sys::Virt::StoragePool::LIST_SCSI
232           Include SCSI storage pools
233
234       Sys::Virt::StoragePool::LIST_SHEEPDOG
235           Include sheepdog storage pools
236

AUTHORS

238       Daniel P. Berrange <berrange@redhat.com>
239
241       Copyright (C) 2006-2009 Red Hat Copyright (C) 2006-2009 Daniel P.
242       Berrange
243

LICENSE

245       This program is free software; you can redistribute it and/or modify it
246       under the terms of either the GNU General Public License as published
247       by the Free Software Foundation (either version 2 of the License, or at
248       your option any later version), or, the Artistic License, as specified
249       in the Perl README file.
250

SEE ALSO

252       Sys::Virt, Sys::Virt::Error, "http://libvirt.org"
253
254
255
256perl v5.10.1                      2015-07-23         Sys::Virt::StoragePool(3)
Impressum