A P P E N D I X  A

CLI Command Reference

The CLI allows you to see system status, configure system properties, and administer the hardware. It is also scriptable using the ssh keys as explained in Configuring a Public Key.

The following pages provide a description, syntax, and examples for each CLI command. Text that you enter literally is shown in bold. Optional parameters are shown enclosed in [square brackets]. Variables for which you must substitute values are shown in italics. When you must select between multiple parameters, options are separated by a bar ( | ).

This appendix contains the following commands:


alertcfg

Description

Adds or removes email addresses to which alerts will be sent.

Entering alertcfg with no parameters displays the current values of each.

Syntax

alertcfg [add [to | cc] | del [to | cc]]

Options

Adds or carbon copies (cc) an email address to the specified list type.

Removes an email address from the specified list type.

Examples


hc $ alertcfg add to fred@samplecompany.com
      
hc $ alertcfg del cc admin@samplecompany.com
      


df

Description

Reports estimated disk space usage on the system.

Syntax

df [-h | --human-readable | -p | --physical]

Options

Print the results in easily-readable summary format. Note that rounding of numbers means totals are approximate.

Prints the physical space available on the disk.

Examples


hc $ df
Total: 25,151,193.0881; Available: 24,895,438.848; Used: 255,754,240; Use: 1%
hc $ df -p
DISK-101:0 Total: 449,128,448; Avail: 361,584,640; Used: 87,543,808; Use%: 19%
DISK-101:1 Total: 449,128,448; Avail: 388,771,840; Used: 60,356,608; Use%: 13%
DISK-101:2 Total: 449,128,448; Avail: 385,692,672; Used: 63,435,776; Use%: 14%
DISK-101:3 Total: 449,128,448; Avail: 388,822,720; Used: 63,305,728; Use%: 14%
.
.
.


help

Description

Displays a list of available CLI commands.

Syntax

help [command-name]

Options

command-name

Specifies the command for which you wish to receive detailed help.

Examples


hc $ help 
 
 
 
 
alertcfg
df
help
hwcfg
hwstat
ifconfig
license
logout
mdconfig
netcfg 
passwd
reboot
shutdown
sysstat
upgrade
version
wipe
 
 
 
hc $
 
 
 
 


hwcfg

Description

Administers system hardware (nodes and disks).

Syntax

hwcfg FRU ID [-E | --enable]

hwcfg FRU ID [-D | --disable]

Options

Enables a disk identified by FRU ID (field-replaceable unit ID).

Disables a disk identified by FRU ID.

Examples

1. Disable a disk.


hc $ hwcfg DISK-101:1 --disable
      
Disabling [101:1]
Operation successfully completed

Disk status in hwstat -v output changes from ONLINE to OFFLINE.

2. Enable a disk.


hc $ hwcfg DISK-101:1 --enable
      
Enabling [101:1]
Operation successfully completed

Disk status in hwstat -v output changes from OFFLINE to ONLINE.



Note - If you reboot with the disk disabled, to enable the disk you must enable it and then reboot again.




hwstat

Description

Displays information about disk and server node field-replaceable units (FRUs) in the Sun StorageTek 5800 system or displays information about a particular FRU.

Syntax

hwstat [ -v | --verbose ]

Options

-v, --verbose

Shows a list of all components (FRUs and others) and their statistics.

Examples


hc $ hwstat 
 
