etc dfs dfstab

Solaris has the /etc/dfs/dfstab file that you can use to share via nfs. Below is an example of the file:

# Do not modify this file directly.
# Use the sharemgr(1m) command for all share management
# This file is reconstructed and only maintained for backward
# compatibility. Configuration lines could be lost.
#       share [-F fstype] [ -o options] [-d "<text>"] <pathname> [resource]
#       .e.g,
#       share  -F nfs  -o rw=engineering  -d "home dirs"  /export/home2

One can export an nfs3 share by following the example noted above. Simply copy the line and add your own options.

share  -F nfs -o ro -d /export/somedir

The above line will export some directory as read only. This is helpful if you want to control the shared directory and prevent people from writing to it.

It is often helpful to share directories in this way since most any directory can be shared and is not reliant on setting the sharenfs option in zfs.

After adding a line to the dfstab file be sure to refresh your nfs server.

Be the first to comment

Leave a Reply