The sharectl command
By dougm on Feb 07, 2007
The sharectl command is a companion to sharemgr. It is used to change the operational properties that the NFS service. Prior to the sharemgr interfaces, these operational properties were changed in the /etc/default/nfs file and the services restarted. The sharectl command should now be used to modify any of the properties currently documented in nfs(4).
Sharectl can also be used to view the properties. For example:
sharectl get nfs
will get and display all the properties for the NFS protocol. The output of the above command would be something like:
Note that the property names are all lower case and the NFS_ prefix is generally removed.
If you want to get the current value of just the nfsmapid_domain property, use:
sharectl get -p nfsmapid_domain nfs
Setting properties is similar to the sharemgr set sub-command. For example, if you want to change the nfsmapid_domain property to abc.com, use the command:
sharectl set -p nfsmapid_domain=abc.com nfs
The sharectl syntax allows multiple properties to be set at the same time.
An additional function of the sharectl command is that it will restart the services that are affected by changes in the properties if those services are already running. This elliminates the need to find which services need to be restarted. In the future, sharectl will make it easier to migrate the /etc/default/nfs properties into the SMF repository.
In the future, other protocols may be added and an enhanced syntax for dealing with sub-services may be added.