kartoza / prj.app

A django app for creating visual changelogs for software releases
30 stars 32 forks source link

Address the low disk space issue #1353

Closed sumandari closed 3 years ago

sumandari commented 3 years ago

please see: http://sentry.kartoza.com/sentry/projecta/issues/2904/

sumandari commented 3 years ago

There is a tool to remove unused image : https://github.com/kartoza/prj.app/pull/1320

I checked on server, and found out there are folder images outside container that contains the same folders with the one in the container:

inside volume

$ sudo ls /var/lib/docker/volumes/changelog_django-media-data_fa4d5/_data
certificate_organisations  docs  images  lasd  mugshots  pdf  test  test.txt

outside container

kartoza@changelog:~$ ls /home/kartoza/media
certificate_organisations  docs  images  lasd  mugshots  pdf
kartoza@changelog:~$ du -sh /home/kartoza/media
2.4G    /home/kartoza/media

We need to check whether those files are being used or not, so that we can free space up to 2.4G

sumandari commented 3 years ago

cc @dimasciput

sumandari commented 3 years ago

removed the media and images folder

kartoza@changelog:~$ du -sh images
1.1G    images
kartoza@changelog:~$ du -sh media
2.4G    media

before:

kartoza@changelog:~$ df -lh
Filesystem      Size  Used Avail Use% Mounted on
udev            1.9G     0  1.9G   0% /dev
tmpfs           386M   41M  346M  11% /run
/dev/sda1        38G   32G  4.5G  88% /
tmpfs           1.9G   88K  1.9G   1% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup

after:

Filesystem      Size  Used Avail Use% Mounted on
udev            1.9G     0  1.9G   0% /dev
tmpfs           386M   41M  346M  11% /run
/dev/sda1        38G   29G  7.9G  79% /
tmpfs           1.9G   88K  1.9G   1% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup