NAS326 du is showing less used than df
Harald
Posts: 3
Freshman Member
Freshman Member
My NAS326 is almost full. df indicates 3.4T used from 3.6T, but du indicates 1.4T used. Why the difference?
#NAS_Sep_2019
#NAS_Sep_2019
0
All Replies
-
Basically, df reads the superblock only and trusts it completely. du reads each object and sums them up.
Also, a running process can keep a deleted file open. This means the space will still be reserved and seen by df, but since du will no longer see a reference to that file in the directory tree, it cannot see those reserved blocks.0 -
The du command only calculates the space occupied by the file.
The du command only calculates the storage space occupied by files that can be accessed. There are two cases that the du command does not calculate the space that has been allocated to the file.
Case 1:
The file is hidden. For example, if a file is stored in the /hola directory and then the file system is installed in the /hola directory, the du command will not calculate the storage space occupied by the files in the /hola directory.
Case 2:
The file was opened by another application and the file was deleted. In this case, the storage space occupied by the file will remain in the assigned state until all access to this file is closed. Since there is no relevant record for this file in the directory, the du command will not calculate the allocated space of this file, however the df command will calculate this part of the allocated space.0 -
The version of busybox used in the NAS326 firmware is 1.19.4 from 4 Feb 2012. This version of busybox contains a bug in the du command which makes it unable to understand sizes over 2TB. I just discovered this myself after buying my own NAS326 and wondering why the 3.6TB of data I synced from my TrueNAS server to a folder on the NAS326 showed 2.0TB used when I checked with du when I know from the same command on the TrueNAS that the actual space used is around 3.6TB.Harald said:My NAS326 is almost full. df indicates 3.4T used from 3.6T, but du indicates 1.4T used. Why the difference?
#NAS_Sep_2019
0 -
Hi @grizewald,
Thank you for your feedback.
Currently we don’t have plan for upgrading NAS326 BusyBox version.
Please kindly limit your file size less than 2TB.
0
Categories
- All Categories
- 164 Beta Program
- 1.7K Nebula
- 86 Nebula Ideas
- 62 Nebula Status and Incidents
- 4.7K Security
- 236 Security Ideas
- 1.1K Switch
- 50 Switch Ideas
- 908 WirelessLAN
- 27 WLAN Ideas
- 5.3K Consumer Product
- 172 Service & License
- 294 News and Release
- 65 Security Advisories
- 14 Education Center
- 911 FAQ
- 399 Nebula FAQ
- 249 Security FAQ
- 90 Switch FAQ
- 100 WirelessLAN FAQ
- 18 Consumer Product FAQ
- 55 Service & License FAQ
- 34 Documents
- 34 Nebula Monthly Express
- 68 About Community
- 51 Security Highlight
Consumer Product Help Center
FAQ
Ally Member
Zyxel Employee