Date: Sun, 9 May 1999 10:18:07 +0400 (MSD) From: "Sergey Ayukov (mailing lists)" <asv1@crydee.sai.msu.ru> To: freebsd-stable@FreeBSD.ORG Subject: Re: NFS question.. Message-ID: <Pine.BSF.4.05.9905091001490.391-100000@crydee.sai.msu.ru> In-Reply-To: <Pine.BSF.4.02A.9905082344170.11097-100000@shell.uniserve.ca>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 8 May 1999, Tom 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. Yes, that is my concern on this issue. I need to export /var/spool for PCNFS printing, but exporting entire /var makes everybody's mail readable by everybody from the subnet :-( > NFS uses inode numbers which come right out of the filesystems. I understand that. But in reality, NFS client does not care about true inode numbers, right? Therefore NFS server could supply fake inode numbers, just as Linux NFSD does. This will also allow transparent exporting of underlying mountpoints (e.g., if /home/group1 is mounted on separate disk, it will still be visible from NFS-mounted /home) and re-export NFS-mounted subdirectories which I also would like to have. > > 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 KB and MB. > 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. I do understand that. But how do I put FreeBSD NFS into unsafe mode? I can't seem to find the reference anywhere. > > 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. Well, I understand the issues (or at least I think so). But I am interested in fast, working NFS implementation (which I know could exist because Linux does it) and not in explanations (system administration is not my primary job). I can trade some bit of stability for performance in case of safe/unsafe NFS write modes. --------------------------------------------------------------------------- Dr. Sergey Ayukov Sternberg Astronomical Institute http://www.ayukov.com Moscow, Russia http://crydee.sai.msu.ru/index-asv.html 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.05.9905091001490.391-100000>