1

This question already has an answer here:

I have a disk size of 1TB. But when I do du -hx . on one of the folders it shows 1.4TB. and df -k . shows 60% full.

I dont understand why is the size shown greater that disk size itself.

Thanks, Mihir

marked as duplicate by Gilles, muru, cuonglm, Raphael Ahrens, chaos Sep 18 '15 at 5:51

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • What filesystem do you have on the disk? – Andy Dalton Sep 17 '15 at 20:56
  • Its an 'nfs' mounted disk. I checked this after running df -T – user1968376 Sep 17 '15 at 21:13
  • Samba can fudge the size of an exported SMB/CIFS volume, making it appear smaller than it really is (mainly to accommodate older Windows clients that can't deal with huge volumes). Perhaps the NFS server exporting your volume is doing something similar. What can you tell us about the NFS server? – James Sneeringer Sep 17 '15 at 22:04
1

There are three possible reasons:

  • your du implementation does not check hard linked files only once

  • the filesystem does not report the space used by files correctly with the stat() syscall

  • The filesystem is NFS and the fileserver is running HP-UX

  • What's so special about HP-UX? – DarkHeart Sep 18 '15 at 4:23
  • HP-UX has DEV_BSIZE == 1024 and for local filesystems, units are in multiples of DEV_BSIZE. NFS however is defined to report values in multiples of 512 which is ignored by HP-UX. – schily Sep 18 '15 at 9:00
  • I cannot seem to replicate that behaviour on an 11.31 server. – DarkHeart Sep 18 '15 at 11:51
  • How did you test this? What did you use as NFS client? – schily Sep 18 '15 at 12:43

Not the answer you're looking for? Browse other questions tagged or ask your own question.