mounting zfs over nfs

I have set up an nfs share on my local home network as follows:

Code:
zfs list
prime/ark                                  12.8G   883G  12.8G  /ark


vipw - change my user to 1000 to match linux
vigr - change my group to 1000 to match linux

recursively chown the zfs mount point to my user and group

Code:
vi /etc/rc.conf
nfs_server_enable="YES"
mountd_enable="YES"
rpc_lockd_enable="YES"
rpc_statd_enable="YES"
rpcbind_enable="YES"

Code:
vi /etc/exports
/ark -maproot=root

Code:
service nfsd start
service mountd reload

over on linux:
Code:
showmount -e remote
mount -t nfs remote:/ark /ark
ln -s /ark ~/0wa

Things seem to be working just fine. I started a long running:
Code:
rsync -a -P /original_ark/ ~/0wa

If that completes without issue, I will think about making the mount semipermanent via automount.

Does this seem reasonable and / or the freebsd way of doing the export? It's my house, behind a firewall, etc. I don't want it wide open, but I'm not terribly worried about somebody mounting it and messing with it. Any suggestions appreciated.

-will
 
For ZFS one can set some properties to do the export, you don't need to muck with the exports file. There are few limitations doing it that way, it works fine for most simple sharing which your home network would be.
But as to your question:
Yep, it's a right/FreeBSD way of doing the sharing, if you wind up sharing other datasets, do them all the same way. /etc/exports or zfs properties, don't mix the two. It will probably work, but it makes it more than a little difficult debugging issues.
 
You could add a network restriction on the export, further limiting who can and cannot mount it.
Code:
/ark -maproot=root -network 192.168.1.0/24
Ah... I kept trying to get this working and nada. I was missing -network... awesome, thanks.
 
Back
Top