Description

The clnas command is the short form of the clnasdevice command. The
clnas and clnasdevice commands are identical. You can use either form of the
command.

The general form of this command is as follows:

clnasdevice [subcommand] [options] [operands]

You can omit subcommand only if options specifies the -? option or
the -V option.

Each option of this command has a long form and a short
form. Both forms of each option are provided with the description of the
option in the “OPTIONS” section of this man page.

Before you use the clnasdevice command to configure a NAS device in the
cluster, your NAS device must conform to the following conditions:

The NAS device must be set up and operating.

The NAS device must be booted and running.

The NAS device's directories must be created and made available to the cluster nodes.

If the NAS device will be a quorum device, the LUN for the quorum device must be created. For information on configuring a NAS quorum device, see the clquorumman page.

Depending on the NAS device vendor, you might need to perform additional tasks
before you configure the device into the cluster. For details about these tasks,
see the -t option in “OPTIONS”. Refer to the documentation for your particular
NAS device for procedures about setting up a NAS device and exporting the
directories.

After the NAS device is fully operational and ready to provide storage for
the cluster, use the clnasdevice command to manage the NAS device configuration information
in the cluster. Otherwise, the cluster cannot detect the NAS device and its
exported directories. Consequently, the cluster cannot protect the integrity of the information in
these directories.

Use the clnasdevice command for these administrative tasks:

To create the NAS device configuration

To update NAS type-specific properties

To remove the NAS device's directories from the cluster configuration

To remove the NAS device from the cluster configuration

The clnasdevice command can be run only on an active cluster node. The
result of running the command is always the same, regardless of the node
on which you run it.

You can use the clnasdevice command with all subcommands (except export) in
a zone cluster. You can also use the -Z option with all
subcommands (except export) to specify the name of a particular zone cluster
to which you want to restrict an operation.

You can access all zone cluster information from a global-cluster node, but
a particular zone cluster is not aware of other zone clusters. If
you do not restrict an operation to a particular zone cluster, the subcommand you
use operates in the current cluster only.

SUBCOMMANDS

The following subcommands are supported:

add

Adds a NAS device to the Oracle Solaris Cluster configuration.

Use the -t option to specify the vendor of the NAS device. For details, see the -t option description in the “OPTIONS” section.

Depending on the type of your NAS device, you might have to set additional properties. These required properties are also explained in the -t option description in the “OPTIONS” section.

Users other than the superuser require solaris.cluster.modify role-based access control (RBAC) authorization to use this command. See rbac(5).

See also the description of the remove subcommand.

add-dir

Adds the specified directories or projects of an already configured NAS device to the cluster configuration. You must have created these directories or projects on the device and made them available to the cluster before using this subcommand. For information about creating directories or projects, see the documentation for your NAS device.

You can add NAS device directories or projects using one of the following methods:

Use the clnasdevice add command to configure the NAS device in the cluster. Then use the clnasdevice add-dir command to configure that device's directories or projects in the cluster.

Use the clnasdevice add-dir-iconfigurationfile form of the command to add the device and configure its directories or projects in a single step. To add directories or projects using this method, provide the password file using the -f option. For details on this option, see the Options section. See the clconfiguration(5CL) man page for more information.

Whenever you create a new directory or project on the NAS device and make it available to the cluster nodes, you need to use this add-dir subcommand to add the directories or projects to the cluster configuration. You can use the find-dir subcommand to list the available directories or projects that can be added to the cluster with the add-dir subcommand.

Users other than the superuser require solaris.cluster.modify RBAC authorization to use this command. See rbac(5).

See also the description of the remove-dir subcommand.

export

Exports the cluster NAS device configuration information. If you specify a file with the -o option, the configuration information is written to that file. If you do not use the -o option, the output is written to standard output (stdout).

The export subcommand does not modify cluster configuration information.

Users other than the superuser require solaris.cluster.read RBAC authorization to use this command. See rbac(5).

find-dir

Displays the sun_uss projects or netapp and sun directories that are set up on the NAS devices that might be used by the cluster. These directories or projects have not yet been added to the cluster configuration with the add-dir subcommand. The directories or projects listed in the output can be candidates for the -d option when you use the add-dir subcommand.

To display a particular type of NAS device, specify the -t option.

To display the sun_uss projects and file systems inside those projects, specify the -v option.

