1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348
|
.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
. ds -- \(*W-
. ds PI pi
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
. ds L" ""
. ds R" ""
. ds C` ""
. ds C' ""
'br\}
.el\{\
. ds -- \|\(em\|
. ds PI \(*p
. ds L" ``
. ds R" ''
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.ie \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. nr % 0
. rr F
.\}
.el \{\
. de IX
..
.\}
.\" ========================================================================
.\"
.IX Title "virt-sparsify 1"
.TH virt-sparsify 1 "2012-06-01" "libguestfs-1.18.1" "Virtualization Support"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "НАЗВА"
.IX Header "НАЗВА"
virt-sparsify \- Make a virtual machine disk sparse
.SH "КОРОТКИЙ ОПИС"
.IX Header "КОРОТКИЙ ОПИС"
.Vb 1
\& virt\-sparsify [\-\-options] indisk outdisk
.Ve
.SH "ОПИС"
.IX Header "ОПИС"
Virt-sparsify is a tool which can make a virtual machine disk (or any disk
image) sparse a.k.a. thin-provisioned. This means that free space within
the disk image can be converted back to free space on the host.
.PP
Virt-sparsify can locate and sparsify free space in most filesystems
(eg. ext2/3/4, btrfs, \s-1NTFS\s0, etc.), and also in \s-1LVM\s0 physical volumes.
.PP
Virt-sparsify can also convert between some disk formats, for example
converting a raw disk image to a thin-provisioned qcow2 image.
.PP
Virt-sparsify can operate on any disk image, not just ones from virtual
machines. If a virtual machine has more than one attached disk, you must
sparsify each one separately.
.SS "ВАЖЛИВІ ОБМЕЖЕННЯ"
.IX Subsection "ВАЖЛИВІ ОБМЕЖЕННЯ"
.IP "\(bu" 4
Virt-sparsify does not do in-place modifications. It copies from a source
image to a destination image, leaving the source unchanged. \fICheck that
the sparsification was successful before deleting the source image\fR.
.IP "\(bu" 4
The virtual machine \fImust be shut down\fR before using this tool.
.IP "\(bu" 4
Virt-sparsify may require up to 2x the virtual size of the source disk image
(1 temporary copy + 1 destination image). This is in the worst case and
usually much less space is required.
.IP "\(bu" 4
Virt-sparsify cannot resize disk images. To do that, use \fIvirt\-resize\fR\|(1).
.IP "\(bu" 4
Virt-sparsify cannot handle encrypted disks. Libguestfs supports encrypted
disks, but encrypted disks themselves cannot be sparsified.
.IP "\(bu" 4
Virt-sparsify cannot yet sparsify the space between partitions. Note that
this space is often used for critical items like bootloaders so it's not
really unused.
.PP
You may also want to read the manual pages for the associated tools
\&\fIvirt\-filesystems\fR\|(1) and \fIvirt\-df\fR\|(1) before starting.
.SH "ПРИКЛАДИ"
.IX Header "ПРИКЛАДИ"
Типовий приклад використання:
.PP
.Vb 1
\& virt\-sparsify indisk outdisk
.Ve
.PP
which copies \f(CW\*(C`indisk\*(C'\fR to \f(CW\*(C`outdisk\*(C'\fR, making the output sparse. \f(CW\*(C`outdisk\*(C'\fR
is created, or overwritten if it already exists. The format of the input
disk is detected (eg. qcow2) and the same format is used for the output
disk.
.PP
To convert between formats, use the \fI\-\-convert\fR option:
.PP
.Vb 1
\& virt\-sparsify disk.raw \-\-convert qcow2 disk.qcow2
.Ve
.PP
Virt-sparsify tries to zero and sparsify free space on every filesystem it
can find within the source disk image. You can get it to ignore (don't zero
free space on) certain filesystems by doing:
.PP
.Vb 1
\& virt\-sparsify \-\-ignore /dev/sda1 indisk outdisk
.Ve
.PP
See \fIvirt\-filesystems\fR\|(1) to get a list of filesystems within a disk image.
.SH "ПАРАМЕТРИ"
.IX Header "ПАРАМЕТРИ"
.IP "\fB\-\-help\fR" 4
.IX Item "--help"
Показати довідкове повідомлення.
.IP "\fB\-\-compress\fR" 4
.IX Item "--compress"
Compress the output file. This \fIonly\fR works if the output format is
\&\f(CW\*(C`qcow2\*(C'\fR.
.IP "\fB\-\-convert\fR raw" 4
.IX Item "--convert raw"
.PD 0
.IP "\fB\-\-convert\fR qcow2" 4
.IX Item "--convert qcow2"
.IP "\fB\-\-convert\fR [other formats]" 4
.IX Item "--convert [other formats]"
.PD
Use \f(CW\*(C`output\-format\*(C'\fR as the format for the destination image. If this is
not specified, then the input format is used.
.Sp
Supported and known-working output formats are: \f(CW\*(C`raw\*(C'\fR, \f(CW\*(C`qcow2\*(C'\fR, \f(CW\*(C`vdi\*(C'\fR.
.Sp
You can also use any format supported by the \fIqemu\-img\fR\|(1) program,
eg. \f(CW\*(C`vmdk\*(C'\fR, but support for other formats is reliant on qemu.
.Sp
Specifying the \fI\-\-convert\fR option is usually a good idea, because then
virt-sparsify doesn't need to try to guess the input format.
.Sp
For fine-tuning the output format, see: \fI\-\-compress\fR, \fI\-o\fR.
.IP "\fB\-\-debug\-gc\fR" 4
.IX Item "--debug-gc"
Debug garbage collection and memory allocation. This is only useful when
debugging memory problems in virt-sparsify or the OCaml libguestfs bindings.
.IP "\fB\-\-format\fR raw" 4
.IX Item "--format raw"
.PD 0
.IP "\fB\-\-format\fR qcow2" 4
.IX Item "--format qcow2"
.PD
Specify the format of the input disk image. If this flag is not given then
it is auto-detected from the image itself.
.Sp
If working with untrusted raw-format guest disk images, you should ensure
the format is always specified.
.IP "\fB\-\-ignore\fR файлова_система" 4
.IX Item "--ignore файлова_система"
.PD 0
.IP "\fB\-\-ignore\fR група_томів" 4
.IX Item "--ignore група_томів"
.PD
Ignore the named filesystem. Free space on the filesystem will not be
zeroed, but existing blocks of zeroes will still be sparsified.
.Sp
In the second form, this ignores the named volume group. Use the volume
group name without the \f(CW\*(C`/dev/\*(C'\fR prefix, eg. \fI\-\-ignore vg_foo\fR
.Sp
Цей параметр можна вказувати декілька разів.
.IP "\fB\-\-machine\-readable\fR" 4
.IX Item "--machine-readable"
This option is used to make the output more machine friendly when being
parsed by other programs. See \*(L"\s-1MACHINE\s0 \s-1READABLE\s0 \s-1OUTPUT\s0\*(R" below.
.IP "\fB\-o\fR параметр[,параметр,...]" 4
.IX Item "-o параметр[,параметр,...]"
Pass \fI\-o\fR option(s) to the \fIqemu\-img\fR\|(1) command to fine-tune the output
format. Options available depend on the output format (see \fI\-\-convert\fR)
and the installed version of the qemu-img program.
.Sp
You should use \fI\-o\fR at most once. To pass multiple options, separate them
with commas, eg:
.Sp
.Vb 2
\& virt\-sparsify \-\-convert qcow2 \e
\& \-o cluster_size=512,preallocation=metadata ...
.Ve
.IP "\fB\-q\fR" 4
.IX Item "-q"
.PD 0
.IP "\fB\-\-quiet\fR" 4
.IX Item "--quiet"
.PD
This disables progress bars and other unnecessary output.
.IP "\fB\-v\fR" 4
.IX Item "-v"
.PD 0
.IP "\fB\-\-verbose\fR" 4
.IX Item "--verbose"
.PD
Увімкнути докладний показ повідомлень з метою діагностики.
.IP "\fB\-V\fR" 4
.IX Item "-V"
.PD 0
.IP "\fB\-\-version\fR" 4
.IX Item "--version"
.PD
Показати дані щодо версії і завершити роботу.
.IP "\fB\-x\fR" 4
.IX Item "-x"
Увімкнути трасування викликів програмного інтерфейсу libguestfs.
.IP "\fB\-\-zero\fR розділ" 4
.IX Item "--zero розділ"
.PD 0
.IP "\fB\-\-zero\fR логічний_том" 4
.IX Item "--zero логічний_том"
.PD
Zero the contents of the named partition or logical volume in the guest.
All data on the device is lost, but sparsification is excellent! You can
give this option multiple times.
.SH "MACHINE READABLE OUTPUT"
.IX Header "MACHINE READABLE OUTPUT"
The \fI\-\-machine\-readable\fR option can be used to make the output more machine
friendly, which is useful when calling virt-sparsify from other programs,
GUIs etc.
.PP
Існує два способи використання цього параметра.
.PP
Firstly use the option on its own to query the capabilities of the
virt-sparsify binary. Typical output looks like this:
.PP
.Vb 4
\& $ virt\-sparsify \-\-machine\-readable
\& virt\-sparsify
\& ntfs
\& btrfs
.Ve
.PP
A list of features is printed, one per line, and the program exits with
status 0.
.PP
Secondly use the option in conjunction with other options to make the
regular program output more machine friendly.
.PP
У поточній версії це означає таке:
.IP "1." 4
Progress bar messages can be parsed from stdout by looking for this regular
expression:
.Sp
.Vb 1
\& ^[0\-9]+/[0\-9]+$
.Ve
.IP "2." 4
The calling program should treat messages sent to stdout (except for
progress bar messages) as status messages. They can be logged and/or
displayed to the user.
.IP "3." 4
The calling program should treat messages sent to stderr as error messages.
In addition, virt-sparsify exits with a non-zero status code if there was a
fatal error.
.PP
All versions of virt-sparsify have supported the \fI\-\-machine\-readable\fR
option.
.SH "СТАН ВИХОДУ"
.IX Header "СТАН ВИХОДУ"
Ця програма повертає значення 0 у разі успішного завершення і ненульове
значення, якщо сталася помилка.
.SH "ЗМІННІ СЕРЕДОВИЩА"
.IX Header "ЗМІННІ СЕРЕДОВИЩА"
.IP "\s-1TMPDIR\s0" 4
.IX Item "TMPDIR"
Location of the temporary directory used for the potentially large temporary
overlay file.
.Sp
You should ensure there is enough free space in the worst case for a full
copy of the source disk (\fIvirtual\fR size), or else set \f(CW$TMPDIR\fR to point
to another directory that has enough space.
.Sp
Типовим значенням є \f(CW\*(C`/tmp\*(C'\fR.
.Sp
Note that if \f(CW$TMPDIR\fR is a tmpfs (eg. if \f(CW\*(C`/tmp\*(C'\fR is on tmpfs, or if you
use \f(CW\*(C`TMPDIR=/dev/shm\*(C'\fR), tmpfs defaults to a maximum size of \fIhalf\fR of
physical \s-1RAM\s0. If virt-sparsify exceeds this, it will hang. The solution is
either to use a real disk, or to increase the maximum size of the tmpfs
mountpoint, eg:
.Sp
.Vb 1
\& mount \-o remount,size=10G /tmp
.Ve
.PP
Опис інших змінних середовища наведено у розділі \*(L"\s-1ENVIRONMENT\s0
\&\s-1VARIABLES\s0\*(R" in \fIguestfs\fR\|(3).
.SH "ТАКОЖ ПЕРЕГЛЯНЬТЕ"
.IX Header "ТАКОЖ ПЕРЕГЛЯНЬТЕ"
\&\fIvirt\-filesystems\fR\|(1), \fIvirt\-df\fR\|(1), \fIvirt\-resize\fR\|(1), \fIvirt\-rescue\fR\|(1),
\&\fIguestfs\fR\|(3), \fIguestfish\fR\|(1), \fItruncate\fR\|(1), \fIfallocate\fR\|(1),
\&\fIqemu\-img\fR\|(1), <http://libguestfs.org/>.
.SH "АВТОР"
.IX Header "АВТОР"
Richard W.M. Jones <http://people.redhat.com/~rjones/>
.SH "АВТОРСЬКІ ПРАВА"
.IX Header "АВТОРСЬКІ ПРАВА"
© Red Hat Inc., 2011
.PP
Ця програма є вільним програмним забезпеченням; ви можете поширювати та/або
змінювати її за умов дотримання \s-1GNU\s0 General Public License утому вигляді,
що оприлюднений Free Software Foundation; версії 2 цієї Ліцензії, або (якщо
забажаєте) будь\-якої випущеної пізніше.
.PP
Ця програма поширюється у сподіванні, що вона буде корисною, але БЕЗ
БУДЬ\-ЯКИХ ГАРАНТІЙНИХ ЗОБОВ’ЯЗАНЬ; навіть без очевидної гарантії
ПРАЦЕЗДАТНОСТІ або ПРИДАТНОСТІ ДЛЯ ВИКОРИСТАННЯ З ПЕВНОЮ МЕТОЮ. Докладніше
про це можна дізнатися з \s-1GNU\s0 General Public License.
.PP
Ви маєте отримати копію \s-1GNU\s0 General Public License разом з цією програмою;
якщо це не так, повідомте про факт за адресою Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, \s-1MA\s0 02110\-1301, \s-1USA\s0.
|