Re: nfsv4 export and foot shooting

From: Andrea Venturoli <ml_at_netfence.it>
Date: Wed, 16 Mar 2022 16:18:45 UTC
On 3/16/22 15:37, mike tancsa wrote:

> For nfsv4, the export line says I need to specify the root directory 
> first. But I dont want to export all of /

I work around this in the following way:

> mkdir -p /nfs/usr/src
> mkdir -p /nfs/usr/obj

Then in /etc/fstab:
> /usr/obj	/nfs/usr/obj	nullfs	rw,noauto	0	0
> /usr/src 	/nfs/usr/src	nullfs	rw,noauto	0	0

And in /etc/exports:
> V4:/nfs							192.168.x.y
> /nfs/usr/obj				-maproot=root		192.168.x.y
> /nfs/usr/src				-maproot=root -ro	192.168.x.y

HTH.

  bye
	av.