HP Smart Storage Administrator Scripting Cookbook

Advanced scripting scenarios 20
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.
Scenario 10: Create a configuration with a specific
block size
Task
Identify the size of a logical volume in blocks, and then create a configuration for another logical volume that
matches exactly, using block size instead of capacity.
Currently, all Smart Array volumes consist of 512-byte blocks. When you create a custom configuration that
uses the Size parameter, the script specifies the input size in MB, which rounds the requested value into
some number of blocks equal to or slightly greater than the requested size; the exact value depends on the
array configuration.
However, if you use the SizeBlocks parameter to create the logical volume, then the script specifies the
input size in the exact number of blocks, and no rounding occurs. In some cases, the RAID configuration
might adjust the number of blocks in the new logical drive.
Hardware configuration
The administrator has a system with a controller and a configured logical volume.
Script output
To identify the size of an existing logical volume, in blocks, observe the output when you capture the existing
configuration. Scripting outputs the current size of volumes in block units in a comment.
; Logical Drive Specifications
LogicalDrive= 2
RAID= 5
Size= 279964
; SizeBlocks= 573367088
Sectors= 32
StripSize= 512
Caching= Enabled
You can then use the size, specified in blocks, to configure another logical volume that is an exact match in
size. When using an input script, you can specify either Size or SizeBlocks, but not both.
Summary