Bug 11681 - can not NFS-export NFS-mounted filesystem
can not NFS-export NFS-mounted filesystem
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: nfs-utils (Show other bugs)
7.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Michael K. Johnson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-05-25 20:32 EDT by mal
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-12-14 18:36:54 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description mal 2000-05-25 20:32:27 EDT
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 01:43:25 EDT
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-08 22:35:33 EDT
assigned to johnsonm
Comment 3 mal 2000-08-09 09:18:17 EDT
>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 18:36:54 EST
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

Note You need to log in before you can comment on or make changes to this bug.