All of lore.kernel.org
 help / color / mirror / Atom feed
* Error mounting nfs clients
@ 2002-11-27 18:50 Albers, Lucas
  2002-11-27 20:46 ` Trond Myklebust
  0 siblings, 1 reply; 2+ messages in thread
From: Albers, Lucas @ 2002-11-27 18:50 UTC (permalink / raw)
  To: 'nfs@lists.sourceforge.net'; +Cc: 'Valhalla-list@redhat.com'

I have been running an nfs server for a number of months.
Every couple of days I get the following error message in my logs:

Hostname rpc.mountd: getfh failed: Operation not permitted

When this happens the clients are unable to mount the nfs exported volumes.
Restarting the service will fix the problem.


After researching the issue.
It appears that the error is related to the defined value:
	NFS_FHSIZE 
in the code listed below in this file:
/usr/src/linux-2.4.18-5/fs/nfsd/nfsctl.c

/*-----------------------------------------------------*/
        if (err == 0) {
                if (fh.fh_size > NFS_FHSIZE)
                        err = -EINVAL;
/*-----------------------------------------------------*/

It appears that raising the value:

#define NFS_FHSIZE      32

Defined in /usr/include/linux/nfs.h
Would fix the problem.

Server Information
Kernel 2.4.18-5 with NFS compiled in.
Clients are all 7.3 and 8.0 RedHat machines.
I am running 16 nfsd daemons on the server.
Usually between 200 and 280 clients are mounting volumes at one time.
Usually only between 20-30 clients are doing anything with their mounted
volumes.

Does anyone have any idea, what exactly is happening to cause this problem?


see complete code snippet below:
-------------------------------------

static inline int
nfsctl_getfh(struct nfsctl_fhparm *data, __u8 *res)
{
        struct sockaddr_in      *sin;
        struct svc_client       *clp;
        int                     err = 0;
        struct knfsd_fh         fh;

        if (data->gf_addr.sa_family != AF_INET)
                return -EPROTONOSUPPORT;
        if (data->gf_version < 2 || data->gf_version > NFSSVC_MAXVERS)
                return -EINVAL;
        sin = (struct sockaddr_in *)&data->gf_addr;

        exp_readlock();
        if (!(clp = exp_getclient(sin)))
                err = -EPERM;
        else
                err = exp_rootfh(clp, to_kdev_t(data->gf_dev), data->gf_ino,
NULL, &fh, NFS_FHSIZE);
        exp_readunlock();
/*-----------------------------------------------------*/
        if (err == 0) {
                if (fh.fh_size > NFS_FHSIZE)
                        err = -EINVAL;
/*-----------------------------------------------------*/
                else {
                        memset(res,0, NFS_FHSIZE);
                        memcpy(res, &fh.fh_base, fh.fh_size);
                }
        }

        return err;
}
-------------------------------------



> --Luke
> --Computer Science Sysadmin, MSU Bozeman 
> --admin(AT)cs.montana.edu 994-3931 



-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T 
handheld. Power & Color in a compact size! 
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

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

end of thread, other threads:[~2002-11-27 20:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-27 18:50 Error mounting nfs clients Albers, Lucas
2002-11-27 20:46 ` Trond Myklebust

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.