|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
FEEDS SEARCH LINKS CONTACT Douglas McCallum Template by Helquin Today's hits: 89 |
Wednesday Mar 21, 2007
sharemgr and ZFS
While there is still some refinement occurring in how sharemgr and ZFS interact, there is already quite a bit of integration. There are two ways that ZFS file systems may be shared. The traditional method of using share (and now sharemgr) is fully supported and will behave like any other file system that is shared. Alternatively, there is the "sharenfs" property method. If a ZFS dataset is shared by setting the sharenfs property on the dataset, ZFS will manage the share(s). This article will outline how ZFS managed shares interact with the sharemgr framework. The first thing to note about ZFS shares is that they appear as sub-groups within the zfs group. For example, if you have a dataset tank/shares that is shared via the sharenfs property zfs set sharenfs=rw,nosuid tank/shares this will show up in a sharemgr show as: sharemgr show -vp zfs If additional file systems are created within tank/shares, they are automatically shared and appear in the same sub-group. For example:
You can change NFS properties using either the same zfs command to change sharenfs, or you can use sharemgr to make the changes. For example, if you want to restrict the above example to being read-only for hosts host1 and host2, you can use sharemgr: sharemgr set -S sys -p ro=host1:host2 zfs/tank/shares or you can use the zfs command: zfs set sharenfs=rw,ro=host1:host2,nosuid tank/shares As the property lists get more complex, the sharemgr approach becomes simpler and less error prone than the zfs command-line due to not having to construct the entire list of options each time a change needs to be made. Over time, there will be tighter integration between ZFS and sharemgr and ZFS. The next optimization will be to change the zfs command to call directly into the sharemgr API rather than doing a popen() of the share command for each share. Posted at 01:31PM Mar 21, 2007 by Douglas McCallum in General | Comments[1] |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Posted by Erin on March 28, 2007 at 04:37 PM MDT #