Skip to main content

NFS Enabling & Sharing

First verify  if  nfs packages are installed and service is running.

pkg info | grep -i nfs

Step 1:
 zfs set share=name=fs1,path=/fs1,prot=nfs mypool/fs1

Step 2:
zfs set sharenfs=on mypool/fs1

Solaris 10 Way of Doing the Same

vi /etc/dfs/sharetab
# share -F nfs /fs1
# cat /etc/dfs/sharetab
/fs1       -       nfs     rw

Save and exit the file.

Get Share information

zfs get all mypool/fs1 | grep nfs

# zfs get sharenfs mypool/fs1
NAME           PROPERTY    VALUE     SOURCE
mypool/fs1   sharenfs    on        local

# zfs get share mypool/fs1
NAME          PROPERTY  VALUE                                  SOURCE
mypool/fs1  share     name=mypool_fs1,path=/fs1,prot=nfs   local

Unsharing the share

To unshare the shared file system using the share-path property :

# zfs set -c share=path=/fs1 mypool/data
share 'mypool_fs1' was removed.



Comments