Anomalous disk usage in pfSense 2.5.1
-
Hi, everyone
I have found out an anomalous disk usage in my pfSense instance. Here you are console output:
[2.5.1-RELEASE][root@morannon.ednonlabs.com]/: df -h Filesystem Size Used Avail Capacity Mounted on /dev/ufsid/591e12427abe4feb 48G 1.5G 43G 3% / devfs 1.0K 1.0K 0B 100% /dev /dev/md0 3.4M 128K 3.0M 4% /var/run devfs 1.0K 1.0K 0B 100% /var/dhcpd/dev
As you can see total size (48G) does not correspond to the sum of available space (43G) and used space(1.5G).
What could be the reason of this behaviour?
Thanks in advance
-
@roldor said in Anomalous disk usage in pfSense 2.5.1:
What could be the reason of this behaviour?
What about :
48G minus 1.5G = 46,5 G.
Available is 43G. You miss 46.5 - 43 = 3.5G.
1.5G is the space used by files - folders and files you can delete, etc.The missing 3.5G could be :
Partition alignment.
The two FAT - or the 'inode' table(s)
The root directory.
Other internal file structures, whatever FreeBSD for this type of file system.Btw :
[2.5.2-RELEASE][root@pfsense.my-domain.net]/root: df -h Filesystem Size Used Avail Capacity Mounted on /dev/ufsid/54ca20c41b3d50b0 285G 7.0G 255G 3% .....
which means (285-255)-7= 23 Gb 'gone' :)
But, I don't care. It's a router, not a NAS.You shouldn't test the ZFS file system, I've heard it far worse ;)
Also : the same story is probably valid for fat32, NTFS, etc.
-
Hi, @gertjan
Thanks for your answer. Nervertheless, I would like to know the main reason of this behaviour.
Regards
-
Ok, you asked for it.
Btw : as you might know, as disk type device is known as a "block device".
When you store a file with one byte in it, or 200 bytes, at least 1 block will get allocated. This is often a sector, or a set of sectors on the physical device.
So, at least, 512 are 'gone' even when you use 1 or 20 bytes.For each file, 256 bytes are lost.
I advise you to locate a nice Youtube video that explains what a file system is, or UFS (used by pfSense == FreeBSD) or ZFS, if you use that.
See https://docs.freebsd.org/en/books/handbook/filesystems/ -
-