OPNsense Forum

Archive => 20.1 Legacy Series => Topic started by: Bytechanger on February 15, 2020, 08:40:22 AM

Title: Disk usage to big?
Post by: Bytechanger on February 15, 2020, 08:40:22 AM
Hi,

on Dashboard Disk usage says 78% [ufs] (20G/28G).
So I went to ssh.

There I found that /var/log/flowd Files are toooo big (Giga). I removed them.
After that, nothing changed!

On ssh:
sudo df -lah /
Filesystem         Size    Used   Avail Capacity  Mounted on
/dev/gpt/rootfs     28G     20G    5.8G    78%    /

BUT with
sudo du -k -hd 1 /
4.0K    /.snap
4.5M    /bin
236M    /boot
152M    /conf
4.0K    /dev
2.9M    /etc
92K    /home
11M    /lib
176K    /libexec
4.0K    /media
4.0K    /proc
4.0K    /rescue
24K    /root
12M    /sbin
1.9G    /usr
664M    /var
2.0M    /tmp
4.0K    /mnt
4.0K    /net
1.7M    /lost+found
2.9G    /

there is NO big Size, so where is 20G used??

Greets
Byte
Title: Re: Disk usage to big?
Post by: siga75 on February 15, 2020, 10:00:10 AM
you removed the file entry in the directory, but probably the inode is still open by a process

rm command does not actually remove the file, it edits the directory removing the link to the inode, and then decrease the counter of hard links, when the counter is 0 if there isn't processes locking the file then the inode is deleted and the space released and marked as free

on normal circumstances the hard link counter is 1, so rm actually delete the file


restart the service and you will see your free space