docker keeps open deleted files in /var/log/journal
Issue
Following directories would be full because docker keeps open deleted files in /var/log/journal/
/var/log
directory/run
directory
docker keeps open deleted files, so the disk space is not reclaimed and the volume fills itself.
# lsof /var/log/ | grep deleted | head -n 4
dockerd-c 1962 root 188r REG 253,5 134217728 393243 /var/log/journal/b21c18bdf4504b179e7e5f603af451d7/system@cd9c4500ea1542078830cfa53d32045c-000000000143f319-00032a1115cf3795.journal (deleted)
dockerd-c 1962 root 281r REG 253,5 134217728 393262 /var/log/journal/b21c18bdf4504b179e7e5f603af451d7/system@cd9c4500ea1542078830cfa53d32045c-00000000016bac54-00079a7673a25632.journal (deleted)
dockerd-c 1962 root 488r REG 253,5 134217728 393257 /var/log/journal/b21c18bdf4504b179e7e5f603af451d7/system@cd9c4500ea1542078830cfa53d32045c-0000000001616409-00080a5af1b3991a.journal (deleted)
dockerd-c 1962 root 499r REG 253,5 134217728 393240 /var/log/journal/b21c18bdf4504b179e7e5f603af451d7/system@cd9c4500ea1542078830cfa53d32045c-00000000013d8382-0007659ff3198e1la.journal (deleted)
# df -h /var/log/
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/root-lv 71G 68G 1.1G 99% /var/log
# du -sh /var/log/
41G /var/log/
or
# df -h
Filesystem Size Used Avail Use% Mounted on
.....
tmpfs 3.9G 3.9G 0 100% /run
Environment
- Red Hat Enterprise Linux 7
- docker-1.12.6-*
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.