D-Link Systems, Inc. makes no warranty of any kind with regard to this material, including,
but not limited to, the implied warranties of merchantability and fitness for a particular
purpose. D-Link Systems, Inc. shall not be liable for errors contained herein or for incidental
or consequential damages in connection with the furnishing, performance, or use of this
material.
This document contains proprietary information, which is protected by copyright. No part of
this document may be photocopied, reproduced, or translated into another language without
the prior written consent of D-Link Systems, Inc.
The information is provided “as is” without warranty of any kind and is subject to change
without notice. The only warranties for D-Link Systems products and services are set forth in the
express warranty statements accompanying such products and services. Nothing herein
should be construed as constituting an additional warranty. D-Link Systems shall not be liable for
technical or editorial errors or omissions contained herein.
xStack is a registered trademark of D-Link, Inc.
Adobe® and Acrobat® are trademarks of Adobe Systems, Incorporated.
Java™ is a U.S. trademark of Sun Microsystems, Incorporated.
Microsoft Windows is a U.S. registered trademarks of Microsoft Corporation.
Oracle® is a registered U.S. trademark of Oracle Corporation, Redwood City, California.
UNIX® is a registered trademark of The Open Group.
All other brand or product names are or may be trademarks or service marks, and are used
to identify products or services, of their respective owners.
D-Link Systems, Inc.
17595 Mount Herrmann Street
Fountain Valley, CA 92708
www.DLink.com
Notice of Export Controls
Export of technical data contained in this document may require an export license from the
United States government. Please contact D-Link, Inc. for any export compliance questions.
Document Revision Level
Date Description
July 2008 Version 1.0
September 2008 Version 1.1 – updated for software version 2.5.0 and redundant controllers
January 2009 Version 1.2 – minor technical and formatting updates
May 2009 Version 1.3 – updated for software version 2.6.0
December 2009
October 2010
Version 1.4 – updated for software version 2.7.0, including new commands
for SNMP support, revised syntax for the IntegrityScanNow command, and
several new Volume attributes
Version 1.5 – updated for software version 2.8.0, including several new
commands in the AdvancedSettings context and removal of the
IsBatteryFailed and IsBatteryCharging items from the System context
Command Line Interface User’s Guide iii
Preface
This document is intended for storage managers, administrators, and developers responsible
for using the command-line interface (CLI) to configure, manage, or develop custom
applications for the D-Link storage array from D-Link. This document assumes that the user
is computer literate, familiar with storage array products, has a basic understanding of
storage products and concepts, and has previous experience using a CLI.
Document Conventions
This document uses the following conventions to draw your attention to certain information.
The CLI is intended for users who have significant storage management
expertise and previous experience using a CLI. Improper CLI use can cause
undesired results.
Notes
Notes provide information that deserves special attention. They are preceded by:
Cautions
Cautions contain information, which if not followed, can cause damage to the DLink storage system. They are preceded by:
Warnings
Warnings contain information, which if not followed, can cause damage to the DLink storage system and to the person installing it. They are preceded by:
iv Preface
Typographic Conventions
The following typographic conventions are used in this document.
Bold text = indicates commands and keywords that you enter literally as shown. When
appropriate, bold text is also used to call attention to text.
Italics = indicate arguments for which you supply values.
< > = angle brackets denote a descriptor to be specified.
[X] = square brackets enclose an optional item.
| = a vertical bar indicates a choice within an optional or required set of items.
[x|y] = square brackets enclosing items separated by a vertical bar indicate an optional
choice.
{x|y} = braces enclosing items separated by a vertical bar indicate a required choice.
[x {y | z}] = nested sets of square brackets or braces indicate optional or required
choices within optional or required items. Braces and a vertical bar within square
brackets indicate a required choice within an optional item.
Courier typeface is used to represent commands and command prompts.
How to Use This Document
This CLI User’s Guide is intended as a general overview of the operation of the CLI. This
User’s Guide also provides concepts and terminology specific to understanding the use of the
CLI. It is intended that the reader can start to use the CLI with this understanding, and later
refer to this User’s Guide as a reference for details on the commands.
6.3 Obtaining the Maximum Size of a Volume ................................................... 79
6.4 Obtaining the Maximum Stripe Width of a Volume ......................................... 79
6.5 Adding an iSCSI Initiator ........................................................................ 80
6.6 Obtaining a Vector of All Controllers on a System ......................................... 80
6.7 Restarting the System ........................................................................... 81
6.8 Shutting Down the System ...................................................................... 81
6.9 Showing the Status of a Controller ............................................................ 81
6.10 Navigating and Displaying System, Volume, and Drive Information ..................... 82
Index ............................................................................................................................................... 85
viii Contents
List of Figures
Figure 1-1. Hierarchy of the System Context ........................................................... 5
Figure 2-1. Management Center Home Page ............................................................ 8
The CLI is a line-oriented user interface that provides commands for configuring, managing,
and monitoring an D-Link storage array. The CLI can be used as an alternative or supplement
to the Management Center graphical user interface (GUI).
Using the CLI can be useful in the following scenarios:
Users who want to develop tools and applications that utilize D-Link functions.
Users that do not have access to a Web browser or the Internet.
Users who prefer to use a CLI rather than a graphical user interface (GUI).
Users that want to perform multiple tasks. CLI users can create a sequence of commands
that are connected together to achieve a very flexible range of results. By comparison,
there is no simple way to connect the output of one GUI program to the input of
another.
Users who perform activities using scripts that contain one or more command lines.
For the latest information about the CLI, consult the Interoperability Matrix
on the D-Link Web site: www.dlink.com.
This chapter provides an introduction to the CLI. The topics covered in this chapter are:
Section 1.1, Contexts (page 2)
Section 1.2, Commands (page 3)
Section 1.3, Properties (page 4)
Section 1.4, Understanding the CLI Hierarchy (page 4)
Section 1.5, Members (page 6)
Section 1.6, Enumerators (page 6)
Section 1.7, Special Keywords (page 6)
Command Line Interface User’s Guide 1
1.1 Contexts
Controller[A] ::
Volume[Mynewvolume] ::
All actions performed with the CLI are done in a specific “context.” A context is a reference
to a specific physical or logical object on the system. Examples of contexts are:
When you start the CLI, for example, you interact with the root context. There is one
instance of the root context on an D-Link storage array. In this guide, the root context is
referred to as System.
Every context has a unique ID. When you are in a context, the prompt indicates the specific
object with which you are communicating. For example:
The system itself (referred to as the root context),
A disk drive in the system.
A volume that was created on the system.
An iSCSI Initiator object that has been registered with the system.
If you communicate with the root object, the prompt takes the form of the IP address of
the root. For example:
192.168.59.25 ::
In the controller context, the prompt displays the unique ID in brackets. For example:
In the volume context, the unique ID is the volume name shown in brackets. For
example:
2 Chapter 1 Introduction
1.2 Commands
Commands cause some action to happen or a state to change. For example, the command
createVolume creates a new volume and the command addInitiator adds an iSCSI
initiator to the list of known initiators for an array. For a complete list of the commands
available in the CLI, see Chapter 5.
The CLI provides a special set of commands called global action commands. Global action
commands indicate an action that you want to perform and precede other commands and
properties on a command line. For example, the global action command Show can be used
with the property Controllers to return information about an array’s controller(s) from
the System context:
You can also chain commands on a command line and have the CLI execute them in
sequence by separating each command with a semicolon (;). The following command line,
for example, tells the CLI to perform two Pop operations and then create a 30 GB volume
named Engineering.
Command Line Interface User’s Guide 3
Pop; Pop; createVolume Engineering 30GB mirror
For a complete list of the global action commands available in the CLI, see Chapter 4.
1.3 Properties
Properties are items that you show using the global action command Show. For example, the
command Show softwareVersion returns the current version of software running on the
array. Some properties can also be set. For example, the property
context lets you set the name of an array using the global action command Set.
Volume[Parity3] :: set name ThisIsMyParityVolume
For a complete list of the properties available in the CLI, see Chapter 5. This chapter
includes the global action commands used with the properties.
1.4 Understanding the CLI Hierarchy
Name
in the Volume
The CLI consists of a hierarchy of contexts, commands, and properties. For example, Figure
1-1 shows the relationships between contexts, commands, and the properties in the root
context. Navigation within the CLI hierarchy is achieved ether by using properties that are of
type Context or ContextList, or by using commands that return Contexts (such as
createVolume and addInitiator).
In Figure 1-1, the arrows represent command- and property-based navigation:
Single arrows show a link from one starting context to one resulting context (for
example, from System to diskList).
Double arrows show a link from one starting context to one resulting context as a result
of selecting from a ContextList (for example, from System to a specifically selected
controller, from Controller to a specifically selected physical port, or from
DiskList to a specifically selected Disk).
Some contexts have both single and double arrows. PhysicalPort, for example, has a
single LAG associated with it (indicated by a single arrow from PhysicalPort to LAG).
However a LAG can have many physical ports(indicated by a double arrow from LAG to
PhysicalPort).
Navigating within the CLI hierarchy is achieved using the following commands:
Push moves down one level in the CLI hierarchy and adds the context to the push/pop
stack.
Select changes to the specified context, without adding the context to the push/pop
stack.
Pop moves up either one level in the CLI hierarchy (if you used the Push command to
navigate down the hierarchy) or to the root level (if you used the Select command to
navigate down the hierarchy).
4 Chapter 1 Introduction
For more information about these global action commands, see Chapter 4.
Command Line Interface User’s Guide 5
Figure 1-1. Hierarchy of the System Context
1.5 Members
Each context has one or more members associated with it. A member can be a value
property, context property, context list, or command. Table 1-1 describes these types of
members.
Table 1-1. Members
Member Description Examples of Data Types for This Member
Value properties Value properties can be read-only or read-write:
Context property
Context lists
Commands Commands support Do.
1.6 Enumerators
Enumerators are a data type, much like Number, String, Boolean, and Date/Time.
Enumerators have a discrete list of possible values that can be used in a property or
command argument . Examples include:
VolumeComposition (for example, JBOD, Stripe, Mirror, Parity, StripeMirror)
Read-only properties only support Show.
Read-write properties support Show and
Set.
Context properties can be read-only or readwrite.
Types of entities that can be displayed or
operated upon from the current context.
Number
String
Enumeration (see section 1.6)
Boolean
Date/Time
DiskList on the root context.
LAG on PhysicalPort
Controllers on the root context
Disks on DiskList
CreateVolume on the root context
Reconfigure on Volume
StripeDepth (for example, 32KB, 64KB, 128KB, 256KB, 512KB, 1024KB, 2048KB)
1.7 Special Keywords
When working in a context that can contain one or more members, the special keywords of
$first and $last let you reference the first or last entry in the list of members, although
the order of entries in the list may be random. This is useful if you use advanced scripts or
perform a repetitive operation that should continue until the entire list is empty, without
needing to indicate the names or index values for the specific members of the list. For
example, you can delete all volumes on an array by specifying the following command
repeatedly until an error occurs (when no more volumes exist):
do volumelist.volume[$last].delete
6 Chapter 1 Introduction
Chapter 2 Installing the CLI
This chapter describes how to install the CLI. The topics covered in this chapter are:
Section 2.1, Supported Operating Systems (page 8)
Section 2.2, Installing the CLI (page 8)
Section 2.3, Starting the CLI (page 14)
Section 2.4, Exiting the CLI (page 18)
Section 2.5, Removing the CLI (page 18)
Command Line Interface User’s Guide 7
2.1 Supported Operating Systems
The CLI supports the following operating systems:
Microsoft Windows XP Professional Service Pack 2
Microsoft Windows Server 2003 R2
Microsoft Windows Server 2008
Microsoft Windows Vista Business and above
2.2 Installing the CLI
To install the CLI, use the following procedure.
1. Start your Web browser.
In the browser address field, enter the IP address of the management port. The home
page in Figure 2-1 appears.
2. From the home page, click Click here to install the Advanced Features for Windows.
The file download security warning message in Figure 2-2 appears.
4. If the security warning appears in Figure 2-3, click Run. A Welcome page appears (see
Figure 2-4).
Figure 2-3. Secondary Warning Message
Command Line Interface User’s Guide 9
Figure 2-4. Welcome Page
5. Click Next. The License Agreement appears (see Figure 2-5).
6. Read the License Agreement, then click I accept the terms in the license agreement
and click Next. (You must accept the terms of the license agreement to proceed.) The
Destination Folder screen appears (see Figure 2-6).
10 Chapter 2 Installing the CLI
Figure 2-5. License Agreement
To obtain a printed copy of the License Agreement, click Print.
Figure 2-6. Destination Folder Screen
7. Either accept the default destination folder shown, or click the Change button and
specify a different installation location.
8. Click Next. You are prompted to select a setup type (see Figure 2-7).
Command Line Interface User’s Guide 11
Figure 2-7. Setup Type Screen
9. Select whether you want to perform the complete or custom setup. The complete setup
installs the Windows VDS Provider and the CLI, and displays the screen in Figure 2-9. If
you only want to install the CLI, select Custom and make the appropriate selections in
the screens that appear (see Figure 2-8); then click Next until the screen in Figure 2-9
appears.
Figure 2-8. Custom Setup Screen
Figure 2-9. Ready to Install the Program Screen
12 Chapter 2 Installing the CLI
10. With the Ready to Install the Program screen displayed, click Install. A progress bar
shows the progress of the installation (see Figure 2-10). As part of this process, a
shortcut is placed on your Windows desktop for starting the CLI.
Figure 2-10. Progress Bar
11. When the installation is complete, the screen in Figure 2-11 appears. Click Finish to
close the screen.
Command Line Interface User’s Guide 13
Figure 2-11. InstallShield Wizard Complete Screen
2.3 Starting the CLI
The CLI can be started using either the CLI shortcut installed on your Windows desktop or
the Run command. The following sections describe these methods for starting the CLI.
2.3.1 Using the CLI Shortcut to Start the CLI
When you installed the CLI, a desktop shortcut was automatically placed on your desktop. To
start the CLI using the shortcut, use the following procedure.
1. Double-click the following shortcut on your Windows desktop:
A HOSTNAME IP address prompt similar to the one below appears.
2. Enter the IP address of the management port for the array with which you want to
communicate (for example, 192.168.59.25).
3. Press the Enter key. You are prompted for a username.
4. Enter a username (the default username is admin) and press Enter. You are prompted
for a password.
14 Chapter 2 Installing the CLI
5. Enter a case-sensitive password (the default password is admin) and press Enter. For
security, each typed password character appears as an asterisk (*). The following actions
occur when you press Enter:
A series of numbers count down from 5 to zero.
When zero is reached, a Successful login message with the IP address of the array you
logged in to appears if the login was successful. In the example below, the user has
logged in to an array with an IP address of 192.168.59.25.
A prompt appears that consists of the IP address of the array to which you are logged in
followed by two colons (for example, 192.168.59.25 ::).
You are now at the System level and can issue CLI command lines at the root context, or
navigate to and issue commands from subcontexts (see section 1.1).
2.3.2 Using the Run Command to Start the CLI
The following procedure describes how to start the CLI using the Windows Run command.
With this method, you enter the name of the CLI executable file in the Open field of the
Windows Run dialog box. If you know the IP address of the array management port,
username, and password, you can add them to the command line following the name of the
CLI executable file. If desired, you can also specify the name of a script that you want the
CLI to automatically run at login.
1. Click the Start button and click Run. The Run dialog box appears (see Figure 2-12).
Figure 2-12. Run Dialog Box
2.In the Open field, click the Browse button. Navigate to the location Program
Files/D-Link, Inc./Advanced Features for Windows (or the destination
location you specified during the installation). Double-click the name of the CLI
executable (cli2.exe).
Command Line Interface User’s Guide 15
3. Optional: To add an IP address of the array management port, username, and password,
or script file name after the CLI executable name, or to disable any real-time
indications, type the option (which consists of a switch and an entry such as an IP
address or hostname) after the name of the CLI executable, as shown in the following
steps. Separate the CLI executable filename from these options with a space.
Adding a system IP address or host name: -g <IPAddressOrHostName>
See the example in Figure 2-13. If -g is omitted, the environment variable
ISA_HOSTNAME is used. If that environment variable is not defined, you are prompted
for an IP address if none is found.
Adding a username: -u <username> Adding a password: -p <password>
The default username and password are admin (see the example in Figure 2-13). If -u is
omitted, the environment variable ISA_USERNAME is used. If -p is omitted, the
ISA_PASSWORD environment variable is used. If these environment variables are not
defined, you are prompted for a username and/or password if none is found.
Figure 2-13. Example of Using the –g, -u, and –p Switches
Running a script: -x <scriptFileName>
See the examples in Figure 2-14 and Figure 2-15. The name of the script file referenced
in the Open field should have the file name scriptFileName.cli. The file name
entered in the Open field should not include the .cli extension. In Figure 2-14, for
instance, the command line will have the CLI run a script called createJbodScript,
which creates a JBOD on the array. The 10GB following the script name tells the CLI to
create a 10 GB volume called myVolName on that JBOD. In Figure 2-15, the command
line will provide the IP address, username, and password for logging in and run the same
script as in Figure 2-14, without creating the 10 GB volume.
Figure 2-14. Example of Using the –x Switch
16 Chapter 2 Installing the CLI
Figure 2-15. Example of Using the –x Switch with the –g, -u, and –p Switches
Because the CLI uses a computer’s environment variables if the –g, -u,
and/or –p switches are not specified on the command line, it is
recommended that you set the environment variables as desired on the
machine where the CLI is running. System environment variables are defined
by Windows and apply to all computer users. However, you must be an
administrator to modify a system environment variable. Changes to the
system environment are written to the registry and usually require a restart
to become effective.
Disabling real-time indications: -I
See the example in Figure 2-16. Specify the -I switch to enable real-time indications
while the CLI is running. This will allow the CLI to provide asynchronous reporting of
changed services and may have performance impacts for heavily loaded systems. It is
generally recommended that this option not be used unless there is a specific need for
it. You can combine the -I switch with any other switches.
Figure 2-16. Example of Using the –I Switch
4. Click the OK button. The following actions occur:
A series of numbers count down from 5 to zero.
When zero is reached, a Successful login message with the IP address of the array you
logged in to appears if the login was successful. In the example below, the user has
logged in to an array with an IP address of 192.168.59.25.
A prompt appears that consists of the IP address of the array to which you are logged in
followed by two colons (for example, 192.168.59.25 ::).
Command Line Interface User’s Guide 17
You are now at the System level and can issue CLI command lines at the root context, or
navigate to and issue commands from sub-contexts (see section 1.1).
2.4 Exiting the CLI
To exit a CLI session, type the Exit command from the CLI session and press Enter to
terminate the CLI program. The Exit command is a “global action” command and can be
issued from any context.
If you omitted the IP address, username, and password in step 2, you will be
prompted for these before gaining access to the root context.
2.5 Removing the CLI
To remove the CLI from the computer on which it is installed, rerun the installer from the
Advanced Features for Windows link. When the screen appears with links for repairing or
uninstalling the CLI, click the un-installation link to remove the CLI.
You can also use Add/Remove Programs from the Windows control panel to
remove the CLI as you would any other Windows application.
18 Chapter 2 Installing the CLI
Chapter 3 Using the CLI
This chapter describes how to use the CLI. The topics covered in this chapter are:
Section 3.1, General Guidelines (page 20)
Section 3.2, Specifying Operating Modes (page 22)
Section 3.3, Command Line Syntax (page 27)
Section 3.4, Getting Help with CLI Commands (page 28)
Command Line Interface User’s Guide 19
3.1 General Guidelines
The following sections describe general guidelines to follow when issuing CLI command lines.
3.1.1 Understanding Commands
Commands are organized into two categories, global action commands and context-specific
commands. All CLI commands are case-insensitive. For readability, the commands in this
guide are shown with a mix of upper-case and lower-case characters.
3.1.2 Global Action Commands
Global action commands can be used within all contexts. For example, the help command is
a global action command. Issuing this command displays all of the global action and contextspecific commands available in the CLI. For a list of all the global action commands, see
Table 4-1 on page 34.
3.1.3 Context-Specific Commands
Context-specific commands can be used within the current context only. Context-specific
commands are prefaced by the global action command Do, Show, or Set. The following
example uses the global command Show and the context-specific command diskList to
get the DiskList information.
192.168.59.25 :: Show diskList←typed by user
ID = 0 ← returned by CLI
Status = OK ← returned by CLI
Disks = 4 Disks ← returned by CLI
For a list of all the context-specific commands, see Chapter 5.
3.1.4 Abbreviating Commands
The CLI lets you abbreviate context-specific command keywords to their fewest unique
characters. For example, instead of entering the full command Show diskList, you can
type Show d. If you type an abbreviated command that can match more than one
command, an error message is returned and you must retype the command, entering
additional characters to make the command unambiguous to the CLI.
192.168.59.25 :: Show d ←typed by user
ID = 0 ← returned by CLI
Status = OK ← returned by CLI
Disks = 4 Disks ← returned by CLI
20 Chapter 3 Using the CLI
Loading...
+ 67 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.