Introduction
ploop (Parallels loopback device) - a kernel block device, similar to the traditional loop device but with more features added, such as dynamic disk space allocation, stackable images, online resize, snapshotting, and live migration helper (write tracker).
Fixes and improvements are being released constantly, thus, as a first troubleshooting step, please, make sure all the available updates are installed.
Table of contents
- Ploop containers creation and requirements
- Ploop disk usage, resize and FS issues
- Snapshots and backups
- Migration
- Ploop containers creation and requirements
1.Structure
Ploop implementation in the kernel have a modular and layered design. The top layer is the main ploop module, which provides a virtual block device to be used for CT filesystem.
The middle layer is the format module, which does translation of block device block numbers into image file block numbers. A simple format module which is called "raw" is doing trivial 1:1 translation, same as existing loop device. More sophisticated format module is keeping the translation table and is able to dynamically grow and shrink the image file. That means, if you create a container with 2GB of disk space, the image file size will not be 2GB, but less -- the size of the actual data stored in the container.
It is also possible to support other image formats by writing other ploop format modules, such as the one for QCOW2 (used by QEMU and KVM).
The bottom layer is the I/O module. Currently modules for direct I/O on an ext4 device, and for NFS are available. There are plans to also have a generic VFS module, which will be able to store images on any decent file system, but that needs an efficient direct I/O implementation in the VFS layer which is still being worked on.
2.Converting existing containers to ploop (or "layout 5")
115479 How to convert VZFS4 containers to ploop format?
Ploop container layout:
~]# ls -la /vz/private/101/
total 16
drwx------ 1 root root 0 Feb 6 05:53 .
drwx------ 1 root root 0 Sep 16 2013 ..
drwx------ 1 root root 0 Feb 6 05:53 dump
drwx------ 1 root root 0 Feb 6 05:53 fs
-rwx------ 1 root root 16 Feb 6 05:54 .owner
drwx------ 1 root root 0 Feb 6 05:53 root.hdd
-rwx------ 1 root root 0 Mar 23 17:10 .running
drwx------ 1 root root 0 Feb 6 05:53 scripts
-rwx------ 1 root root 1288 Mar 23 18:30 Snapshots.xml
lrwxrwxrwx 1 root root 18 Feb 6 05:53 templates -> root.hdd/templates
-rwx------ 1 root root 25 Mar 23 22:11 .uptime
-rwx------ 1 root root 827 Mar 23 18:30 ve.conf
lrwxrwxrwx 1 root root 1 Feb 6 05:53 .ve.layout -> 5
drwx------ 1 root root 0 Feb 6 05:53 .vza
Known issues for creating/converting to ploop.
/vz partition should be in ext4 to run ploop:
115201 Unable to create ploop-based container after upgrade to PCS 6
existing container should not have broken VZFS links
117128 Broken VZFS links prevents container to be converted to ploop
- conversion to ploop only possible from VZFS4 layout, containers with VZFS3 layout should be converted to VZFS4 layout first
3.Ploop vs. VZFS
-Understanding quotaugidlimit and jquota:
119936 How does second-level quota work on ploop containers?
-Understanding diskinodes specific in ploop containers:
123012 Ploop balloon occupies too much space after converting a vzfs container to ploop
Ploop disk usage, resize and FS issues
1. General operations and best practices
115683 How to perform fsck on a ploop container
118646 How to mount ploop image from read-only file system
120700 How to deal with situations when the container hits the inodes limit
120305 How to change the default inodes limit for ploop containers?
120949 How can I compact a ploop container manually?
2.Issues troubleshooting
123812 A ploop container cannot be resized: Unable to change image size to N1 sectors, minimal size is N2
121019 A ploop container cannot be started: Device or resource busy [152]
120591 vzlist shows initial diskspace value after resizing
Snapshots and backups
Ploop snapshots is a mechanism for creating and managing instant states of a running file system. Creating a snapshot leads to creating a new empty ploop image which is layered on top of an old one, then all writes are ending up in the top image, and reads are falling through to a lower level. There can be up to 126) stacked ploop images (or snapshots). Online snapshot merging is also supported.
If you are keeping multiple snapshots, mind the diskspace. Container with snapshots will occupy more real diskspace than it is showing from the inside of it.
1.Troubleshooting
118238 How to delete orphan ploop snapshots not listed with prlctl snapshot-list?
120483 Ploop snapshot cannot be deleted with "Single delta, nothing to merge" error message
115903 A snapshot cannot be deleted or mounted
119824 Backup fails with vzquota error: "Can't open quota file"
Migration
1.Migration into ploop
P2C:
To avoid delays and problems when migrating a physical server to a Container, make sure that the following requirements are met:
The Linux distribution installed on the source physical computer is supported by Parallels Cloud Server. To find that out, check the /etc/vz/conf/dists directory on the destination Parallels server and look for a corresponding Linux_Distribution_Name-version.conf configuration file (e.g., redhat-5.conf). If there is none, you can do one of the following:
Create a new distribution configuration file and place it in the /etc/vz/conf/dists directory on the destination Parallels server. For more details, see Creating Configuration Files for New Linux Distribution.
Start migration without a configuration file. In this case unknown.conf from the /etc/vz/conf/dists directory will be used to configure the resulting Container. However, you will not be able to use standard Parallels Cloud Server utilities (e.g., prlctl) to perform main operations on the newly created Container (e.g., set its IP address or configure DNS parameters) and have to do that manually from inside the Container.
ssh is installed on both the source physical computer and the destination Parallels server to provide secure encrypted and authenticated communication between the two. You can check if the ssh package is already installed by executing the ssh -V command.
- rsync is installed on the source physical computer to copy the source contents to the resulting Container. If rsync on the source physical computer is incompatible with that on the destination Parallels server, use the latter, which is located in the /usr/local/share/vzlinmigrate directory.
123939 Hardware server migration to container in ploop format not supported in PVA
115709 Container migration from PVC 4.0 or 4.6 to Parallels Cloud Storage
116321 Migration of VZFS container to PCS6 fails: "Can't migrate this private area on shared FS (old layout)"
116322 Migrated container from OpenVZ to PCS fails to convert to ploop
2.Migration of ploop containers between nodes
123102 Directories left after unsuccessful container migration cannot be deleted
117024 Online migration fails : /usr/sbin/vzctl exited with code 152
124013 Container migration fails with "ssh exited with code 2" error message