ZFS nfsshare to export RW and RO host?
I think you have a syntax problem. The value of the sharenfs property is the options that get sent to share(1)
. Try
zfs set sharenfs=rw=host1:host2:host3,ro=host4 pool1
unless you really do need to be exporting the filesystems with root permissions to all those hosts, in which case it's safest to be explicit:
zfs set sharenfs=rw=host1:host2:host3,root=host1:host2:host3,ro=host4 pool1
(or better yet, use a netgroup or network instead).
Related videos on Youtube
Aleksandr Levchuk
I do Bioinformtics research and work as a Bioinformtics systems + databases administrator. As of February 2011, I'm active on Biostar stackexchange - it's a Question and Answer website for Bioinformatics.
Updated on September 18, 2022Comments
-
Aleksandr Levchuk over 1 year
I have been exporting NFS from OpenSloarins like this (successfully):
zfs set sharenfs=root=rw=host1:host2:host3 pool1
I'm acting according the man pages
sharefs
,share_nfs
but the following does not work:zfs set sharenfs=root=rw=host1:host2:host3,ro=host4 pool1
All hosts loose access permission.
How can I share to some hosts as read/write and to some as read only?
-
Aleksandr Levchuk about 13 yearsYes. This was wrong
sharenfs=root=rw=
. Your config is now in my production.