2004-10-27 16:43:03

by mrg

[permalink] [raw]
Subject: Re: NFS Server problem (kernel > 2.6.5 ?)

Thanks, it worked!

I uninstalled the nfs-utils-1.0.6-22 (from FC2), then installed
nfs-utils-1.0.6 from kernel.org. Et voila!

- Geir R
----- Original Message -----
From: "Jason Holmes" <[email protected]>
To: "mrg" <[email protected]>
Cc: <[email protected]>
Sent: Tuesday, October 26, 2004 7:48 PM
Subject: Re: [NFS] NFS Server problem (kernel > 2.6.5 ?)


> mrg wrote:
> > Hi,
> >
> > I've had a server running FC2 for a while. I recently upgraded the
kernel to
> > 2.6.8.1, and then the NFS server stopped working.
> > I only get a 'Permission denied' on the client side, but the server
writes a
> > 'rpc.mountd: authenticated mount request from ...' in the message log.
> > I've tried al kinds of kernel options without any luck. I've also tried
> > 2.6.8, 2.6.9-rc4 and 2.6.9, but the only kernel that works is the
> > 2.6.5-1.358 which comes with FC2. However, the client can run both FC2
stock
> > kernel and 2.6.9 and still connect to the server (when run with kernel
> > 2.6.5-1.358).
> >
> > Some config info:
> > /etc/exports:
> > /rootfs 192.168.1.0/24(rw,sync,no_root_squash)
> >
> > /etc/hosts.deny is empty, /etc/hosts.allow: ALL:ALL
> >
> >
> > Does anybody know what the problem is ?
>
> I had a similar problem when replacing the RedHat kernel on Enterprise 3
> Update 3. The problem was that the RedHat nfs-utils package didn't work
> properly with the vanilla kernels (even though it's version 1.0.6, it's
> a very much patched version of 1.0.6). After replacing the nfs-utils
> package with a vanilla 1.0.6, things worked fine.
>
> Thanks,
>
> --
> Jason Holmes
>
>



-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs


2004-10-27 16:50:12

by J. Bruce Fields

[permalink] [raw]
Subject: Re: NFS Server problem (kernel > 2.6.5 ?)

On Wed, Oct 27, 2004 at 06:43:00PM +0200, mrg wrote:
> Thanks, it worked!
>
> I uninstalled the nfs-utils-1.0.6-22 (from FC2), then installed
> nfs-utils-1.0.6 from kernel.org. Et voila!

If you download the FC2 srpm you can see the list of patches that
distinguishes their version from stock nfs-utils-1.0.6. It might be
useful to figure out exactly which of those patches it is that causes
the problem.

--b.


-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

2004-10-27 18:01:28

by Jason Holmes

[permalink] [raw]
Subject: Re: NFS Server problem (kernel > 2.6.5 ?)

#
# Make sure check_new_cache() is looking in the right place
#
--- src/support/nfs/cacheio.c.org 2003-08-04 00:12:16.000000000 -0400
+++ src/support/nfs/cacheio.c 2004-03-22 18:12:55.163534208 -0500
@@ -223,12 +223,23 @@ int readline(int fd, char **buf, int *le
* This succeeds iff the "nfsd" filesystem is mounted on
* /proc/fs/nfs
*/
+static char *cachelist[] = {
+ { "auth.unix.ip" }, { "nfsd.export" }, { "nfsd.fh" },
+ { NULL, NULL }
+};
int
check_new_cache(void)
{
struct stat stb;
- return (stat("/proc/fs/nfs/filehandle", &stb) == 0) ||
- (stat("/proc/fs/nfsd/filehandle", &stb) == 0);
+ char path[64];
+ int i;
+
+ for (i=0; cachelist[i]; i++ ){
+ sprintf(path, "/proc/net/rpc/%s/channel", cachelist[i]);
+ if (stat(path, &stb) < 0)
+ return 0;
+ }
+ return 1;
}


#
# Eliminate 3 syslog message that are logged for
# successful events.
#
--- src/utils/mountd/mountd.c.org 2003-09-12 18:14:16.000000000 -0400
+++ src/utils/mountd/mountd.c 2004-06-16 09:31:06.000000000 -0400
@@ -90,10 +90,11 @@ mount_dump_1_svc(struct svc_req *rqstp,
{
struct sockaddr_in *addr =
(struct sockaddr_in *) svc_getcaller(rqstp->rq_xprt);
- xlog(L_NOTICE, "dump request from %s",
- inet_ntoa(addr->sin_addr));

- *res = mountlist_list();
+ if ((*res = mountlist_list()) == NULL)
+ xlog(L_WARNING, "dump request from %s failed.",
+ inet_ntoa(addr->sin_addr));
+
return 1;
}

@@ -143,9 +144,11 @@ mount_export_1_svc(struct svc_req *rqstp
{
struct sockaddr_in *addr =
(struct sockaddr_in *) svc_getcaller(rqstp->rq_xprt);
- xlog(L_NOTICE, "export request from %s",
- inet_ntoa(addr->sin_addr));
- *resp = get_exportlist();
+
+ if ((*resp = get_exportlist()) == NULL)
+ xlog(L_WARNING, "export request from %s failed.",
+ inet_ntoa(addr->sin_addr));
+
return 1;
}

@@ -154,9 +157,10 @@ mount_exportall_1_svc(struct svc_req *rq
{
struct sockaddr_in *addr =
(struct sockaddr_in *) svc_getcaller(rqstp->rq_xprt);
- xlog(L_NOTICE, "exportall request from %s",
- inet_ntoa(addr->sin_addr));
- *resp = get_exportlist();
+
+ if ((*resp = get_exportlist()) == NULL)
+ xlog(L_WARNING, "exportall request from %s failed.",
+ inet_ntoa(addr->sin_addr));
return 1;
}


Attachments:
nfs-utils-1.0.6-mountd.patch (2.15 kB)