Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

OpenSolaris 2009.06 - man page for clnasdevice (opensolaris section 1cl)

clnasdevice(1CL)					 Sun Cluster Maintenance Commands					  clnasdevice(1CL)

NAME
clnasdevice, clnas - manage access to NAS devices for Sun 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 {-pname=value[,...] | -u userid} [-f passwdfile] nasdevice /usr/cluster/bin/clnasdevice add -i {- | clconfigfile} [-t type] [-pname=value | -u userid] {-f passwdfile} {+ | nasdevice[ ...]} /usr/cluster/bin/clnasdevice add-dir -d directory[,...] nasdevice /usr/cluster/bin/clnasdevice add-dir -i {- | clconfigfile} [-d all | directory[,...]] [-f passwordfile] {+ | nasdevice[ ...]} /usr/cluster/bin/clnasdevice export [-o {- | clconfigfile}] [-t type[,...]] [-d all | directory[,...]] [+ | nasdevice[ ...]] /usr/cluster/bin/clnasdevice list [-t type[,...]] [+ | nasdevice[ ...]] /usr/cluster/bin/clnasdevice remove [-t type[,...]] [-F ] {+ | nasdevice[ ...]} /usr/cluster/bin/clnasdevice remove-dir -d all | directory[,...] nasdevice /usr/cluster/bin/clnasdevice set {-pname=value[,...] | -u userid} [-f passwdfile] nasdevice /usr/cluster/bin/clnasdevice show [-t type[,...]] [+ | nasdevice[ ...]]
DESCRIPTION
The clnasdevice command manages Sun Cluster configuration information about NAS devices and their directories. 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: o The NAS device must be set up and operating. o The NAS device must be booted and running. o The NAS device's directories must be created and made available to the cluster nodes. o 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 clquorum.1cl man 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. Conse- quently, the cluster cannot protect the integrity of the information in these directories. Use the clnasdevice command for these administrative tasks: o To create the NAS device configuration o To update NAS type-specific properties o To remove the NAS device's directories from the cluster configuration o 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 this command only in the global zone.
SUBCOMMANDS
The following subcommands are supported: add Adds a NAS device to the Sun 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 of an already configured NAS device to the cluster configuration. You must have created these directo- ries on the device and made them available to the cluster before using this subcommand. For information about creating directories, see the documentation for your NAS device. You can add NAS device directories one of two ways: o Use the clnasdevice add command to configure the NAS device in the cluster. Then use the clnasdevice add-dir command to con- figure that device's directories in the cluster. o Use the clnasdevice add-dir -i configurationfile form of the command to add the device and configure its directories in a single step. To add directories using this method, provide the password file using the -f option. For details on this option, see the "OPTIONS" section. For the format of the clconfiguration(5CL) file, see its man page. Whenever you create a new directory on the NAS device and make it available to the cluster nodes, you need to use this add-dir subcom- mand to add the directories to the cluster configuration. 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). 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 Sun 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 directories from the Sun Cluster configuration. The remove-dir subcommand removes the exported directories specified by the -d option. When you use -d all, the subcommand removes all the directories of the specified NAS device. Whenever a directory is removed from the NAS device, you need to use this remove-dir subcommand to remove the directories from the cluster configuration. The NAS directories in the cluster configuration must match the existing directories 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 the NAS device from Sun Microsystems, Inc. As this device does 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: o A listing of all the current NAS devices configured in Sun Cluster o The available directories of each NAS device o 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. 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-[,...] Specifies the NAS device directory or directories. Use this option only with the add-dir, remove-dir, and export subcommands. This option accepts a special keyword, all. When you use the -d all option, you specify all directories on the specified NAS devices. o With the remove-dir subcommand, all directories on the specified devices are removed. o With the export subcommand, the configuration information of all directories on the specified devices is displayed to the specified output. o 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. -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 Sun Cluster configuration. -f passwdfile --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 the NAS device from Sun Microsystems, Inc. As 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 pass- word. 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: o Specify passwords on a single line. Do not type passwords across multiple lines. o Leading white spaces and tabs are ignored. o Comments begin with an unquoted # sign. Comments continue to the next new line The parser ignores all comments. o 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. Note - You do not specify properties for the NAS device from Sun Microsystems, Inc. As 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. -t 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 Sun Cluster configuration. The NAS device type is identified by the vendor name. For example, the NAS device type for Sun Microsystems, Inc. is sun. Different types of NAS devices have different or in some cases, no properties. sun Specifies a NAS device from Sun Microsystems, Inc. Note - You do not specify properties for the NAS device from Sun Microsystems, Inc. As this device does not have any properties, the set subcommand and the -f, -p, and -u options do not apply. 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 [-f passwdfile] or -u userid [-f passwdfile] 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: o Set up the NAS device. o Set up directories and made them available to the cluster nodes. o 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. For instructions about obtaining the support module, see Sun Cluster With Network-Attached Storage Devices Manual for Solaris OS. -u userid --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 the NAS device from Sun Microsystems, Inc. As 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).
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 pro- cesses 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: o The object does not exist. o A directory in the path to the configuration file that you attempted to create with the -o option does not exist. o 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, or resource group 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 a NAS Device From Sun Microsystems, Inc. to a Cluster The following clnasdevice command adds the Sun Microsystems, Inc. storage system sunnas1 to the Sun Cluster configuration. # clnasdevice add -t sun sunnas1 Example 2 Adding a NAS Device From Network Appliance, Inc. to a Cluster The following clnasdevice command adds the Network Appliance, Inc. storage system netapp1 to the Sun Cluster configuration. # clnasdevice add -t netapp -p userid=root netapp1 Please enter password Example 3 Adding Some NAS-Device-Directories to a Cluster The following clnasdevice command adds two exported directories of the already configured NAS device sunnas1 to the cluster configuration. # clnasdevice add-dir -d /export/dir1,/export/dir2 sunnas1 Example 4 Removing All NAS-Device-Directories From Cluster Configuration The following clnasdevice command removes all directories that belong to the NAS device netapp1 from the cluster configuration. # clnasdevice remove-dir -d all netapp1 Example 5 Removing a NAS Device From a Cluster The following clnasdevice command removes the NAS device sunnas1 and all of its remaining directories, if any, from the Sun Cluster config- uration. # clnasdevice remove -F sunnas1 Example 6 Displaying the NAS Devices Configured in the Cluster The following clnasdevice command displays the names of all NAS devices that are configured in the cluster. To see a listing of the devices and their directories, use the verbose option or the show subcommand. # clnasdevice list sunnas1 Example 7 Display the NAS Devices and Their Directories 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. # clnasdevice show -v Nas Device: sunnas1.sfbay.sun.com Type: sun Userid: root Directory: /export/dir1 /export/dir2 Nas Device: netapp2 Type: netapp Userid: root Directory: /export/dir1 /export/dir2
ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWsczu | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+
SEE ALSO
Intro(1CL), cluster(1CL)
NOTES
The superuser can run all forms of this command. Any user can run this command with the following subcommands and options: o -? option o -V option 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 | +-----------+---------------------------------------------------------+ |list | solaris.cluster.read | +-----------+---------------------------------------------------------+ |set | solaris.cluster.modify | +-----------+---------------------------------------------------------+ |remove | solaris.cluster.modify | +-----------+---------------------------------------------------------+ |remove-dir | solaris.cluster.modify | +-----------+---------------------------------------------------------+ |show | solaris.cluster.read | +-----------+---------------------------------------------------------+ Sun Cluster 3.2 6 Sep 2007 clnasdevice(1CL)