1Sys::Virt::StorageVol(3U)ser Contributed Perl DocumentatiSoyns::Virt::StorageVol(3)
2
3
4

NAME

6       Sys::Virt::StorageVol - Represent & manage a libvirt storage volume
7

DESCRIPTION

9       The "Sys::Virt::StorageVol" module represents a storage volume managed
10       by libvirt. A storage volume is always associated with a containing
11       storage pool ("Sys::Virt::StoragePool").
12

METHODS

14       my $name = $vol->get_name()
15           Returns a string with a locally unique name of the storage vol
16
17       my $name = $vol->get_key()
18           Returns a string with a globally unique key for the storage vol
19
20       my $name = $vol->get_path()
21           Returns a string with a locally unique file path of the storage vol
22
23       my $xml = $vol->get_xml_description()
24           Returns an XML document containing a complete description of the
25           storage vol's configuration
26
27       $vol->delete($flags)
28           Immediately delete the storage volume freeing its storage
29           resources.  The "flags" parameter indicates any special action to
30           be taken when deleting the volume.
31
32       $vol->resize($newcapacity, $flags=0)
33           Adjust the size of the storage volume. The $newcapacity value
34           semantics depend on the $flags parameter. If $flags specifies
35           "RESIZE_DELTA" then the $newcapacity is relative to the current
36           size. If $flags specifies "RESIZE_SHRINK" then the $newcapacity
37           value is the amount of space to remove
38
39       $vol->wipe($flags = 0)
40           Clear the data in the storage volume to avoid future information
41           leak. The "flags" parameter is currently unused and defaults to
42           zero.
43
44       $vol->wipe_pattern($algorithm, $flags = 0)
45           Clear the data in the storage volume to avoid future information
46           leak. The $algorithm parameter specifies the data pattern used to
47           erase data, and should be one of the WIPE ALGORITHM CONSTANTS
48           listed later. The "flags" parameter is currently unused and
49           defaults to zero.
50
51       my $info = $vol->get_info()
52           Retrieve live information about the storage volume. The returned
53           $info hash reference contains three keys. "type" indicates whether
54           the volume is a file or block device. "capacity" provides the
55           maximum logical size of the volume. "allocation" provides the
56           current physical usage of the volume. The allocation may be less
57           than the capacity for sparse, or grow-on-demand volumes. The
58           allocation may also be larger than the capacity, if there is a
59           metadata overhead for the volume format.
60
61       $vol->download($st, $offset, $length);
62           Download data from $vol using the stream $st. If $offset and
63           $length are non-zero, then restrict data to the specified volume
64           byte range.
65
66       $vol->upload($st, $offset, $length);
67           Upload data to $vol using the stream $st. If $offset and $length
68           are non-zero, then restrict data to the specified volume byte
69           range.
70

CONSTANTS

72       The following sets of constants are useful when dealing with storage
73       volumes
74
75   VOLUME TYPES
76       The following constants are useful for interpreting the "type" field in
77       the hash returned by the "get_info" method
78
79       Sys::Virt::StorageVol::TYPE_FILE
80           The volume is a plain file
81
82       Sys::Virt::StorageVol::TYPE_BLOCK
83           The volume is a block device
84
85       Sys::Virt::StorageVol::TYPE_DIR
86           The volume is a directory
87
88       Sys::Virt::StorageVol::TYPE_NETWORK
89           The volume is a network source
90
91   DELETE MODES
92       The following constants are useful for the "flags" parameter of the
93       "delete" method
94
95       Sys::Virt::StorageVol::DELETE_NORMAL
96           Do a plain delete without any attempt to scrub data.
97
98       Sys::Virt::StorageVol::DELETE_ZEROED
99           Zero out current allocated blocks when deleteing the volume
100
101   WIPE ALGORITHM CONSTANTS
102       The following constants specify the algorithm for erasing data
103
104       Sys::Virt::StorageVol::WIPE_ALG_BSI
105           9-pass method recommended by the German Center of Security in
106           Information Technologies
107
108       Sys::Virt::StorageVol::WIPE_ALG_DOD
109           4-pass Dod 5220.22-M section, 8-306 procedure
110
111       Sys::Virt::StorageVol::WIPE_ALG_GUTMANN
112           The canonical 35-pass sequence
113
114       Sys::Virt::StorageVol::WIPE_ALG_NNSA
115           4-pass NNSA Policy Letter NAP-14.1-C (XVI-8)
116
117       Sys::Virt::StorageVol::WIPE_ALG_PFITZNER7
118           7-pass random
119
120       Sys::Virt::StorageVol::WIPE_ALG_PFITZNER33
121           33-pass random
122
123       Sys::Virt::StorageVol::WIPE_ALG_RANDOM
124           1-pass random
125
126       Sys::Virt::StorageVol::WIPE_ALG_SCHNEIER
127           7-pass method described by Bruce Schneier in "Applied Cryptography"
128           (1996)
129
130       Sys::Virt::StorageVol::WIPE_ALG_ZERO
131           1-pass, all zeroes
132
133       VOLUME RESIZE CONSTANTS
134
135       The following constants control how storage volumes can be resized
136
137       Sys::Virt::StorageVol::RESIZE_ALLOCATE
138           Fully allocate the extra space required during resize
139
140       Sys::Virt::StorageVol::RESIZE_DELTA
141           Treat the new capacity as a delta to the current capacity
142
143       Sys::Virt::StorageVol::RESIZE_SHRINK
144           Treat the new capacity as an amount to remove from the capacity
145

AUTHORS

147       Daniel P. Berrange <berrange@redhat.com>
148
150       Copyright (C) 2006-2009 Red Hat Copyright (C) 2006-2009 Daniel P.
151       Berrange
152

LICENSE

154       This program is free software; you can redistribute it and/or modify it
155       under the terms of either the GNU General Public License as published
156       by the Free Software Foundation (either version 2 of the License, or at
157       your option any later version), or, the Artistic License, as specified
158       in the Perl README file.
159

SEE ALSO

161       Sys::Virt, Sys::Virt::Error, "http://libvirt.org"
162
163
164
165perl v5.10.1                      2012-09-26          Sys::Virt::StorageVol(3)
Impressum