nfs mount point directory mess

on

Had to share some very specific directories from this machine by nfs.

So I created a new directory in root: /nfsshare

In here I created some mount points:
Let’s say I have this directory /var/lib/users/xxx/bla/zzz containing all documents to be shared.

in nfshare i create a new directory zzz

with sudo mount -o bind /var/lib/users/xxx/bla/zzz /nfsshare/zzz/ now data is accesible from /nfsshare/zzz

so adding this direactory to /etc/exports:

/nfsshare/zzz 192.168.1.0/24(ro,no_subtree_check)

no on ubuntu restart nsf daemon

sudo service nfs-kernel-server restart

mounting this nfs share on the other machine is as simple as

$mount -t nfs 192.168.1.116:/nfsshare/xxx /mnt/xxx