Re: du and df Used Space Inconsistent On Fresh Install



On Fri, 31 Mar 2006 16:52:57 +1100, Cameron Hutchison wrote:

In list.debian.user you write:
[...]
df says ~340Mb used
du says ~830Mb used
that's quite a difference ....

Doinig a du from / is going to include all filesystems, not just
/dev/hda8. In particular /proc is going to be included and as the size
of /proc/kcore is equal to the amount of memory in the box, that could
add a sizable chunk to the difference.

Try:
# du -skx /

The -x restricts du to one file system.

Ah ! That gives this :

# du -skx /
311184

which is a much "better" figure. I guess the ~30000 Kb that du has
"missing", compared with df, might be the ext3 journal (since du
counts visible files and directories AIUI).

BTW: the box has 512Mb RAM, which is close to but not exactly the same
as the difference between the original 340Mb and 830Mb. Still, it
looks like /proc (and /sys and /dev) must have been the cause of the
discrepancy - thanks very much.

Nick Boyce
Bristol, UK
--
You are in a maze of twisty political parties, all alike.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx



Relevant Pages

  • Re: Dump Help
    ... where your valuable stuff is and back up those filesystems. ... > The dump utility backs up by file system, ... > You told it to back up the '/' file system and it apparently did. ... To unsubscribe, ...
    (freebsd-questions)
  • Re: [UNIONFS] 00/42 Unionfs and related patches review
    ... data changes will happen on a lower inode all within one second and not be ... lowerfilesystems are able to be local filesystems. ... saves on inodes and pages by having BOTH the upper and lower dentry point to ... dentry of the upper file system now points to an inode ...
    (Linux-Kernel)
  • Re: Weird Apache problem, hanging on particular data patterns
    ... I have checked ALL filesystems. ... When I split one of the two "weird" files up into 1k chunks only the ... This file when assembled hangs at exactly 1,130bytes, ... > with a subject of "unsubscribe". ...
    (Debian-User)
  • Re: disklabel differences FreeBSD, DragonFly
    ... and most of those qualify as needing to "run commands that workon ... filesystems on the two parts with different arguments ...". ... in root filesystem increases robustness if you have a power outage. ... true that converted me to the idea that reducing the file system count ...
    (freebsd-hackers)
  • Re: Tool for document management
    ... to search my archives of material I have written in the past, ... inability to make use of grep in searching my archives. ... file system for document storage, when, as the calendar rolled over ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)