The following examples show how to enter CLI commands on a command line. The examples show the syntax, the form, and, in some examples, script commands. Examples are shown for both the Windows operating system and the UNIX operating system. Note that the usage for the -c terminal varies depending on your operating system. On Windows operating systems, enclose the script command following the -c terminal in double quotation marks (“ ”). On UNIX operating systems, enclose the script command following the -c terminal in single quotation marks (‘ ’).
This example shows how to change the name of a storage subsystem. The original name of the storage subsystem is Payroll_Array. The new name is Finance_Array.
Windows operating system:
SMcli ICTSANT -n “Payroll_Array” -c “set storageSubsystem userLabel=\“Finance_Array\”;”
UNIX operating system:
SMcli ICTSANT -n ‘Payroll_Array’ -c ‘set storageSubsystem userLabel=“Finance_Array”;’
This example shows how to delete an existing logical drive and create a new logical drive on a storage subsystem. The existing logical drive name is Stocks_<_Bonds. The new logical drive name is Finance. The controller host names are finance1 and finance2. The storage subsystem is protected, requiring the password TestArray.
Windows operating system:
SMcli finance1 finance2 -c ‘set session password=\”TestArray\”; delete logicalDrive [\”Stocks_^<_Bonds\”]; create logicalDrive driveCount[3] RAIDLEVEL=3 capacity=10GB userLabel=\”Finance\”; show storageSubsystem healthStatus;”
UNIX operating system:
SMcli finance1 finance2 -c ‘set session password=“TestArray”; delete logicalDrive [“Stocks_<Bonds”]; create logicalDrive driveCount[3] RAIDLEVEL=3 capacity=10GB userLabel=“Finance”; show storageSubsystem healthStatus;’
This example shows how to run commands in a script file named scriptfile.scr on a storage subsystem named Example. The -e terminal causes the file to run without checking the syntax. Running a script file without checking the syntax lets the file run more quickly; however, the file might not run correctly because the syntax for a command might be incorrect.
SMcli -n Example -f scriptfile.scr -e
This example shows how to run commands in a script file named scriptfile.scr on a storage subsystem named Example. In this example, the storage subsystem is protected by the password MyArray. Output, as a result of commands in the script file, goes to file output.txt.
Windows operating system:
SMcli -n Example -f scriptfile.scr -p “My_Array” -o output.txt
UNIX operating system:
SMcli -n Example -f scriptfile.scr -p ‘My_Array’ -o output.txt
This example shows how to show all of the storage subsystems in the current configuration. The command in this example returns the host name of each storage subsystem.
SMcli -d
If you want to know the IP address of each storage subsystem in the configuration, add the -i terminal to the command.
SMcli -d -i