
Appendix C. CLI
551
Draft Document for Review August 30, 2007 12:59 am
7065appCLI.fm
The following failures have been found:
Failed Drive - Unassigned or Hot Spare
Storage Subsystem: DS3200
Enclosure: Controller/Drive enclosure
Affected drive slot(s): 1
Service action (removal) allowed: Yes
Service action LED on component: Yes
amazon:/ #
An alternative to specifying multiple commands in one line to create a script file that contains
each command on a single line. You can do this using the Script Editor (which allows you to
validate and execute the commands), or in your favourite text editor.
In the script file each command, must be terminated with a semicolon. Quotation marks are
not necessary. Example C-13 shows a script file which creates some logical drives and
assigns them to a host.
Example: C-13 Example of a command script file
create logicalDrive drives=(7,2 7,3) RAIDLevel=1 userLabel="Hudson-1"
segmentSize=64 \ capacity=10 GB owner=a usageHint=fileSystem mapping=none;
create logicalDrive drive [7,4] RAIDLevel=0 userLabel="Hudson-2" segmentSize=64 \
capacity=8 GB owner=b usageHint=fileSystem mapping=none;
set logicalDrive ["Hudson-1"] logicalUnitNumber=0 host="Hudson";
set logicalDrive ["Hudson-2"] logicalUnitNumber=1 host="Hudson";
To execute this script file (outside ot Script Editor), save it (for example. createDrive.cmd) and
run it as shown in Example C-14.
Example: C-14 SMcli executes the script
amazon:~ # SMcli -n DS3200 -f createDrive.cmd -o hudson.out -S
amazon:~ #
Some commands require the input of string values like the command shown in Example C-15
Example: C-15 SMcli - Character masking
amazon:~ # SMcli -n DS3400 -c "set logicalDrive [\"Orinoco-1\"]
userLabel=\"Orinoco-2\";" -S -e
amazon:~ #
This command will rename the logical drive Orinoco-1 into Orinoco-2. The parameter
logicalDrive requires the name of a logical drive specified in square brackets. Because the
actual logical drive name contains a number, double quotation marks are required. To avoid
conflicts with the shell running this command it is sometimes necessary to mask some
characters. In this example the double quotation marks of the logical drive name are masked
with a backlash. How to mask special characters depends on the used shell and the used
operating system. The shell documentation contains more details about character masking.