Bug 11681

Summary: can not NFS-export NFS-mounted filesystem
Product: [Retired] Red Hat Linux Reporter: mal
Component: nfs-utilsAssignee: Michael K. Johnson <johnsonm>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-12-14 23:36:54 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description mal 2000-05-26 00:32:27 UTC
I am using RedHat 6.2 stock installation
and I am trying to NFS- export a filesystem
which is mounted over nfs from another computer as following
192.168.2.1:/home/httpd /home/httpd     nfs
exec,dev,nosuid,ro,bg,nolock 0 0
Then I am trying to export it as
/etc/exports:
/home/httpd (ro,insecure,all_squash,no_subtree_check,nohide)
It mounts just fine.
The problem is:
when I do ls -l command prints:

ls: /mnt/autorun: No such file or directory
ls: /mnt/boot.cat: No such file or directory
ls: /mnt/COPYING: No such file or directory
ls: /mnt/doc: No such file or directory
ls: /mnt/dosutils: No such file or directory
ls: /mnt/images: No such file or directory
ls: /mnt/misc: No such file or directory
ls: /mnt/README: No such file or directory
ls: /mnt/RedHat: No such file or directory
ls: /mnt/RELEASE-NOTES: No such file or directory
ls: /mnt/RPM-GPG-KEY: No such file or directory
ls: /mnt/rr_moved: No such file or directory
ls: /mnt/TRANS.TBL: No such file or directory
ls: /mnt/updates: No such file or directory
ls: /mnt/extrapackages: No such file or directory
ls: /mnt/qmail: No such file or directory
ls: /mnt/kernelupdates: No such file or directory
total 0

So it found the filenames which are on nfs filesystem,
but it can not access the files itself.
In the same time if I export a non-nfs filesystem,
(CD-ROM for example)
/etc/exports:
/mnt/cdrom (ro,insecure,all_squash,no_subtree_check,nohide)

and then access nfs-exported cd-rom,
everything is OK

ls -lstr
total 0
   0 dr-xr-xr-x   51 root     root         8192 Dec 31  1969 rr_moved
   0 -rw-r--r--    8 root     root        18385 Sep  7  1999 COPYING
   0 -rw-r--r--    8 root     root         1908 Sep 25  1999 RPM-GPG-KEY
   0 -rwxr-xr-x    9 root     root          538 Sep 26  1999 autorun
   0 -rw-r--r--    9 root     root         3400 Mar  8 10:42 README
   0 -rw-r--r--   18 root     root        16300 Mar  8 14:10 RELEASE-NOTES
   0 drwxrwxr-x    4 root     root         2048 Mar  8 17:51 misc
   0 drwxrwxr-x    5 root     root         2048 Mar  8 17:51 RedHat
   0 drwxrwxr-x    7 root     root         2048 Mar  8 17:51 images
   0 drwxrwxr-x    6 root     root         4096 Mar  8 17:51 dosutils
   0 -rwxr--r--    1 root     root         2048 Mar  8 18:02 boot.cat
   0 drwxrwxr-x    5 root     root         2048 Mar  9 12:40 doc
   0 -r--r--r--    1 root     root          544 Mar  9 13:37 TRANS.TBL

the files are printed OK.

Vladislav

Comment 1 Seth Vidal 2000-07-14 05:43:25 UTC
This is a no-no. NFS does not support exporting a previously exported share.

To my knowledge NO networked file system (SMB,ATALK, NFS, AFS) support this.

just don't do it.


Comment 2 Cristian Gafton 2000-08-09 02:35:33 UTC
assigned to johnsonm

Comment 3 mal 2000-08-09 13:18:17 UTC
>This is a no-no. NFS does not support exporting a previously exported share.

Old NFS (from RedHat 5.2) supports this just fine,
there is a special option for this.
SAMBA allows re-exporting without problem,
(the only problem with SMB protocol it does not 
support unix devices, and etc.).
In 2.4 kernel this NFS re-exporting can be easily achieved anyway.
mount -t bind /dir1 /dir2
will mount dir2 as a dir1, then export dir2 via nfs. 
There are many other ways to do this
(for example if you do not need devices - just use SAMBA).

So this silly NFS restriction does nothing execept
preventing people doing useful things:
for example to make a "proxy" 
giving public read-only access for NFS server
without allowing people to access internal server directly.

I ended up with recompiling nfs from RedHat 5.2.






Comment 4 Alan Cox 2002-12-14 23:36:54 UTC
The kernel nfsd restriction was there for a reason. unfsd can kind of work
around this in user space but isnt safe used the way you are talking about really