The problem is that statvfs() only returns two values (total blocks and
free blocks) from which we have to calculate three values: size, free,
and available space. Prior to pooled storage, available = size - free.
This isn't true with ZFS.  On your local filesystem, df(1) recognizes it
as a ZFS filesystem, and uses libzfs to get the real amount of available
space.  Over NFS, we have no choice but to stick with POSIX semantics,
which means that we can never provide you with the right answer.  For
implementation details, check out adjust_total_blocks() in
usr/src/cmd/fs.d/df.c.

- Eric

On Thu, Jun 08, 2006 at 04:38:57PM -0700, Robert Milkowski wrote:
> NFS server (b39):
> 
> bash-3.00# zfs get quota nfs-s5-s8/d5201 nfs-s5-p0/d5110
> NAME             PROPERTY       VALUE                      SOURCE
> nfs-s5-p0/d5110  quota          600G                       local
> nfs-s5-s8/d5201  quota          600G                       local
> bash-3.00#
> bash-3.00# df -h | egrep "d5201|d5110"
> nfs-s5-p0/d5110        600G   527G    73G    88%    /nfs-s5-p0/d5110
> nfs-s5-s8/d5201        600G   314G   269G    54%    /nfs-s5-s8/d5201
> bash-3.00#
> 
> 
> NFS client (S10U1 + patches, NFSv3 mount over TCP):
> 
> bash-3.00# df -h | egrep "d5201|d5110"
> NFS-srv:/nfs-s5-p0/d5110   600G   527G    73G    88%    /opt/d5110
> NFS-srv:/nfs-s5-s8/d5201   583G   314G   269G    54%    /opt/d5201
> bash-3.00#
> 
> 
> Well why I get 583GB size for d5201 on NFS client?
> 
> ps. maybe I'm tired and missiong something really obvious...?
>  
>  
> This message posted from opensolaris.org
> _______________________________________________
> zfs-discuss mailing list
> zfs-discuss@opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

--
Eric Schrock, Solaris Kernel Development       http://blogs.sun.com/eschrock
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to