SOLVED What type/area of data makes up "Other" in disk usage?
d19dotca last edited by girish
I have roughly 7 GB left on my disk and am looking at either upgrading or cleaning up my existing Cloudron instance. I looked at my disk usage in Cloudron and it shows 11.75 GB of "Other". What does Other refer to exactly? Is "Other" Cloudron-related files still, or is this the rest of the OS? It seems like it's been growing over time so I suspect maybe there's some logs or something filling it up. Later today I'll try to scope that out but for now thought I'd quickly post in here for assistance in case anyone can define "Other" in the disk usage report in Cloudron.
UPDATE #1: It looks like 6 GB are taken up by the /var/lib/docker/overlay2 directory. Any ideas there? Is that supposed to be that large? Is it okay to clean it up somehow?
@d19dotca In Cloudron 5, we renamed 'Other' to 'Ubuntu'. The /var/lib/docker is the docker images of the addons (databases) and the apps. The size depends on the apps you have. Is the 6GB output from du -hcs ? Is so, that output is not reliable. Instead, use
docker system df. Or the Cloudron disk usage graphs should also give the docker images size. In my cloudron which has ~14 apps, the size is 6.12 GB.
I noticed that in my cloudron Ubuntu is actually 26.9 GB (!). That seems very high, I will investigate tomorrow why it's so high.
Have you had any chance to look at it? I realized that my "Ubuntu" is also growing and would like to know why.
@d19dotca @gloes There is a bug in the disk size calculation. Will get it fixed.
OK, I found various issues:
- We were using apparent disk size information instead of disk block usage (see du's --apparent-size)
- I have renamed 'Ubuntu' to 'Everything else'. What it means is the rest of the unaccounted space. This includes ubuntu, swap space, other files user has created in other part of the file system etc.
After the changes, the numbers add up.
In my case, what I found was:
- I had a 2GB unused swap on my disk!
- I used to backup to filesystem before. Later I moved to an external disk. I had forgotten to delete the backups on the
/var/backups. I have put a warning in the backups UI that warns the user that old backups are not deleted by Cloudron. This gave me back another 8GB.
Finally, one important bit: by default ext4 will reserve 5% of the disk for the root user. You can see this like so:
root@strawberry:~# tune2fs -l /dev/sda1 | grep Reserved Reserved block count: 1562918 Reserved GDT blocks: 1024 Reserved blocks uid: 0 (user root) Reserved blocks gid: 0 (group root)
1562918 blocks * 4096 block size = ~6GB.
You can reduce the percent to say 2 like this:
tune2fs -m 2 /dev/sda1
Unless you have a big disk, I would leave it at 5%.