To display specific sun_uss NAS device projects and the file systems inside those projects, specify the -v and -d options.

The find-dir subcommand does not modify cluster configuration information.

Users other than the superuser require solaris.cluster.read RBAC authorization to use this command. See rbac(5).

list

Displays the NAS devices configured in the cluster.

To display the device's directories that are configured in the cluster and the device type, use the verbose option -v.

To display NAS devices of a particular type, use the -t option.

Users other than the superuser require solaris.cluster.read RBAC authorization to use this command. See rbac(5).

remove

Removes the specified NAS device or devices from the Oracle Solaris Cluster configuration.

If you do not specify the force option, -F, you must have already removed the NAS device directories from the configuration by using the remove-dir subcommand.

If you specify the force option, -F, the command removes the NAS device and its directories from the cluster configuration. See -F in OPTIONS.

Users other than the superuser require solaris.cluster.modify RBAC authorization to use this command. See rbac(5).

See also the description of the add subcommand.

remove-dir

Removes the specified NAS directory or project from the Oracle Solaris Cluster configuration.

The remove-dir subcommand removes the exported directories or projects specified by the -d option. When you use -dall, the subcommand removes all the directories or projects of the specified NAS device.

Whenever a directory or project is removed from the NAS device, you need to use this remove-dir subcommand to remove the directories or projects from the cluster configuration. The NAS directories or projects in the cluster configuration must match the existing directories or projects that are exported from the NAS device.

Users other than the superuser require solaris.cluster.modify RBAC authorization to use this command. See rbac(5).

See also the description of the add-dir subcommand.

set

Sets specified properties of a specific NAS device.

Note - You do not specify properties for NAS devices from Oracle's Sun StorageTek products. Because these devices do not have any properties, the set subcommand and the -f, -p, and -u options do not apply.

Users other than the superuser require solaris.cluster.modify RBAC authorization to use this command. See rbac(5).

show

When no options are provided, displays the following information:

A listing of all the current NAS devices configured in Oracle Solaris Cluster

The available directories of each NAS device

All properties associated with each NAS device

To display a particular type of NAS device, specify the -t option. To display information about a particular device, pass the NAS device's hostname as the operand to the command.

To display the file systems contained in the specified projects, use the -d and -v options with the show subcommand. You can use the all keyword to display all the projects of a NAS device, or just individual projects.

Users other than the superuser require solaris.cluster.read RBAC authorization to use this command. See rbac(5).

Options

The following options are supported:

-?

--help

Displays help information. When this option is used, no other processing is performed for any other options.

You can specify this option with or without a subcommand.

If you specify this option without a subcommand, the list of subcommands for this command is displayed.

If you specify this option with a subcommand, the usage options for the subcommand are displayed.

-ddirectory[,…]

--directory=directory-[,...]

--directory directory-[,...]

-dproject[,…]

--directory=project-[,...]

--directory project-[,...]

Specifies the directory or directories of the netapp and sun NAS devices, as well as projects of the sun_uss NAS devices. For sun_uss NAS devices, you must create the project on the NAS device before you create a file system. The project name cannot start with a /. File systems must be created within a project. A project is a sun_uss NAS device term, and you can create as many file systems as you want in a project. Use this option only with the add-dir, remove-dir, export, and show subcommands.

This option accepts a special keyword, all. When you use the -dall option, you specify all directories on the specified NAS devices.

With the remove-dir subcommand, all directories on the specified devices are removed.

With the export subcommand, the configuration information of all directories on the specified devices is displayed to the specified output.

With the add-dir subcommand and the -iconfigfile option, all directories on the specified NAS device that are listed in the configuration file are added.

When the show and find-dir subcommands are used with the -v option for the sun_uss NAS device, the file systems contained in the specified projects in the -d option are displayed. You can use the all keyword to display all the projects of a NAS device, or just individual projects.

-F

--force

Forces the removal of the specified NAS device.

The force option is available only with the remove subcommand. When you use this force option with the remove subcommand, it removes the NAS device and its configured directories from the Oracle Solaris Cluster configuration.

-fpasswd-file

--passwdfile=passwd-file

--passwdfile passwd-file

Specifies the password file that contains the password to use when logging in to the NAS device.

Note - You do not specify properties for NAS devices from Oracle's Sun StorageTek products. Because this device does not have any properties, the set subcommand and the -f, -p, and -u options do not apply.

