简体   繁体   中英

docker overlay2 increase size

I am very new to docker so please pardon if anything stupid:PI have docker running on my cloud server and was facing issue of running out of space because of docker overlay files. So I mounted 100GB of storage to the server at

/home/<user>/data

and in daemon.json configured the docker root directory to this newly mounted storage and copied all the old files but after that also when I check

df -h 

overlay file shows size 36G. Am I doing something wrong How can I increase this overlay to completely utilize the storage?

PS: Also when it starts filling up it doesn't increase space it just fills up and all the apps stop working

Docker stores images, containers, and volumes under /var/lib/docker by default. If you haven't mounted another filesystem there, you are likely looking at the free space on your root filesystem.

When mounting another filesystem in this location, you likely want to move the current directory aside so you can copy it into the new filesystem. If you do restore the content, be sure to use a command that preserves ownership, permissions, and symlinks (I believe cp -a and tar both do this).

Also, make sure the docker engine is not running when you replace this directory, and be sure the filesystem type matches your current root filesystem type, or is compatible with your graph driver.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM