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

3
  • What filesystem do you have on the disk? Sep 17, 2015 at 20:56
  • Its an 'nfs' mounted disk. I checked this after running df -T Sep 17, 2015 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? Sep 17, 2015 at 22:04

1 Answer 1

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

4
  • What's so special about HP-UX?
    – user14755
    Sep 18, 2015 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, 2015 at 9:00
  • I cannot seem to replicate that behaviour on an 11.31 server.
    – user14755
    Sep 18, 2015 at 11:51
  • How did you test this? What did you use as NFS client?
    – schily
    Sep 18, 2015 at 12:43

Not the answer you're looking for? Browse other questions tagged .