For security reasons, the password cannot be specified in command-line options. To keep the password secure, place it in a text file and specify the file by using the -f option. If you do not specify an input file for the password, the command prompts for the password.

Set permissions of the input file to readable by root and prohibit access by either group or world.

When using clnasdevice add with the -i option, if your clconfigfile does not contain the password the -fpasswdfile option is required.

In the input file, observe the following restrictions:

Specify passwords on a single line. Do not type passwords across multiple lines.

Leading white spaces and tabs are ignored.

Comments begin with an unquoted # sign. Comments continue to the next new line.

The parser ignores all comments.

If you use an input file for the device user password, the # sign cannot be part of the password.

-iclconfigfile

--input={- | clconfigfile-}

--input {- | clconfigfile-}

Specifies the configuration information that is used to create or modify the NAS device. This information must conform to the format that is defined in the clconfiguration(5CL) man page. This information can be contained in a file or through the standard input (stdin). To specify the standard input, specify - instead of a file name.

If you specify the same properties on the command line and in the clconfigfile file, the properties that you set on the command-line prevail.

When using clnasdevice add with the -i option, the -fpasswdfile option is required.

-o {- | clconfigfile}

--output={- | clconfigfile-}

--output {- | clconfigfile-}

Writes the NAS device configuration information in the format that is defined in the clconfiguration(5CL) man page. You can write this information to a file or to the standard output (stdout). To specify the standard output, specify - instead of a file name.

-pname=value[,…]

--property=name-=value-[,...]

--property name- value-[,...]

Specifies the properties that are specific to a NAS device type.

Note - You do no t specify properties for NAS devices from Oracle's Sun StorageTek products. Because this device does not have any properties, the set subcommand and the -f, -p, and -u options do not apply.

You must specify this option when you use the add subcommand to add a new NAS device to a cluster configuration. You also must specify this option when you modify the properties of a NAS device with the set subcommand. See the description of the -t option for more information.

-tnas-device-type

--type=nas-device-type

--type nas-device-type

Specifies the NAS device type. You must specify this option when you add a NAS device to the Oracle Solaris Cluster configuration. The NAS device type is identified by the vendor name. For example, Oracle's Sun StorageTek NAS device type is sun.

Different types of NAS devices have different or in some cases, no properties.

sun

Specifies Oracle's Sun StorageTek NAS device.

Note - You do not specify properties for the sunNAS device. Because this device does not have any properties, the set subcommand and the -f, -p, and -u options do not apply.

sun_uss

Specifies Oracle's Sun ZFS Storage ApplianceNAS device.

-p userid=osc_agent [-f passwd-file] or -u userid [-f passwdfile]

The userid must be osc_agent. Before using sun_uss, you must download the client code and install it on all cluster nodes. This osc_agent userid is created by running one of the workflows on the device. The userid must have been created on the device before you use the clnasdevice subcommands that take userid as input.

The userid and the password properties are required.

-p "nodeIPs{node}"=[IP]

This property specifies an IP for each node. If you are using an IP other than the IP of the cluster node name to access the NAS device, you can specify this IP using the nodeIPsnode property. This property is optional. If you do not specify an IP, the system uses the IP of the cluster node name. These IPs must match the IPs specified in the NFS Access Mode of the projects on the NAS device.

If you do not specify a property value, (for example, -p "nodeIPs{node}"=), the IP for the specified node is removed from the cluster configuration and the system uses the IP of the cluster node name.

Before adding a sun_uss NAS device and its projects, you must perform the necessary setup. Setup tasks include downloading and installing the client code on the cluster nodes. Run the Configure for Oracle Solaris Cluster NFS workflow to create the userid osc_agent and its password on the device. Create projects, whose Share Mode is none or read-only (the read-write mode is supported but not recommended). The NFS Access Mode must use the Network notion and grant read-write access to the IPs of the cluster nodes.

netapp

Specifies a NAS device from Network Appliance, Inc. The NAS device from Network Appliance, Inc. has the following property. This property is required if you add a NAS device by using the add subcommand:

-p userid=userid [-fpasswdfile]

or

-uuserid [-fpasswdfile]

The userid is the user ID that the cluster uses to perform administrative duties on the NAS device. When you add a user ID to the device configuration, you are prompted for its password. You can also place the password in a text file and use it by specifying the -f option.

Before adding a NAS device and its exported directories into the cluster configuration, you must have already performed the following tasks:

