Curious df output

Hi,
I just started with OpenWRT and I found curious the output of df:

root@OpenWrt:/# df -Th
Filesystem           Type            Size      Used Available Use% Mounted on
/dev/root            squashfs        4.5M      4.5M         0 100% /rom
tmpfs                tmpfs          60.7M    340.0K     60.4M   1% /tmp
/dev/mtdblock9       jffs2           9.0M      5.0M      4.0M  56% /overlay
overlayfs:/overlay   overlay         9.0M      5.0M      4.0M  56% /
tmpfs                tmpfs         512.0K         0    512.0K   0% /dev

It says the total size for / is 9.0M however I have placed myself a 10.4M folder in it and there is still some space available (4.0M). Is df the recommended tool to check storage in OpenWRT?

root@OpenWrt:/apps# pwd
/apps
root@OpenWrt:/apps# du -sh
10.4M	.

It's compressing the content

2 Likes

oh I see. That must explain why I thought writing files to it was a bit slower compared to /tmp. Also is df output referring to uncompressed size?

I would assume it shows the worst case scenario, if something that's uncompressable, like a ZIP, would be put there.

My 2nd guess would be based on current compression ratio.

:wink:

1 Like

This topic was automatically closed 0 minutes after the last reply. New replies are no longer allowed.