Child pages
  • Using OpenIndiana as a storage server
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 14 Next »

With large amounts of disk being available to the average consumer, it's becoming more and more common to build a pool for your home office and serve shared resources to your LAN. This is usually one of the more difficult situations to share files because there are usually many versions of many different operating systems. We'll explore several options below with some hints for clarification on how to make them work. 

One thing to keep in mind if sharing a zfs file system over NFS and SMB at the same time is to create your file system with mixed case-sensitivity and nbmand "non-blocking mandatory locking" as in the example below:

$ zfs create -o casesensitivity=mixed -o nbmand=on yourpool/share


It's very simple to export an NFS share using zfs tools. The command below will allow any host to mount a nfs share. 

$ zfs set sharenfs=rw yourpool/yourshare

To restrict the share to a single host execute something like the following:

$ zfs set sharenfs=rw=@ yourpool/yourshare

Or to restrict the share to a subnet execute the following:

$ zfs set sharenfs=rw=@ yourpool/yourshare

OS X Clients

In order to make OS X clients work properly you'll need to force the client to default to v3 of NFS.  As reported in the man page:

For NFS versions that use a separate mount protocol, mount_nfs implements the mount proto-col as described in RFC 1094, Appendix A and NFS: Network File System Version 3 Protocol Specification, RFC 1813, Appendix I.


The current NFSv4 functionality is "alpha quality" software.  Some basic functionality is not yet implemented.  Use at your own risk.  Currently, the only way to enable NFSv4 is to specify the mount option:

-o vers=4.0alpha

You can test mounts using the following. These will not be persistent across reboots but will allow you to test the usability of your NFS shares. You'll need to force NFSv3 using the vers=3 option even though the man page says it defaults to that. Things do not work properly when the version is not explicitly set.

$ sudo mount_nfs -o sync -o vers=3 storeageserver:/yourpool/yourshare localmount/


To share a zfs file system named "bob" via smb/cifs execute a command like the following below. Note that the share name is arbitrary and can be completely different than the name of the file system itself, as seen in the example below.

$ zfs set sharesmb=name=myshare yourpool/shares/bob

To just turn on cifs sharing for a zfs file system without specifying a share name execute a command like the following.  Note that the auto-generated names created using this method are usually not user-friendly.

$ zfs set sharesmb=on yourpool/shares/bob
  • No labels