Managing Network File Systems in Oracle® Solaris 11.2

Exit Print View

Updated: July 2014
 
 

sharectl Command

    This 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:

  • Set client and server operational properties

  • Display property values for a specific protocol

  • Obtain the status of a protocol

The sharectl utility uses the following syntax:

# sharectl subcommand [option] [protocol]

The sharectl utility supports the following subcommands:

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.

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

You must have root privileges to use the set subcommand.

You do not need to repeat this command for each additional property value. You can use the –p option multiple times to define multiple properties in the same command.

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

# sharectl set -p 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

You must have root privileges to use the get subcommand.

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

# sharectl get -p servers nfs
servers=1024

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

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

status Subcommand

The status subcommand displays whether the specified protocol is enabled or disabled. It supports the –h option, which 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