df on a nfs mounted share vs local?
Just wondering, how come df reports
root:~# df /mnt/export/ Filesystem 1k-blocks Used Available Use% Mounted on /dev/hda5 2562252 383792 2178460 15% /mnt/export on the server, while on a client that mounts /mnt/export over nfs: [root@space download]# df /mnt/nfs/ Filesystem 1k-blocks Used Available Use% Mounted on lfs:/mnt/export 2562256 383792 2178464 15% /mnt/nfs
Just a few blocks diffrent, but I've seen much bigger.. also seen +/- a few % on "Use"
Signature · 3 lines
Nils Olav Selåsdal <[email protected]> System Developer, UtelSystems a/s w w w . u t e l s y s t e m s . c o m
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
" " == Nils O <Selåsdal <[email protected]>> writes:
> Just wondering, how come df reports root:~# df /mnt/export/ > Filesystem 1k-blocks Used Available Use% Mounted on /dev/hda5 > 2562252 383792 2178460 15% /mnt/export on the server, while on > a client that mounts /mnt/export over nfs: [root@space > download]# df /mnt/nfs/ Filesystem 1k-blocks Used Available > Use% Mounted on lfs:/mnt/export 2562256 383792 2178464 15% > /mnt/nfs
> Just a few blocks diffrent, but I've seen much bigger.. also > seen +/- a few % on "Use"
It is a rounding error. The block size on the NFS client is typically 4 or 8k, whereas the block size on the local filesystem is typically 512 bytes.
On most UNIX implementations, the 'statvfs()' call supports two variables f_bsize and f_frsize, which allow you to distinguish between the two. Linux lacks kernel support for the latter variable.
Cheers,
Trond