Sunday, April 27, 2008

Enclosure Based Naming and Sun Cluster

As I posted previously, we are working on getting our Sun Cluster installation running. We had originally hoped to use ZFS for this project, which would have made deployment much easier. Unfortunately, the risks associated with the bug discussed in my ZFS Difficulties post are just too high to allow us to deploy it for production use at this time.

Instead, we are moving to Veritas Volume Manager and File System (VxVM and VxFS) for control of the data directories and shared storage.

We hit a hitch associated with Enclosure Based Naming. It turns out that if your storage drivers return devices in a format including the WWN, Enclosure-Based Naming is mandatory. Since the names are assigned based on some obscure, secret algorithm, you are virtually guaranteed that the different systems in your cluster will have different Enclosure Based Names associated with them.

Sun Cluster, on the other hand, insists that all of your devices be named the same way on all systems in the cluster.

Fortunately, Sun Infodoc 215296 describes how to resolve this impasse for VxVM 4.1+.

First, boot the node that you will be fixing in non-cluster mode. You can do this with a
boot -x
command. Make sure that no disk groups are imported from the shared storage before proceeding.

The /etc/vx/disk.info file contains a mapping from the WWN-based device names (that you see in OS-based commands like format) to the Enclosure Based Names. You can edit this file directly, changing only the numerical part of the Enclosure Based Name that does not match between the different servers.

After making this change, and before you reboot, run the following command to re-configure the storage:
vxconfigd -k
(Note that volumes and disk groups will freak out at this point if you have them imported on the system, since they see the disks being migrated to a "different" location. You really want to have deported the disk groups before you start, or else you may find yourself doing plex recovery.)

You can verify that the changes took effect properly by running
vxdisk -e list
and matching up the disk names to your reference configuration.

Good luck!

--Scott

No comments: