The invention provides a method and a device for adjusting a storage space of a container data volume. Relates to the field of container data volume storage capacity expansion, and aims at a scene that a kata security container uses an external
iscsi disk as a data volume, when a container storage plug-in controller module (controller) receives a capacity expansion request, the method comprises the following steps: firstly, carrying out capacity expansion on an
iscsi LUN on an
external storage system, then executing an operation of scanning the disk on a host running by the container to obtain a new size of the
iscsi disk, and finally, carrying out data
volume expansion on the new size of the iscsi disk. The method comprises the following steps: when a
file system is mounted on a kata
virtual machine, a container storage plug-in node module notifies a kata container to update the size of a data volume, finally, after a kata-agent running in the kata
virtual machine receives a capacity expansion request, the space size of a virtual disk is refreshed, the
file system on the virtual disk is expanded in a mounting state, and finally the capacity expansion
processing is completed.