Difference between revisions of "Ploop/Limits"

From OpenVZ Virtuozzo Containers Wiki
Jump to: navigation, search
m (fix ploop v2 size in PB)
(2^32, ploop v2 limit explained)
Line 10: Line 10:
  
 
Use ploop convert tool to convert from ploop v1 to ploop v2 image.
 
Use ploop convert tool to convert from ploop v1 to ploop v2 image.
 
  
 
== Internals ==
 
== Internals ==
Line 16: Line 15:
 
Ploop v1 image size limitation comes from the fact that unsigned 32 bit integer
 
Ploop v1 image size limitation comes from the fact that unsigned 32 bit integer
 
is used to store sector address inside the ploop image. Therefore the maximum
 
is used to store sector address inside the ploop image. Therefore the maximum
number of sectors is (u32)-1, which is 4294967295. As sector size is 512 bytes,
+
number of sectors is 2<sup>32</sup>, which is 4294967295. As sector size is 512 bytes,
4294967295 sectors are equal to 2 terabytes. From that number, we should subtract
+
4294967295 sectors are equal to 2 terabytes. As the first megabyte of the image is
1 megabyte, as first 1MB of image is used for translation table.
+
used for header and L2 translation table, maximum image size is decreased by 1MB.
 +
 
 +
Ploop v2 uses the same unsigned 32 bit field to address blocks rather than sectors.
 +
Block size itself is measured in 512 byte sectors, and can be specified during image creation.
 +
If not specified, block size defaults to 2048 sectors, i.e. 1 megabyte. Therefore,
 +
the image can be up to 4 petabytes (4096 TB) in size.
 +
Same as with ploop v1, the first megabyte of the image is
 +
used for header and L2 translation table, maximum image size is decreased by 1MB.

Revision as of 01:03, 30 July 2014

Ploop images has the following limits:

  • Number of snapshots: 126
  • Image size:
    • ploop v1: 2 TB minus 1 MB
    • ploop v2: 4 PB (4096 TB) minus 1 MB
  • Inner ext4 file system size: currently set to 16 TB

Conversion

Use ploop convert tool to convert from ploop v1 to ploop v2 image.

Internals

Ploop v1 image size limitation comes from the fact that unsigned 32 bit integer is used to store sector address inside the ploop image. Therefore the maximum number of sectors is 232, which is 4294967295. As sector size is 512 bytes, 4294967295 sectors are equal to 2 terabytes. As the first megabyte of the image is used for header and L2 translation table, maximum image size is decreased by 1MB.

Ploop v2 uses the same unsigned 32 bit field to address blocks rather than sectors. Block size itself is measured in 512 byte sectors, and can be specified during image creation. If not specified, block size defaults to 2048 sectors, i.e. 1 megabyte. Therefore, the image can be up to 4 petabytes (4096 TB) in size. Same as with ploop v1, the first megabyte of the image is used for header and L2 translation table, maximum image size is decreased by 1MB.