Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 5 down vote accepted

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).

share|improve this answer
Yes. This was wrong sharenfs=root=rw=. Your config is now in my production. – Aleksandr Levchuk Mar 27 '11 at 5:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.