Go to main content

Reference for Oracle Solaris Cluster 4.4

Exit Print View

Updated: August 2018
 
 

clnasdevice (8CL)

Name

clnasdevice, clnas - manage access to NAS devices for Oracle Solaris Cluster

Synopsis

/usr/cluster/bin/clnasdevice -V
/usr/cluster/bin/clnasdevice [subcommand] -?
/usr/cluster/bin/clnasdevice subcommand [options] -v [nasdevice[…]]
/usr/cluster/bin/clnasdevice add -t type {-p name=value
     [,…] | -uuserid} [-f passwdfile] [-Z {zone-cluster-name | global}] 
     nasdevice 
/usr/cluster/bin/clnasdevice add -i {- | clconfigfile}[-t type] 
     [-p name=value | -uuserid] {-f passwdfile} [-Z {zone-cluster-name | global}] 
     {nasdevice
/usr/cluster/bin/clnasdevice add-dir -d directory[,…] [-Z 
     {zone-cluster-name | global}] nasdevice
/usr/cluster/bin/clnasdevice add-dir -i {- | clconfigfile} [-d all | 
     directory [,…]] [-f passwordfile] [-Z {zone-cluster-name | global}] 
     {nasdevice
/usr/cluster/bin/clnasdevice export [-o {- | clconfigfile}] [-t 
     type[,…]] [-d all | directory[,…]] [+ | nasdevice[…]]
/usr/cluster/bin/clnasdevice find-dir [-d {all |directory[,...] 
     [-t type[,…]] [-Z {zone-cluster-name[,…] | global | all}] 
     [+ | nasdevice[…]]
/usr/cluster/bin/clnasdevice list [-t type[,…]] [-Z 
     {zone-cluster-name[,...] | global | all}] [+ | nasdevice[…]]
/usr/cluster/bin/clnasdevice remove [-t type[,…]] [-Z 
     {zone-cluster-name | global}] [-F] {+ | nasdevice[…]}
/usr/cluster/bin/clnasdevice remove-dir -d all | directory[,…] 
     [-Z {zone-cluster-name | global}] nasdevice
/usr/cluster/bin/clnasdevice set {-p name=value[,…] | -u
     userid} [-f passwdfile] [-Z {zone-cluster-name | global}] 
     nasdevice
/usr/cluster/bin/clnasdevice show [-d {all | directory[,...] [-t 
     type[,…]] [-Z {zone-cluster-name[,…] | global | all}] 
     [+ | nasdevice[…]]

Description

The clnasdevice command manages Oracle Solaris Cluster configuration information for NAS devices and their directories or projects.

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.

From the global 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. The –Z option is not valid when the command is run from a zone-cluster node.

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.

Sub Commands

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 root role require solaris.cluster.modify authorization to use this command. See rbac(7).

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 –i configurationfile 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(7CL) 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 root role require solaris.cluster.modify authorization to use this command. See rbac(7).

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 root role require solaris.cluster.read authorization to use this command. See rbac(7).

find-dir

Displays the sun_uss projects that are set up on the NAS devices that might be used by the cluster. These projects have not yet been added to the cluster configuration with the add-dir subcommand. The 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, specify the -d 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 root role require solaris.cluster.read authorization to use this command. See rbac(7).

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 root role require solaris.cluster.read authorization to use this command. See rbac(7).

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 root role require solaris.cluster.modify authorization to use this command. See rbac(7).

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 –d all, 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 root role require solaris.cluster.modify authorization to use this command. See rbac(7).

See also the description of the add-dir subcommand.

set

Sets specified properties of a specific NAS device.

Users other than the root role require solaris.cluster.modify authorization to use this command. See rbac(7).

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 root role require solaris.cluster.read authorization to use this command. See rbac(7).

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.

–d directory[,…]
-–directory=directory–[,…]
-–directory directory–[,…]
–d project[,…]
-–directory=project–[,…]
-–directory project–[,…]

Specifies the 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 –d all 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 –i configfile 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.

–f passwd-file
-–passwdfile=passwd-file
-–passwdfile passwd-file

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

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 –f passwdfile 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.

–i clconfigfile
-–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(7CL) 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 –f passwdfile option is required.

–o {- | clconfigfile}
–-output={- | clconfigfile}
–-output {- | clconfigfile}

Writes the NAS device configuration information in the format that is defined in the clconfiguration(7CL) 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.

–p name=value[,…]
–-property=name=value[,…]
–-property name=value[,…]

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

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.

–t nas-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, the Oracle ZFS Storage Appliance NAS device type is sun_uss.

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

sun_uss

Specifies Oracle ZFS Storage Appliance NAS 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.

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. For more information, see Managing Network-Attached Storage Devices in an Oracle Solaris Cluster 4.4 Environment.

–u userid
-–userid=userid
-–useriduserid

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

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 {zone-cluster-name | global | all}
–-zonecluster={zone-cluster-name | 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.

The –Z option is not valid when the command is run from a zone-cluster node.

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

zone-cluster-name

Specifies that the command with which you use this option will operate on each specified nas-device-type only in the zone cluster named zone-cluster-name.

global

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

all

Specifies that the command with which you use it will operate on each specified nas-device-type in all zone clusters and in the global 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:

0 CL_NOERR

No error

The command that you issued completed successfully.

1 CL_ENOMEM

Not enough swap space

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

3 CL_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.

6 CL_EACCESS

Permission denied

The object that you specified is inaccessible. You might need the root role or authorization to issue the command. See the rbac(7) man page for more information.

15 CL_EPROP

Invalid property

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

18 CL_EINTERNAL

Internal error was encountered

An internal error indicates a software defect or other defect.

36 CL_ENOENT

No such object

The object that you specified cannot be found for one of the following reasons: (1) The object does not exist. (2) A directory in the path to the configuration file that you attempted to create with the –o option does not exist. (3)The configuration file that you attempted to access with the –i option contains errors.

39 CL_EEXIST

Object exists

The device, device group, cluster interconnect component, node, cluster, resource, resource type, resource group, or private string that you specified already exists.

41 CL_ETYPE

Invalid type

The type that you specified with the –t or –p option does not exist.

Examples

Example 1 Adding NAS Devices From Oracle ZFS Storage Appliance to a Cluster or Zone Cluster

The following clnasdevice command adds the Oracle ZFS Storage Appliance uss7110-01 of type sun_uss to the configuration.

# clnasdevice add -t sun_uss -p userid=osc_agent -f passwd-file uss7110-01
Example 2 Adding NAS Projects to a Cluster

The following clnasdevice command adds two projects to the already-configured NAS device uss7110-01.

# clnasdevice add-dir -d pool-0/local/nassa-pl,pool-0/local/nassa-p2 uss7110-01
Example 3 Removing a NAS Device From a Cluster or Zone Cluster

The following clnasdevice command removes the NAS device uss7110-01 and all of its remaining projects, if any, from the cluster sun configuration.

# clnasdevice remove -F uss7110-01

The following clnasdevice command removes the NAS device uss7110-01 and all of its remaining projects, if any, from the zone cluster ZC configuration.

# clnasdevice remove -Z ZC -F uss7110-01

The following example shows how to update the nodeIPs property.

# clnasdevice set -p "nodeIPs{cluster-1}"=10.155.55.145 \
-p "nodeIPs{cluster-2}"=10.155.55.146 uss7110-01

The following example removes the current setting of the IPs from the cluster configuration, so that the system uses the IPs of the cluster node names.

# clnasdevice set -p "nodeIPs{cluster-1}"= -p "nodeIPs{cluster-2}"= uss7110-01
Example 4 Displaying NAS Device Projects That Have Not Been Added to the Cluster

The following clnasdevice command displays the NAS device project names that have not yet been added to the cluster.

# clnasdevice find-dir uss7110-01
Nas Device:           uss7110-01
Type:                 sun_uss
Unconfigured Project: pool-0/local/nassa-p2
Unconfigured Project: pool-0/local/nassa-p1
Example 5 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
uss7110-01

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:uss7110-01

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:uss7110-01
ZC:uss7110-01
Example 6 Display the NAS Devices and Their Projects

The following clnasdevice command displays the names of all NAS devices that are configured in the cluster, along with the project file systems.

# clnasdevice show -v -d all uss7110-01
Nas Device:      uss7110-01
Type:            sun_uss
Project:         pool-0/local/nassa-p1
  File System:   /export/nassa-p1/nassa-p1-fs1
  File System:   /export/nassa-p1/nassa-p1-fs2
  File System:   /export/nassa-p1/nassa-p1-fs3
Project:         pool-0/local/nassa-p2
  File System:   /export/nassa-p2/nassa-p2-fs1
  File System:   /export/nassa-p2/nassa-p2-fs2

Attributes

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
ha-cluster/system/core
Interface Stability
Evolving

See Also

Intro(8CL), cluster(8CL)

Managing Network-Attached Storage Devices in an Oracle Solaris Cluster 4.4 Environment

Notes

The root role can run all forms of this command.

Any user can run this command with the following subcommands and options:

  • –? option

  • –V option

To run this command with other subcommands, users other than the root role require authorizations. See the following table.

Subcommand
Authorization
add
solaris.cluster.modify
add-dir
solaris.cluster.modify
export
solaris.cluster.read
find-dir
solaris.cluster.read
list
solaris.cluster.read
set
solaris.cluster.modify
remove
solaris.cluster.modify
remove-dir
solaris.cluster.modify
show
solaris.cluster.read