Skip to contentSkip to conversation

[[email protected]: Bug#239158: Strange exportfs problems, fantastically unhelpful error message]

[email protected]: Bug#239158: Strange exportfs problems, fantastically unhelpful error message Chip Salzenberg 3 participants 3 messages Mar 21, 2004 – Mar 22, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

This Debian bug report includes an exportfs problem which I suspect is due to one export tree under the other, and an error message complaint which I think is justified....

----- Forwarded message from Phil Edwards <[email protected]> -----

Subject: Bug#239158: Strange exportfs problems, fantastically unhelpful error message
From: Phil Edwards <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Date: Sun, 21 Mar 2004 00:37:43 -0500

Package: nfs-kernel-server
Version: 1:1.0.6-1
Severity: normal

[~]# cat /etc/exports
/usr/local fenric(ro,async) hreidmar(ro,async)
/home fenric(rw,sync) hreidmar(rw,sync)
[~]# exportfs -v -r
exporting hreidmar:/usr/local
exporting fenric:/usr/local
exporting hreidmar:/home
exporting fenric:/home
exporting hreidmar:/usr/local to kernel
hreidmar:/usr/local: Invalid argument
exporting fenric:/usr/local to kernel
fenric:/usr/local: Invalid argument
reexporting hreidmar:/home to kernel
reexporting fenric:/home to kernel
[~]#

I have no idea why the export fails. If either line is commented, then the export succeeds; presumably that's strong evidence of /something/, but I don't know the nfs-kernel-server code at all and so can't say what.

My real complaint is that "Invalid argument" doesn't tell me a damn thing, so I have no idea what to try next.

-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux fenric 2.4.22-fenric3 #1 SMP Sun Oct 12 00:45:53 EDT 2003 i686
Locale: LANG=C, LC_CTYPE=C

Versions of packages nfs-kernel-server depends on:

ii  debconf                     1.4.7        Debian configuration management sy
ii  libc6                       2.3.2.ds1-11 GNU C Library: Shared libraries an
ii  libwrap0                    7.6-ipv6.1-3 Wietse Venema's TCP wrappers libra
ii  nfs-common                  1:1.0.6-1    NFS support files common to client
ii  sysvinit                    2.85-9       System-V like init.

-- debconf information:
nfs-kernel-server/sync-default:
nfs-kernel-server/tcpwrappers-mountd:

----- End forwarded message -----

Signature · 13 lines
Chip Salzenberg               - a.k.a. -               <[email protected]>
"I wanted to play hopscotch with the impenetrable mystery of existence,
    but he stepped in a wormhole and had to go in early."  // MST3K


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
NFS maillist  -  [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
#1 lore raw
Quoted 3 lines · Chip Salzenberg

This Debian bug report includes an exportfs problem which I suspect is due to one export tree under the other, and an error message complaint which I think is justified....

Well, what he tries to do is invalid from the kernel point of view. And unfortunately there's no "EBADNFSEXPORTPLEASEREADTHEMANPAGE" :-)

I agree though this issue is confusing to many people. Wasn't there some work going on to allow an arbitrary configuration of exports? For each file handle, we need to establish the dentry chain anyway, so it should not be too hard to find the proper export entry.

Olaf

Signature · 13 lines
Olaf Kirch     |  Stop wasting entropy - start using predictable
[email protected]   |  tempfile names today!
---------------+ 


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
NFS maillist  -  [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
#2 lore raw
In reply to Chip Salzenberg
Quoted 3 lines · Chip Salzenberg

This Debian bug report includes an exportfs problem which I suspect is due to one export tree under the other,

Possibly, if one of /usr/local or /home is a symlink to somewhere underneath the other.

Quoted 2 lines

and an error message complaint
which I think is justified....

I second this complaint. On other OSes that case is checked in userspace early and a sensible message printed, e.g.

irix# exportfs -av
re-exported /
exportfs: /opt: parent-directory (/) already exported re-exported /mnt/scratch

Quoted 3 lines

I have no idea why the export fails. If either line is commented, then the export succeeds; presumably that's strong evidence of /something/, but I don't know the nfs-kernel-server code at all and so can't say what.

You can get a better idea of what is failing by:

linux# echo 4 > /proc/sys/sunrpc/nfsd_debug

linux# exportfs -av
exporting foo.melbourne.sgi.com:/home/fmeh exporting bar.melbourne.sgi.com:/home/fmeh exporting foo.melbourne.sgi.com:/home exporting bar.melbourne.sgi.com:/home exporting foo.melbourne.sgi.com:/home/fmeh to kernel exporting bar.melbourne.sgi.com:/home/fmeh to kernel exporting foo.melbourne.sgi.com:/home to kernel foo.melbourne.sgi.com:/home: Invalid argument exporting bar.melbourne.sgi.com:/home to kernel bar.melbourne.sgi.com:/home: Invalid argument

linux# tail /var/log/messages
...

Mar 22 09:49:53 4A:quux kernel: exp_export called for foo.melbourne.sgi.com:/home
(403/54526548 fl 24).
Mar 22 09:49:53 4A:quux kernel: exp_export: export not valid (Rule 3).  <------
Mar 22 09:49:53 4A:quux kernel: exp_export called for bar.melbourne.sgi.com:/home
(403/54526548 fl 24).
Mar 22 09:49:53 4A:quux kernel: exp_export: export not valid (Rule 3).  <------

The error message tells you...indirectly...what is going on. You need to match it to the source of fs/nfsd/export.c:exp_export() to make any sense of it. The "Rule 3" message happens when a child of the given directory is already exported.

Greg.

Signature · 12 lines
Greg Banks, R&D Software Engineer, SGI Australian Software Group.
I don't speak for SGI.


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
NFS maillist  -  [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs