D-Link DSN-4100, DSN-4200, DSN-520, DSN-540, DSN-1100-10 Cli User's Manual

...
D-Link System, Inc.™
xStack Storage DSN-1000 / 2000 / 3000 / 4000 / 5000 series
Command Line Interface User’s Guide
Version 1.5
© 2011 D-Link Systems, Inc. All Rights Reserved
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.
Copyright © 2011 D-Link Systems, Inc.™
Trademarks
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 D­Link storage system. They are preceded by:
Warnings
Warnings contain information, which if not followed, can cause damage to the D­Link 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.
Command Line Interface User’s Guide v
vi Preface
Contents
Chapter 1 Introduction ............................................................................................................................ 1
1.1 Contexts ............................................................................................. 2
1.2 Commands .......................................................................................... 3
1.3 Properties ........................................................................................... 4
1.4 Understanding the CLI Hierarchy ............................................................... 4
1.5 Members ............................................................................................ 6
1.6 Enumerators ........................................................................................ 6
1.7 Special Keywords .................................................................................. 6
Chapter 2 Installing the CLI..................................................................................................................... 7
2.1 Supported Operating Systems ................................................................... 8
2.2 Installing the CLI .................................................................................. 8
2.3 Starting the CLI ................................................................................... 14
2.3.1 Using the CLI Shortcut to Start the CLI ............................................. 14
2.3.2 Using the Run Command to Start the CLI ........................................... 15
2.4 Exiting the CLI .................................................................................... 18
2.5 Removing the CLI ................................................................................. 18
Chapter 3 Using the CLI ........................................................................................................................ 19
3.1 General Guidelines ............................................................................... 20
3.1.1 Understanding Commands ............................................................. 20
3.1.2 Global Action Commands .............................................................. 20
3.1.3 Context-Specific Commands .......................................................... 20
3.1.4 Abbreviating Commands ............................................................... 20
3.1.5 Editing Command Lines ................................................................ 21
3.1.6 Concatenating Commands ............................................................. 21
3.1.7 Referencing Root Items ................................................................ 21
3.2 Specifying Operating Modes .................................................................... 22
3.2.1 Output Mode ............................................................................. 23
3.2.2 Indication Mode ......................................................................... 24
3.2.3 Stream Mode ............................................................................. 25
3.2.4 Completion Code Mode ................................................................ 25
3.2.5 Echo Command Mode ................................................................... 26
3.2.6 Exit Script on Error Mode .............................................................. 26
3.3 Command Line Syntax ........................................................................... 27
3.4 Getting Help with CLI Commands ............................................................. 28
3.4.1 Help Summary ........................................................................... 28
3.4.2 Command Help .......................................................................... 30
3.4.3 Advanced Scripting Concepts ......................................................... 31
Chapter 4 Global Action Commands .................................................................................................... 33
4.1 List of Global Action Commands ............................................................... 34
4.2 Description of Global Action Commands ..................................................... 35
4.2.1 Do .......................................................................................... 35
4.2.2 Echo ....................................................................................... 36
4.2.3 Execute ................................................................................... 36
4.2.4 Exit ........................................................................................ 37
4.2.5 Help ....................................................................................... 37
4.2.6 List ......................................................................................... 38
Command Line Interface User’s Guide vii
4.2.7 Mode ...................................................................................... 38
4.2.8 Pop ........................................................................................ 40
4.2.9 Push ....................................................................................... 40
4.2.10 RequireArgs .............................................................................. 41
4.2.11 Select ..................................................................................... 42
4.2.12 Set ......................................................................................... 43
4.2.13 ShiftArgs .................................................................................. 43
4.2.14 Show....................................................................................... 44
4.2.15 System .................................................................................... 45
Chapter 5 Supported CLI Commands and Properties ........................................................................ 47
5.1 System Commands and Properties ............................................................ 48
5.2 Controller Commands and Properties ........................................................ 50
5.3 PhysicalPort Commands and Properties ...................................................... 52
5.4 PoolList Commands and Properties ........................................................... 53
5.5 DiskList Property ................................................................................. 53
5.6 Disk Commands ................................................................................... 54
5.7 VolumeList Property ............................................................................. 55
5.8 Volume Commands and Properties ............................................................ 55
5.9 VolumeComposition Properties ................................................................ 57
5.10 Extent Properties................................................................................. 57
5.11 TaskList Property ................................................................................. 58
5.12 Task Commands and Properties ............................................................... 59
5.13 iSCSI Commands and Properties ............................................................... 60
5.14 iSCSITarget Commands and Properties ....................................................... 61
5.15 iSCSISession Properties .......................................................................... 64
5.16 iSCSIConnection Properties ..................................................................... 65
5.17 Portal Commands and Properties ............................................................. 66
5.18 Initiator Commands and Properties ........................................................... 67
5.19 AdvancedSettings Commands and Properties ............................................... 68
5.20 SystemPolicy Properties ........................................................................ 69
5.21 ExternalConnectionsManager Properties ..................................................... 70
5.22 SystemStatistics Properties ..................................................................... 71
5.23 LAG Commands and Properties ................................................................ 72
5.24 ManagementPort Commands and Properties ................................................ 73
5.25 NetworkRoute Commands and Properties ................................................... 74
5.26 ServicePool Commands and Properties ....................................................... 75
Chapter 6 Application Examples .......................................................................................................... 77
6.1 Setting the Name of the System ............................................................... 78
6.2 Creating Volumes ................................................................................ 78
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
Figure 2-2. File Download Security Warning Message ................................................. 9
Figure 2-3. Secondary Warning Message ................................................................. 9
Figure 2-4. Welcome Page ................................................................................ 10
Figure 2-5. License Agreement ........................................................................... 10
Figure 2-6. Destination Folder Screen .................................................................. 11
Figure 2-7. Setup Type Screen ........................................................................... 11
Figure 2-8. Custom Setup Screen ........................................................................ 12
Figure 2-9. Ready to Install the Program Screen ...................................................... 12
Figure 2-10. Progress Bar .................................................................................. 13
Figure 2-11. InstallShield Wizard Complete Screen .................................................. 13
Figure 2-12. Run Dialog Box .............................................................................. 15
Figure 2-13. Example of Using the –g, -u, and –p Switches ......................................... 16
Figure 2-14. Example of Using the –x Switch .......................................................... 16
Figure 2-15. Example of Using the –x Switch with the –g, -u, and –p Switches .................. 17
Figure 2-16. Example of Using the –I Switch ........................................................... 17
Figure 3-1. Example of Viewing Operating Modes .................................................... 22
Figure 3-2. Example of Normal Output ................................................................. 23
Figure 3-3. Example of XML Output ..................................................................... 23
Figure 3-4. Example of Formatted XML Output (Excerpt Shown) .................................. 24
Figure 3-5. Examples of Errors Displayed in Completion Code Mode .............................. 25
Command Line Interface User’s Guide ix
List of Tables
Table 1-1. Members .......................................................................................... 6
Table 3-1. Items in a Command Line .................................................................... 27
Table 4-1. Global Action Commands .................................................................... 34
Table 5-1. System Context Commands ................................................................. 48
Table 5-2. System Context Properties .................................................................. 49
Table 5-3. Controller Commands ........................................................................ 50
Table 5-4. Controller Properties ......................................................................... 50
Table 5-5. PhysicalPort Command ....................................................................... 52
Table 5-6. PhysicalPort Properties ...................................................................... 52
Table 5-7. PoolList Commands ........................................................................... 53
Table 5-8. PoolList Properties ............................................................................ 53
Table 5-9. DiskList Property .............................................................................. 53
Table 5-10. Disk Commands .............................................................................. 54
Table 5-11. Disk Properties ............................................................................... 54
Table 5-12. Volume Property ............................................................................. 55
Table 5-13. Volume Commands .......................................................................... 55
Table 5-14. Volume Properties ........................................................................... 56
Table 5-15. VolumeComposition Properties ........................................................... 57
Table 5-16. Extent Properties ............................................................................ 57
Table 5-17. TaskList Properties .......................................................................... 58
Table 5-18. Task Commands .............................................................................. 59
Table 5-19. Task Properties .............................................................................. 59
Table 5-20. iSCSI Commands ............................................................................. 60
Table 5-21. iSCSI Properties .............................................................................. 60
Table 5-22. iSCSITarget Commands ..................................................................... 61
Table 5-23. iSCSITarget Properties ...................................................................... 61
Table 5-24. iSCSISession Properties ..................................................................... 64
Table 5-25. iSCSIConnection Properties ................................................................ 65
Table 5-26. Portal Commands ............................................................................ 66
Table 5-27. Portal Properties ............................................................................ 66
Table 5-28. Initiator Command .......................................................................... 67
Table 5-29. Initiator Properties .......................................................................... 67
Table 5-30. AdvancedSettings Commands ............................................................. 68
Table 5-31. AdvancedSettings Properties .............................................................. 68
Table 5-32. SystemPolicy Properties .................................................................... 69
Table 5-33. ExternalConnectionsManager Properties ................................................ 70
Table 5-34. SystemStatistics Properties ................................................................ 71
Table 5-35. LAG Commands .............................................................................. 72
Table 5-36. LAG Properties ............................................................................... 72
Table 5-37. ManagementPort Command ............................................................... 73
Table 5-38. ManagementPort Properties ............................................................... 73
Table 5-39. NetworkRoute Command ................................................................... 74
Table 5-40. NetworkRoute Properties .................................................................. 74
Table 5-41. ServicePool Commands ..................................................................... 75
Table 5-42. ServicePool Properties ...................................................................... 75
x Contents
Chapter 1 Introduction
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:
192.168.59.25 :: show controller[a] ID = A Status = OK IsActive = true SlotNumber = 0 SerialNumber = 00001 DriveSlots = 12 NumFrontPorts = 8 DisplayName = Blade A SoftwareVersion = 2.5.1.21 IsAlternateSoftwareVersionPresent = true AlternateSoftwareVersion = 2.5.1.21 BoardType = 0009 BoardTypeRevision = XC05 I8kHwVersion = 1.0.0.0 I8kSwVersion = 0.1.0.0 MpuSwVersion = 2.5.1.21 BindFailReason = Bind_OK BladeHealth = Healthy BladeState = Bound BladeType = SFF PersistenceSetting = Unchanged BatteryState = Failed BufferMemDimmCnt = 2 BufferMemSize = 2048 SystemMemDimmCnt = 2 SystemMemSize = 512 SystemTime = 13:18:27 Ports = 8 Ports LAGs = 8 LAGs ManagementPort = ManagementPort [192.168.59.25], Status=OK BasePool = [BaseA], 2 disks
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 read­write.
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.
8 Chapter 2 Installing the CLI
Figure 2-1. Management Center Home Page
Figure 2-2. File Download Security Warning Message
3. Click Run to run the installer.
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 context­specific 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