NODE-101
[00E08159-7311-0000-CA80-11735981E000]
DISK-101:0
[HITACHI_HDS7250ASUN500G_0609K4MJHD=KRVN63ZAH4MJHD]
DISK-101:1
[HITACHI_HDS7250ASUN500G_0609K4NHRD=KRVN63ZAH4NHRD]
DISK-101:2
[HITACHI_HDS7250ASUN500G_0609K4USGD=KRVN63ZAH4USGD]
DISK-101:3
[HITACHI_HDS7250ASUN500G_0609K54SLD=KRVN63ZAH54SLD]
NODE-102
[00E08159-59FC-0000-7480-FC595981E00]
DISK-102:0
[HITACHI_HDS7250ASUN500G_0609K56DKD=KRVN63ZAH56DKD]
DISK-102:1
[HITACHI_HDS7250ASUN500G_0609K50VPD=KRVN63ZAH50VPD]
DISK-102:2
[HITACHI_HDS7250ASUN500G_0609K3P98D=KRVN63ZAH3P98D]
DISK-102:3
[HITACHI_HDS7250ASUN500G_0609K4UT8D=KRVN63ZAH4UT8D]
.
 
.
 

 


hc $ hwstat -v
 
 
 
Component
----------
Type
----
FRU ID
------
Status
------
NODE-101
NODE
[00E08159-7311-0000-CA80-11735981E000]
[Online]
DISK-101:0
[enabled]
DISK
[HITACHI_HDS7250ASUN500G_0609K4MJHD=KRVN63ZAH4MJHD]
 
DISK-101:1
[enabled]
DISK
[HITACHI_HDS7250ASUN500G_0609K4NHRD=KRVN63ZAH4NHRD]
 
DISK-101:2
[enabled]
DISK
[HITACHI_HDS7250ASUN500G_0609K4USGD=KRVN63ZAH4USGD]
 
DISK-101:3
[enabled]
DISK
[HITACHI_HDS7250ASUN500G_0609K54SLD=KRVN63ZAH54SLD]
 
NODE-102
NODE
[00E08159-59FC-0000-7480-FC595981E000]
[Online]
DISK-102:0	
[enabled]
DISK
[HITACHI_HDS7250ASUN500G_0609K56DKD=KRVN63ZAH56DKD]
 
DISK-102:1
[enabled]
DISK
[HITACHI_HDS7250ASUN500G_0609K50VPD=KRVN63ZAH50VPD]
 
DISK-102:2	
[enabled]
DISK
[HITACHI_HDS7250ASUN500G_0609K3P98D=KRVN63ZAH3P98D]
 
DISK-102:3
[enabled]
DISK	
[HITACHI_HDS7250ASUN500G_0609K4UT8D=KRVN63ZAH4UT8D]
 
.
 
 
 
.
 
 
 


ifconfig

Description

Configures or displays the admin and data virtual IP addresses.



Note - Release 1.0 supports changing only the IP address and netmask of the data and admin VIPs. A VIP is either data0 or admin0.



Syntax

ifconfig device netmask

Options

device

Specifies the device (data0 or admin0).

netmask

Specifies the IP address.

Examples


hc $ ifconfig data0 10.7.224.42
      
Please wait a couple of minutes while the configuration is updated.
      
nopasswd@10.123.45.1's password:
      
You must reboot the cell with "reboot --all" for changes to take effect.
      
hc $ ifconfig admin0 10.7.224.41
      
You must reboot the cell for changes to take effect.


license

Description

Displays or sets the current software license.

Entering license with no parameters displays the current license.

Syntax

license [value]

Options

value

Sets the current license to the specified value.

Examples


hc $ license 
      
License Not Yet Entered
hc $ license STK5800-SEARCH-10001
hc $ license
STK5800-SEARCH-10001
hc $


logout

Description

Ends the administrative session.

Syntax

logout | exit

Options

None

Examples


client $ logout
      
hc $ logout Connection to hc1-admin closed. 
client $
hc $ exit
      
Connection to hc1-admin closed. 
client $


mdconfig

Description

Enables updates to the existing metadata schema.

Entering mdconfig with no parameters performs a validation on the current schema overlay file.

Syntax

mdconfig [-d | --dump | -t | --template | -c | --commit]

Options

Prints the current schema configuration as standard output.

Returns an empty overlay file that you can use as a starting point to extend the schema configuration.

Commits the configuration change described in the overlay file to be read in as standard input.

Example


hc $ mdconfig -t
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Id: metadata_config_template.xml 7255 2006-03-01 00:1618Z wr152514
 
Copyright 2005 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
<!--
 
<!--
This template file provides a schema config overlay skeleton.
Note that the fsview refers to the namespace of the schema. 
<!--
 
<metadataConfig>
<schema>

<namespace name="NAMESSPACE_NAME">

<field name="FIELD1" type="string"/>

<field name="FIELD2" type="string"/>

<field name="FIELD3" type="string"/>

</namespace>

</schema>
 
<fsViews>
<fsView name="FSVIEW_NAME" filename="${FIELD3}.num" namespace="NAMESPACE_NAME">

<attribute name="FIELD1"/>

<attribute name="FIELD2"/

</fsView>

...

</fsViews>
 
</metadataConfig>
 
hc $ cat overlay.xml | ssh admin@<ADMIN IP> mdconfig
hc $ cat overlay.xml | ssh admin@<ADMIN IP> mdconfig -c


netcfg

Description

Enables you to set and display various network configuration parameters, including:

Syntax

netcfg [ smtp] [ gw ] [ ntp] [ loghost] [ clients]

Options

Sets the location of the SMTP server that the Sun StorageTek 5800 system uses.

Sets the default gateway (router) that the Sun StorageTek 5800 system uses.

Sets the external NTP servers that the Sun StorageTek 5800 system uses.

Sets the external log host that the Sun StorageTek 5800 system uses.

Specifies the authorized clients for the Sun StorageTek 5800 system.

Examples


hc $ netcfg
      
Gateway: 10.7.227.254
Subnet: 255.255.252.0
Log Host: 10.123.45.1
NTP Server: 10.123.45.1
SMTP Server: 10.7.22.20
Authorized Clients: All
 
hc $ netcfg smtp 10.7.224.20 25
Please wait a couple of minutes while the configuration is updated.
nopasswd@10.123.45.1's password:
You must reboot the cell with "reboot --all" for changes to take effect.
hc $ netcfg gw 10.7.226.254 255.255.255.0
Please wait a couple of minutes while the configuration is updated.
nopasswd@10.123.45.1's password:
You must reboot the cell with "reboot --all" for changes to take effect.
hc $ netcfg ntp 10.7.224.30,10.7.224.40
      
Please wait a couple of minutes while the configuration is updated.
nopasswd@10.123.45.1's password:
You must reboot the cell with "reboot --all" for changes to take effect.
hc $ netcfg loghost 10.7.224.15
      
Please wait a couple of minutes while the configuration is updated.
nopasswd@10.123.45.1's password:
You must reboot the cell with "reboot --all" for changes to take effect.
hc $ netcfg clients 10.45.1.19,192.18.7.2,34.7.7.101
      
hc $ netcfg
      
Gateway: 10.7.226.254
Subnet: 255.255.255.0
Log Host: 10.7.224.15
NTP Server: 10.7.224.30,10.7.224.40
SMTP Server: 10.7.224.20:25
Authorized Clients: 10.45.1.19,192.18.7.2,34.7.7.101
      
hc $ netcfg clients all
      
hc $ netcfg
      
Gateway: 10.7.226.254
Subnet: 255.255.255.0
Log Host: 10.7.224.15
NTP Server: 10.7.224.30,10.7.224.40
SMTP Server: 10.7.224.20:25
Authorized Clients: all
      


passwd

Description

Allows the system administrator to change the admin password, as well as set and change an ssh pubkey for accessing the CLI.

Syntax

passwd [-P | --pubkey ]

Options

-P or --pubkey

Use this option if you are going to provide a public key to be used for login authorization.

Examples


hc $ passwd
      
password: 
password (again): 
authentication tokens successfully updated
hc $ 
 
client_$ ssh admin@cluster-admin passwd --pubkey < file.pub 
authentication tokens successfully updated 

 

 

 

 

where file.pub is the file containing the public key.

