Currently, private CCE clusters use Device Mapper as the Docker storage driver.
Device Mapper is developed based on the kernel framework and supports many advanced volume management technologies on Linux.
Docker Device Mapper storage driver leverages the thin provisioning and snapshot capabilities of this framework to manage images and containers.
For CCE clusters in v1.7.3-r6 or earlier versions, the Docker Device Mapper is set to the loop-lvm mode by default. By default, Docker generates data and metadata files in the /var/lib/docker/devicemapper/devicemapper directory. The two files are attached to loop devices and used as block devices. After multiple containers are attached to the files, the performance deteriorates dramatically.
The loop-lvm mode enables you to use Docker out of the box, without additional configuration. This mode is not recommended in the production environment. The Docker Device Mapper also supports the direct-lvm mode. This mode enables you to use raw partitions (no file systems). In the medium-load and high-density environments, this mode provides better performance.
To ensure system stability, you need to set the Docker Device Mapper to the direct-lvm mode.
CCE allows you to change the mode of the Device Mapper on VM nodes running on EulerOS.
Method 1:
Example:
Example:
Method 2:
"dm.thinpooldev=/dev/mapper/vgpaas-thinpool"
touch config.yaml
user: domainName: username: password: projectName: apiGatewayIp: iamHostname: ecsHostname: evsHostname: swrAddr: defaultPassword: defaultPrivateKey: hosts: - host: <node_ip_01> user: root password: privateKey: serverId: - host: <node_ip_02> user: root password: privateKey: serverId:
Parameter |
Description |
|
---|---|---|
domainName |
Tenant name |
|
username |
User name |
|
password |
User password, which is enclosed in quotation marks ('' '') |
|
projectName |
Name of the project to which the to-be-configured node belongs |
|
apiGatewayIp |
IP address of an API gateway |
|
iamHostname |
Endpoint of the IAM service |
|
ecsHostname |
Endpoint of the ECS service |
|
evsHostname |
Endpoint of the EVS service |
|
swrAddr |
Address of a software repository |
|
defaultPassword |
(Optional) Default login password of a node. The value must be enclosed in quotation marks ('' ''). |
|
defaultPrivateKey |
(Optional) Absolute path to the default key file for logging in to a node. The value must be enclosed in quotation marks ('' ''). |
|
hosts |
Host array structure [1]. You can set multiple nodes for which you want to change the Device Mapper mode. The following parameters must be included: user, password/privateKey, and serverId. For details about the host array structure, see Table 2. |
Parameter |
Description |
---|---|
host |
IP address of the node for which you want to change the Device Mapper mode. This node must be in the same subnet as the current logged-in node. |
user |
User name. Set this parameter to root. |
password |
Password for the root user on the node for which you want to change the Device Mapper mode. The value must be enclosed in quotation marks ('' ''). NOTE:
Set either password or privateKey. |
privateKey |
Absolute path to the key file of the root user on the node for which you want to change the Device Mapper mode. The value must be enclosed in quotation marks ('' ''). NOTE:
Set either password or privateKey. |
serverId |
ID of the ECS corresponding to the node for which you want to change the Device Mapper mode |
It takes about 3 to 5 minutes to configure a node.
curl -k https://<swr-address>:20202/swr/v2/domains/op_svc_servicestage/namespaces/op_svc_servicestage/repositories/default/packages/cluster-versions/versions/base/file_paths/cceadm -1 -O;chmod u+x cceadm; ./cceadm batch-config-docker --conf=./config.yaml
Replace <swr-address> with the address of a software repository, which is the same as the value of swrAddr in Table 1.