HP 3PAR CLI - installing, creating scripts and automation of tasks / Powershell

First, we need to install HP 3PAR CLI software on a server.

I am going to use a windows server but I hope to be able to make a post also about linux and hp-ux versions.

Steps:

Download HP 3PAR CLI from HP portal 
I am using 3PAR_Inform_OS_3.2.2_MU2_CLI_SNMP_SW_QR482-11085.iso file downloaded from https://h20575.www2.hpe.com/tsusbportal/index.do?lc=EN_US&jumpid=sc_7epymnkr2q
It requires HP passport account and account details like SAID and SAR numbers.

Mount the iso, unpack it or burn it to a CD and browse the drive to \cli\windows and run setup file.


HP 3PAR Cli software

Next, you need to click next, accept the default install location or change with a personalized one, and to click install.
When install finishes you will find an icon on desktop and a shortcut in start menu named HP 3PAR CLI 3.x.x

Running the CLI will ask you for system details.
Insert IP address of the system followed by user name and password:

Next, if you require running automated scripts you will need a user with necessary rights for the commands it will execute and the password for it.

HP gives you the option to save the password in an encrypted file to be called by a script.

Steps to save it:
1. After you login to CLI run any of the following commands:
setpassword -saveonly -file c:\mypass.pwfile
setpassword -saveonly -file mypass.pwfile



Any option you choose will save the password file to the installation directory of CLI and NOT in C:\ drive. Not sure if it`s a bug or a feature :)

Complete path of the file is:
\Program Files (x86)\Hewlett-Packard\HP 3PAR CLI\bin


File will look like this:


To be continued....







Reset or change HP 3PAR SSMC Administrator Password

After you install HP 3PAR SSMC - StoreServ Management Console for the first time, you are asked to setup administrator credential on your SSMC system.

After you setup the credentials (username and password) you are unable to change them without logging in to the console.

If you forget username and password for SSMC follow the steps bellow to reset your credentials:

Default installation directory is:

C:\Program Files\Hewlett-Packard\SSMC\

if you changed the default path, make sure you browse to it.

Under ssmcbase folder (C:\Program Files\Hewlett-Packard\SSMC\ssmcbase) you can find a script called ClearAdminCredential.bat


To reset the password you have two options:

Double click the file and push Y for YES when asked.



Or, run the script from a command prompt and select Yes,
Reset SSMC Password

Running the console again will prompt you with the following page:


Insert new username and password and you are good to go!

HP 3PAR Adaptive Flash Cache Configuration


Assumptions:

HP 3PAR Adaptive Flash Cache is a feature that uses SSDs for read cache. It can be used to maximize read hits and improve random read performance.
Flash Cache can be created in 16 GB increments.
Flash Cache is always created as fully allocated RAID 1 Logical Disks behind all nodes on the array
Feature can be enabled on entire system rather or on VVSet Mode.

We will activate on entire system:

Verify available space:
DC13PAR cli% showspace -p -devtype SSD -t r1 -ha mag
--Estimated(MB)---
RawFree              UsableFree
1896448                948224

Verify if Flash Cache is already configured:
DC13PAR cli% showflashcache

If is enabled you will see an output similar to:
                               -(MB)-
Node Mode  State     Size Used%
   0 SSD   normal   65536    41
   1 SSD   normal   65536    41
   2 SSD   normal   65536    45
   3 SSD   normal   65536    41
-------------------------------
   4 total         262144

And you should skip the createflashcache step.

If it`s not configured carry on with the next step:

Create 128 GB (or as much as you need) of Flash Cache for each node pair in the array:
DC13PAR cli% createflashcache 128g

Verify again with showflashcache and go to next step.

We will now enable Flash Cache on entire system, as stated at the beginning using following command:

DC13PAR cli% setflashcache enable sys:all








HP 3PAR Adaptive Flash Cache Configuration


Assumptions:

HP 3PAR Adaptive Flash Cache is a feature that uses SSDs for read cache. It can be used to maximize read hits and improve random read performance.
Flash Cache can be created in 16 GB increments.
Flash Cache is always created as fully allocated RAID 1 Logical Disks behind all nodes on the array
Feature can be enabled on entire system rather or on VVSet Mode.

We will activate on entire system:

Verify available space:
DC13PAR cli% showspace -p -devtype SSD -t r1 -ha mag
--Estimated(MB)---
RawFree              UsableFree
1896448                948224

