System Administration Guide: Network Services

add-share Subcommand

After creating a share group, use this subcommand to add shares to the group. A share is a path to a file or a directory. Note that a share can exist in one group only. If you try to add a share to another group, you will get an error message.

This subcommand supports the following options:

-n

Checks the validity of the command-line string.

-s

Specifies the path to the share, which is a file or a directory.

-t

Specifies that the share is transient. Transient shares are automatically removed from the group when you reboot the system or use the disable or stop subcommands.

-d

Adds descriptive text about the share.

-r

Assigns the share a resource name that identifies the share. Note that the resource name only uses alphanumeric characters, the hyphen (-), and the underscore (_). The first character in the name must be alphabetic.

-h

Provides an online-help description.

This subcommand uses the following syntax:


# sharemgr add-share [-h] [-n] -s share-path [-t] [-d description] [-r resource-name] share_group

The following example adds the shares /export/home/home0 and /export/home/home1 to my_group.


example# sharemgr add-share -s /export/home/home0 my_group
example# sharemgr add-share -s /export/home/home1 my_group