Scripting Storage Management Solutions with Hitachi Device Manager Software



Similar documents
Hitachi Storage Command Suite Logical Groups and LDEV Labels

EMC CLARiiON PRO Storage System Performance Management Pack Guide for Operations Manager Published: 04/14/2011

Simplifying Online Backup Operations for Microsoft Exchange, SQL and Oracle with Hitachi Protection Manager Software

AVG 8.5 Anti-Virus Network Edition

How To Install Storegrid Server On Linux On A Microsoft Ubuntu 7.5 (Amd64) Or Ubuntu (Amd86) (Amd77) (Orchestra) (For Ubuntu) (Permanent) (Powerpoint

1z0-102 Q&A. DEMO Version

Hitachi Path Management & Load Balancing with Hitachi Dynamic Link Manager and Global Link Availability Manager

Hitachi Unified Compute Platform (UCP) Pro for VMware vsphere

Print Audit 6 Network Installation Guide

Oracle EXAM - 1Z Oracle Weblogic Server 11g: System Administration I. Buy Full Product.

Defender Token Deployment System Quick Start Guide

GETTING STARTED WITH FLEXI-CLOUD

HOW TO SILENTLY INSTALL CLOUD LINK REMOTELY WITHOUT SUPERVISION

Using SMIGRATE to Backup, Restore and Migrate Team Sites in SharePoint Products and Technologies 2003

Contingency Planning and Disaster Recovery

Guide to deploy MyUSBOnly via Windows Logon Script Revision 1.1. Menu

Tutorial. Inventory Methods

Spector 360 Deployment Guide. Version 7

WhatsUp Gold v16.3 Installation and Configuration Guide

EVault Software. Course 361 Protecting Linux and UNIX with EVault

HP StorageWorks Modular Smart Array 1000 Small Business SAN Kit Hardware and Software Demonstration

Craig Carpenter MCT. MCSE, MCSA

AVG 9.0 Internet Security Business Edition

Monitoring Oracle Enterprise Performance Management System Release Deployments from Oracle Enterprise Manager 12c

TANDBERG MANAGEMENT SUITE 10.0

Set Up Panorama. Palo Alto Networks. Panorama Administrator s Guide Version 6.0. Copyright Palo Alto Networks

Using VMWare VAAI for storage integration with Infortrend EonStor DS G7i

Secure Messaging Server Console... 2

Equalizer VLB Beta I. Copyright 2008 Equalizer VLB Beta I 1 Coyote Point Systems Inc.

WebLogic Server Foundation Topology, Configuration and Administration

Best Practices for Implementing Autodesk Vault

Dell UPS Local Node Manager USER'S GUIDE EXTENSION FOR MICROSOFT VIRTUAL ARCHITECTURES Dellups.com

VMware Data Recovery. Administrator's Guide EN

Deploying the BIG-IP LTM system and Microsoft Windows Server 2003 Terminal Services

Setting Up a Unisphere Management Station for the VNX Series P/N Revision A01 January 5, 2010

MICROSOFT BITLOCKER ADMINISTRATION AND MONITORING (MBAM)

Management Utilities Configuration for UAC Environments

Hosted Connecting Steps Client Installation Instructions

NAS 253 Introduction to Backup Plan

Magento Search Extension TECHNICAL DOCUMENTATION

Intelligent Power Protector User manual extension for Microsoft Virtual architectures: Hyper-V 6.0 Manager Hyper-V Server (R1&R2)

1 Disabling Access to USB Mass Storage Devices

Using SMI-S for Management Automation of StarWind iscsi SAN V8 beta in System Center Virtual Machine Manager 2012 R2

HYPERION SYSTEM 9 N-TIER INSTALLATION GUIDE MASTER DATA MANAGEMENT RELEASE 9.2

Understanding MySQL storage and clustering in QueueMetrics. Loway

Print Audit 4 Network Install Guide

EMC ViPR Controller. ViPR Controller REST API Virtual Data Center Configuration Guide. Version

Installing Microsoft Exchange Integration for LifeSize Control

Managing Qualys Scanners

Deploying the BIG-IP System with Oracle E-Business Suite 11i

Desktop : Ubuntu Desktop, Ubuntu Desktop Server : RedHat EL 5, RedHat EL 6, Ubuntu Server, Ubuntu Server, CentOS 5, CentOS 6

PAYMENTVAULT TM LONG TERM DATA STORAGE

EMC Virtual Infrastructure for SAP Enabled by EMC Symmetrix with Auto-provisioning Groups, Symmetrix Management Console, and VMware vcenter Converter

Quick Start Guide. IT Management On-Demand

CLARiiON Performance Monitoring Scripting

How To Install An Aneka Cloud On A Windows 7 Computer (For Free)

XMap 7 Administration Guide. Last updated on 12/13/2009

NetSpective Logon Agent Guide for NetAuditor

How To Install Powerpoint 6 On A Windows Server With A Powerpoint 2.5 (Powerpoint) And Powerpoint On A Microsoft Powerpoint 4.5 Powerpoint (Powerpoints) And A Powerpoints 2

INTRODUCTION TO CLOUD MANAGEMENT

Pragmatic Version Control

CASHNet Secure File Transfer Instructions

Configuring the BIG-IP LTM v11 for Oracle Database and RAC

Identikey Server Windows Installation Guide 3.1

WhatsUp Gold v16.2 MSP Edition Deployment Guide This guide provides information about installing and configuring WhatsUp Gold MSP Edition to central

Virtual Appliance Setup Guide

How to Scale out SharePoint Server 2007 from a single server farm to a 3 server farm with Microsoft Network Load Balancing on the Web servers.

HOW TO CONFIGURE SQL SERVER REPORTING SERVICES IN ORDER TO DEPLOY REPORTING SERVICES REPORTS FOR DYNAMICS GP

How To Set Up A Macintosh With A Cds And Cds On A Pc Or Macbook With A Domain Name On A Macbook (For A Pc) For A Domain Account (For An Ipad) For Free

Centralized Disaster Recovery using RDS

On premise upgrade guide (to 3.3) XperiDo for Microsoft Dynamics CRM

VMTurbo Operations Manager 4.5 Installing and Updating Operations Manager

Publish Acrolinx Terminology Changes via RSS

NSave Table of Contents

Application Server Installation

Eylean server deployment guide

Date 07/05/ :24:03. CENTREL Solutions. Author. Version Product XIA Configuration Server [ ]

Parallels Virtuozzo Containers 4.7 for Linux

Getting Started with Tableau Server 6.1

Best Practices for VMware ESX Server 2

HOWTO: Set up a Vyatta device with ThreatSTOP in router mode

Migrating to ESXi: How To

EXPRESSCLUSTER X for Windows Quick Start Guide for Microsoft SQL Server Version 1

System Compatibility. Enhancements. Security. SonicWALL Security Appliance Release Notes

Microsoft Corporation. Project Server 2010 Installation Guide

inforouter V8.0 Server Migration Guide.

GRAVITYZONE HERE. Deployment Guide VLE Environment

Configuring Virtual Blades

Make a folder named Lab3. We will be using Unix redirection commands to create several output files in that folder.

EaseUS Todo Backup user guide. EaseUS Todo Backup. Central Management Console. User guide - 1 -

Creating a remote command shell using default windows command line tools

PANO MANAGER CONNECTOR FOR SCVMM& HYPER-V

USER GUIDE: MaaS360 Services

Polycom CMA System Upgrade Guide

Title Goes ASSET MANAGEMENT

Oracle Enterprise Manager

LANDesk White Paper. LANDesk Management Suite for Lenovo Secure Managed Client

HP 3PAR Online Import for HDS Storage Data Migration Guide

Transcription:

Scripting Storage Management Solutions with Hitachi Device Manager Software October 31, 2007 Craig Chan Software Design Manager 2007 Hitachi Data Systems

Welcome to the WebTech Series Series of webcasts targeted specifically toward the more technical user of Hitachi solutions Goals: Maximize the potential from your existing IT infrastructure Deploy best-in-class techniques for storage and storage management Benefit from real-life before and after scenarios Webcasts are once or twice a month suggestions welcome for upcoming sessions View entire schedule and register at www.hds.com/webtech 2

What We Will be Covering How to download and install HiCommand Command Line Interface (CLI) for Device Manager Testing your installation with a few simple commands Editing the properties file to simplify commands Creating some batch scripts to execute on demand Using the system scheduler to run batch scripts periodically Using the CLI Batch and understanding its benefits 3

Key Functions in the CLI RefreshStorageArrays/AddStorageArray These commands let you get the latest information from the arrays. To get the latest information from all arrays, use RefreshStorageArrays. Be aware this will take a lot of time for Device Manager instances with several arrays to manage. To get the latest information from a specific array, use the AddStorageArray with a specific array to update the information for that array only. GetStorageArray This command retrieves details about the storage subsystem already registered with the HiCommand Device Manager. Array Group Filter FreeSpace HostStorageDomain Journal Pool LDEV LogicalDKC LogicalUnit Path PDEV GetServerInfo Port Returns information about your Device Manager installation including version information and registered arrays. 4

More Functions in the CLI - Provisioning AddHostStorageDomain Creates a Host Storage Domain to add LUNs to. AddWWNForHostStorageDomain Adds world wide names from the host to ensure only that host can access the LUNs. AddLun This command creates a path from the host to the volume (logical unit). This command is use to allocate storage to a host. AddArrayReservation Locks the array so other users can t interfere with resources you are about to use. DeleteArrayReservation Removes your lock on the array so other users can once again manage the array. You should always do this after you are done. 5

Getting Started Installing the CLI Download the CLI package to any host machine 6

Getting Started Download Install Files Choose the installation files for you platform The CLI requires the JRE as well HDvM has specific JRE requirements which may not be easily found on the link provided. It s often easier to search for the right JRE version online instead. Install the files on the host of your choosing Ensure communication with the server is available Check ports Confirm LAN settings 7

Test a Command Try retrieving some information using GetServerInfo C:\HiCommandCLI http://192.168.101.1:2001/service GetServerInfo u system p manager RESPONSE: An instance of ServerInfo serverversion=hicommand Device Manager Server v5.8 Build 0580-03 (Aug 27, 2007) serverurl=http://localhost:2001 uptime=35 minutes 26 seconds upsince=thu, 25 Oct 2007 16:50:24 GMT currentapiversion=5.8 license=0 List of 3 StorageArray elements: An instance of StorageArray arrayfamily=ams/wms displayarrayfamily=ams/wms An instance of StorageArray arrayfamily=usp displayarrayfamily=usp An instance of StorageArray arrayfamily=r600 displayarrayfamily=usp_v 8

Test Another Command Usually we refresh the storage array to make sure we have the latest information C:\HiCommandCLI http://192.168.101.1:2001/service AddStorageArray ipaddress=172.16.100.1 family=usp u system p manager 9 RESPONSE: An instance of StorageArray objectid=array.usp.15050 name=usp@172.16.100.1 description=usp (15050) at 172.16.100.1 serialnumber=15050 arrayfamily=usp arraytype=usp microcodeversion=50-09-00/00 agentversion=04_09_00 productname=raid500 controllerversion=50-09-00-00/00 numberofcontrollers=1 capacityingb=7,847 cacheinmb=32,768 sharedmemoryinmb=-1 numberofsparedrives=-1 freecapacityingb=5,290 allocatedcapacityingb=2,530

Too Much Typing Everything works, but notice we tend to type the same things over and over. We keep typing the URL to point to the server the commands are sent to. And we keep typing the username and password to perform the commands as. C:\HiCommandCLI http://192.168.101.1:2001/service GetSystemInfo u system p manager C:\HiCommandCLI http://192.168.101.1:2001/service AddStorageArray ipaddress=172.16.100.1 family=usp u system p manager We can simplify this by putting these settings in the HiCommandCLI.properties file. 10

Editing the Properties File Edit the HiCommandCLI.properties file in the CLI directory Make sure the URL points to your Device Manager Server ################################# # # Device Manager Command Line Interface (CLI) Properties File # # Can be used to provide options and default parameters for the # Device Manager CLI program. # # The Device Manager CLI program does not require any of the properties to be set. <snip!> # set the server url #HiCommandCLI.serverurl=http://localhost:2001/service HiCommandCLI.serverurl=http://172.16.100.1:2001/service ##### OPTIONS #### #user=khalsa # password can be provided directly, or from a password file #password=khalsa #password=@d:\\devicemanager\\.passwd <snip!> 11

Editing the Properties File Change the username to the one you want to execute the commands Change the password to correspond to that user. ################################# # # Device Manager Command Line Interface (CLI) Properties File # # Can be used to provide options and default parameters for the # Device Manager CLI program. # # The Device Manager CLI program does not require any of the properties to be set. <snip!> # set the server url HiCommandCLI.serverurl=http://172.16.100.1:2001/service ##### OPTIONS #### user=system #user=khalsa Note: Passwords should not be included in clear text in this file. We are doing this for demonstration purposes only # password can be provided directly, or from a password file password=manager #password=khalsa #password=@d:\\devicemanager\\.passwd <snip!> 12

Easier Commands Now we can type fewer parameters URL is always the same Username and password is always the same C:\HiCommandCLI GetServerInfo RESPONSE: An instance of ServerInfo serverversion=hicommand Device Manager Server v5.8 Build 0580-03 (Aug 27, 2007) serverurl=http://localhost:2001 uptime=35 minutes 26 seconds upsince=thu, 25 Oct 2007 16:50:24 GMT currentapiversion=5.8 license=0 List of 3 StorageArray elements: C:\HiCommandCLI AddStorageArray ipaddress=172.16.100.1 family=usp RESPONSE: An instance of StorageArray objectid=array.usp.15050 name=usp@172.16.100.1 description=usp (15050) at 172.16.100.1 13

Creating Your First Script A common task is to refresh the Device Manager database so it is up to date with the latest changes to the array. RefreshArrays.bat REM This batch file refreshes all the arrays in Device Manager to make sure you REM have the latest information in your instance of Device Manager. This may take REM a long time to run so be aware of your environment @ECHO OFF ECHO Starting to refresh all arrays in HDvM. CALL HiCommandCLI RefreshStorageArrays Then running the command is as simple as specifying the batch file name C:\RefreshArrays.bat Starting to refresh all arrays in HDvM RESPONSE: An instance of StorageArray objectid=array.usp.15050 name=usp@172.16.100.1 description=usp (15050) at 172.16.100.1 serialnumber=15050 arrayfamily=usp arraytype=usp microcodeversion=50-09-00/00 14

Extending Your First Script We should really perform a LUN Scan as well to update host and logical group information with any new WWNs, but this script is more complicated RefreshArrays.bat REM This batch file refreshes all the arrays in Device Manager to make sure you REM have the latest information in your instance of Device Manager. This may take REM a long time to run so be aware of your environment @ECHO OFF ECHO Starting to refresh all arrays in HDvM. CALL HiCommandCLI -o "allarrays.txt" RefreshStorageArrays ECHO Updating hosts and logical groups for serialnum=15050 model=usp CALL HiCommandCLI AddLunScan serialnum=15050 model=usp ECHO Updating hosts and logical groups for serialnum=77010000 model=ams1000 CALL HiCommandCLI AddLunScan serialnum=77010000 model=ams1000 ECHO Updating hosts and logical groups for serialnum=15060 model=r600 CALL HiCommandCLI AddLunScan serialnum=15060 model=r600 Now our script will update the host and logical group information as well C:\RefreshArrays.bat Starting to refresh all arrays in HDvM Updating hosts and logical groups for serialnum=15050 model=usp Updating hosts and logical groups for serialnum=77010000 model=ams1000 Updating hosts and logical groups for serialnum=15060 model=r600 15

Something Complicated but Useful It would be nice to have a script that could just be dropped into your environment and work instead of having to edit the file. RefreshArrays.bat REM This batch file refreshes all the arrays in Device Manager to make sure you REM have the latest information in your instance of Device Manager. This may take REM a long time to run so be aware of your environment @ECHO OFF ECHO Starting to refresh all arrays in HDvM. CALL HiCommandCLI -o "allarrays.txt" RefreshStorageArrays FOR /F "tokens=1,2 delims==" %%i IN (allarrays.txt) DO ( IF "%%i"==" objectid" ( FOR /F "tokens=2,3 delims=." %%q IN ("%%j") DO ( ECHO Updating hosts and logical groups for serialnum=%%r model=%%q CALL HiCommandCLI AddLunScan serialnum=%%r model=%%q ))) Now we can refresh Device Manager without updating this script. C:\RefreshArrays.bat Starting to refresh all arrays in HDvM Updating hosts and logical groups for serialnum=15050 model=usp Updating hosts and logical groups for serialnum=77010000 model=ams1000 Updating hosts and logical groups for serialnum=15060 model=r600 16

Even More Specifically 17 Maybe you want to refresh only one array in Device Manager s database RefreshUSP.bat REM This batch file refreshes only the USP array in Device Manager, to make sure REM you have the latest information in your instance of Device Manager. Since we REM also know the serial number, we ll refresh the hosts and logical groups as well. @ECHO OFF ECHO Starting to refresh all arrays in HDvM. HiCommandCLI AddStorageArray ipaddress=172.16.100.1 family=usp ECHO Updating the Hosts and Logical Groups CALL HiCommandCLI AddLunScan serialnum=15050 model=usp This command will take less time to execute since only one array is updated C:\RefreshUSP.bat Starting to refresh all arrays in HDvM RESPONSE: An instance of StorageArray objectid=array.usp.15050 name=usp@172.16.100.1 description=usp (15050) at 172.16.100.1 serialnumber=15050 arrayfamily=usp arraytype=usp microcodeversion=50-09-00/00

Now For Something Useful It would be nice to ensure the Device Manager database was up to date each morning Let s take the RefreshArrays.bat script we created and schedule it to run every night at 2:00 am 18

Provisioning Through CLI 19 Let s break down the tasks you need to perform Create a Host Storage Domain with the appropriate port Add world wide names to this Host Storage Domain Set the host mode settings to be specific to your environment Add logical units to your Host Storage Add these new storage paths to Logical Groups Here s what it looks like in CLI commands REM This batch file allocates storage to hosts. @ECHO OFF ECHO Allocating storage to hosts. CALL HiCommandCLI AddHostStorageDomain serialnum=15050 model=usp port=cl1-a domain=0x01 nickname=exchserver1 hostmode= Windows Extension CALL HiCommandCLI AddWWNForHostStorageDomain serialnum=15050 model=usp port=cl1-a domain=1 wwn=aa.aa.aa.aa.aa.aa.aa.aa CALL HiCommandCLI AddLUN serialnum=15050 model=usp port=cl1-a lun=0 domain=0x01 devnum=0a:08 CALL HiCommandCLI AddLUN serialnum=15050 model=usp port=cl1-a lun=1 domain=0x01 devnum=0a:09 CALL HiCommandCLI AddLUN serialnum=15050 model=usp port=cl1-a lun=2 domain=0x01 devnum=0a:10 CALL HiCommandCLI AddObjectForLogicalGroup logicalpath= /Windows/Server1/USP groupelements=path.usp.15050.0.1.2568 CALL HiCommandCLI AddObjectForLogicalGroup logicalpath= /Windows/Server1/USP groupelements=path.usp.15050.0.1.2569 CALL HiCommandCLI AddObjectForLogicalGroup logicalpath= /Windows/Server1/USP

Performance of CLI CLI commands are executed serially This results in linear performance of the same AddLun command With CLI Batch, the commands are almost executed in parallel This results in a much faster response when allocating several LUNs Time [sec] 2500 2000 1500 1000 500 CLI CLI Batch 0 1 10 20 30 40 50 60 70 80 90 100 The Number of LUNS 20

Provisioning Through CLI Batch First create a file to contain the batch commands (batch.txt) beginbatch HiCommandCLI AddLUN serialnum=15050 model=usp port=cl1-a lun=0 domain=0x01 devnum=0a:08 HiCommandCLI AddLUN serialnum=15050 model=usp port=cl1-a lun=0 domain=0x01 devnum=0a:09 HiCommandCLI AddLUN serialnum=15050 model=usp port=cl1-a lun=0 domain=0x01 devnum=0a:10 HiCommandCLI AddLUN serialnum=15050 model=usp port=cl1-a lun=0 domain=0x01 devnum=0a:11 HiCommandCLI AddLUN serialnum=15050 model=usp port=cl1-a lun=0 domain=0x01 devnum=0a:12 HiCommandCLI AddLUN serialnum=15050 model=usp port=cl1-a lun=0 domain=0x01 devnum=0a:13 HiCommandCLI AddLUN serialnum=15050 model=usp port=cl1-a lun=0 domain=0x01 devnum=0a:14 HiCommandCLI AddLUN serialnum=15050 model=usp port=cl1-a lun=0 domain=0x01 devnum=0a:15 endbatch Then we ll add LUNs to the host we previously defined. REM This batch file allocates multiple LUNs to hosts. REM It uses a faster process for multiple LUNs to provide quicker execution @ECHO OFF CALL HiCommandCLI AddArrayReservation serialnum=15050 model=usp pause REM If the array reservation fails, hit CTRL-C here to abort and try again CALL HiCommandCLI b batch.txt CALL HiCommandCLI DeleteArrayResrvation serialnum=15050 model=usp 21

What You Learned Today You should now be able to download and install HiCommand CLI for Device Manager You can use the command line to manage your arrays You can create scripts to execute multiple commands You can schedule scripts to run periodically You can batch commands together to perform quicker 22

References for the Material Today These scripts are available to you to use in your own environment You will be able to find these scripts on the WebTech Portal in both Windows Batch and Perl. Please contact John Harker at Hitachi Data Systems to have these scripts sent to you. Additional details for the commands used today can be found in the following guides: Command Line Interface (CLI) User s Guide found on the Device Manager CD 23

Upcoming WebTech Sessions: We have several additional WebTech sessions planned this year November 13: Eliminating Redundant Data in Your Backup Environment November 28: Best Practices for Oracle Automatic Storage Management and Hitachi Replication Software December 05: Using Hitachi Dynamic Link Manager to Enable Server Boot from the SAN December 13: Effective Compliance Strategies How to Protect Yourself and Your Company We will be adding additional sessions based upon participant requests. Please go to www.hds.com/webtech next week for the a link to the recording, presentation, and FAQ in addition to registering for upcoming WebTechs. 24

25 Questions/Discussion

26 Thank You