1

On a panfs filesystem:

  • pan_quota says I'm using 8.67 GB.
  • du -hcsx says I'm using 8.1 GB.
  • baobab says I'm using 3.3 GB.

This is for my home directory, with a 8 GB soft and 10 GB hard quota. What might cause the modest discrepancy between duand pan_quota? And what may cause the huge discrepancy between baobab and either du or pan_quota?

The difference is not due to one or two specific files, but propagates down and is present for smaller and larger directories alike.

gerrit
  • 3,487

1 Answers1

1

The disk space used by a file includes more than the size of the contents. Most filesystems use fixed-size blocks; if a file's size isn't a multiple of the block size, then the last block is only partially filled. du counts the total number of blocks, which is usually a little more than the sum of the file sizes since it also includes the part of the last block that isn't filled.

I think the difference between pan_quota and du -h is due to the fact that the PANFS filesystem doesn't report its block size accurately. The JASMIN FAQ suggests using pand_du instead of du.

It seems that on your machine, Baobab is displaying the sum of the file sizes. That's the number you get with du --appparent-size. Baobab displays the actual disk usage on my machine (but with 1GB = 109 bytes, whereas du -h uses 1GB = 230 bytes); I think this is because you're using a version older than this change

commit dbcbe27e0452eeacbc4a253f1b0b1a06708834de
Author: Paolo Borelli <pborelli@gnome.org>
Date:   2012-01-07

    Use the STANDARD_ALLOCATED_SIZE file attribute.

but I haven't traced it down to make sure.

For more information about disk usage discrepancies, see Why are there so many different ways to measure disk usage?

  • I neglected to mention that I don't run baobab on the host machine (where it is unavailable), but through sshfs, so perhaps that prevents baobab from performing an accurate calculation. – gerrit Apr 23 '16 at 20:33