C H A P T E R  5

Administering the System

This chapter describes how to perform administrative tasks on your Sun StorageTek 5800 system. It contains the following sections:

Managing Passwords or Public Keys

You can use the passwd command interactively to set a new password, or use it non-interactively to supply a new public key.

Changing the System Password

single-step bulletLog in to the CLI and change the password interactively with the passwd command.

hc $ passwd
password: password (again): 
authentication tokens successfully updated 
hc $ 

Note - Passwords must be at least six characters long.

Configuring a Public Key

A public key allows you to log in to the Sun StorageTek 5800 system from remote systems also carrying that key. Configuring a public key is primarily done to allow for scripting.

Create a public key without a pass phrase. The Sun StorageTek 5800 system comes configured with a password, so the first time you set the public key, you will be prompted to supply your password.

Once the key is set, you can log in without being prompted. If you send another key non-interactively, the new key replaces the old key. If you wish to return to interactive logins, remove your private key, or send a public key that you have created with a pass phrase.

1. Configure ssh for password-free login by supplying a public key from a client system, for example:

client_$ ssh admin@hc1-admin passwd --pubkey < file.pub
admin@hc1-admin's password: 
authentication tokens successfully updated 

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

2. Verify password-free login.

client_$ ssh admin@hc1-admin 
Sun StorageTek 5800 System Management Console 
hc $

Executing a Script

The following simple example demonstrates how to use a CLI command within a client script.

1. Create a script file containing CLI commands.

You create scripts on ssh-capable client machines in any desired client-side shell, and then execute them across the network via ssh. In the examples that follow, note that the identity of the user on the client machine is the same as admin on the Sun StorageTek 5800 system. Otherwise, ssh will fail.

On the client-side, use any available editor to create the following script file.

ssh admin@hc1-admin df

Substitute the name or VIP of the administrative interface of your cluster for hc1- admin in the example.

2. Save the file (for example, as cli-script.sh) and make it executable by typing:

client_$ chmod +x cli-script.sh

3. Run the script.

client_$ ./cli-script.sh

You should see the df output for the Sun StorageTek 5800 system cluster appear on your screen.

You can enter additional CLI commands with multiple ssh commands embedded in standard script logic to script CLI command activities.

Powering Up the System

1. Verify that the system is completely shut down by ensuring that the power switches on the front of the rack are set to the off or 0 position.

2. Switch both black power switches on the front of the rack to the on or 1 position.

3. Wait several minutes.

4. Log in to the CLI and verify that the Sun StorageTek 5800 system is operational using the hwstat command.

For more information, see hwstat.

Shutting Down the System

1. Shut down (power off) the Sun StorageTek 5800 system with the shutdown command.

hc $ shutdown
shutdown? [y/N]: n
hc $ shutdown 
shutdown? [y/N]: y 
Connection to hc1-admin closed.

2. Switch both power switches on the front of the rack to the off or 0 position.

Rebooting the System

single-step bulletReboot the Sun StorageTek 5800 system with the reboot command.

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

Recovering From a Power Failure

When power is restored after a power failure, the Sun StorageTek 5800 system becomes operational automatically without administrator intervention. The system should not require any recovery time and there are no procedures for recovery after a power loss, other than restoring power.

While no special procedures are required here, you should still:

1. Verify that all nodes and disks are online.

2. If some are not, check for potential system/hardware failures caused by the abrupt loss of power.

No data loss should occur as a result of a power failure. Any stored data for which the client received an OID remains securely stored on the Sun StorageTek 5800 system. As you would expect, however, any client store operations that were in-progress at the time of power failure will fail.

Upgrading the System

You use the upgrade command to upgrade the Sun StorageTek 5800 system cluster to a newer version of the software. You perform an upgrade:

single-step bulletTo perform an upgrade from a DVD, insert the DVD into the drive in the service node. Then, log into the CLI and type the following:

hc $ upgrade dvd

single-step bulletTo download the image from an IP address and upgrade in one step, type the following:

hc $ upgrade

single-step bulletTo download the image from an IP address and upgrade at a later time, type the following:

hc $ upgrade download
hc $ upgrade downloaded

Note here that:

Once the upgrade begins, it checks to see that all nodes and disks are available and then does not permit any changes. Be aware that the process is non-interactive. However, it does display a great deal of information about what is going on throughout. For instance, it unpacks the install image, upgrades the service node, the switches, and finally each node in the cluster.

If there is a problem with the images during an upgrade, the nodes will boot from the previous version. There is no procedure for manually rolling back to that previous version.

If there is a power outage during an upgrade, the system may or may not come back online. It depends upon where in the process, the upgrade was interrupted. Should the system not become operational, you should call your Sun Service representative.

A controlled reboot of the entire cell is the last phase of the upgrade process. First, the service node is rebooted. Next, each node except one is rebooted. Then, the switches are rebooted, and finally, the last node is rebooted. When the switch is rebooted, you are logged out of the CLI and are unable to connect again until the system has come back with the new image.

Wiping Data From the System

single-step bulletDelete all data and metadata from the cluster with the wipe command.

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

After you issue the wipe command, the schema is reset to the original factory settings, while other cluster configurations (such as network settings and passwords) are unaffected.