0% found this document useful (0 votes)
68 views2 pages

How To Share ZFS As NFS in Solaris 11

This document discusses how to share ZFS file systems as NFS in Solaris 11. It describes setting the share and sharenfs properties on a ZFS dataset to name and publish the share. The sharenfs property is set to "on" to permanently share the file system, with SMF services handling sharing on boot. It also covers displaying share information, inheritance of shares to child datasets, and unsharing a file system by clearing the share properties.

Uploaded by

mateen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
68 views2 pages

How To Share ZFS As NFS in Solaris 11

This document discusses how to share ZFS file systems as NFS in Solaris 11. It describes setting the share and sharenfs properties on a ZFS dataset to name and publish the share. The sharenfs property is set to "on" to permanently share the file system, with SMF services handling sharing on boot. It also covers displaying share information, inheritance of shares to child datasets, and unsharing a file system by clearing the share properties.

Uploaded by

mateen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

How to share ZFS as NFS in Solaris 11

Monday, May 04, 2015


10:27 AM

ZFS is the default file system when it comes to Solaris 11. In solaris 11, Oracle made it
even easy to share ZFS as NFS file system. The major change that oracle made in NFS
sharing is that it removed the dependency of /etc/dfs/dfstab to share NFS permanently.
The file /etc/dfs/dfstab is obsolete in Solaris 11, so even if you make any changes to it,
they are ignored.
Solaris 11 makes use of SMF services to share the NFS file systems automatically while
booting. In solaris 11 the ZFS file system is shared as NFS in 2 steps :
Step 1
Name the share, by assigning a value to datasets name property :
# zfs set share=name=fs1,path=/fs1,prot=nfs geekpool/fs1

Publish the share by setting the sharenfs property to on


Step 2
# zfs set sharenfs=on geekpool/fs1

There is no need to edit any file to make the share permanent. By default when you turn
on the sharenfs property to on, it gets permanently shared. SMF services takes care of
sharing the NFS file system while booting.
The legacy ZFS sharing Syntax (Solaris 10 Way)
The legacy way of sharing the ZFS file system as NFS (using share command) from solaris
10 is still supported without having to use /etc/dfs/dfstab. Instead we use the
file /etc/dfs/sharetab in Solaris 11.
# share -F nfs /fs1
# cat /etc/dfs/sharetab
/fs1

nfs

rw

Display the shares


To display the information on shared NFS file systems you can use below 2 commands :
# zfs get sharenfs geekpool/fs1
NAME
PROPERTY VALUE SOURCE
geekpool/fs1 sharenfs on
local

# zfs get share geekpool/fs1


NAME
PROPERTY VALUE
SOURCE
geekpool/fs1 share name=geekpool_fs1,path=/fs1,prot=nfs local

Inheritance of share
When you share a ZFS file systems as NFS, all its children inherit the sharenfs property.
For example if we share geekpool/fs1 :
# zfs set share=name=fs1,path=/fs1,prot=nfs geekpool/fs1
name=fs1,path=/fs1,prot=nfs

# zfs set sharenfs=on geekpool/fs1

If you check the share sharenfs property of geekpool/fs1/fs2 which is a child dataset of
fs1 :
# zfs get sharenfs geekpool/fs1/fs2
ZFS as NFS Page 1

# zfs get sharenfs geekpool/fs1/fs2


NAME
PROPERTY VALUE
geekpool/fs1/fs2 sharenfs on

SOURCE
inherited from geekpool/fs1

Unsharing the share


To unshare the shared file system using the share-path property :
# zfs set -c share=path=/fs1 geekpool/data
share 'geekpool_fs1' was removed.

To unshare the file system using share-name property :


# zfs set -c share=name=geekpool_fs1 geekpool/fs1
share 'geekpool_fs1' was removed.

ZFS as NFS Page 2

You might also like