Friday, 10 July 2009

Sun StorageTek 2540 and ESX troubleshooting

We experienced a few issues with the StorageTek 2540 array that forms the core of our SAN recently. The symptom was that the array flagged itself as being in a degraded state and that one or more volumes were not assigned to the preferred controller.


The first step was to upgrade the SAN firmware and Common Array Manager (CAM) software to the latest release. Despite this, we observed the problem again. Further digging into the problem found that the failover was happening when we performed a LUN rescan under VMware ESX.


My previous understanding was that there were essentially two types of arrays: active/active and active/passive. In the active/active configuration, both controllers in an array can service I/O requests to a specific volume concurrently. In an active/passive configuration, one [active] controller handles the I/O with the second [passive] controller sitting idle, only servicing I/O if the active controller fails.


I understood the StorageTek 2540 to be an active/passive array; it is only possible to assign a volume to one controller at any time. However, in order to improve the throughput of the array, different volumes can be assigned to different controllers. For example, a volume “VOL1” might be assigned to controller A as its active controller and to controller B for its passive controller, while volume “VOL2” might be assigned to controller B as its active controller and controller A as its passive controller.


It turns out that things are more subtle than this; there is a third type of array configuration: asymmetric.


The asymmetric configuration follows the active/passive model in that only one controller is servicing I/O for a specific volume at any time, but extends this by allowing I/O operations to be received by the second controller. If this happens, the array will automatically failover the volume to the second controller to service the request. This process is called Automatic Volume Transfer (AVT). If the first controller then receives I/O operations, the AVT moves the volume back.


Yes, this could cause some flapping between controllers. It can also cause I/O stalls as the controllers fail across.


Some of the array initiator types (such as Solaris with Traffic Manager (aka MPxIO)) disable AVT, others, including the Linux initiator that we’ve used on our VMware hosts, have AVT enabled.


So the problem we’re having appears to be caused by the array failing over a volume to its second controller. But why is it doing this? The only configuration I had performed on the ESX side was to ensure the multi-pathing option was set to Most Recently Used (MRU); the correct setting for active/passive arrays. What appears to have happened is that when booting, the ESX servers are not mapping to a consistent path. Out of our five ESX servers, three were setting one controller as active, while the other two servers were setting the second controller as active. Presumably, when one of the hosts (that has the wrong active path) performs a scan, the request is sent to the failover controller which invokes AVT and fails over the volume.


How to fix?


Sun have told me that the next version of CAM, due in a few weeks, will include a “VMware” initiator type which will disable AVT. This will negate the need to perform the NVSRAM hack in VMware’s Knowledge Base, but will require a firmware upgrade.


In the meantime, it might be a case of just ensuring that all the ESX hosts are using the same path to connect to each volume. This is all theory as I’m still working this out, but at least it’s all starting to make sense.


Although not specifically VMware or 2540 related, the following links provide some interesting reading around the subject:


Sun discussion forum thread about preferred and owner controllers


Linux kernel mailing list post detailing a bug experienced with multipath and asymmetric arrays


Saturday, 4 July 2009

Note-taking on the Cloud

In the "old" days, things were pretty simple; the Palm handled contacts, calendar, tasks and notes well, allowing me to carry everything with me but still sync them with my PC.

Of course, things are more advanced these days: Multiple computers, at home and at work, the iPhone providing near continuous Internet connectivity, web based services and richer software applications. But despite this, I'm still struggling to get perfect syncing across all platforms. Here's where things are for me today:

  • Contacts: Google Contacts synced with the iPhone, but no Outlook/Exchange integration.
  • Calendar: Google Calendar synced with the iPhone, but primary calendar only.
  • Tasks: Still using Outlook/Exchange for this. No sync.
  • Notes: Some notes in Outlook, some notes in OneNote, a few notes on the iPhone. Nothing syncs.

The last one is particularly disappointing as note synchronisation shouldn't be difficult. I tried using Google Notebook for a while until Google got bored and dropped it.

It was then I tried Evernote. There is a free version, provided you don't exceed a certain number of notes per month and there are clients for Windows, Mac OS X and the iPhone. There's also a web interface for when I'm in Linux or on a public machine.

My preference in terms of note taking functionality and power is OneNote. The only downside to this application is that notes are basically locked to the client PC, or synced to the corporate SharePoint server at best.

In comparison with OneNote, Evernote has fewer features, and an interface that is less rich. The Mac and Windows versions both have different levels of functionality (the Mac has a nicer set of views IMHO). But in it's favour, any notes I make, on any of my devices, now sync with the cloud.

Evernote is therefore my de facto notes application. For now.

Monday, 29 June 2009

Upgrading to ESXi 4.0

Although VMware vSphere came out a couple of months ago, I haven't had the time to try it out yet. Today I took the opportunity to try and upgrade my ESXi 3.5 server to ESXi 4.0. This won't allow me to test out the new VMware features such as Fault Tolerence, but I'll be able to run the latest vSphere client and see how the interface has changed.

I was a bit reluctant to do this because installing ESXi 3.5 on the USB key drive inside my ML115 G5, although not complicated, consisted of a number of steps and manual copying of files (not to mention having to crawl under the desk and physically install the USB stick).

