beautypg.com

Summary of special symbols, Returned execution status, Cli file location – HP SAN Virtualization Services Platform User Manual

Page 17: Automating storage-related tasks, Creating pits, Cli file location automating storage-related tasks

background image

NOTE:

The search is not case sensitive.

Summary of special symbols

Table 1 Special symbols

Where used

Purpose

Symbol

At the beginning of a line in the input file,
followed by a space

A comment line

# (hash)

Before the end of a line mark (carriage return
and line feed)

A line continuation mark that allows the command
to continue to the next input line

~ (tilde)

Between arguments

Separates command arguments

, (comma)

Immediately precedes argument names

Marks argument names

- (dash)

Immediately precedes value names (where used)

Identifies value names in case of some predefined
arguments that have a multiple number of strings

_ (underscore)

Enclose names that contain white spaces in them,
or numbers with a decimal symbol

Identifies strings containing white spaces as one
entry, or numbers with a decimal symbol (which
is geographic region-dependent)

“ “ (quotation
marks)

Used as a wildcard when listing CLI command
names in console mode

Search and listing symbol for CLI command
names

? (question mark)

Returned execution status

When invoking the vsm_cli command from a batch file, an execution status is returned. If no
error occurred, the returned status is zero. Otherwise, the returned status is a positive integer
representing the error code (a detailed error description can be found in the VSM API output file
for this run).

CLI file location

The path to the VSM CLI files is set in the system path on all Windows platforms, so you can run
the CLI from any folder. In other operating systems, the CLI is installed in the following paths:

HP-UX: /opt/vsmcli/bin/VSMCli

Linux: /sbin/VSMCLI

Automating storage-related tasks

The following are examples of scripts written to perform some common storage-related tasks. The
explanations of each CLI command are included in the following sections.

Creating PiTs

Below is a script that can be periodically invoked to:

Create a PiT on a virtual disk named vol1.

Always keep the last four PiTs (including the most recently created PiT).

OnErrorGoto Exit
CreatePiT -VirtualDisk "vol1", -PiT "PIT_0" TEMPLATE, -timeout 900
PurgePiTsOrSnapshots -PiT, -template "PIT_0", -keep 4
Exit:

CLI file location

17