Announcement

Collapse
No announcement yet.

Discrepancy between df and du [even after reboot!]

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Discrepancy between df and du [even after reboot!]

    Hi,
    I made an interesting observation: the free and used disk space that is reported by df and du is inconsistent and even certain values reported by df alone seem to be inconsistent.
    I have an encrypted home directory; I'm not sure if that matters. For what I am saying, the encrypted home is moutned/unencrypted.
    I did reboot and the numbers did not change whatsoever. All the posts I found by googling suggest that problems due to open file handles should disappear after rebooting.

    Here is the 'df -h' output:
    Code:
    Filesystem                Size  Used Avail Use% Mounted on
    /dev/mapper/kubuntu-root   89G   80G  4.2G  96% /
    none                      4.0K     0  4.0K   0% /sys/fs/cgroup
    udev                      1.5G  4.0K  1.5G   1% /dev
    tmpfs                     301M  868K  301M   1% /run
    none                      5.0M     0  5.0M   0% /run/lock
    none                      1.5G  872K  1.5G   1% /run/shm
    none                      100M   16K  100M   1% /run/user
    /dev/sda1                 228M  166M   51M  77% /boot
    /home/me/.Private          89G   80G  4.2G  96% /home/me
    /dev/sdb1                 917G  844G   27G  97% /media/data
    If you look at /home/me/.Private, it says size 89GB (which is correct), used 80GB andavailable 4.2GB - should the latter two not add up to the first one

    And if I do 'du -sh /home/me' (/home/me is my home directoy), I get 68GB!?! Looking at the size of my (non-system) folders, the sum is 60GB; so, apparently there are some hidden folders that are pretty large (which in itself surprises me... .kde is 1GB and .local is 3.8GB), but that does not explain the discrepancy with df!

    Can anyone explain to me what is going on?
    Thanks,
    Chopstick
    Last edited by Chopstick; Nov 02, 2013, 02:36 PM.

    #2
    Add up the Avail values for /, /sys/fs/cgroup, /dev, /run, /run/lock, /run/shm, /run/user, and /boot.
    Using Kubuntu Linux since March 23, 2007
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      Thanks, Snowhog. Here are the values:

      $ df -h /
      Filesystem Size Used Avail Use% Mounted on
      /dev/mapper/kubuntu-root 89G 83G 1.4G 99% /
      ~$ df -h /sys/fs/cgroup
      Filesystem Size Used Avail Use% Mounted on
      none 4.0K 0 4.0K 0% /sys/fs/cgroup
      ~$ df -h /dev
      Filesystem Size Used Avail Use% Mounted on
      udev 1.5G 4.0K 1.5G 1% /dev
      ~$ df -h /run/
      Filesystem Size Used Avail Use% Mounted on
      tmpfs 301M 852K 301M 1% /run
      ~$ df -h /run/lock/
      Filesystem Size Used Avail Use% Mounted on
      none 5.0M 0 5.0M 0% /run/lock
      ~$ df -h /run/shm/
      Filesystem Size Used Avail Use% Mounted on
      none 1.5G 444K 1.5G 1% /run/shm
      ~$ df -h /run/user/
      Filesystem Size Used Avail Use% Mounted on
      none 100M 12K 100M 1% /run/user
      ~$ df -h /boot/
      Filesystem Size Used Avail Use% Mounted on
      /dev/sda1 228M 166M 51M 77% /boot

      The total of this is 4.86GB. That's approximately the amount that's missing between Size, Used and Avail in my $HOME. Is this supposed to be the missing space?
      But it does not explain the different to the du -sch result...

      Comment

      Working...
      X