From owner-freebsd-questions Wed Jan 3 23:19: 4 2001 From owner-freebsd-questions@FreeBSD.ORG Wed Jan 3 23:19:02 2001 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from dt051n37.san.rr.com (dt051n37.san.rr.com [204.210.32.55]) by hub.freebsd.org (Postfix) with ESMTP id C6B4E37B400 for ; Wed, 3 Jan 2001 23:19:01 -0800 (PST) Received: from gorean.org (master [10.0.0.2]) by dt051n37.san.rr.com (8.9.3/8.9.3) with ESMTP id XAA41101; Wed, 3 Jan 2001 23:18:53 -0800 (PST) (envelope-from DougB@gorean.org) Message-ID: <3A5423DC.20C2812C@gorean.org> Date: Wed, 03 Jan 2001 23:18:52 -0800 From: Doug Barton Organization: Triborough Bridge & Tunnel Authority X-Mailer: Mozilla 4.76 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Daniel Leal Cc: freebsd-questions@freebsd.org Subject: Re: nfs References: <00122821175400.00794@farrusco.brabos.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Daniel Leal wrote: > > Hi everyone ! > > I have two machines running FreeBSD 4.2 stable. The machines are "ethernet > connected". Because the hardisk of the second machine is not very large, I wish > to mount the /usr/ports, /usr/src and /home from my first machine. Very reasonable idea. > But I am not > understanding very well how can I tell it to /etc/exports. My problem is that > /usr/ports should be mounted read-only with root mapped to nobody (I think), Why? If you don't really need it to be read only, there is no reason for it to be. Additionally, you really want /usr/ports mounted r/w, unless you never plan to build ports from the machine that has it mounted. > but /usr/ports/distfiles should be mounted read-write (isn't it ?). And > /usr/src should stay read-only. See above, there is no real reason to do this. The easiest way to accomplish what you want is to simply export /usr (assuming that it is its own filesystem) with the -alldirs option and then mount the individual directories as needed. In /etc/exports: /usr -alldirs -maproot=0 0.0.0.0 Replace 0.0.0.0 with the real IP address, of course. In /etc/fstab you'd want something like: nfshost:/usr/ports /usr/ports nfs rw,-cisU3 0 0 Replace nfshost with the proper name of the server. Put the IP and name in your /etc/hosts file. Check the mount_nfs man page for the meaning of the options. NFS isn't the easiest thing to get started with, but it's a very useful tool when you get your teeth around it. Good luck, Doug To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message