The past few months, I've been busy with scripting our HP P4000 SAN - among others. For scripting HP provides the CLI interface. Strangely, HP is making a weird distinction between Windows and other platforms. For Windows the CLI is a local installation available on the "HP StorageWorks P4000 Management Software for Microsoft Windows DVD". On non-Windows platforms, you have to SSH to port 16022 on your box to access what HP calls the on-system CLI.
While some vendors (e.g Juniper SSG, Citrix Xenserver) first put new features in the command-line interface and make them available in th GUI later, this is not the case with the HP P4000. The CLI seems to be trailing the GUI.
There are also some differences between the Windows CLI and the on-system CLI. A first step is to check the "CLIQ - The SAN/iQ Command-Line Interface User Guide" to see if a command is available. For each command the availability is listed, e.g:
assignVolumeToServer
This command assigns a volume to a server.
Availability: Windows, SAN/iQ
Working with the CLI - in our case the on-system CLI - for some time, I learned the good and the bad and wanted to share some of this, since there is clearly not too much information available on this subject. All in all, the CLI is easy to work with, but there are a few traps you should avoid.
A P4000 SAN has a minimum of 1 node and typically multiple nodes for high-availability. Each node has its own IP and the cluster also has an IP address: the VIP. What I learned the hard way, is that a few commands do not work when you connect to the VIP. Therefore it is recommended to connect to one of the nodes to execute CLIQ commands.
The command that did not work for me was 'createremotesnapshot'. After some digging, I found out that this is a bug in the firmware when you connect to the VIP. See this HP Support document: http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?objectID=c02635577&lang=en&cc=us&taskId=101&prodSeriesId=4004602&prodTypeId=12169
When you lookup the command assignVolume in the User Guide, this is what you will find:
assignVolume
This command assigns a volume to a server. This assignment sets the access to a volume, based on host iqn(s).
No mention that this command removes anything. But beware! The command assignVolume will assign the volume to an initiator like you ask, but existing assignments will be removed!
If you only want to add an assignment, it is better to use the command assignVolumeToServer. The unassignvolume command is maybe even more dangerous, but at least it is clearly mentioned in the documentation that all assignments will be removed.
unassignVolume
This command disassociates a volume from all servers.
Abonneren op:
Reacties posten (Atom)
Geen opmerkingen:
Een reactie posten