We help IT Professionals succeed at work.

NFS on FreeBSD: cannot mount /usr/src as read-write, only as read.

thiamwah
thiamwah asked
on
hi guys,

I am using FreeBSD 4.x. I find I cannot mount "usr/src" on the client NFS as read-write, only as read only. How do I fix it ?

My build (NFS) server :
drwxr-xr-x  20 root  wheel      512 Aug 22 19:29 usr
/etc/exports:
/usr/src -ro 10.0.0.200 <-- can only mount as read-only ?

bash-2.04$ showmount -e
Exports list on localhost:
/usr/src                           10.0.0.200

If I mount as read write, as in "/usr/src 10.0.0.200" in /etc/exports,
"showmount" does not show anything.

On the client side, it says "permission denied".
What is the problem? Please advice.
Comment
Watch Question

Top Expert 2005
Commented:
If you export a volume read-only (ro option in exports), then of course all clients are restricted to read-only access. Since you will be using /usr/src to do a 'make world' you need /etc/exports to contain:

/usr/src maproot=root 10.0.0.200

assuming that 10.0.0.200 is the IP of the system that will mount the exported file system.  To keep things in /usr/src sane, you want to include the maproot option so that root can manipulate the contents of /usr/src and so that the file ownership and perms remans correct. In all likelyhood you'll probably want to export /usr/ports the same way.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.