<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<b>1. Feature</b><br>
<div class="moz-forward-container">
<div class="moz-forward-container"><b> <br>
</b>prl_disk_tool for Virtuozzo 7<br>
<br>
<b>2. Description<br>
</b><br>
the package prl-disk-tool (binary /usr/sbin/prl_disk_tool)<br>
is used to manage virtual machine and container disk images<br>
can perform the following operations:<br>
<ol>
<li><i>resize</i><i> --size ...: </i>Resize image (in-place)<br>
</li>
<li><i>resize --size ... --resize_partition </i>: Resize
image and last partition to fit (copying)</li>
<li><i>resize --info </i>: Display resize estimates (current
size, minimum size, minimum size w/o resizing last
partition) - <b>VM only</b><br>
</li>
<li><i>compact </i>: Compact image to occupy less space on
host disk. (in-place)<br>
</li>
<li><i>compact --info </i>: Display compact estimates (block
count, allocated, used) - <b>VM only</b><br>
</li>
<li><i>merge </i>: Merge internal snapshots of image
(in-place) - <b>VM only</b></li>
<li><i>merge --external </i>: Merge external snapshot of
image (in-place) - <b>VM only</b></li>
<li><i>convert [--plain | --expanding] </i>: Convert image
between plain and expanding modes (copying) - <b>VM only</b></li>
</ol>
<p>prl_disk_tool uses libguestfs, qemu-img to work. </p>
<p> </p>
The user has to install additional packages to use part of
functionality:<br>
<br>
prl-disk-tool resize --info (last partition: btrfs) ->
btrfs-progs >= 4.2 (already in repo)<br>
prl-disk-tool resize {--info,--resize_partition} (last
partition: ntfs) -> libguestfs-winsupport (already in repo)<br>
prl-disk-tool compact {--info,} (exists partition with ntfs)
-> libguestfs-winsupport <br>
<br>
prl_disk_tool locks an image passed as argument by flock(). So
only multiple reads (compact|resize --info) OR a single write
(others) are allowed.<br>
<br>
FS-aware functions (resize --resize_partition|--info, compact
[--info]) work for ext2/ext3/ext4/ntfs/btrfs/xfs.<br>
<br>
prl_disk_tool uses qemu-img to perform fs-unaware operations. It
is more powerful than qemu-img due to fs-aware operations
performed with libguestfs. The main purpose of prl_disk_tool is
to automate some frequent operations.<br>
<br>
<b>3. Products<br>
<br>
</b>Virtuozzo 7 beta2<br>
<br>
Packages:<b><br>
</b>
<ul>
<li>prl-disk-tool >= 7.0.5</li>
<li>libguestfs >= 1.28.1-1.18</li>
<li> btrfs-progs >= 4.2 (optional)<br>
</li>
<li>libguestfs-winsupport >= 7.2.1 (optional)<br>
</li>
<li>libguestfs-xfs (in dependencies)<br>
</li>
<li>qemu-img >= 1.5.3-86</li>
</ul>
<b>4. Testing<br>
<br>
</b>Need to test the following cases:<br>
<ul>
<li>All functions work for qcow2 images.</li>
<li>Functions not tagged as <b>VM only </b>work for ploop
images.</li>
<li>FS-aware functions (resize --resize_partition|--info,
compact [--info]) work for ext2/ext3/ext4/ntfs/btrfs/xfs.<br>
</li>
</ul>
<p><b>5. Known issues<br>
</b></p>
<ul>
<li><i>resize --resize_partition </i>should be implemented
in-place (due to limitations of qcow2, only for expanding)<br>
</li>
<li>all modifying operations have --dry-run option to not
modify an image. The image is still opened for write, and
exclusive lock is acquired.</li>
<li>only listed filesystems are supported</li>
<li>virt-resize, used by <i>resize --resize_partition, </i>leaves
an empty block of ~3M at the end of image.</li>
<li><i>convert --plain </i>fallocate()s space inaccurately
(due to unawareness of qcow2 internal structures).</li>
<li><i>resize [expand] </i>after<i> convert --plain </i>does
not force allocation of new (bigger) chunk of space (we do
not keep image type (plain/expanding) for now - so it is
impossible to determine whether we should allocate space
outside of <i>convert </i>operation)<br>
</li>
</ul>
<pre class="moz-signature" cols="72">--
С уважением, Максим Переведенцев
Your sincerely, Maxim Perevedentsev</pre>
<br>
</div>
<br>
<br>
</div>
</body>
</html>