Docker Community Forums

Share and learn in the Docker community.

Docker is consuming space from var file system apart from the /var/lib/docker dedicated filesystem

Hi Team,

I have been seeing the issue in our docker environments where even if the docker is setup on the /var/lib/docker dedicated file system , it also consumes the space from the /var separate file system. When I looked into the file system to find out the files which consuming more space , I could see the /var/lib/docker directory size is 13GB but file system usage is 9.8GB. When I checked for the var file system files sizes, but I don’t see the sum of other files are equal to 9.4G which is shown in the df output for var file system. Could anyone tell me will the docker consuming this space somehow

root@docker1 lib]# df -ThP /var /var/lib/docker
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/rootvg-var xfs 12G 9.4G 2.7G 78% /var
/dev/mapper/appvg-lv_docker xfs 50G 9.8G 40G 20% /var/lib/docker
[root@docker1 lib]# du -sh /var/lib/docker
13G /var/lib/docker
[root@edpuvlltxfixa01 lib]#

[root@docker1 lib]# du -sh /var/*
0 /var/adm
115M /var/cache
0 /var/crash
8.0K /var/db
0 /var/empty
0 /var/games
0 /var/gopher
0 /var/kerberos
13G /var/lib
0 /var/local
0 /var/lock
1.6G /var/log
44M /var/logs
0 /var/logtemp
0 /var/ltx
0 /var/mail
0 /var/nis
1.4G /var/opt
0 /var/preserve
0 /var/run
8.3M /var/spool
0 /var/temp
19M /var/tmp
0 /var/yp
[root@docker1 lib]#