C H A P T E R 3 |
Controller and Disk Commands |
This chapter provides the available controller and disk commands with sample code. Topics covered in this chapter include:
The following commands are explained in this section:
For details on downloading controller firmware, see download controller-firmware.
The download controller-configuration command restores controller configuration information previously saved using the upload controller-configuration command. The configuraton file includes channel settings; host and drive side parameters; array parameters; network port setup; controller general parameters; logical drive, logical volume, and physical drive information; partition information and mappings on host channels.
A logical drive or logical volume create operation might be required to completely restore the saved configuration. However, creating a logical drive might take a long time, and block other operations. The command provides an option to specify whether to build the logical drive.
Caution - The download controller-configurationcommand unmaps all existing logical drives if they do not match the configuration file that is being downloaded. |
Note - Optimally, rebuild any logical drives before running this command. |
The fail command simulates a controller failure and causes all the LUNs assigned to the specified controller to fail over to the redundant controller, if it is configured for failover. If the controller is configured for failover, the inter-controller link is not disconnected with this command.
Note - Before running this command, perform a show redundancy-mode command to make sure a secondary controller exists. For details, see show redundancy-mode. |
Note - This command prompts the user to confirm the failure, unless the --yes option is specified. |
The following example fails the secondary controller if Y is specified at the prompt. Specify N to cancel the failure.
The following example fails the primary controller and uses the -yes option so no prompt is displayed before the controller fails.
The mute command silences the controller’s audible alarm. After the fault condition that caused the alarm to sound is cleared, the next fault condition causes the alarm to sound again. For details on alarms, refer to the Sun StorEdge 3000 Family Installation, Operation, and Service Guide for your array.
Note - This command works on RAID subsystems. It does not work on JBODs. To manually silence a JBOD alarm, push the Reset button on the right ear of the array. |
Use the password command in scripts to specify the password assigned to the array controller when the user is not available to respond to password prompts. The correct password must be supplied when issuing potentially dangerous commands to the array over a network connection. For interactive sessions, the Sun StorEdge CLI prompts the user for this password only when necessary. No password is required when accessing the array using inband SCSI. For details on setting the password, see set controller-password.
Note - Use quotation marks around password strings that contain spaces or apostrophes. |
The following example supplies the controller password, test password.
The reset controller command shuts down the controller, flushes its cache to disk, and then restarts the controller. This temporarily causes the array to go offline, which might affect applications running on any hosts connected to the array. After running a reset command, to stay in prompt mode, run the select command to reselect the device.
The following example resets the controller for the specified device.
The set cache-parameters command sets cache policy (write-back or write-through), optimization mode (sequential or random), and a periodic cache synchronization value.
Caution - Data inconsistency can occur when a controller configured with one optimization mode is used to replace a failed controller with a different mode. |
The controller must be reset for this command to take effect.
The cache policy determines when cached data is written to the disk drives. The ability to hold data in cache while it is being written to disk can increase storage device speed during sequential reads.
Using write-through cache, the controller writes the data to the disk drive before signaling the host OS that the process is complete. Write-through cache has lower write operation and throughput performance than write-back cache, but it is the safer strategy, with minimum risk of data loss on power failure. Because a battery module is installed, power is supplied to the data cached in memory and the data can be written to disk when power is restored.
Using write-back cache, the controller receives the data to write to disk, stores it in the memory buffer, and immediately sends the host OS a signal that the write operation is complete, before the data is actually written to the disk drive. Write-back caching improves the performance of write operations and the throughput of the controller card. Write-back cache is enabled by default.
The controller cache write policy is the default setting for all logical drives. When you create a logical drive, if you do not specify a write policy, the logical drive uses the write policy specified by the set cache-parameters command. If the write policy changes for the controller, the write policy automatically changes for the logical drive as well. If you specify write-back or write-through for individual logical drives, the write policy for those drives remains the same regardless of any changes to the global write policy. For details about setting individual logical drive cache policy, see set logical-drive.
You can also configure the write policy to automatically change from write-back cache to write-through cache when certain environmental events, such as a fan failure, occur. For details, see set auto-write-through-trigger.
For more information on cache policy, refer to the Sun StorEdge 3000 Family RAID Firmware User’s Guide.
Before creating or modifying logical drives, determine the appropriate optimization mode for the RAID array. The controller supports two optimization modes, sequential I/O and random I/O. Sequential I/O is the default mode.
The RAID array’s cache optimization mode determines the cache block size used by the controller for all logical drives:
An appropriate cache block size improves performance when a particular application uses either large or small stripe sizes:
Since the cache block size works in conjunction with the default stripe size set by the cache optimization mode for each logical drive you create, these default stripe sizes are consistent with the cache block size setting. You can, however, specify a different stripe size for any logical drive at the time you create it. For more information, create logical-drive.
Once logical drives are created, you can use the set cache-parameters command to change the optimization mode while logical drives exist. However, using the Sun StorEdge CLI set cache-parameters command to change optimization mode can result in a pre-existing logical drive having a stripe size that, because it is inappropriate for that optimization mode, could not have been selected at the time the logical drive was created. This combination will not yield the best performance possible, but there is no risk of data loss or other data-related problems. You can avoid this inefficiency by choosing stripe sizes and an optimization mode that are appropriate for your applications.
For information on stripe size and optimization modes, refer to the Sun StorEdge 3000 Family RAID Firmware User’s Guide.
The following example sets the cache mode to write-back.
The following example sets the cache mode to write-back, the optimization to sequential, and the sync period to 30 seconds.
The set controller-date command sets a controller date, time, and time zone which enables you to reference and correlate messages and errors.
The following example sets the controller time and date to September 22, 2004 at 1:43 pm in the Pacific Standard time zone during daylight savings time.
The set controller-name command specifies a name for the array.
The following example sets the controller name as testname.
To remove an existing controller name, specify a zero-length string with a pair of double-quote characters. For example:
The set controller-password command specifies a password that protects the RS-232 character interface, telnet, and FTP services from unauthorized use.
The following example sets the controller password as test123.
The following example shows how the password length is checked. If you enter a maximum length for the password that exceeds the maximum allowed based on the length of the controller name, you will get an error. As shown in this example, the controller name has been set to 1023456789 (10 characters), so the maximum length of the password allowed is 22:
# sccli c2t0d0 set controller-password “1234567890abcdef1234567890abcdef” controller current acceptable max length of password: 22 sccli> get/set operation: error: failed to check/set password |
To remove an existing password, specify a zero-length string with a pair of double-quote characters. For example:
The set rs232-configuration command specifies the speed, in bits per second, for the specified RAID controller port. Single-controller configurations have a single RS-232 port (port 1). Redundant controllers have a second port (port 2). Usually, both ports are connected to support controller failover, so both should be set to the same speed. The default speed is 38400. The controller must be reset for this change to take effect.
In the following example, the RAID controller RS-232 port 1 band rate is set to 38400.
The set unique-identifier command specifies the unique identifier for the array subsystem as a six-digit hexadecimal number from 0 to 0xfffff. This identifier is initialized from the chassis serial number automatically, and should not be changed unless the chassis is replaced. The controller must be reset for this change to take effect.
The following example sets the controller unique identifier as 0x1234.
The following example sets the controller unique identifier to the default value based on the chassis serial number. This command must be followed by the reset controller command before the change takes effect.
The show cache-parameters command displays the RAID controller parameters that influence the performance of the read/write cache. Returned values include write policy (write-through or write-back), optimization mode (random or sequential), periodic cache synchronization period, and current global write policy (write-through or write-back). For details on setting the cache parameters, see set cache-parameters.
The following example shows all the cache settings for a Sun StorEdge 3510 FC device.
sccli> show cache-parameters mode: write-back optimization: sequential sync-period: 30s current-global-write-policy: write-back |
The show controller-date command displays the boot time and date, current time and date, and time zone of the RAID controller.
The following example shows the controller boot time and date, current time and date, and time zone.
sccli> show controller-date Boot time : Thu Sep 16 02:37:36 2004 Current time : Wed Sep 22 13:43:06 2004 Time Zone : GMT -07:00 |
The show controller-name command displays the RAID controller name. If the RAID controller name is not set, the command returns ““ (an empty set of quotation marks).
The following example shows the controller name is test.
The show inquiry-data command displays the data returned by the array controller including the inquiry vendor ID, product ID, firmware revision, and if applicable, IP address. The output of this command varies from one product to another, and from one channel to another.
When addressing a primary controller, the Ethernet address is also displayed. A “Serial Number” field is also displayed; this may contain a RAID controller unique ID value, which defaults to the RAID enclosure’s serial number, or a JBOD serial number, depending on the type of device selected.
When inband communication is used with the array, additional data derived from Vital Product Data are also displayed. The additional data may vary from one invocation to the next, even if the same device is selected, depending on the type of HBA that is used to communicate with the array, whether HBA load-balancing software is used, and which LUN received the command.
Note - The abbreviation inquiry can be substituted for the show inquiry-data command. |
The following example shows an inband Sun StorEdge 3310 SCSI array inquiry.
The following example shows an inband Sun StorEdge 3510 FC array inquiry.
The following example shows an out-of-band Sun StorEdge 3510 FC array inquiry.
The show redundancy-mode command shows whether the two controllers are operating correctly as a redundant pair. Returned values include Active-Active, disabled, enabled, failed, scanning, detected, and primary or secondary.
You can also use the show redundancy-mode command to monitor the status of an automatic firmware update. The Sun StorEdge CLI will display the progression of “Failed,” “Scanning,” “Detected,” and “Enabled” states. Returned values include:
1. Initial Failed Status Response: This is the response to the command upon a controller failure and is shown for completeness.
2. Scanning Status: Install Controller FRU. The installed controller is performing self-test and scanning disk channels. This is also the state where the controller updates the firmware on the newly installed controller if it is not identical to the running firmware version. The controllers can remain in this state for up to 10 minutes depending upon system activity.
3. Detected Status: Redundant Controller Process Starts. The installed controller has completed the scanning of the disk channels, updated installed controller firmware as required, and communicated to the primary controller. This status is transitional and normally cannot be detected unless repetitive operations are executed.
4. Enabled State: Redundant Controller Procedure Completed. The installed controller has completed the redundant controller procedure enabling the active-active operation.
The following example shows the redundancy status is Enabled and the mode is Active-Active for a Sun StorEdge 3510 FC array.
The show redundant-controller command displays the redundant-controller information.
The following example shows the redundant-controller information.
The show shutdown-status command displays the controller shutdown status.
The following example shows the controller shutdown is complete.
The show unique-identifier command displays the RAID controller unique identifier. A valid controller unique identifier is a hexidecimal number from 0 to 0xfffff. It is displayed as a six-digit value, where the first digit is always 0 for consistency with the presentation of FRU serial numbers. The default value for the unique ID is the FRU serial number of the midplane/chassis in which the controller resides.
The following example shows the unique identifier is 00476F.
The shutdown controller command shuts down the RAID controller and stops I/O processing. This temporarily causes the array to go offline, which might affect applications running on any hosts connected to the array. Data in the controller cache is flushed to logical drives. After issuing this command, issue the reset controller command.
Note - Use this command whenever the RAID array is powered off. It ensures that all data is written to disk, and that the backup battery (if present) is not drained by the cache memory. |
Note - A controller shutdown does not generate an event message. To view the status of the shutdown, use the show shutdown-status command. For details, see show shutdown-status. |
The following example shows the message prompts that are displayed when you run the shutdown controller command.
The unfail command restores the controller pair to redundant operation. When a primary controller fails, the secondary controller becomes the primary controller. The unfail command makes the initial primary controller the secondary controller.
Note - The unfail command reverses the fail secondary command, permitting the secondary controller to resume operation and restore the controller pair to redundant operation. |
The following example reverses the fail secondary command.
The upload controller-configuration command saves a description of the configuration of the array to a user-specified file. The file can be used to restore the same configuration to the array at a later date, or to copy the configuration to another array. The file includes channel settings; host and drive side parameters; array parameters; network port setup; controller general parameters; logical drive, logical volume, and physical drive information; partition information and mappings on host channels. For details on downloading the controller configuration file, see download controller-configuration.
Note - The file contains binary data and cannot be viewed with a text editor. |
The following example saves the RAID configuration into the binary file raidcfg.bin.
The following commands are explained in this section:
For details on downloading disk firmware, see download disk-firmware.
The abort clone command stops the cloning of the specified disk drive.
To clone a disk, use the clone command. For details, see clone.
To view the progress of a clone, use the show clone command. For details, see show clone.
The following example aborts the clone disk drive operation for ID 5 on channel 2.
The clone command uses a destination disk to copy and replace a drive that is suspected of failing. The disk that you are replacing must be a member of a logical drive. The clone command is not supported for NRAID arrays.
The clone command might be issued in response to a self-monitoring analysis and reporting technology (SMART) warning. To enable SMART, see set drive-parameters.
The following example copies and replaces disk drive ID 5 on channel 2 with disk drive ID 0 on channel 3.
The configure global-spare command specifies a global spare disk. The disk drive status is set to standby.
The following example configures disk drive ID 5 on channel 2 as a global spare.
The scan disk command scans and makes available a hard drive without having to shut down the array. When a Sun StorEdge 3000 family SCSI array is powered on, the controller scans all physical drives that are connected through drive channels. Unlike Sun StorEdge 3000 FC and SATA arrays, if a Sun StorEdge 3000 family SCSI array has completed initialization and then a physical drive is connected, the controller does not automatically recognize the new drive until the next controller reset. This difference in behavior is due to differences between Fibre Channel and SCSI architectures and protocols.
Note - This command is supported on Sun StorEdge 3000 SCSI arrays only. |
The following example scans disk 2.
The set disk-array command sets disk array parameters including the background logical drive rebuilding priority and hard drive data verification.
set disk-array [normal-verify value| rebuild-verify value | init-verify value] [rebuild-priority value] |
The following example specifies that data is verified during the rebuilding process and when initializing logical drives.
The set led command changes the drive LED for the specified disk (or slot) from green to amber. For Sun StorEdge 3000 family SCSI JBODs, specify a disk device using a Solaris device name such as sd31 or c1t0d0s2, or specify a slot number. Use the show led-status command to show the status of the identified disk drive.
Note - This command does not support Sun StorEdge 3510 FC JBODs or Sun StorEdge 3511 SATA JBODs. |
To change a specific drive LED in a RAID array from green to amber, use the following parameters.
To change a specific drive LED in a Sun StorEdge 3000 family SCSI JBOD from green to amber, use the following parameters.
The following example changes the drive with SCSI address 8 from green to amber in the enclosure associated with the enclosure device /dev/es/ses0.
The show clone command displays the progress of disk cloning.
The following example returns information for the disks being cloned on the specified device.
sccli> clone d2.5 d0.5 sccli: start clone 2.5 to 0.5 sccli> show clone Ch ID Status ------------------- 0 5 2% complete |
The show disk-array command displays the disk array parameters including the logical drive rebuild priority and the hard drive settings for verifying the written data for initializing, rebuilding, and writing normal I/O data.
The following example returns the disk array parameter information.
sccli> show disk-array init-verify: disabled rebuild-verify: disabled normal-verify: disabled rebuild-priority: low |
The show disks command displays information about the disk drives in the array enclosure and any expansion chassis. Information returned includes the following: channel and ID, negotiated speed, associated logical drive, capacity (size), status, vendor information, mirror output, and worldwide node name (WWNN).
Note - Mirror output is valid only for RAID 1 logical drives. |
The following example returns information for disks ID 0, ID 3, and ID 7 on channel 2.
The following example returns information for disks on channel 2 for disks 3 through 7, and for channel 1 disk 4.
The following example shows all disk information.
Note - All device capacity is displayed in powers of 1024. For details, see Device Capacity. |
Returned values include channel number, disk SCSI ID, size, speed (megabytes per second), logical drive assignment, status, drive model ID, firmware revision, serial number, and device node name. If the -b option is specified, the drive buffer size and drive serial number are displayed.
Logical drive assignment values include:
The show led-status command displays the status of the LED adjacent to the specified disk drive slot in the array enclosure or expansion chassis. Returned values include on and off. If the value is on, the LED of the specified drive is amber. If the value is off, the LED of the specified drive is green if it is working properly.
Note - This command does not support Sun StorEdge 3510 FC JBOD devices or Sun StorEdge 3511 SATA JBOD devices. |
To display the status of LEDs in LVD RAID enclosures, use the following syntax.
To show the status of LVD JBOD enclosures, use the following syntax.
The following example shows the status of the LED adjacent to the disk assigned to drive slot 3 for an expansion chassis.
The following example shows the status of the LED adjacent to the disk assigned to drive slot 2 for the RAID array.
The unconfigure global-spare command unconfigures a global spare disk.
Specify the disk to unconfigure. For example, specify the disk with target ID 1 on channel 2 as 2.1. |
The following example unconfigures disk drive ID 5 on channel 2 as a global spare.
Copyright © 2009 Sun Microsystems, Inc. All rights reserved.