JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris Cluster Reference Manual     Oracle Solaris Cluster 4.1
search filter icon
search icon

Document Information

Preface

Introduction

OSC4 1

OSC4 1cl

claccess(1CL)

cldev(1CL)

cldevice(1CL)

cldevicegroup(1CL)

cldg(1CL)

clinterconnect(1CL)

clintr(1CL)

clmib(1CL)

clnas(1CL)

clnasdevice(1CL)

clnode(1CL)

clps(1CL)

clpstring(1CL)

clq(1CL)

clquorum(1CL)

clreslogicalhostname(1CL)

clresource(1CL)

clresourcegroup(1CL)

clresourcetype(1CL)

clressharedaddress(1CL)

clrg(1CL)

clrs(1CL)

clrslh(1CL)

clrssa(1CL)

clrt(1CL)

clsetup(1CL)

clsnmphost(1CL)

clsnmpmib(1CL)

clsnmpuser(1CL)

clta(1CL)

cltelemetryattribute(1CL)

cluster(1CL)

clzc(1CL)

clzonecluster(1CL)

OSC4 1ha

OSC4 1m

OSC4 3ha

OSC4 4

OSC4 5

OSC4 5cl

OSC4 7

OSC4 7p

Index

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[,…] 
| -u userid} [-f passwdfile] [-Z {zoneclustername | global}] nasdevice 
/usr/cluster/bin/clnasdevice add -i {- | clconfigfile}[-t type] 
[-p name=value | -u userid] {-f passwdfile} 
[-Z {zoneclustername | global}] {nasdevice
/usr/cluster/bin/clnasdevice add-dir -d directory[,…] [-Z {zoneclustername 
| global}] nasdevice
/usr/cluster/bin/clnasdevice add-dir -i {- | clconfigfile} [-d all | directory  
[,…]] [-f passwordfile] [-Z {zoneclustername | 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  
{zoneclustername[,…] | global | all}] [+ | nasdevice[ …]]
/usr/cluster/bin/clnasdevice list [-t type[,…]]  [-Z {zoneclustername[,...] 
| global | all}] [+ | nasdevice[ …]]
/usr/cluster/bin/clnasdevice remove [-t type[,…]] [-Z {zoneclustername 
| global}] [-F ] {+ | nasdevice[ …]}
/usr/cluster/bin/clnasdevice remove-dir -d all | directory[,…] [-Z 
{zoneclustername | global}] nasdevice
/usr/cluster/bin/clnasdevice set {-p name=value[,…] | -u userid} 
[-f passwdfile] [-Z {zoneclustername | global}] nasdevice
/usr/cluster/bin/clnasdevice show [-d {all | directory[,...] [-t 
type[,…]] [-Z {zoneclustername[,…] | 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:

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:

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 -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(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 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 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 -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 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.

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.

-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(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 -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(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.

-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, Oracle's Sun 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's Sun 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 Oracle Solaris Cluster With Network-Attached Storage Device Manual.

-u userid
--userid=userid
--userid userid

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

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 superuser or RBAC access to issue the command. See the su(1M) and rbac(5) man pages 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:

  • 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.

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's Sun ZFS Storage Appliance to a Cluster or Zone Cluster

The following clnasdevice command adds the Sun 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(5) for descriptions of the following attributes:

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

See Also

Intro(1CL), cluster(1CL)

Oracle Solaris Cluster With Network-Attached Storage Device Manual

Notes

The superuser can run all forms of this command.

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

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

Subcommand
RBAC 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