Docker Space issues on USB flash drive. /var/lib/containerd taking up space on drive

  • Despite setting up shares and setting up docker to use my SSD drive and not my 64gig flash drive for the docker. /var/lib/containerd was taking up 35gigs of free space on my flash drive. deleting containerd breaks docker in OMV. I ended up bind mounting /var/lib/containerd to my ssd. I then had to delete all my containers, networks and volumes to get it working again. was not the end of the world but I thought that having my docker install the the SSD would solve this issue? Now that I am doing what I am doing, OMV only takes up 3.14 gigs on my flash drive instead of the near 40 gigs it was taking before. Maybe the location of containerd can be included in the docker settings plugin? IDK. Ether way. my stuff seems to be working allot better now.

  • votdev

    Approved the thread.
  • What path do you have in:


    In OMV | Services | Compose | Settings | Docker | Docker storage


    Using a path on your system drive there will be a problem.


    Leaving that setting empty will cause the default to be used which is under /var/library on the system drive.

    --
    Google is your friend and Bob's your uncle!


    A backup strategy is worthless unless you have a verified to work by testing restore strategy.


    OMV AMD64 7.x on headless Chenbro NR12000 1U Intel Xeon CPU E3-1230 V2 @ 3.30GHz 32GB ECC RAM.

    OMV AMD64 8.x on headless Tyan Thunder SX GT86C-B5630 1U Server with Intel Xeon Silver 4110 CPU @ 2.10GHz & 32GB DDR4 ECC RAM.

    Edited 2 times, last by gderf ().

  • As you can see in my last post, the first drive is a 2tb NVME drive(top drive). first time around I deleted containerd and it wrecked me pretty bad, I didn't have a backup so I did a start from scratch. I luckily had backups of all my containers ect. Did that. made sure docker was installing on the SSD like you see in the images. Everything seemed ok at first, but my USB usage kept going up and up. I used ncdu found that 35gigs was being used up on my containerd folder. I moved it to the ssd, mounted it. After doing that a bunch of my containers stopped working. Deleted all my containers, networks and volumes

    . Recreated all my containers with no major issues. cotainerd and docker are located

    /srv/dockercontain/

    A share on my OMV


    I set the share to use root:root 755 in the OMV GUI.

    What I want to know is. Where is cointainerd supposed to go after setting the docker location? Is this because I installed the kernal plugin.? Could that have something to do with this? Do I need containerd? I have read other threads saying that it is not needed. Maybe I just needed to delete containers, networks, volumes then spin all the containers up.

    • Official Post

    I used ncdu found that 35gigs was being used up on my containerd folder.

    What is using all this space? In my case the directory /var/lib/containerd is less than 3MB.

    I cannot remember any post here regarding issues with size of that directory. Only /var/lib/docker

  • What is using all this space? In my case the directory /var/lib/containerd is less than 3MB.

    I cannot remember any post here regarding issues with size of that directory. Only /var/lib/docker

    Yep, With 50 to 60 containers running, my /var/lib/containerd is just over 8MB.



    What I want to know is. Where is cointainerd supposed to go after setting the docker location? Is this because I installed the kernal plugin.? Could that have something to do with this? Do I need containerd? I have read other threads saying that it is not needed. Maybe I just needed to delete containers, networks, volumes then spin all the containers up.

    Containerd is installed as a docker dependency, so yes you need it.


    You need to figure out what is using all the space. Just deleting and recreating everything with the same configuration will likely create the same result.


    This process will most likely require taking all containers down, perhaps a removal and reinstall of docker/containerd removing the contents of the offending directory in between, and then bringing up the containers one at a time, checking the usage of that offending directory each time.


    Hopefully that will let you find the container that is causing this.

    Asrock B450M, AMD 5600G, 64GB RAM, 6 x 4TB RAID 5 array, 2 x 10TB RAID 1 array, 100GB SSD for OS, 1TB SSD for docker and VMs, 1TB external SSD for fsarchiver OS and docker data daily backups





  • This is what my containerd looks like right now. It is syslinked to my NVME drive at the moment. I stopped using a bind mount. I don't know what is causing this or why. Keep in mind I did do a full reinstall and I am getting the same issue. Could the Kernal plugin be the cause? I don't really have anything crazy. Every single one of my containers seem to be getting snapshots taking up this space.

    • Official Post

    Could the Kernal plugin be the cause?

    Definitely not.

    It is syslinked to my NVME drive at the moment.

    The bind mount might have caused that if docker couldn't create its overlayfs mounts. Never tried. Seems like it would cause the snapshot issue. None of my docker machines have more than 1mb in /var/lib/containerd. Why are you symlinking to a different drive?

    omv 8.0.6-1 synchrony | 6.17 proxmox kernel

    plugins :: omvextrasorg 8.0.2 | kvm 8.0.2 | compose 8.1.2 | cterm 8.0 | borgbackup 8.0.2 | cputemp 8.0 | mergerfs 8.0 | scripts 8.0.1 | writecache 8.1


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Definitely not.

    The bind mount might have caused that if docker couldn't create its overlayfs mounts. Never tried. Seems like it would cause the snapshot issue. None of my docker machines have more than 1mb in /var/lib/containerd. Why are you symlinking to a different drive?

    Because those snapshots would fill my 64gb flash drive and cause major performance issues. The first time I had this issue I ended up reinstalling OMV and doing a start from scratch. I am doing my backups using the docker plugin. not sure if that is causing the snapshot issue. I didn't do anything weird accept setup syslinks in my /srv/ to all my shares before I made the shares.

  • Because those snapshots would fill my 64gb flash drive and cause major performance issues. The first time I had this issue I ended up reinstalling OMV and doing a start from scratch. I am doing my backups using the docker plugin. not sure if that is causing the snapshot issue. I didn't do anything weird accept setup syslinks in my /srv/ to all my shares before I made the shares.

    Performance issues? That's a big understatement.


    What is the rationale for doing this?: "I didn't do anything weird accept setup syslinks in my /srv/ to all my shares before I made the shares."

    --
    Google is your friend and Bob's your uncle!


    A backup strategy is worthless unless you have a verified to work by testing restore strategy.


    OMV AMD64 7.x on headless Chenbro NR12000 1U Intel Xeon CPU E3-1230 V2 @ 3.30GHz 32GB ECC RAM.

    OMV AMD64 8.x on headless Tyan Thunder SX GT86C-B5630 1U Server with Intel Xeon Silver 4110 CPU @ 2.10GHz & 32GB DDR4 ECC RAM.

  • Performance issues? That's a big understatement.


    What is the rationale for doing this?: "I didn't do anything weird accept setup syslinks in my /srv/ to all my shares before I made the shares."

    I am pretty sure I have having usb space issues before doing this. But doing a syslink to all my shares in my /srv/ drive was the only way I could get more then one SMB share to work on my mergerFS. I needed a low perm share and a high perm share. No matter what I did I could not get the 2nd share working. Admittedly Grok recommended using syslinks to bypass some sort of mergerFS permission issue nonsense. I couldn't get sources from the stupid thing, but it worked. It actually worked. So I went ahead and setup all my shares that way.

    /srv$ tree -I "dev-disk-by-uuid-*" -t -L 1

    .

    ├── mergerfs

    ├── GAMES -> /srv/mergerfs/merge/sharestorage/GAMES/

    ├── PLEX -> /srv/mergerfs/merge/sharestorage/PLEX/

    ├── OMVbackup -> /srv/mergerfs/merge/sharestorage/#backup/OMVbackup/

    ├── PS2SMB -> /srv/mergerfs/merge/sharestorage/PS2SMB/

    ├── #pictures -> /srv/mergerfs/merge/sharestorage/#pictures/

    ├── SYNCTHING -> /srv/mergerfs/merge/sharestorage/SYNCTHING/

    ├── compose -> /srv/dev-disk-by-uuid-065797a6-b491-41b2-94c4-1b3ee3e4c260/compose/

    ├── dockerbackups -> /srv/mergerfs/merge/sharestorage/#backup/dockerbackups/

    ├── port -> /srv/dev-disk-by-uuid-065797a6-b491-41b2-94c4-1b3ee3e4c260/portainer/

    ├── dockercontain -> /srv/dev-disk-by-uuid-065797a6-b491-41b2-94c4-1b3ee3e4c260/dockcontain/

    ├── OMVbackups -> /srv/mergerfs/merge/sharestorage/#backup/OMVbackup/



    Not sure how any of this would even matter considering that my docker install targets the UUID and not a syslink.
    /srv/dev-disk-by-uuid-065797a6-b491-41b2-94c4-1b3ee3e4c260/dockcontain/docker
    and I have reinstalled it several times using the GUI.

  • I can't even begin to follow what you are doing or why. And I am willing to say nobody else is doing these things in the way you are doing them either. I suggest starting over from scratch and not doing things like this.


    And it's symlinks not syslinks.

    --
    Google is your friend and Bob's your uncle!


    A backup strategy is worthless unless you have a verified to work by testing restore strategy.


    OMV AMD64 7.x on headless Chenbro NR12000 1U Intel Xeon CPU E3-1230 V2 @ 3.30GHz 32GB ECC RAM.

    OMV AMD64 8.x on headless Tyan Thunder SX GT86C-B5630 1U Server with Intel Xeon Silver 4110 CPU @ 2.10GHz & 32GB DDR4 ECC RAM.

  • I should mention that everything is working just fine with the exception of what I can only call database corruption in plex probably caused by me. I plan on fixing all that, but other then that, everything is working fine. Immich is still getting photos, my reverse proxies are all up ect. I can live like this until I painfully migrate to OMV 8. I just really wanted to know what could cause this or if anyone else had this issue.

    Digging through containerd tree I see dir for all my containers, they all use a good amount of space, Home-assistant using the most at 2gigs.
    I was having this issue before messing with symlinks. The contents of my containerd this size on my last install. This is a recent start from scratch. I already redid my entire OMV server because of this issue. I even noticed the USB growing every time I pulled an image on this new install before I put in a single symlink. The docker install is not targeting a symlink but a UUID. Using symlinks in docker compose is common practice as far as I know.


    I believe this issue is related to using the backup features in the docker plugin. I would have to do testing to be sure.

    • Official Post

    Because those snapshots would fill my 64gb flash drive and cause major performance issues.

    They shouldn't. All of my docker machines don't even have a 64gb os drive. I have no idea why you are filling the drive with "snapshots".


    I am doing my backups using the docker plugin. not sure if that is causing the snapshot issue.

    The docker (openmediavault-compose) plugin does not use snapshots. It either backs up the container live or stops it. Are you using snapshots somewhere? I honestly don't know why someone would.

    omv 8.0.6-1 synchrony | 6.17 proxmox kernel

    plugins :: omvextrasorg 8.0.2 | kvm 8.0.2 | compose 8.1.2 | cterm 8.0 | borgbackup 8.0.2 | cputemp 8.0 | mergerfs 8.0 | scripts 8.0.1 | writecache 8.1


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Official Post

    Yep


  • so this folder is nearly empty on everyone else's setup?

    Yes.


    --
    Google is your friend and Bob's your uncle!


    A backup strategy is worthless unless you have a verified to work by testing restore strategy.


    OMV AMD64 7.x on headless Chenbro NR12000 1U Intel Xeon CPU E3-1230 V2 @ 3.30GHz 32GB ECC RAM.

    OMV AMD64 8.x on headless Tyan Thunder SX GT86C-B5630 1U Server with Intel Xeon Silver 4110 CPU @ 2.10GHz & 32GB DDR4 ECC RAM.

  • Ok, I think I fixed it and now have it behaving like all your setups. I got rid of the syslinks, /var/lib/containerd is all on the USB.
    1. I shutdown all my containers.
    2. systemctl docker containerd stop
    3. deleted the symlink and recreated the containerd dir.


    4. ran
    docker info | grep "Storage Driver"

    results

    Storage Driver: overlayfs

    5. sudo nano /etc/docker/daemon.json

    My results did not have a storage driver listed. just my dataroot. I edited it to the following.


    5. turned everything back on, turned on all my containers.

    6. /var/lib/containerd is all on the USB. The following is the size after turning on all the containers. Keep in mind I would see the USB fill up in the past when I turned on each container.


    Everything seems to be working now. Ill be back if it starts messing up. I am wondering what the contents of /etc/docker/daemon.json is on everyone else's install? I kinda want to know what caused this in the first place? But if it is never replicated again, I don't care that much. I appropriate all your help.

  • /etc/docker/daemon.json

    Code
    {
      "data-root": "/srv/d0/docker/docker-data"
    }

    --
    Google is your friend and Bob's your uncle!


    A backup strategy is worthless unless you have a verified to work by testing restore strategy.


    OMV AMD64 7.x on headless Chenbro NR12000 1U Intel Xeon CPU E3-1230 V2 @ 3.30GHz 32GB ECC RAM.

    OMV AMD64 8.x on headless Tyan Thunder SX GT86C-B5630 1U Server with Intel Xeon Silver 4110 CPU @ 2.10GHz & 32GB DDR4 ECC RAM.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!