Disk Space Taken between Postgres and Docker

Hello guys!

I have a doubt regarding disk space and I hope someone can throw some light into this for me, as I’m not very experienced as a Linux SysAdmin.

My server (40GB) is running out of space, I usually control very extensively our uploads and stuff until I finally do the move of switching everything to AWS S3. The values were always normal until a a week or so ago when it started to go up (that’s when I updated to 2.0)

The Space is being taken between two directories, one is: /var/discourse/shared/standalone (taking 17.1GiB), divided as such:

 7.1GiB [##########] /postgres_data
    5.0GiB [#######   ] /backups
    4.3GiB [######    ] /log
  573.8MiB [          ] /uploads
   93.3MiB [          ] /redis_data

I did some research and found a similar case: https://meta.discourse.org/t/disk-space-usage-by-postgres/61137/4

In my case, however, postgres gives back an error saying that there is no “backup” to drop.

And the other: /var/lib/docker (18.7GiB), divided as such:

11.6GiB [##########] /containers
    7.1GiB [######    ] /aufs

(Where the 11.6GiB of /containers are being taken by a sole container, and “aufs” is divided between 4.2GiBs for /diff and 2.9Gib for /mnt)

With this one I also read around and did the commands recommended by the Team, like “./launcher cleanup” but only cleaned 100 or so MBs.

Is there a way, technique, procedure or something that I’m missing? Inside the Discourse Installation it only marks 219MB for Uploads and 4.15GB for Backups.

Right now I’m at 93% disk usage and I fear that the installation will collapse without disk space at any moment.

Thanks in advance for any help and mostly for your patience

Try

. /launcher cleanup

@pfaffman that was already tried:

2 Likes

Oops. Thanks, @michaeld. I should probably not post before I’m awake.

And now looking again, I’m reminded that I have an instance with a 2gb postgres directory that should be much smaller. I bet that it’s the same backup issue, but I’ll wait until after coffee to check on that.

2 Likes

As an additional note, I can’t do any Update/Rebuild operations as it claims that there is not enough space on disk. Is there a command to “purge” postgres?

You can try renaming the logs and backup directories to something else and restart the container. If it still works, you can then safely delete those directories. If it’s broken (which seems unlikely) you can move them back to the original names.