Well the good news is that ESXi 4.0 is a much easier story. The operating system can be installed from CD straight onto the USB key drive, so no need to pull the side off the case. The install is quick and takes about 5 minutes. Then a reboot and to the DOS-like menu that allows for the networking, password etc to be configured.

A download of the vSphere 4 client and registering the licence key (free for ESXi) and everything is ready to go. I re-added the iSCSI and NFS datastores from my OpenSolaris server and fired up the VMs.

I haven't done anything beyond this yet, but for an upgrade I assumed would be a hassle, ESXi 4.0 has been very straightforward.

Saturday, 20 June 2009

Upgrading to OpenSolaris 2009.06

I've been absent from this blog for a while because we've been moving house. The move is now complete and broadband installed in the new house so I'm back online and ready to continue blogging. Today, upgrading OpenSolaris.

My storage server, the ML110 G5 has been running OpenSolaris 2008.11. With the release of OpenSolaris 2009.06, I wanted to upgrade and wondered if I should have left a spare slice of disk so I could perform a live upgrade. With the rest of the network dependent on this server for services (DNS, iSCSI LUNs, file and print serving), a failed upgrade didn't appeal.

It turns out that the the upgrade was very easy and a spare slice was not required:

Step one: Upgrade the Package Manager:

$ pfexec pkg install SUNWipkg

Step two: Run the Package Manager and select "Update All".

Wait while the new package requirements are evaluated, downloaded and installed.

Step three: Reboot

That's it. Checking /etc/release now reports:

OpenSolaris 2009.06 snv_111b X86
Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
Use is subject to license terms.
Assembled 07 May 2009


Although I'm not an expert in IPS, the OpenSolaris packaging system, my understanding is that the previous version of the operating system is still on the system in the form of a ZFS snapshot, so if I have any problems, I should be able to rollback without too many problems.

Compared with upgrading other operating systems, OpenSolaris has been an absolute dream. Highly recommended.

Tuesday, 21 April 2009

Oracle to buy Sun

This blog is typically about stuff I'm doing, but having invested 10 years in working with Sun kit, I think this deserves a comment. I'm not particularly qualified to make an informed contribution to the Oracle buyout discussion, but since that doesn't stop most Slashdot commentators, here are my observations:

1) It could have been a lot worse. If IBM had bought Oracle, they would have two directly competing CPU architectures (POWER and SPARC), two directly competing Unix implementations (AIX and Solaris), directly competing storage, Java development tools, application servers, databases etc. The long term outcome would have been that some of these technologies would have been sunset and development consolidated.

2) It could have been much, much worse: HP could have bought Sun. See DEC/Digital and the Compaq merger to see how that would have played out.

3) Sun seems to get a bad rap from the Slashdot crowd, but the number of people who are dismayed that their favourite Sun product is under threat highlights the significance that Sun has in the market. This is especially telling when you see that the object of dismay is one of many different products: Solaris, Java, OpenOffice, Virtualbox, MySQL...

4) Oracle have now migrated from being a software solutions house to a total solutions provider. Although there is talk that Oracle will sell off SPARC to Fujitsu, or port everything to x86, the reality is that SPARC is a very lucrative platform for Sun and will be a revenue generator for Oracle. In fact, Oracle now own a very good portfolio.

5) In the last 12-18 months, Sun has "got" Open Source. I'm not sure Oracle has. Hopefully the Sun culture will impact Oracle (remember how NeXT "absorbed" Apple after being bought?).

So although I'm no expert in the area of business, the future for Sun might be okay after all. Time will tell...

Saturday, 11 April 2009

Getting CIFS permissions working in OpenSolaris

I blogged a while back about how I managed to get NFS4 configured on my OpenSolaris server. At the end of that blog, I promised to update on getting CIFS working as well using the OpenSolaris CIFS server.

Finally got around to it tonight. Took a while as every attempt from my Vista machine was reporting an "Access Denied" message when running "net view \\opensolaris".

To cut a long story short, the problem was caused by me setting up a mapping between Unix and Windows using the idmap command. The answer was to remove any mappings and allow the CIFS server to work it out itself. All sorted!

Upgrading to OpenSUSE 11.1

Although it's been out for a number of months (released in December), I've just taken the step of upgrading my workstation to OpenSUSE 11.1. In order to perform a clean upgrade, I decided a reinstall from scratch would be easiest, especially since my services and custom scripts are now running on the OpenSolaris server.

I finally took this opportunity to move all my documents to the server. They now benefit from having regular ZFS snapshots and get backed up to the external USB drive for added security.

Once my home area was clean and having backed up my ~/.mozilla directory, I proceeded to install from the OpenSUSE 11.1 DVD download. I had previously used the 64bit version and hit a few problems with Java and Flash, so this time I opted for a 32bit install (only got 2GB RAM so not a huge hit). All worked as expected, although the default partitioning seems a bit tight - something I've had to rectify this morning using LVM. If installing, it would be worth creating a bigger root filesystem (15GB?) (assuming you're not using multiple partitions for /usr, /var etc.)

The only thing that is bugging me slightly is the beagled indexing daemon causes the CPU fans to spin up when the machine is idle. I need to see if this is because it's doing an initial index build or if this will be permanent, in which case I might turn beagle off.

I was surprised at how easily the Compiz "wobbly windows" was to enable, especially when I remember how difficult and flakey it used to be. I have however turned it off because it's faster without the effects.

All in all, a good distribution upgrade with no major issues.