To return to interactive prompting, remove your private key or create a new public key with a pass phrase.



Note - Passwords must be at least six characters long.





Note - If you have already supplied a public key and then supply a new public key, the new key replaces the old key. Only one public key is allowed on the Sun StorageTek 5800 system.




reboot

Description

Reboots the cluster. Rebooting causes an alert to be sent.

Syntax

reboot [-F | --force ] [-A | --all ]

Options

-F or --force

Prompts for confirmation before forcing a reboot.

-A or --all

Reboots the switches along with the nodes.



Note - In non-interactive mode, reboot does not prompt for confirmation (no -F or
--force is required).



Examples


hc $ reboot
      
Reboot? [y/N]: y 
Connection to hc1-admin closed. 
hc $ reboot --force 
Connection to hc1-admin closed. 
client_$ ssh admin@hc1-admin reboot 
client_$ 


shutdown

Description

Shuts down (powers off) the cluster. System shutdown causes an alert to be sent.



caution icon

Caution - Use the shutdowncommand only in consultation with Sun StorageTek 5800 system support personnel.



Syntax

shutdown [ -F | --force ]

Options

-F or --force

Forces a system shutdown without prompting for confirmation.



Note - In non-interactive mode, shutdown does not prompt for confirmation (no
-F or --force is required).



Examples


hc $ shutdown
      
It is not safe to shutdown the system
Do you want to shutdown anyway? [y/N]: n 
hc $ shutdown Shutdown? [y/N]: y 
Connection to hc1-admin closed. 
client_$ ssh admin@hc1-admin shutdown 
Connection to hc1-admin closed.


sysstat

Description

Displays overall and performance statistics about the system.

Syntax

sysstat [ -i seconds | --interval=seconds] [ -v | --verbose]

Options

Specifies a number of seconds at which to repeat the statistics listing. (The default here is 5.)

Displays voluminous information about the system.

Examples


hc $ sysstat 
Silo 1, Cell 1: Cluster Online. Estimated free space: 7T.
16 nodes online, 64 disks online, 0 disks unrecovered
Data VIP 10.7.225.222. Admin VIP 10.7.225.223.
Data services Online, Query Available
Failure Tolerance: Fault Tolerant
Last Recovery Cycle: Completed 5 hours ago.
Next Recovery Cycle: To complete in 9 hours.

The output that the sysstat command produces is as follows:

Verbose output includes the online/offline status of each node and disk in the cluster. The online/offline status reported by the command refers to the logical system status. To see the state of hardware components, refer to hwstat.


upgrade

Description

Upgrades the cluster to a newer version of the Sun StorageTek 5800 system software. You perform an upgrade from a DVD, or from an ISO image located on a web server. For a detailed description, see Upgrading the System.

Syntax

upgrade [dvd |< image-name> | downloaded]

Options

Performs an upgrade from a DVD.

Downloads the image from an IP address and upgrades in one step.

Downloads the image from an IP address and upgrades at a later time.

Examples


hc $ upgrade dvd
      
 
hc $ upgrade http://123.45.67.89/honeycombdvd.iso
      
 
hc $ upgrade download http://123.45.67.89/honeycombdvd.iso
      
hc $ upgrade downloaded
      
 


version

Description

Displays the version of the system software.

Syntax

version

Options

None

Example.


hc $ version
Sun StorageTek 5800 System v1.0 build 1.0.7 built on Tues Apr 10 18:05:32
 


wipe

Description

Deletes all data and metadata on the cell. It does not delete the system software, however. After issuing the wipe command, you use the reboot command to complete the process.



caution icon

Caution - All data and metadata in the Sun StorageTek 5800 system is lost when you run the wipecommand. Consult Sun StorageTek 5800 system technical support prior to using this command.



Syntax

wipe [ -F | --force ]

Options

-F or --force

Forces a system wipe without prompting for confirmation.

Examples


hc $ wipe
      
Destroy all data? [y/N]: