This section describes how to allocate data disk space.
When creating a node, you need to configure a data disk whose capacity is greater than or equal to 100GB for the node. You can click Expand to customize the data disk space allocation.
A data disk, 100 GB for example, is divided as follows (depending on the container storage rootfs):
You can log in to the node and run the docker info command to view the storage engine type.
# docker info Containers: 20 Running: 17 Paused: 0 Stopped: 3 Images: 16 Server Version: 18.09.0 Storage Driver: devicemapper
The thin pool is dynamically mounted. You can view it by running the lsblk command on a node, but not the df -h command.
No separate thin pool. The entire container engine and container image space (90% of the data disk by default) are in the /var/lib/docker directory.
The capability of customizing pod basesize is related to the node OS and container storage rootfs. You can log in to the node and run the docker info command to view the container storage rootfs.
In the case of using Docker on EulerOS 2.9 nodes, basesize will not take effect if CAP_SYS_RESOURCE or privileged is configured for a container.
When configuring basesize, consider the maximum number of pods on a node. The container engine space should be greater than the total disk space used by containers. Formula: the container engine space and container image space (90% by default) > Number of containers x basesize. Otherwise, the container engine space allocated to the node may be insufficient and the container cannot be started.
For nodes that support basesize, when Device Mapper is used, although you can limit the size of the /home directory of a single container (to 10 GB by default), all containers on the node still share the thin pool of the node for storage. They are not completely isolated. When the sum of the thin pool space used by certain containers reaches the upper limit, other containers cannot run properly.
In addition, after a file is deleted in the /home directory of the container, the thin pool space occupied by the file is not released immediately. Therefore, even if basesize is set to 10 GB, the thin pool space occupied by files keeps increasing until 10 GB when files are created in the container. The space released after file deletion will be reused but after a while. If the number of containers on the node multiplied by basesize is greater than the thin pool space size of the node, there is a possibility that the thin pool space has been used up.
When the container engine space is insufficient, image garbage collection is triggered.
The policy for garbage collecting images takes two factors into consideration: HighThresholdPercent and LowThresholdPercent. Disk usage above the high threshold (default: 85%) will trigger garbage collection. The garbage collection will delete least recently used images until the low threshold (default: 80%) has been met.