mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* nfs and LBD support (2TB+)
@ 2004-12-01 23:20 Stephan van Hienen
  2004-12-01 23:50 ` Trond Myklebust
       [not found] ` <20041201234619.GO22547@schnapps.adilger.int>
  0 siblings, 2 replies; 5+ messages in thread
From: Stephan van Hienen @ 2004-12-01 23:20 UTC (permalink / raw)
  To: linux-kernel

Hi,

i don't know if this is kernel related ?

server is exporting nfs 2.3TB

/dev/md0              2.3T  959G  1.4T  41% /raid

on the client i see this as 316GB :

storage:/raid         316GB  129GB  187GB  41% /raid

server is running 2.6.10-rc2
client is running 2.6.9-ac11

both have LBD support enabled
(and both are running tao (which is based on rhel 3))

any ideas ?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: nfs and LBD support (2TB+)
  2004-12-01 23:20 nfs and LBD support (2TB+) Stephan van Hienen
@ 2004-12-01 23:50 ` Trond Myklebust
  2004-12-02 17:51   ` Stephan van Hienen
       [not found] ` <20041201234619.GO22547@schnapps.adilger.int>
  1 sibling, 1 reply; 5+ messages in thread
From: Trond Myklebust @ 2004-12-01 23:50 UTC (permalink / raw)
  To: Stephan van Hienen; +Cc: linux-kernel

to den 02.12.2004 Klokka 00:20 (+0100) skreiv Stephan van Hienen:
> Hi,
> 
> i don't know if this is kernel related ?
> 
> server is exporting nfs 2.3TB
> 
> /dev/md0              2.3T  959G  1.4T  41% /raid
> 
> on the client i see this as 316GB :
> 
> storage:/raid         316GB  129GB  187GB  41% /raid
> 
> server is running 2.6.10-rc2
> client is running 2.6.9-ac11
> 
> both have LBD support enabled
> (and both are running tao (which is based on rhel 3))
> 
> any ideas ?

Yep... There is a slight problem with the way glibc has decided to
implement the statvfs function when interacting with 2.6.x kernels...

The POSIX definition of statvfs declares that the entry f_blocks (which
returns the size of the filesystem) shall be in units of f_frsize (see
the manpage).

OTOH the system call sys_statfs() still returns f_blocks in units of
f_bsize (as it has done since the dawn of Linux)...

So when glibc calls sys_statfs(), and then just copies the results into
the statvfs format structure, it is putting a value of f_blocks which is
in units of f_bsize into something that should be in units of f_frsize.

This was not a problem in Linux-2.4.x, 'cos glibc would simply emulate a
value for f_frsize by setting it to f_bsize.
However for 2.6.x kernels, glibc grabs a value of f_frsize that the
kernel gives it. So if that value differs from the bsize (and allowing
f_frsize != f_bsize is the whole point of passing a value for f_frsize
to glibc in the first place), you get wierd discrepancies like the
above.

Cheers,
  Trond

-- 
Trond Myklebust <trond.myklebust@fys.uio.no>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: nfs and LBD support (2TB+)
       [not found] ` <20041201234619.GO22547@schnapps.adilger.int>
@ 2004-12-02 17:49   ` Stephan van Hienen
  0 siblings, 0 replies; 5+ messages in thread
From: Stephan van Hienen @ 2004-12-02 17:49 UTC (permalink / raw)
  To: Andreas Dilger; +Cc: linux-kernel

On Wed, 1 Dec 2004, Andreas Dilger wrote:

> Are you running NFS v3 or v2?  I _think_ there is a 2T limit for NFS v2.
not sure
i have support for nfs2 and 3 compiled in both kernels
so i think it's running 3 ?
(how can i check, it doesn't show with mount)

btw another system sun ultrasparc running 2.4.20 show the mount ok
(2TB+)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: nfs and LBD support (2TB+)
  2004-12-01 23:50 ` Trond Myklebust
@ 2004-12-02 17:51   ` Stephan van Hienen
  2004-12-02 18:08     ` Trond Myklebust
  0 siblings, 1 reply; 5+ messages in thread
From: Stephan van Hienen @ 2004-12-02 17:51 UTC (permalink / raw)
  To: Trond Myklebust; +Cc: linux-kernel

On Wed, 1 Dec 2004, Trond Myklebust wrote:

> Yep... There is a slight problem with the way glibc has decided to
> implement the statvfs function when interacting with 2.6.x kernels...
>

<..>

> This was not a problem in Linux-2.4.x, 'cos glibc would simply emulate a
> value for f_frsize by setting it to f_bsize.
> However for 2.6.x kernels, glibc grabs a value of f_frsize that the
> kernel gives it. So if that value differs from the bsize (and allowing
> f_frsize != f_bsize is the whole point of passing a value for f_frsize
> to glibc in the first place), you get wierd discrepancies like the
> above.

and is there a fix ?
(it looks like it's working ok, but still i would like to see the actual 
free space/usage)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: nfs and LBD support (2TB+)
  2004-12-02 17:51   ` Stephan van Hienen
@ 2004-12-02 18:08     ` Trond Myklebust
  0 siblings, 0 replies; 5+ messages in thread
From: Trond Myklebust @ 2004-12-02 18:08 UTC (permalink / raw)
  To: Stephan van Hienen; +Cc: linux-kernel

to den 02.12.2004 Klokka 18:51 (+0100) skreiv Stephan van Hienen:

> and is there a fix ?
> (it looks like it's working ok, but still i would like to see the actual 
> free space/usage)

...for glibc? Wrong list.

If you want to revert the patch that changes the NFS value of frsize to
reflect the server's value, then that is

http://linux.bkbits.net:8080/linux-2.6/user=trond.myklebust/gnupatch@412a6c715tssAB_N5Kg-Z1JqFn4FmA


Cheers,
  Trond
-- 
Trond Myklebust <trond.myklebust@fys.uio.no>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-12-02 18:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-01 23:20 nfs and LBD support (2TB+) Stephan van Hienen
2004-12-01 23:50 ` Trond Myklebust
2004-12-02 17:51   ` Stephan van Hienen
2004-12-02 18:08     ` Trond Myklebust
     [not found] ` <20041201234619.GO22547@schnapps.adilger.int>
2004-12-02 17:49   ` Stephan van Hienen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®