Date: Wed, 03 Jan 2001 23:18:52 -0800 From: Doug Barton <DougB@gorean.org> To: Daniel Leal <dleal@webvolution.net> Cc: freebsd-questions@freebsd.org Subject: Re: nfs Message-ID: <3A5423DC.20C2812C@gorean.org> References: <00122821175400.00794@farrusco.brabos.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3A5423DC.20C2812C>