H
H
HexUserHex2020-11-04 20:11:26
Docker
HexUserHex, 2020-11-04 20:11:26

Why is free space disappearing on VDS(docker)?

Good evening,
There is a simple vds on which my docker-compose runs, one container from which eats up 95% of all free space on the VDS. I figured out the container... But so far I have not been able to find the root of the problem.
I will provide the output of any commands promptly :)

[email protected]:~# docker system df -v
Images space usage:
 
REPOSITORY                               TAG                 IMAGE ID            CREATED             SIZE                SHARED SIZE         UNIQUE SIZE         CONTAINERS
gitea/gitea                              latest              b2a668ed1fd0        3 days ago          149.5MB             5.573MB             143.9MB             1
jwilder/nginx-proxy                      latest              509ff2fb81dd        3 days ago          165MB               69.22MB             95.76MB             1
nextcloud                                latest              0fe69d55da2d        4 days ago          810.9MB             69.22MB             741.7MB             1
adminer                                  latest              a36eacf2923e        4 days ago          89.88MB             5.573MB             84.31MB             1
kylemanna/openvpn                        latest              dab8cc82cd7b        8 days ago          15.26MB             5.573MB             9.683MB             1
mysql                                    5.7                 1b12f2e9257b        11 days ago         448.5MB             69.22MB             379.3MB             1
jrcs/letsencrypt-nginx-proxy-companion   latest              684a50dcf80f        2 weeks ago         94.1MB              0B                  94.1MB              1
parser                                   latest              cac9a4d5705b        3 weeks ago         1.325GB             0B                  1.325GB             1
portainer/portainer-ce                   latest              a0a227bf03dd        2 months ago        195.5MB             274.7kB             195.3MB             1
portainer/portainer                      latest              62771b0b9b09        3 months ago        79.14MB             274.7kB             78.86MB             0
cs16ds/server                            latest              9d66f6388e56        2 years ago         1.061GB             0B                  1.061GB             1
 
Containers space usage:
CONTAINER ID        IMAGE                                    COMMAND                  LOCAL VOLUMES       SIZE                CREATED             STATUS                NAMES
57bac0444d47        gitea/gitea:latest                       "/usr/bin/entrypoint…"   1                   91.7MB              3 days ago          Up 3 days             gitea
7bdf862784fa        jwilder/nginx-proxy                      "/app/docker-entrypo…"   4                   51MB                3 days ago          Up 2 days             nginx-proxy
06d3d1dbb93c        portainer/portainer-ce:latest            "/portainer -H unix:…"   1                   0B                  3 days ago          Up 3 days             portainer
dc7eaca029bf        adminer:latest                           "entrypoint.sh docke…"   0                   24.9kB              4 days ago          Up 3 days             adminer
e1b4718c8d45        nextcloud:latest                         "/entrypoint.sh apac…"   1                   51.6MB              4 days ago          Up 2 days             nextcloud
6e144fccc214        mysql:5.7                                "docker-entrypoint.s…"   1                   4B                  4 days ago          Up 3 days (healthy)   mysql
827a9bc5cb38        kylemanna/openvpn                        "ovpn_run"               1                   375B                4 days ago          Up 3 days             openvpn
d2a32eca806e        jrcs/letsencrypt-nginx-proxy-companion   "/bin/bash /app/entr…"   3                   2.34kB              4 days ago          Up 3 days             nginx-proxy-letsencrypt
9c075ec9c5c8        parser:latest                            "/bin/sh -c /docker-…"   2                   13.4GB              9 days ago          Up 3 days             parser
7fe022eb9a7e        cs16ds/server:latest                     "/bin/hlds_run.sh"       0                   1.71MB              9 days ago          Up 3 days             cs
 
Local Volumes space usage:
VOLUME NAME                                                        LINKS               SIZE
docker-compose_parser_cronfiles                                    1                   0B
docker-compose_nextcloud                                           1                   484.8MB
docker-compose_openvpn                                             1                   43.16kB
docker-compose_mysql                                               1                   246.6MB
docker-compose_html                                                2                   1.106kB
2e71efedd2b7c696f8c66c467d797b78ac148f0396e157dd6d8482121d47f48c   1                   424B
docker-compose_portainer_data                                      1                   242.5kB
docker-compose_data_gitea                                          1                   3.711MB
docker-compose_vhost.d                                             2                   278B
docker-compose_certs                                               2                   66.13kB
9132b7b14717afa0d9d51a40ebe2892474ae100d289b95705911978dc2312c93   1                   33.33MB


2. I find the container that takes up the most space and go into it:
docker exec -it parser bash

3. and search for large files and directories inside the container itself
ps: I still don’t understand why I can’t specify the size in megabytes in find which is in the container in the -size option ' M', in a find that is not in a container, the 'M' option works with a bang...

bash-5.0# find /  -size +100000k
/usr/lib/chromium/chrome                                                                                                                                                                                                                 
/usr/lib/firefox/libxul.so


As a result, I did not find any large files / directories, etc.

Just in case, the output of df -h inside the parser container:
bash-5.0# df -h                                                                                                                                                                                                                          
Filesystem                Size      Used Available Use% Mounted on                                                                                                                                                                       
overlay                  19.7G     18.9G         0 100% /                                                                                                                                                                                
tmpfs                    64.0M         0     64.0M   0% /dev                                                                                                                                                                             
tmpfs                   974.8M         0    974.8M   0% /sys/fs/cgroup                                                                                                                                                                   
/dev/sda1                19.7G     18.9G         0 100% /cronfiles                                                                                                                                                                       
/dev/sda1                19.7G     18.9G         0 100% /etc/resolv.conf                                                                                                                                                                 
/dev/sda1                19.7G     18.9G         0 100% /etc/hostname
/dev/sda1                19.7G     18.9G         0 100% /etc/hosts
shm                      64.0M         0     64.0M   0% /dev/shm
/dev/sda1                19.7G     18.9G         0 100% /var/www/html
tmpfs                   974.8M         0    974.8M   0% /proc/acpi
tmpfs                    64.0M         0     64.0M   0% /proc/kcore
tmpfs                    64.0M         0     64.0M   0% /proc/keys
tmpfs                    64.0M         0     64.0M   0% /proc/timer_list
tmpfs                    64.0M         0     64.0M   0% /proc/sched_debug
tmpfs                   974.8M         0    974.8M   0% /sys/firmware

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0nkery, 2020-11-05
@HexUserHex

Try
du -hs /var/lib/docker/*
it See a list of folders with the space they take up. Next, go to the thickest, for example, containers and enter another command:
du -hs /var/lib/docker/containers/*
And so on until victory.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question