oliv
February 2, 2021, 3:35am
#1
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 .
frollic
February 2, 2021, 6:19am
#2
It's compressing the content
Hi
I would like to get the real available storage space in my router. When I use df -h I get the following:
root@LEDE:~# df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 2.8M 2.8M 0 100% /rom
tmpfs 250.8M 1.1M 249.7M 0% /tmp
/dev/ubi0_1 23.5M 56.0K 22.2M 0% /overlay
overlayfs:/overlay 23.5M 56.0K 22.2M 0% /
ubi1:syscfg 29.6M 252.0K 27.8M 1% /tm…
2 Likes
oliv
February 2, 2021, 12:23pm
#3
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?
frollic
February 2, 2021, 1:47pm
#4
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.
1 Like
system
closed
February 12, 2021, 1:48pm
#5
This topic was automatically closed 0 minutes after the last reply. New replies are no longer allowed.