linux-admin.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* updating informations of file systems
@ 2009-02-09  8:55 Pol
  2009-02-09 10:21 ` Glynn Clements
  0 siblings, 1 reply; 7+ messages in thread
From: Pol @ 2009-02-09  8:55 UTC (permalink / raw)
  To: linux-admin

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 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: updating informations of file systems
  2009-02-09  8:55 updating informations of file systems Pol
@ 2009-02-09 10:21 ` Glynn Clements
  2009-02-09 14:43   ` Pol
  0 siblings, 1 reply; 7+ messages in thread
From: Glynn Clements @ 2009-02-09 10:21 UTC (permalink / raw)
  To: xtekhne; +Cc: linux-admin


Pol wrote:

> 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.

-- 
Glynn Clements <glynn@gclements.plus.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: updating informations of file systems
  2009-02-09 10:21 ` Glynn Clements
@ 2009-02-09 14:43   ` Pol
  2009-02-10  9:03     ` Glynn Clements
  0 siblings, 1 reply; 7+ messages in thread
From: Pol @ 2009-02-09 14:43 UTC (permalink / raw)
  To: linux-admin

Glynn Clements wrote:
> 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 



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: updating informations of file systems
  2009-02-09 14:43   ` Pol
@ 2009-02-10  9:03     ` Glynn Clements
  2009-02-11 11:53       ` Chamith Kumarage
  2009-02-11 23:03       ` Pol
  0 siblings, 2 replies; 7+ messages in thread
From: Glynn Clements @ 2009-02-10  9:03 UTC (permalink / raw)
  To: xtekhne; +Cc: linux-admin


Pol wrote:

> > 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).

-- 
Glynn Clements <glynn@gclements.plus.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: updating informations of file systems
  2009-02-10  9:03     ` Glynn Clements
@ 2009-02-11 11:53       ` Chamith Kumarage
  2009-02-11 23:03       ` Pol
  1 sibling, 0 replies; 7+ messages in thread
From: Chamith Kumarage @ 2009-02-11 11:53 UTC (permalink / raw)
  To: Glynn Clements; +Cc: xtekhne, linux-admin

On Tue, 2009-02-10 at 09:03 +0000, Glynn Clements wrote:
> Pol wrote:
> 
> > > 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

> 
> 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).
> 
-- 
*** Microsoft isn't evil, they just make really crappy operating systems ***


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: updating informations of file systems
  2009-02-10  9:03     ` Glynn Clements
  2009-02-11 11:53       ` Chamith Kumarage
@ 2009-02-11 23:03       ` Pol
  2009-02-12  6:48         ` Glynn Clements
  1 sibling, 1 reply; 7+ messages in thread
From: Pol @ 2009-02-11 23:03 UTC (permalink / raw)
  To: linux-admin

Glynn Clements wrote:
> Pol wrote:

>> 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

     



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: updating informations of file systems
  2009-02-11 23:03       ` Pol
@ 2009-02-12  6:48         ` Glynn Clements
  0 siblings, 0 replies; 7+ messages in thread
From: Glynn Clements @ 2009-02-12  6:48 UTC (permalink / raw)
  To: xtekhne; +Cc: linux-admin


Pol wrote:

> >> 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. 

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.

> 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.

-- 
Glynn Clements <glynn@gclements.plus.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-02-12  6:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-09  8:55 updating informations of file systems Pol
2009-02-09 10:21 ` Glynn Clements
2009-02-09 14:43   ` Pol
2009-02-10  9:03     ` Glynn Clements
2009-02-11 11:53       ` Chamith Kumarage
2009-02-11 23:03       ` Pol
2009-02-12  6:48         ` Glynn Clements

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).