HP Smart Storage Administrator Scripting Cookbook Abstract This document provides basic and advanced scripting terminology and scenarios for HP Smart Storage Administrator users. The primary audience is the system administrator with a good working knowledge of storage hardware and the configuration of logical drives and arrays.
© Copyright 2013, 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. The only warranties for HP products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. HP shall not be liable for technical or editorial errors or omissions contained herein. Confidential computer software.
Contents Overview ..................................................................................................................................... 4 About HP SSA ............................................................................................................................................. 4 How to use this guide ................................................................................................................................... 4 Changes to the Method mode Auto option ......
Overview About HP SSA HP SSA is the main tool for configuring arrays on HP Smart Array controllers. It exists in three interface formats: the HP SSA GUI, the HP SSA CLI, and HP SSA Scripting. All formats provide support for configuration tasks. Some of the advanced tasks are available in only one format. The diagnostic features in HP SSA are also available in the standalone software HP Smart Storage Administrator Diagnostics Utility CLI.
website (http://h18004.www1.hp.com/products/servers/proliantstorage/software-management/acumatrix/inde x.html). Changes to the Method mode Auto option When creating a script, you must select options for the Action mode and the Method mode. In earlier versions of ACU Scripting, the Auto option was the default value for the Method mode. Auto is no longer the preferred option in HP SSA, and the Method mode no longer has a default option. Beginning with ACU v8.28.
DriveWriteCache = Enable | Disable PreferredPathMode = Auto|Manual ; Array Options ; There can be multiple array specifications in the file Array = A|B|C|D|E|F|G|...Z|AA|AB|AC... | NEXT OnlineSpareMode = Dedicated | AutoReplace OnlineSpare = Port:ID,... | Box:Bay,... | Port:Box:Bay | None | N Drive = Port:ID... | Box:Bay... | Port:Box:Bay,...
Example: ; Date captured: Wed Jan 15 15:33:14 2014 ; Version: 1:60:0:5 Action= Configure Method= Custom ; Controller Specifications ; Controller HP Smart Array P800, Firmware Version 5.
Basic scripting scenarios Scenario 1: Configure a two-disk array Task Create a simple two-disk array with a 100 GB RAID 1 logical volume. Hardware configuration • Storage system • An unconfigured HP Smart Array controller in slot 1 If the controller contains an existing configuration, the script fails unless you add the -reset parameter to the command line to clear the existing configuration.
Method=Custom Controller=Slot1 Array=A LogicalDrive=1 RAID=0 Size=200000 Summary The script modifies the size of the logical drive only, because multiple transformations of a logical drive cannot be performed at the same time. For example, HP SSA must complete the size expansion before beginning another transformation, such as a RAID level change. To modify existing arrays and volumes, the HP SSA GUI may be a more intuitive tool for some users.
Scenario 4: Configure by disk type and count Task Create an array by specifying the type and count of disks for HP SSA to use. This example use two SAS drives. This method does not require you to specify physical disks by location. Hardware configuration • Storage system • An HP Smart Array controller in slot 1 • Two available SAS physical disks This script fails if two unused SAS drives are not available on the controller.
Method=Custom Controller=Slot1 Array=A Drive=2 OnlineSpare=1 LogicalDrive=1 RAID=1 Size=MAX Array=B Drive=* LogicalDrive=NEXT Repeat=20 RAID=5 Size=MAX Summary For both arrays, this script uses the MAX value to consume the fully available capacity of the physical drives. For Array B, the Repeat option specifies the number of times to repeat the configuration. Instead of using the number 2, the script uses the NEXT value to specify the ID of the second logical drive.
Advanced commands Controller=ALL You can use Controller=All instead of the Slot=N command. Advantages • You do not need to determine where controllers are installed. • You can target all controllers at once.
This option filters the discovered controllers, restricting the command to only internal or only external controllers. Example When using the Controller=First command, if the system had no internal controllers (due to hardware failure or discovery failure) but had an external controller for shared storage, the script would attempt to create a volume on the external controller.
Repeat=N | MAX You can use this command as part of the logical drive specification. Advantage You can quickly divide the available space on an array into multiple volumes without specifying each volume individually.
RAID=5 In this example, three or more physical drives must be available to support the RAID level. OnlineSpare=N You can use OnlineSpare=N instead of specifying the actual paths (OnlineSpare=1E:1:1, 1E:1:2). Advantage You can specify the number of spares needed for the configuration, and the scripting software selects the first available drives based on increasing path. This command is most useful when all drives in the configuration are the same size.
Advantage You can ensure that only a certain type of drive is used in a configuration where multiple drive types exist.
LogicalDrive=Next RAID= 0 SizeBlocks= 20971520 Advanced commands 17
Advanced scripting scenarios Scenario 6: Clear the configuration on all internal controllers Task Clear the current configuration on all internal controllers in the system. Hardware configuration Unspecified Script # hpssascripting -i input.
LogicalDrive=Next RAID=0 Summary By combining the advanced commands to specify -internal controllers only, and then First controllers, the user does not add volumes to external controllers or to additional internal controllers on the same system. The Next command eliminates the need to identify specific arrays and volumes. Scenario 8: Create multiple arrays on unconfigured systems with mixed physical disk configurations Task Add two arrays, each with one volume, to each system.
Hardware configuration The administrator has an unconfigured system with a controller. Script Controller= Slot 1 Array= A Drive= * LogicalDrive=1 ; consumes the first 2TiB RAID= 0 Size= MAXMBR LogicalDrive=2 ; consumes remainder of free space RAID=0 Summary Without specifying drives by name, the administrator instructs the controller to use available disk space, up to 2TiB, to create the first volume in an array. Any remaining disk space is consumed in a second volume automatically.
To create a logical drive that uses the exact same configuration of another logical drive, use the SizeBlocks parameter to specify the size, thus avoiding the rounding that can occur with the Size parameter. Scenario 11: Configuring HP SmartCache Task This script illustrates how to configure HP SmartCaching. Hardware configuration The administrator has a system with a controller, physical drives, and logical drives configured.
Acronyms and abbreviations ACU Array Configuration Utility HP SSA HP Smart Storage Administrator MBR master boot record SAAP Smart Array Advanced Pack SAS serial attached SCSI SATA serial ATA Acronyms and abbreviations 22
Documentation feedback HP is committed to providing documentation that meets your needs. To help us improve the documentation, send any errors, suggestions, or comments to Documentation Feedback (mailto:docsfeedback@hp.com). Include the document title and part number, version number, or the URL when submitting your feedback.