Re: knfsd and submounts

Matthew Vanecek (mev0003@unt.edu)
Fri, 25 Jun 1999 11:48:03 -0500


Miquel van Smoorenburg wrote:
>
> According to Dominik Kubla:
> > Hmm, let's see. Configure.help says:
> >
> > Emulate Sun NFS daemon
> > CONFIG_NFSD_SUN
> > If you would like for the server to allow clients to access
> > directories that are mount points on the local filesystem (this is
> > how nfsd behaves on Sun systems), say yes here. If unsure, say N.
> >
> > Ah, I see! That's the equivalent to unfsd's "--re-export" option, right?
>
> No, I don't think so ..
>
> Say you have /usr/fnord on your root filesystem. Then, /usr gets mounted
> and /usr/fnord dissapears. When you export / over NFS, /usr is not exported.
> Do you now get to see /usr/fnord on the NFS client, or not? _That_ is
> what the option CONFIG_NFSD_SUN does, at least if I'm understanding
> things correctly.
>

Mine works thusly. I've got the following mount points:
/dev/hda1 on / type ext2 (rw)
/dev/hda6 on /home type ext2 (rw)
/dev/hda2 on /usr type ext2 (rw)
/dev/hda5 on /var type ext2 (rw)

In /etc/exports, one of my shares is:

/ reliant(rw,no_root_squash) excelsior

Now, locally, I do an ls:
[root@ds9 /root]# ls /usr
X11R6/ doc/ i386-redhat-linux/ info/ local/ reliant/
src/
bin/ etc/ i486-linux-libc5/ lib/ lost+found/ sbin/
tmp@
dict/ games/ include/ libexec/ man/ share/

>From reliant, I mount the ds9:/ export and do an ls of the
<mountpoint>/usr directory:
Connection to ds9 closed.
me2v:reliant me2v$ su -c 'mount ds9:/ /mnt/ds9'
Password:
me2v:reliant me2v$ ls /mnt/ds9/usr
me2v:reliant me2v$

Now, the kernel was configured with the following Network File System
options:
#
# Network File Systems
#
# CONFIG_CODA_FS is not set
CONFIG_NFS_FS=y
CONFIG_NFSD=y
CONFIG_NFSD_SUN=y
CONFIG_SUNRPC=y
CONFIG_LOCKD=y
CONFIG_SMB_FS=y
# CONFIG_NCP_FS is not set

Plainly, the CONFIG_NFSD_SUN does something other than what the
Configure.help says it does. I'm not sure what, but it *doesn't* allow
submounts to be viewed as part of the total exported filesystem; only
the physical partition is exported, and not any of the other partitions
mounted on the exported partition (I know, we export directories, by for
clarity's sake...)

> > So the only way to export say a multigigabyte FTP server without to much
> > hassle is to put the filesystem on a software RAID or LVM. (Which i had
> > so i did not experience that particular problem in the first place.)
> > That's suboptimal.
>
> Yup..
>

Yes, definitely sub-optimal. However, also, definitely something to
drool over... ;)

-- 
Matthew Vanecek
Course of Study: http://www.unt.edu/bcis
Visit my Website at http://people.unt.edu/~mev0003
For answers type: perl -e 'print
$i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);'
*****************************************************************
For 93 million miles, there is nothing between the sun and my shadow
except me. I'm always getting in the way of something...

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/