Dockerized database will no longer start because...
FATAL: could not write lock file "postmaster.pid": No space left on device
There are hundreds of Gb available on my hard-disk although I do believe something has run out of space. This problem first cropped up after a couple of attempts at restoring a 45Gb database from backup. During that time my Docker.qcow2
file ballooned to 60Gb. Does Hypervisor have some limit on the size of that VM file? Using Docker for Mac.
EDIT:
Just want to make clear that my usecase genuinely required that much diskspace but yes if you haven't tried prune
then first try the most upvoted answer.
It seems to be a clue that I somehow get the same error when I remove these lines from docker-compose.yml
:
volumes:
- website_database_volume:/var/lib/postgresql/data
(and yes I sanity checked I was in the right part of the file by messing with other attributes)
Output of of docker system df
TYPE TOTAL ACTIVE SIZE RECLAIMABLE
Images 21 16 4.58 GB -7.44e+09 B (-162%)
Containers 827 3 28.69 MB 28.69 MB (99%)
Local Volumes 5 5 57.02 GB 0 B (0%)