Wednesday, January 12, 2011

VMware Virtual Machine Clustered Filesystem Setup

The situation is:

  • I am running VMware ESX 3.5 (3 ESX Hosts w/ vCenter Server in a Cluster);
  • I need five Virtual Machines to read from the same disk running a clustered file system;
  • I cannot replicate data for each Virtual Machine due to capacity; and
  • I need to avoid a single point of failure (sharing from a VM is not a viable option);

In a traditional system I would point two servers at the same LUN and used a clustered file-system and this is what I'm looking for an equivalent of inside of a virtualised environment.

I have a SAN and can use Raw Disk Mappings (RDM) from a VM to map to a LUN however there is LUN limit on the SAN and I am unable to establish a LUN for each Virtual Machine.

Is there a clever way around this or am I snookered?

More info:

I'm looking to run a clustered application and need to share file content and configuration between two Virtual Machines, about 50gb. This was previously done using a shared LUN on a SAN. I require both load balancing and HA of the machines. I do not have the capacity to replicate the data on each VM and the application cannot tolerate any sync-lag.

Essentially I "just" need a way to point each VM at a single LUN and allow the VM to then control that disk.

Licensed features include HA/DRS

  • Are each of the ESX hosts running the same VM? I think I need more information about the shared disk before I can offer anything too useful

    Antitribu : updated the question for clarity; 3 ESX hosts have 5 VMs running; I require a single disk device accessible by each of the 5 VMs.
  • I was going to suggest iSCSI but no matter how you slice it, you need to create a LUN to share between the VMs regardless of the protocol (FC, iSCSI) used. You mention a LUN limit, but you shouldn't need to create more than a single LUN for all the VMs to share. Each would have an RDM pointing to that LUN. Are you saying you lack the ability to create a single additional LUN on your SAN?

    Antitribu : I have a LUN and can point a single VM to that LUN using RDM. That machine can then access that disk without issue. VMware however then greys out the RDM option on new disk creation because that LUN is in use. Basically it seems limited to a 1 to 1 ratio of LUNs to VMs. Linking the same disk with the RDM mapping to multiple machines faults with a disk lock error as normal.
    Kevin Kuphal : As noted in the answer below, you need to change the SCSI controller bus sharing setting on the virtual machines. Once you do that, the single LUN can be shared between more than one VM
  • Note: I've never done this before.

    The shared storage RDM should be possible, although having five nodes accessing it could introduce hilarity.

    The technique you want is similar to how two node Microsoft Clustering Services is implemented (with a shared quorum drive); VMware provide a documented method for how to achieve it.

    The solution looks well documented, if a little hairy. I'd recommend building and testing it in a lab before considering letting it anywhere near your production cluster.

    Good luck.

    Antitribu : Thank you! Looks like, thats the doc I'm after, will let you know how I go with it.
    Antitribu : Worked well enough to point me to the crux of the solution. Short version would be, create a new disk pointing to an RDM on a _different_ scsi device. so say SCSI1:1, VMware will create a new SCSI controller automatically and on that controller set shared disk access as required.
    Greg Work : Well done for isolating the magic required -- I'm glad it worked!
    From Greg Work

0 comments:

Post a Comment