Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 May 1999 23:51:41 -0700 (PDT)
From:      Tom <tom@uniserve.com>
To:        "Sergey Ayukov (mailing lists)" <asv1@crydee.sai.msu.ru>
Cc:        tetragon@cyber.com.au, freebsd-stable@FreeBSD.ORG
Subject:   Re: NFS question..
Message-ID:  <Pine.BSF.4.02A.9905082344170.11097-100000@shell.uniserve.ca>
In-Reply-To: <Pine.BSF.4.05.9905081155510.373-100000@crydee.sai.msu.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 9 May 1999, Sergey Ayukov (mailing lists) wrote:

> On Sat, 8 May 1999, Gavan McCormack wrote:
> 
> > Sorry if this is not apropos for STABLE.
> > 
> > I am running 3.1-STABLE, and wish to NFS export the _directory_ /usr/home.
> > 
> > Currently, my /var and /usr are directories under /, I dont have a seperate
> > /usr partition. I want to export /usr/home, but do NOT want to have to
> > export /.
> > 
> > According to my 4.4BSD SMM "...the kernel information is stored on a per
> > local file system mount point and client host address basis and cannot
> > refer to individiual directories within the local server filesystem."
> 
> I was also hit by this idiosyncrasy when switching from Linux to FreeBSD
> (see my previous messages several days ago). Judging from comments by
> several people, FreeBSD NFS server can't export directories and is not
> supposed to; I had to find it hard way, trying to find out what is wrong

  First of all, NFS is only designed to export filesystems.  FreeBSD can
indeed export selective directories in a filesystem (see manpage), and
nfsd will do its best to limit access to that directory.  However,
clients could guess and probably access stuff outside that directory tree.
NFS uses inode numbers which come right out of the filesystems.

> with my /etc/exports. Finally today I have tried to take another approach,
> namely use Linux NFSD. I had to make some dirty hacks at the source (but
> not much), but to my surprise, it worked. I am able to export directories
> which are not mountpoints and re-export NFS-mounted directories. The write
> performance difference is also tremendous; with FreeBSD kernel
> implementation I was only getting ridiculous 580K/s over 100MBit full
> duplex cable; with Linux NFSD (user-level!) I get about 2M/sec (I am using
> NFSv2 clients; DOS PC/NFS and OS/2 NFS).

  K is KB or kb?  M is MB or Mb?  Anyhow, what you are seeing is the
difference between safe NFS and unsafe NFS.  Put FreeBSD NFS into unsafe
mode, and you should get similar performance.  By default FreeBSD NFS will
not ack a write until the write has been hit the disk.  Linux NFS acks
writes as soon as they are received.

> Unfortunately, it does not work right all of the time. On some
> directories, it seems to report bogus data to clients, so that they hang,
> or crash, or display nonse. I can't make it work correctly. All in all, it
> seems Linux is way better at NFS and probably more suited for my needs.
> Too bad I have already converted 20GB to ffs :-(

  Probably not.  You need to understand the issues.


Tom



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.02A.9905082344170.11097-100000>