Verify if Flash Cache is already configured:
DC13PAR cli% showflashcache

If is enabled you will see an output similar to:
                               -(MB)-
Node Mode  State     Size Used%
   0 SSD   normal   65536    41
   1 SSD   normal   65536    41
   2 SSD   normal   65536    45
   3 SSD   normal   65536    41
-------------------------------
   4 total         262144

And you should skip the createflashcache step.

If it`s not configured carry on with the next step:

Create 128 GB (or as much as you need) of Flash Cache for each node pair in the array:
DC13PAR cli% createflashcache 128g

Verify again with showflashcache and go to next step.

We will now enable Flash Cache on entire system, as stated at the beginning using following command:

DC13PAR cli% setflashcache enable sys:all








3PAR Remote Copy (RCIP) Basic Network Setup


Basic Network Setup for Remote Copy over IP on 3PAR


Setting up remote copy for 3PAR it`s easy and straight forward.
We are working on 8440 3PAR system, with 4 controller nodes.

Before doing any setup, your Remote Copy tab in CMC will look like in the picture bellow:

First, we need to connect to 3PAR CLI using administrator account:

Default credentials for 3PAR are:
Username: 3paradm
Password: 3pardata

Our systems have 4 RC ports, one on each node.

showport command will list all ports and their details:



If you execute showport -rcip comand you will get following answer:
DC13PAR cli% showport -rcip
There is no specified port information.

You need to setup IP details for each port as next step. Command for this task is:

controlport rcip addr <ip_address> <subnet_mask> <node:slot:port>

In our example:

DC13PAR cli% controlport rcip addr 10.244.77.200 255.255.255.192 0:3:1
Are you sure you want to change the address for 0:3:1?
select q=quit y=yes n=no: y
Remote Copy interface change successful.

Do the same for all interfaces (in our case, interfaces numbers are: 0:3:1, 1:3:1, 2:3:1 and 3:3:1) but don`t forget to change the IP address as each interface needs a different IP.

Execute startrcopy command to enable the RC engine.
DC13PAR cli% startrcopy

Now, if you run showport -rcip command you should get an output similar to:

DC13PAR cli% showport -rcip
N:S:P State ---HwAddr---        IPAddr         Netmask                Gateway  MTU  Rate Duplex AutoNeg
0:3:1 ready 3654B8CEC58D 10.244.77.200 255.255.255.192       -         1500 1Gbps   Full     Yes
1:3:1 ready 3654B8CEC8D5 10.244.77.201 255.255.255.192       -         1500 1Gbps   Full     Yes
2:3:1 ready 3654B8CEC4D9 10.244.77.202 255.255.255.192       -         1500 1Gbps   Full     Yes
3:3:1 ready 3654B8CEC7F9  10.244.77.203 255.255.255.192       -         1500 1Gbps   Full     Yes
----------------------------------------------------------------------------------------
    4

Notice there is no gateway set up. We need to add Gw details for each port. Command is:
controlport rcip gw <ip_address> <node:slot:port>

In our case: 

DC13PAR cli% controlport rcip gw 10.244.77.193 0:3:1
Are you sure you want to change the gateway for 0:3:1?
select q=quit y=yes n=no: y
Remote Copy interface change successful.

Running  showport -rcip command you should be able to see all details:

RO_DC1_135_3PAR_SYS cli% showport -rcip
N:S:P State ---HwAddr---        IPAddr         Netmask       Gateway  MTU  Rate Duplex AutoNeg
0:3:1 ready 3654B8CEC58D 10.244.77.200 255.255.255.192 10.246.99.192 1500 1Gbps   Full     Yes
1:3:1 ready 3654B8CEC8D5 10.244.77.201 255.255.255.192 10.246.99.192 1500 1Gbps   Full     Yes
2:3:1 ready 3654B8CEC4D9 10.244.77.202 255.255.255.192 10.246.99.192 1500 1Gbps   Full     Yes
3:3:1 ready 3654B8CEC7F9 10.244.77.203 255.255.255.192 10.246.99.192 1500 1Gbps   Full     Yes
----------------------------------------------------------------------------------------------
    4

Execute showrcopy command to check the status:

DC13PAR cli% showrcopy

Remote Copy System Information
Status: Started, Normal

At this point you should configure the secondary system similar to the primary one and test the connection between them.

Ping command to test the connection is:
controlport rcip ping <ip_addr> <node:slot:port>