Skip to contentSkip to conversation

NFS digest, Vol 1 #1251 - 1 msg

DISCUSSION Rongqing "Frank" Tu 2 participants 2 messages Dec 1, 2002 – Dec 2, 2002 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

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

Quoted 115 lines · 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;
}

-------------------------------------

Quoted 3 lines

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

Quoted 9 lines

--__--__--

_______________________________________________
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

#2 lore raw

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:
------------------

Quoted 8 lines

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?

Quoted 9 lines

-----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

Quoted 38 lines

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

Quoted 28 lines · 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

Quoted 34 lines
Quoted 6 lines

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.

Quoted 27 lines

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.

Quoted 1 line
Quoted 1 line

Usually only between 20-30 clients are doing anything with their

mounted

Quoted 20 lines
Quoted 3 lines

volumes.

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

problem?

Quoted 16 lines

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)

Quoted 47 lines
Quoted 35 lines
                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;
}

-------------------------------------

Quoted 3 lines

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

Quoted 9 lines

--__--__--

_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

End of NFS Digest

Quoted 7 lines

-------------------------------------------------------
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