1,734
edits
Changes
make trd more readable
prl_disk_tool for Virtuozzo 7
The package prl-disk-tool (binary /usr/sbin/prl_disk_tool)
can perform the following operations:
<code>prl_disk_tool</code> uses [http://libguestfs.org/ libguestfs], [http://wiki.qemu.org/download/qemu-doc.html#qemu_005fimg_005finvocation qemu-img] to work.
The user has to install additional packages to use part of functionality:
prl_disk_tool locks an image passed as argument by flock(). So only multiple
reads (''<code>{compact,resize} --info''</code>) OR a single write (others) are allowed.
FS-aware functions (''<code>resize {--resize_partition|--info}, compact [--info]''</code>) workfor ext2/ext3/ext4/ntfs/btrfs/xfs.
<code>prl_disk_tool </code> uses <code>qemu-img </code> to perform fs-unaware operations. It is morepowerful than qemu-img due to fs-aware operations performed with libguestfs.
The main purpose of <code>prl_disk_tool </code> is to automate some frequent operations.
Virtuozzo 7 beta2
* qemu-img >= 1.5.3-86
Need to test the following cases:
* All functions work for qcow2 images.
* Functions not tagged as '''VM only''' work for ploop images.
* FS-aware functions (''<code>resize --resize_partition|--info, compact [--info]''</code>) work for ext2/ext3/ext4/ntfs/btrfs/xfs.
* ''<code>resize --resize_partition'' </code> should be implemented in-place (due tolimitations of qcow2, only for expanding)* all modifying operations have ''<code>--dry-run'' </code> option to not modify an image. The image is still opened for write, and exclusive lock is acquired.
* only listed filesystems are supported
* virt-resize, used by ''<code>resize --resize_partition''</code>, leaves an empty block of ~3M at the end of image.* ''<code>convert --plain'' </code> fallocate()s space inaccurately (due to unawareness of qcow2 internal structures).* ''<code>resize [expand]'' </code> after ''<code>convert --plain'' </code> 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 ''<code>convert'' </code> operation) == Links == * [https://lists.openvz.org/pipermail/users/2015-November/006598.html TRD in devel@ mail archive] [[Category: TRD]]