I have a Solaris 10 server that has mounted a remote filesystem via NFS. I believe the remote system is a NetApp, but it's not clear.
When I run df -h <mountpoint> I get size 12T, used 10T with a capacity at 87%.
When I change to the mountpoint and run ls -A |xargs du -s I get about 8 megabytes. I have come to expect du to descend recursively and add up all the file sizes, but it doesn't appear to do it here.
As a hedge, I ran
find <mountpoint> -ls | awk '{total=total+$7}END{print total}' the answer is 13006791645. When divided by 1024^3 (1073741824), I get about 12.1 terabytes.
So it would seem that find -ls and df are more or less in agreement. Why would du fail so greviously?
PS: the command ls -A grabs the hidden snapshot directories also but find finds nothing (except "cycle detected").
du -sgives a total per name given on the command line, unless you use--total(GNU du only, I don't have Solaris handy to check what options that version ofduaccepts). So did you add up all the numbers given byls -A |xargs du -s? Why not just dodu -s $mountpoint?gduon Solaris. In special as it is too dumb to understand extended attribute files.-lsis the file size, not its disk usage