Using An Input File To Execute A Script; Outputting The Cli To A Text File - 3Ware 720-0186-00 Manual

Sas/sata raid controller
Table of Contents

Advertisement

Using an input file to execute a script

Outputting the CLI to a Text File

www.3ware.com
You can operate 3ware CLI scripts by executing a file. The file is a text file
containing a list of CLI commands which you have entered in advance. Each
command must be on a separate line.
Syntax
tw_cli -f <filename>
Where
<filename>
is the name of the text file you want to execute.
Example
tw_cli -f clicommand.txt
This example executes the file
included in that file.
Scripting examples
Following is a scripting example for a 4-port controller using a text file called
config_unit.txt, containing three commands. This example sets up a 4-port
controller with two units, each with 2 drives mirrored. It then prints the
configurations for verification. The commands included in the script file are:
/c0 add type=raid1 disk=0-1
/c0 add type=raid1 disk=2-3
/c0 show
Following is a scripting example for a 12-port controller using a text file
called config_unit.txt, containing three commands. This example sets up a 12-
port controller with two units: one with the first 2 drives mirrored, and another
with the remaining drives in a RAID 5 array. It then prints the configurations
for verification. The commands included in the script file are:
/c0 add type=raid1 disk=0-1
/c0 add type=raid5 disk=2-11
/c0 show
To run either of the scripts, enter:
tw_cli -f config_unit.txt
You can have the output of the 3ware CLI, including errors, sent to a text file
by adding 2>&1 to the end of the line. This could be useful, for example, if
you want to email the output to AMCC Technical Support.
Examples
tw_cli /c2/p0 show >> controller2port0info.txt 2>&1
or
tw_cli /c0 show diag >> Logfile.txt 2>&1
Working with 3ware CLI
clicommand.txt
, and runs the CLI commands
8

Advertisement

Table of Contents
loading

This manual is also suitable for:

9690sa9590se9550sx9550sxu9500s3ware 9650se

Table of Contents