2010/11/8 Pádraig Brady <[email protected]>: > On 08/11/10 20:37, Tim Spriggs wrote: >> Hello, >> >> I am running gentoo-prefix on OSX which builds coreutils. When I >> compare the output of the system df to the standard GNU df I get: >> >> >> $ /bin/df -h /data/hirise06 >> Filesystem Size Used Avail Capacity Mounted on >> hiserve2:/vol/hirise06 7.9Ti 430Gi 7.5Ti 6% /data/hirise06 >> >> $ df -h /data/hirise06 >> Filesystem Size Used Avail Use% Mounted on >> hiserve2:/vol/hirise06 >> 2.0T 431G -523G - /data/hirise06 >> >> The 2.0T size looks suspicious to me. Maybe an integer is overflowing >> somewhere? > > Well 2T is between 32 bit and 64 bit. > If I had to guess I'd say df was using a 32 bit statfs > that was returning 1024 blksize? > > Could you compare the system calls made by both versions of df. > On GNU/Linux I can trace the statfs calls like: > > strace -v -e statfs,statfs64 df /data/hirise06 > > If the trace for the above gives no output > for either command, then can you include the > full trace output. > > thanks, > Pádraig. >
I ran: # dtruss -c -f /opt/prefix/bin/df /data/hirise06 CALL COUNT exit 1 fcntl_nocancel 1 fstatfs64 1 getgid 1 gethostuuid 1 getrlimit 1 kqueue 1 shared_region_check_np 1 shm_open 1 statfs64 1 workq_open 1 bsdthread_register 2 fcntl 2 getdirentries64 2 getfsstat64 2 getpid 2 ioctl 2 lseek 2 madvise 2 thread_selfid 3 write_nocancel 3 issetugid 4 pread 4 getegid 7 read 7 workq_kernreturn 9 close 10 open 10 kevent 11 munmap 11 open_nocancel 12 close_nocancel 13 fstat64 13 read_nocancel 15 __sysctl 19 getuid 19 geteuid 27 mmap 30 stat64 38 and similarly: # dtruss -c -f /bin/df /data/hirise06 CALL COUNT bsdthread_register 1 exit 1 fcntl 1 fstat64 1 geteuid 1 getrlimit 1 issetugid 1 shared_region_check_np 1 statfs64 1 thread_selfid 1 getfsstat64 2 getpid 2 ioctl 2 madvise 2 write_nocancel 2 close 3 close_nocancel 3 open 3 open_nocancel 3 read_nocancel 3 pread 4 munmap 5 stat64 6 __sysctl 15 mmap 16
