[英]Why is df command showing incorrect size?
I am using a 64 MB QSPI formatted in some UBI partitions. 我使用某些UBI分区中格式化的64 MB QSPI。
df is an applet of busybox 1.27.2 df是busybox 1.27.2的小程序
Actually, 其实,
~ # df -h
Filesystem Size Used Available Use% Mounted on
/dev/ubi0_0 3.1T 1.9T 1.2T 63% /
/dev/ubi1_0 1.6T 21.8G 1.5T 1% /conf
But, obviously, the size cannot be that! 但是,显然,大小不能那么大! Anyway, the use % seems to be correct, for the files contained in the partitions weight few MB. 无论如何,对于分区中包含的文件重量只有几个MB,使用%似乎是正确的。
How do you explain that? 您如何解释?
I have been able to fix the issue. 我已经能够解决此问题。
Busybox 1.28.0 commit d1535216 substitutes use of statfs with statvfs ( https://github.com/mirror/busybox/commit/d1535216ca27047e3962d61b975bd2a638aa45a2 ). Busybox 1.28.0 commit d1535216将statfs的使用替换为statvfs( https://github.com/mirror/busybox/commit/d1535216ca27047e3962d61b975bd2a638aa45a2 )。
I applied the commit to my project using Busybox 1.27.2 and, now, sizes are correct! 我使用Busybox 1.27.2将提交应用于我的项目,现在,大小是正确的!
Thanks anyway. 不管怎么说,还是要谢谢你。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.