OpenSolaris

You are not signed in. Sign in or register.

Heads up: Sharemgr project integration

Date: Wed, 01 Nov 2006 20:12:11 -0700
From: Doug McCallum <Doug.McCallum at Sun dot COM>
To: on-all at Sun dot COM, onnv-gate at onnv dot eng dot sun dot com
Subject: Heads up: Sharemgr project integration

If you don't share directories via NFS you can skip this message.
If you do share directories via NFS and you bfu or upgrade, your
configuration will continue to work. Cap-I Install users are
unaffected by these changes.

I just integrated:
        PSARC 2005/374 Share management improvements
        6281048 NFS needs simplified administration

With this putback, the NFS management interfaces have been
significantly updated. There are two new utilities, sharemgr and
sharectl, that implement a new management interface. The share and
unshare commands still exist but have been reimplemented to use the
new facility. These new commands provide a fully scriptable mechanism
for creating and managing shares.  /etc/dfs/dfstab should no longer be
modified directly. The sharemgr command should be used instead. Share
and unshare have a new command line option "-p" for persisting the
share or unshare.  shareall and unshareall have also been modified to
use sharemgr.

The biggest change that will be visible to users is that NFS shares
are now contained in named "share groups" and these groups appear as
service instances in SMF. NFS share properties are set on the group
rather than on individual shares in order to make it simpler to change
the properties on multiple shares at the same time.

Existing NFS shares will automatically be imported into the SMF
configuration repository and will appear in the group "default".  ZFS
shares that are shared via setting the sharenfs property will be in a
sub-group under the "zfs" group.

Using "sharemgr show -vp" will output the NFS share groups and
their contents.  Sample output is:

default nfs=()
          /export/home
zfs nfs=()
    zfs/data/share nfs=(nosuid="true") nfs:sys=(rw="*" ro="host1:host2")
          /data/share
          /data/share/user1
          /data/share/user2
sandbox nfs=(nosuid="true")
          /data/export/dougm

The output from the "share" command for the same system is:

-               /data/share   rw,ro=host1:host2,nosuid   ""
-               /data/share/user1   rw,ro=host1:host2,nosuid   ""
-               /data/share/user2   rw,ro=host1:host2,nosuid   ""
-               /export/home   rw   ""
-@sandbox       /data/export/dougm   nosuid   ""

and the services shown in SMF with the command "svcs group" are:

STATE          STIME    FMRI
online         Oct_10   svc:/network/shares/group:zfs
online         Oct_10   svc:/network/shares/group:default
online         10:34:20 svc:/network/shares/group:sandbox

An example of adding a new share to group "sandbox" is:

        sharemgr add-share -s /workspaces sandbox

which would add  the share /workspaces to sandbox and share it
with the properties already set on the share group.

The biggest improvement should be seen in system startup where we no
longer run the shareall script to start NFS and can startup the share
groups in parallel.

Draft man pages and other docs are available on the project
website at http://fs.central.sun.com/insight/iteams/theobroma/projects/mg1/

Bugs should be filed in solaris/utility/filesystem with sharemgr in
the synopsis.

If you have questions, send them to theobroma at sun dot com.

Doug