On Thu, Eric Schrock wrote: > The problem is that statvfs() only returns two values (total blocks and > free blocks) from which we have to calculate three values: size, free,
? >From statvfs(2) the following are returned in struct statvfs: fsblkcnt_t f_blocks; /* total # of blocks on file system in units of f_frsize */ fsblkcnt_t f_bfree; /* total # of free blocks */ fsblkcnt_t f_bavail; /* # of free blocks avail to So, the data is being passed back. Is there something I am missing? > 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. So, from the comments, that bit of df code seems to be adjusting for quotas if they exist? I am not sure I understand why zfs' VFS_STATVFS() function can't do what the df command is doing and then return the appropriate value to both df and the NFS server? So, in Robert's case, is that 17GB really available and if so that would seem to be an important thing to report to the NFS clients. Spencer > 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 _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss