2002-12-01 19:42:32

by Frank

[permalink] [raw]
Subject: Re: NFS digest, Vol 1 #1251 - 1 msg

It seems the error # was not -EINVAL, but -EPERM.
I ever experieced the same error message and I debuged out that the error
was caused by -EPERM, but I was on a differrent situation. I tried to
export a mounted nfs point and I got this "permission denied" message.

Have you tried tracking the code?

Frank


On Wed, 27 Nov 2002 [email protected] wrote:

> Send NFS mailing list submissions to
> [email protected]
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.sourceforge.net/lists/listinfo/nfs
> or, via email, send a message with subject or body 'help' to
> [email protected]
>
> You can reach the person managing the list at
> [email protected]
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of NFS digest..."
>
>
> Today's Topics:
>
> 1. Error mounting nfs clients (Albers, Lucas)
>
> --__--__--
>
> Message: 1
> From: "Albers, Lucas" <[email protected]>
> To: "'[email protected]'" <[email protected]>
> Cc: "'[email protected]'" <[email protected]>
> Date: Wed, 27 Nov 2002 11:50:02 -0700
> Subject: [NFS] Error mounting nfs clients
>
> 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
>
>
>
>
> --__--__--
>
> _______________________________________________
> NFS maillist - [email protected]
> https://lists.sourceforge.net/lists/listinfo/nfs
>
>
> End of NFS Digest
>



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs


2002-12-02 18:06:38

by Lucas Albers

[permalink] [raw]
Subject: RE: Re: NFS digest, Vol 1 #1251 - 1 msg

I tried turning off nfs version 1 and 2 to try and solve this problem.
This had the unforeseen effect of killing my nis server.
For that reason I have had to go back to exporting all versions of nfs
v1,v2,v3.

I am not sure what the actual cause of the error message was in this
particular problem.
Trond said it was related to the mounting of the filesystem by the
client:
------------------

> From: Trond Myklebust [mailto:[email protected]]
> Sent: Wednesday, November 27, 2002 1:47 PM
> If you do that, you will no longer be running NFSv2. Under NFSv2, file
> handle sizes are 32 bytes long, no more, no less...
>
> If the filesystem you are using needs to generate filehandles that are
> greater that 32 bytes long, then you will probably only be able to use
> it with NFSv3

------------------------
It appears thec clients are needing to generate filehandles that are
longer then 32 bytes long?
This is causing the error message, long filenames?


> -----Original Message-----
> From: [email protected] [mailto:nfs-
> [email protected]] On Behalf Of Rongqing "Frank" Tu
> Sent: Sunday, December 01, 2002 12:42 PM
> To: [email protected]
> Subject: [NFS] Re: NFS digest, Vol 1 #1251 - 1 msg
>
> It seems the error # was not -EINVAL, but -EPERM.
> I ever experieced the same error message and I debuged out that the
error
> was caused by -EPERM, but I was on a differrent situation. I tried to
> export a mounted nfs point and I got this "permission denied" message.
>
> Have you tried tracking the code?
>
> Frank
>
>
> On Wed, 27 Nov 2002 [email protected] wrote:
>
> > Send NFS mailing list submissions to
> > [email protected]
> >
> > To subscribe or unsubscribe via the World Wide Web, visit
> > https://lists.sourceforge.net/lists/listinfo/nfs
> > or, via email, send a message with subject or body 'help' to
> > [email protected]
> >
> > You can reach the person managing the list at
> > [email protected]
> >
> > When replying, please edit your Subject line so it is more specific
> > than "Re: Contents of NFS digest..."
> >
> >
> > Today's Topics:
> >
> > 1. Error mounting nfs clients (Albers, Lucas)
> >
> > --__--__--
> >
> > Message: 1
> > From: "Albers, Lucas" <[email protected]>
> > To: "'[email protected]'" <[email protected]>
> > Cc: "'[email protected]'" <[email protected]>
> > Date: Wed, 27 Nov 2002 11:50:02 -0700
> > Subject: [NFS] Error mounting nfs clients
> >
> > 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
> >
> >
> >
> >
> > --__--__--
> >
> > _______________________________________________
> > NFS maillist - [email protected]
> > https://lists.sourceforge.net/lists/listinfo/nfs
> >
> >
> > End of NFS Digest
> >
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> NFS maillist - [email protected]
> https://lists.sourceforge.net/lists/listinfo/nfs



-------------------------------------------------------
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 - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs