Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Solved /var/lib/docker/overlay2 getting full

    Support
    storage
    4
    6
    1764
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G
      geba last edited by girish

      I had some trouble with my Cloudron. Found out that the disk was getting full, and managed to fix that with the instructions at https://cloudron.io/documentation/server/#recovery-after-disk-full

      However, I investigated a bit what was taking up so much space. It turns out that by far the biggest culprit is /var/lib/docker/overlay2 which has about 450 subfolders and uses 16 GB of my 45 GB drive. (determined with "du -x", i.e. skipping anything that's not on the root file system).

      I use only 6 apps, and the appsdata folder is only about 7.5 GB. Is it normal that the /var/lib/docker/overlay2 takes up twice as much space as my appsdata? My understanding is that that folder contains the docker containers of the apps and whatever other containers are running, so it seems odd that it's that much larger than appsdata.

      Is it possible that some old content is not cleaned up or duplicated when the VPS is rebooted? I had to reboot a few days ago (for the first time in months), just wondering if that has any connection. It was a hard reboot, i.e. equivalent to just cutting the power without shutting down.

      1 Reply Last reply Reply Quote 0
      • nebulon
        nebulon Staff last edited by

        For a start, docker images are often quite large, composed of a multitude of filesystem layers on top of each other. To mitigate the problem a bit, all Cloudron apps share the same base image, that helps a bit. The appsdata folder really only contains the data from within the apps, so that heavily depends on your own usage. The application code, so to speak, is inside those docker images.

        1 Reply Last reply Reply Quote 0
        • girish
          girish Staff last edited by

          Note that du -hcs /var/lib/docker will give incorrect disk usage output because of the overlay filesystem (this seems to be some linux/fs limitation).

          1 Reply Last reply Reply Quote 0
          • R
            RoboMod last edited by

            I have a follow up question: Will the size of the docker images grow infinitely? Or is there any way to keep them below a certain limit?

            1 Reply Last reply Reply Quote 0
            • nebulon
              nebulon Staff last edited by

              The docker images as such wont grow at all. But everytime an app gets installed, new images will get downloaded and thus the overall space used for images changes. Same on app uninstallation, the docker images of that app will get purged and space will be freed up.

              R 1 Reply Last reply Reply Quote 0
              • R
                RoboMod @nebulon last edited by

                @nebulon Okay. Thanks for clarification!

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                Powered by NodeBB