Possible to NFSv4 share all ZFS filesystems?

Hello =)

I would like to NFSv4 share all ZFS filesystems in my tank3 pool to a Linux host.

The problem is that I am only allowed to have one mount point on the Linux host.

I don't suppose it is possible to NFSv4 share the zpool it self?

Or should I put all zfs file systems in a root zfs filesystem /tank3/root/, then share that one? E.g.

Code:
/tank3/root/project1
/tank3/root/project2

What is the recommended solution for such a problem?
 
On FreeBSD:
Code:
echo 'V4: / -sec=sys' >> /etc/exports
zfs set sharenfs='on' tank3/root

On Linux:
Note that if you just mount /tank3/root you will see folders but if you try to create anything in them it will not propagated to the ZFS dataset. You have to mount each ZFS dataset one by one.
Code:
mount -t nfs4 <server>:/tank3/root/project1
mount -t nfs4 <server>:/tank3/root/project2

Or, since the manually mounting above can get painful as you add additional folders, you can use autofs on Linux to automatically mount the ZFS datasets. This is Ubuntu/Mint compatible, taylor it as needed. Make sure your hostnames are FQDN on both sides as well.
Code:
apt-get install autofs nfs-common
echo "NEED_IDMAPD=yes" >> /etc/default/nfs-common
echo -e "/tank3/root\t/etc/auto.tank3" >> /etc/auto.master
echo -e "*\t-fstype=nfs4\t<server>:/tank3/root/&" >> /etc/auto.tank3

*EDIT*
I read a little close and can you clarify "The problem is that I am only allowed to have one mount point on the Linux host"? What I said above applies, each ZFS dataset must be mounted individually be it manually or through something like autofs. If you mount the root of a bunch of datasets you will seem them as folders but you can't do anything.
 
Back
Top