简体   繁体   English

为什么df命令显示不正确的大小?

[英]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.

相关问题 16 位的位带结构给出了 3 个字节的大小以及不正确的分配 - Bit banded struct of 16 bits gives size as 3 bytes as well as incorrect assignments 为什么上传的二进制文件大小比实际大小小得多? - Why is the uploaded binary size so much smaller than the actual size? 为什么STM32CubeIDE在调试时不显示SFR寄存器? - Why is STM32CubeIDE not showing SFR registers when debugging? 在Windows 7命令窗口中测试嵌入式DOS应用程序时强制显示屏幕大小 - Force screen size when testing embedded DOS app in Windows 7 command window 如果不使用boost function.hpp,则将其二进制文件的大小增加200k。 为什么? - Including boost function.hpp, without using it, increases the size of my binary by 200k. Why? 为什么我们不应该在嵌入式系统中动态分配不同大小的内存 - Why shouldn't we have dynamic allocated memory with different size in embedded system 与at()或索引相比,为什么使用C ++迭代器会大大增加代码大小? - Why does using C++ iterators increase code size drastically compared to at() or indexing? Microblaze & C++ | 为什么在某些条件下代码大小会急剧增加? - Microblaze & C++ | Why does the code size increase dramatically under certain conditions? 为什么arm-none-eabi-size报告.data部分为0,即使我使用初始化的RAM? - Why does arm-none-eabi-size report the .data section to be 0 even though I am using initialized RAM? 为什么mbed生成不同大小的bin文件在线编译和离线编译(导出gcc_arm makefile) - Why mbed generating bin file different size online compiler and off line compile (export gcc_arm makefile)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM