Skip to contentSkip to conversation

updating informations of file systems

DISCUSSION Pol 3 participants 7 messages Feb 9, 2009 – Feb 12, 2009

lore
Share & tools
lore

Pol

author
#0 lore raw

Sometimes i happened to notice that the result of the 'du -s' command on a ext3 partition of my local disc does not yield the real value. My impression is that, some times, it may take hours, before the real space used by the partition being updated.
Is that possible?

Thank you

--Pol

#1 lore raw
Quoted 5 lines · Pol

Sometimes i happened to notice that the result of the 'du -s' command on a ext3 partition of my local disc does not yield the real value. My impression is that, some times, it may take hours, before the real space used by the partition being updated.
Is that possible?

No.

BTW, "du" reports the space used by a specific set of directories. If you want to know the total amount of space free and used for a partition, you need to use "df".

Apart from anything else, "du" won't report the space used by files which have been deleted (unlinked) but still exist because a process is using them.

Signature · 1 line
Glynn Clements <[email protected]>
author
#2 lore raw
Quoted 4 lines · Glynn Clements

Apart from anything else, "du" won't report the space used by files which have been deleted (unlinked) but still exist because a process is using them.

Sorry, i meant 'df'.
Is it possible 'df' does not report the current amount of space used by partitions?

thank you
--Pol

#3 lore raw
Quoted 7 lines · Pol
Quoted 3 lines

Apart from anything else, "du" won't report the space used by files which have been deleted (unlinked) but still exist because a process is using them.

Sorry, i meant 'df'.
Is it possible 'df' does not report the current amount of space used by partitions?

No. Any allocation or deallocation of blocks will be immediately reflected in the output from "df" (for local filesystems, at least; there may be issues with networked filesystems).

Signature · 1 line
Glynn Clements <[email protected]>
#4 lore raw
Quoted 9 lines · Glynn Clements
Quoted 7 lines · Pol
Quoted 3 lines

Apart from anything else, "du" won't report the space used by files which have been deleted (unlinked) but still exist because a process is using them.

Sorry, i meant 'df'.
Is it possible 'df' does not report the current amount of space used by partitions?

General "df" output will describe the following fields..

Filesystem |1K-blocks | Used | Available | Use% | Mounted on

As Glynn explained, there are issues in "df" with networked filesystems like NFS. There it will print blanks for attributes that the server doesn't support.

~Chamith

Quoted 5 lines

No. Any allocation or deallocation of blocks will be immediately reflected in the output from "df" (for local filesystems, at least; there may be issues with networked filesystems).

Signature · 1 line
*** Microsoft isn't evil, they just make really crappy operating systems ***
author
#5 lore raw
In reply to Glynn Clements
Quoted 10 lines · Glynn Clements
Quoted 3 lines · Pol

Sorry, i meant 'df'.
Is it possible 'df' does not report the current amount of space used by partitions?

No. Any allocation or deallocation of blocks will be immediately reflected in the output from "df" (for local filesystems, at least; there may be issues with networked filesystems).

Problem must be in the temp files and directories managed by ktorrent. According to ktorrent, 2 GB of a 4 GB directory have been downloaded in the last 24 hours, yet 'df' shows no sensible change of the available space in that partition.
Remarkably, 'du -s' returns 4GB for that directory, although my guess is that size is only 2GB actually.
How to double check size of that directory and files therein?

Thank you
--Pol

#6 lore raw
Quoted 9 lines · Pol
Quoted 8 lines
Quoted 3 lines

Sorry, i meant 'df'.
Is it possible 'df' does not report the current amount of space used by partitions?

No. Any allocation or deallocation of blocks will be immediately reflected in the output from "df" (for local filesystems, at least; there may be issues with networked filesystems).

Quoted 6 lines

Problem must be in the temp files and directories managed by ktorrent. According to ktorrent, 2 GB of a 4 GB directory have been downloaded in the last 24 hours, yet 'df' shows no sensible change of the available space in that partition.
Remarkably, 'du -s' returns 4GB for that directory, although my guess is that size is only 2GB actually.

It's not uncommon for BitTorrent clients to start by creating all of the files with the correct sizes, then insert the data into the files as it's received.

If ktorrent does this, then it will use the full 4GB from the start, so you wouldn't see any change in disk usage while it is running.

Quoted 1 line

How to double check size of that directory and files therein?

"du" will count the disk space actually used by each file, including indirect blocks and slack space, and not counting holes (blocks of zeros which aren't stored on disk). Files with multiple links are only counted once.

Note that the result of "du -s ..." for the root of a filesystem won't match the result of "df", as "du" doesn't count blocks which aren't associated with a specific file (e.g. superblocks, inode table, free space bitmap), or which belongs to a file with no links.

Signature · 1 line
Glynn Clements <[email protected]>