1

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

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

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

schily
  • 19,173
  • What's so special about HP-UX? –  Sep 18 '15 at 04: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 09:00
  • I cannot seem to replicate that behaviour on an 11.31 server. –  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