Set up the NAS device.

Set up directories and made them available to the cluster nodes.

Determined the user ID and password to use for administrative tasks on the device.

The NAS device must also be up and running. To provide support for netapp NAS devices in the cluster, the administrator must also install the required software module that is provided by Network Appliance, Inc. Additionally, the iSCSI license must be valid for the Network Appliance, Inc. NAS device.

-uuserid

--userid=userid

--userid userid

Specifies the user ID that is used to log in to the NAS device.

Note - You do not specify properties for NAS devices from Oracle's Sun StorageTek. Because this device does not have any properties, the set subcommand and the -f, -p, and -u options do not apply.

The cluster needs to know the user ID to log in and perform administrative duties on the device.

Alternatively, you can specify the user ID with the -p option. See -p for details.

You can use this option only with the add and set subcommands.

-V

--version

Displays the version of the command.

Do not specify this option with subcommands, operands, or other options. The subcommands, operands, or other options are ignored. The version of the command is displayed. No other processing is performed.

-v

--verbose

Displays verbose information to standard output (stdout).

-Z {zoneclustername| global | all}

--zoneclustername={zoneclustername | global |all}

Specifies the cluster where the nas-device-type is registered and where you want to operate.

This option is supported by all subcommands except the export command.

If you specify this option, you must also specify one of the following arguments:

zoneclustername

Specifies that the command with which you use this option will operate on all specified nas-device-types only in the zone cluster named zoneclustername.

global

Specifies that the command with which you use this option will operate on all specified nas-device-types only in the global cluster.

all

If you use this argument in the global cluster, it specifies that the command with which you use it will operate on all specified nas-device-types in all clusters (including the global cluster and all zone clusters).

If you use this argument in a zone cluster, it specifies that the command with which you use it will operate on all specified nas-device-types only in that zone cluster.

Operands

The following operands are supported:

nasdevice

The name of a NAS device. The NAS device name is the hostname by which the NAS device communicates over the network. The cluster needs the NAS hostname of the NAS device to communicate with the NAS device. If the subcommand accepts more than one NAS device, you can use the plus sign (+) to specify all NAS devices. For the add and add-dir subcommands, the plus sign operand indicates all NAS devices in the specified configuration file.

Exit Status

If the command is successful for all specified operands, it returns zero
(CL_NOERR). If an error occurs for an operand, the command processes the next
operand in the operand list. The returned exit code always reflects the error
that occurred first.

The following exit values can be returned:

0CL_NOERR

No error

The command that you issued completed successfully.

1CL_ENOMEM

Not enough swap space

A cluster node ran out of swap memory or ran out of other operating system resources.

3CL_EINVAL

Invalid argument

You typed the command incorrectly, or the syntax of the cluster configuration information that you supplied with the -i option was incorrect.

6CL_EACCESS

Permission denied

The object that you specified is inaccessible. You might need superuser or RBAC access to issue the command. See the su(1M) and rbac(5) man pages for more information.

15CL_EPROP

Invalid property

The property or value that you specified with the -p, -y, or -x option does not exist or is not allowed.

18CL_EINTERNAL

Internal error was encountered

An internal error indicates a software defect or other defect.

36CL_ENOENT

No such object

The object that you specified cannot be found for one of the following reasons:

The object does not exist.

A directory in the path to the configuration file that you attempted to create with the -o option does not exist.

The configuration file that you attempted to access with the -i option contains errors.

Example 7 Displaying the NAS Devices Configured in the Cluster or Zone Cluster

The following clnasdevice command displays the names of all NAS devices that are
configured in the cluster. To see a list of the devices and their
directories, use the verbose option or the show subcommand.

# clnasdevice list
sunnas1

The following clnasdevice command displays the names of all NAS devices that are
configured in the zone cluster ZC. To see a list of the devices
and their directories, use the verbose option or the show subcommand.

# clnasdevice list -Z ZC
ZC:sunnas1

The following clnasdevice command displays the names of all NAS devices that are
configured in the zone cluster ZC. To see a list of the devices
and their directories, use the verbose option or the show subcommand.

# clnasdevice list -Z all
global:sunnas1
ZC:netapp1

Example 8 Display the NAS Devices and Their Directories or Projects

The following clnasdevice command displays the names of all NAS devices that are
configured in the cluster, along with their directories that are part of the
cluster configuration.