Hi,
I also had some problems mounting NFS or SMB shares on ZFS via Ubuntu (which I use for e.g. web server or plex server).
Maybe it helps when I post how it is configured (working) for me:
On the ubuntu server I have a line in /etc/fstab to auto-mount at every startup like this:
Code:
10.x.x.x:/storage/nfs /mnt/cloud nfs
Where 10.x.x.x is the IP address of the napp-it fileserver, /storage/nfs my storage pool, /mnt/cloud the directory on the ubuntu server where to mount the NFS share to and the last "nfs" to tell mount that this is a NFS share
I think there is a package required on a clean ubuntu machine to be able to mount NFS shares but I am sure you already have that or can be found very easily via Google.
I am not sure if everything is necessary but I post it nevertheless:
My Ubuntu user which is running all necessary processes (e.g. web server that accesses the mounted shares) has e.g. UID 115 and GID 1001.
What solved the problem that on the ZFS (napp-it) machine the linux user was not properly mapped, was to configure that in /etc/idmapd.conf on the Ubuntu machine:
Domain = <YOUR DOMAIN>
On the ZFS machine, make sure you set it to the same value:
# sharectl set -p nfsmapid_domain=<YOUR DOMAIN> nfs
(posted that here not long ago:
https://forums.servethehome.com/ind...-storage-pool-with-linux-ubuntu-server.25555/)
On napp-it I also have users with the same name as on the Ubuntu servers with the same UID (user ID; not sure if GID is also necessary but I may also have added my Ubuntu users to GID 10 which by default is the UUCP group I think?)
NFS properties of my pool is set to sec=sys,rw=@10.x.x.x/24,root=... (rw=@10.x.x.x/yy for giving read/write access to the Ubuntu machine which has to mount the share).
On ZFS ACL for folders it is important that not only the desired folder (plus subfolders) like /storage/nfs/movies has the needed rights but also that the "lower" root folders give that user at least e.g. readxs_set rights so the machine that want to mount the share (I think NFS mount only works for the pool/nfsshare itself but no subfolders like pool/nfsname/movies), otherwise the mount user cannot read the directory list for the folders.
For example my pool looks like this:
/storage (this is the pool itself, no ACL here)
/storage/nfs (this is one of my NFS file systems, webserver user has e.g. readxs_set rights here)
/storage/nfs/www (this is the base web folder on my share, the webserver user has e.g. full_set rights here)
Hope this helps in solving that riddle.
Best regards,
daisho
/Edit: after a long time ...
Just migrating my server to newer Ubuntu version and can confirm:
a) nfs-common tools have to be installed, otherwise /etc/idmapd.conf doesn't exist
b) Solaris side (napp-it) needs to have same user with same UID (default for installing user on Ubuntu server seems to be 1000 right now), group GID does not matter.
I just kept my OmniOS server as is (NFS properties rw=@... and nfsmapid_domain) and edited /etc/fstab plus /etc/idmapd.conf > went fine