ZFS share permissions

raubo

Member
Jan 17, 2018
9
1
21
64
Hello,
is there anywhere a list of valid commands or does a manual exist for the access permissions and restrictions to ZFS NFS shares in Proxmox VE?
I know this example "zfs set sharenfs="rw=@192.168.200.0/24 tank/test". So, how can I restrict several IPs out of this network to read only access? How can I give read only rights to a different subnet?
Do I have to enter these commands one by one or must all permissions be included in one single command?
Who know more and can help?
 
Last edited:
  • Like
Reactions: ________
the manpage of zfs (`man zfs`) explains the details quite well:
Code:
     sharenfs=on|off|opts
       Controls whether the file system is shared via NFS, and what options are to be used.  A file system with a sharenfs property of off is managed with the exportfs(8) command and entries in the /etc/exports file.  Otherwise, the file system is automatically shared and unshared with the zfs share and zfs
       unshare commands.  If the property is set to on, the dataset is shared using the default options:

       sec=sys,rw,crossmnt,no_subtree_check

       See exports(5) for the meaning of the default options. Otherwise, the exportfs(8) command is invoked with options equivalent to the contents of this property.

       When the sharenfs property is changed for a dataset, the dataset and any children inheriting the property are re-shared with the new options, only if the property was previously off, or if they were shared before the property was changed.  If the new property is off, the file systems are unshared.

in short - check the syntax of exports and provide a fitting exports-string as value for the sharenfs option
this blogpost also has some pointers (haven't explicitly tried it myself):
https://blog.programster.org/sharing-zfs-datasets-via-nfs

I hope this helps!
 
  • Like
Reactions: ________

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!