System Administration Guide: Network Services

sharectl Command

The Solaris Express, Developer Edition 2/07 release includes the sharectl utility, which is an administrative tool that enables you to configure and manage file-sharing protocols, such as NFS. You can use this command to do the following:

The sharectl utility uses the following syntax:


# sharectl subcommand [option] [protocol]

The sharectl utility supports the following subcommands:

Table 6–6 Subcommands for sharectl Utility

Subcommand 

Description 

set

Defines the properties for a file-sharing protocol. For a list of properties and property values, see the parameters described in the nfs(4) man page.

get

Displays the properties and property values for the specified protocol. 

status

Displays whether the specified protocol is enabled or disabled. If no protocol is specified, the status of all file-sharing protocols is displayed. 


Note –

sharemgr and sharectl are the preferred utilities for managing your file systems and file-sharing protocols.


For more information about the sharectl utility, see the following:

For information about the sharemgr utility, see the following:

set Subcommand

The set subcommand, which defines the properties for a file-sharing protocol, supports the following options:

-h

Provides an online-help description

-p

Defines a property for the protocol

The set subcommand uses the following syntax:


# sharectl set [-h] [-p property=value] protocol

Note –

The following:


The following example sets the minimum version of the NFS protocol for the client to 3:


# sharectl set -p nfs_client_versmin=3 nfs

get Subcommand

The get subcommand, which displays the properties and property values for the specified protocol, supports the following options:

-h

Provides an online-help description.

-p

Identifies the property value for the specified property. If the -p option is not used, all property values are displayed.

The get subcommand uses the following syntax:


# sharectl get [-h] [-p property] protocol

Note –

You must have root privileges to use the get subcommand.


The following example uses nfsd_servers, which is the property that enables you to specify the maximum number of concurrent NFS requests:


# sharectl get -p nfsd_servers nfs
nfsd_servers=16

In the following example, because the -p option is not used, all property values are displayed:


# sharectl get nfs
listen_backlog=32
protocol=ALL
servers=32
lockd_listen_backlog=32
lockd_servers=20
lockd_retransmit_timeout=5
grace_period=90
nfsmapid_domain=company.com
server_versmin=2
server_versmax=4
client_versmin=2
client_versmax=4
max_connections=-1

status Subcommand

The status subcommand, which displays whether the specified protocol is enabled or disabled, supports the following option:

-h

Provides an online-help description

The status subcommand uses the following syntax:


# sharectl status [-h] [protocol]

The following example shows the status of the NFS protocol:


# sharectl status nfs
nfs	   enabled