vrijdag 1 juli 2011

HP P4000 SAN CLI

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.

vrijdag 18 april 2008

Solaris for Linux sysadmins

Last week, I started playing with Solaris. As a long-time Linux and Unix sysadmin, I have been in contact with Solaris before, but it has been quite a while since our last encounter.

Although I have touched Solaris before, these were only brief encounter. This time I decided to really get close. Sun and virtualization make this a lot easier than it was in the past. I downloaded Solaris 10 x86_64 from the Sun web site and installed it in a virtual machine. I will spare you the details of this installation, there are already sufficient resources available elsewhere and to be honest ... installation is not that hard.

What I want to write about, is a Solaris introduction for those already comfortable with Linux. So basically, I will highlight the main differences. This should allow Linux sysadmins to get quickly up to speed with Sun Solaris 10.

Let me start by giving you a summary of areas of interest:
  • SMF
  • Networking
  • Disk partitioning + ZFS
  • Resource Limits
With Solaris 10, Sun has done away with the traditional start/stop scripts in /etc/rc?.d/ directories. We all know this system has a few disadvantages:
  • Scripts start one after the other, startup time could benefit from parallellism.
  • No real dependencies between services. This means that although the network failed to start, eg the NFS server will still try to start.
Service Management Framework (SMF) in Solaris 10 fixes these shortcomings.