• Article for your preferred language does not exist. Below is international version of the article.

Article ID: 1838, created on May 10, 2007, last review on May 5, 2014

Resolution

Virtuozzo technology allows to use VE disks of 2 types:

1. Plain (default)

    On disk creation all nominal disk size (for example, 100 GB) is being allocated at once.

2. Compact (experimental in 3.x)

    On disk creation disk file starts small, then become larger as you add more data to the VE.

The original size of compact disk file that belongs to newly created VE with default disk quota is about 17 MBs. Compact disks experience slight performance degradation compared to plain disks, but allow to save considerable amount of disk space and allow to oversubscribe disk space.

Type of disks is "VE wide" property, which means, that the VE can only have disks of the same type. Also, this property is stored in the VE config file in DISKTYPE value.

Usage Scenario

1. VE creation

    On VE creation you can specify the disk type, that VE will have, by entering in the command line:


For plain disks:

 vzctl create 101 --pkgset w2k3 --disktype plain


For compact disks:

 vzctl create 101 --pkgset w2k3 --disktype compact



 If you create VE without specifying disktype, then plain disktype will be chosen.


2. Setting the VE disk type

    At any moment during the VE lifecycle you can set the VE disk type, by entering in the command line:


 For plain disks:

 vzctl set 101 --disktype plain


For compact disks:

 vzctl set 101 --disktype compact


ATTENTION:
For both running and stopped VE, newly selected disktype property will be applied only on next VE start or VE mount. It means, that on next mount or start all VE drives will be converted (if necessary). This operation can take up to several minutes depending on disk size.

3. Setting default VE disk type for every new created VEs (this setting doesn’t cover VEs which already have configured disk type)


For plain disks:

 vzctl set 0 --disktype plain --save


For compact disks:

vzctl set 0 --disktype compact --save

4. Querying the VE disk type

The VE disk type can be obtained by reading DISKTYPE property from the VE config file. You can do this by entering in the command line:
 
vzcfgt get 101 DISKTYPE


- If vzcfgt.exe utility didn't print any value or printed "0", it means that VE disks are plain.
- If vzcfgt.exe utility printed "3", it means that VE disks are compact.

Email subscription for changes to this article
Save as PDF