DF and Du commands in Linux & Unix statistically inconsistent disk space values often use DF and Du to see the disk free space and space, and occasionally find that DF (free space) is less than the disk size minus du (footprint).
Two commands are implemented in the same way, but the process of implementation is fundamentally different. Just as two people go to the same place, but take different paths, so the length of the journey is different.
The full name of the DF command is disk free, and it is obvious that it is the idle space in the statistics disk, or the number of free disk blocks. It is calculated from the disk allocation graph.
The full name of the du command is disk used, which is the space that the statistics disk has already used. It is the direct statistics of the size of each directory, not from the hard disk to obtain information.
You typically encounter two situations:
1. The du command is a user-level program that does not take into account metadata, while the DF command looks at the disk allocation diagram of the file system and considers it. The DF command obtains real file system data, while the DU command only looks at parts of the file system.
2. If a user deletes a file in a directory that is open by a running app, the value returned by the du command displays the size of the directory after the file has been subtracted. However, the DF command does not show the size after subtracting the file until the running application closes the open file, and the value returned by DF shows the file system usage after subtracting the file.
Use DF command to show the free space of the test is not correct everyone in peace, I use DF revealed that the disk's surplus space is 20G, but I write data in the middle of the disk when the reminder there is no space.
Then I delete a local file can write disk, Sennheiser official website.
I would like to ask everyone has not been from other doorways to obtain the disk surplus space is correct, RHEL3 on the Ulimit and xdmcp problem Yu Phlogistic yu.
The file system partition is a EXT3 partition.
Thank you! is not the disk qualified, perhaps see turn2fsdf incorrect ... No way.
Df-i
See if there are any available inode.
One situation is that the file system Inode is not present, and another scenario is that the 5% space that is stored for root cannot be used by the average user. The former may have a larger sex control. Df-i
See if there is an inode that is not available.
One scenario is that the file system is not in the inode, and another condition is the 5% that was saved for root ...
Weichongli proclaimed in 2010-04-29 11:52 http://linux./bbs/images/common/back.gif
Well, maybe that's the way I look at the next time I show this.
Thanks for all the answers. Reply 4# Weichongli
It is true that the problem is caused by this, even if the inode is exhausted.
Thank you! Reply 6# Wzhuzhu
The ext3 file system rarely shows this situation in the context of acquiescence.
How much is a small file in your system?
Or your file system block size installation of the control large, ★ ¡ï Server Data Statistics program, method? Help Yu phlogistic yu phlogistic? (tune2fs-l)
DF and Du commands statistics on disk space inaccuracy