Issue
Inside an EC2 I have docker with a container that I can't lose, so I noticed that I was out of space on the attached and exclusive volume for docker.
So I increased it with another 15GB and executed the commands according to the aws documentation, but my container is not getting this new size.
sudo growpart /dev/nvme1n1 1
sudo pvresize /dev/nvme1n1p1
sudo lvextend -L+15G /dev/docker/docker-pool
And I noticed that these "dm" are still old, does anyone know what it could be, and how to solve it?
Considerations:
In
/etc/sysconfig/docker-storage
is already defined--storage-opt dm.basesize=75GB
docker system info
Server Version: 19.03.13-ce Storage Driver: devicemapper Pool Name: docker-docker--pool Pool Blocksize: 524.3kB Base Device Size: 75.16GB Backing Filesystem: ext4 Udev Sync Supported: true Data Space Used: 67.24GB Data Space Total: 80.38GB Data Space Available: 13.14GB Metadata Space Used: 11.81MB Metadata Space Total: 67.11MB Metadata Space Available: 55.3MB Thin Pool Minimum Free Space: 8.038GB Deferred Removal Enabled: true Deferred Deletion Enabled: true Deferred Deleted Device Count: 0 Library Version: 1.02.135-RHEL7 (2016-11-16)
Solution
To solve the problem, in addition to enlarging the disk and performing the manual resizing process mentioned in the question, enable saving the container to a new image with docker commit
removing the container and then uploading it again, based on the previously saved image, in this way the new container got all the space available on the instance's disk.
Answered By - David Answer Checked By - Robin (WPSolving Admin)