To increase the number of containers or images running on a node, you need to increase its disk size accordingly. You need to mount disks to nodes to provide more storage space for containers.
- If no disk has been mounted to a node before, see Mount a disk to the Docker data directory.
- If you have purchased a disk for a node and the disk is not mounted on the node, perform the following steps to mount the disk:
- To ensure data security, we recommend that you take snapshots of volumes or back up data on the node before you perform the following operations.
- You need to confirm whether the applications in the cluster can be scheduled to other nodes.
- Perform the following operations during off-peak hours.
- When you drain a node, Pods on this node will be scheduled to other nodes. Make sure that the cluster has sufficient nodes. If your cluster does not have enough nodes, we recommend that you scale out the cluster first.
/var/lib/dockeris mounted on
/dev/vdb1. If the /var/lib/docker directory is mounted, no action is required. Otherwise, perform the following steps to mount a disk to the node:
- Mark the node as unschedulable.
For more information, see Mark node as unschedulable.
- Drain the node.
For more information, see Safely drain a node.
- Remove the node.
This topic only describes the operations in the Container Service console.
- Log on to the Container Service console.
- In the left-side navigation pane, choose Nodes.
- Select the node you want to remove and click Batch Remove or choose in the Actions column.
- In the Remove Node dialog box that appears, click OK.
Note Do not select the Release ECS Instance check box.
- Add the newly removed node to the cluster.
- In the left-side navigation pane, choose .
- Select the cluster. Choose
in the Actions column.
- Select Auto or Manual. This example selects to automatically add the node.
- Select the newly removed node and click Next Step.
- Select Format Data Disk.
- Follow the instructions to perform the other operations.
After the node is added, log on to the node and run the df command to view the disks mounted on the node.
You can use the preceding methods to mount disks to nodes.