VMware Cloud Community
tim_k
Contributor
Contributor
Jump to solution

Shared storage between 2 VMs on VI3?

Hello,

We are in the midst of migrating our VMs from an ESX2.5 environment to a 3.0.2 environment. We have 2 small Linux VMs set up as redundant web servers, with a shared VMDK file configured on both of them for the content. From what I understand, this is not possible in VI3. I tried setting the same sort of thing up with some test WinXP VMs, but got an error adding the disk to the second VM when the first VM already had the disk active.

Does anyone have this sort of setup, or are there any other suggestion about how to enable this? It's only a 16GB disk, so I don't want to set up anything too exotic for that size of data. The SAN is a Netapp 3050c, but the NFS license is currently tied up on another device. Worst case, I guess I can just clone the disk and have our web person mirror one disk to the other.

Thanks,

Tim

Reply
0 Kudos
1 Solution

Accepted Solutions
jhanekom
Virtuoso
Virtuoso
Jump to solution

ESX 2.x and 3.x will both allow you to share a VMDK between VMs, provided you set the VMDK up on a separate virtual SCSI controller in the VM (i.e. set the SCSI address to anything other than SCSI0:x) as well as setting the bus sharing type to something other than "None" (if it's a single ESX host, set it to Virtual. If you have more than one ESX host accessing the VMDK, set this to physical.)

Even so: Care should be taken to prevent both VMs from accessing the VMDK unless you have a clustered file system on the VMDK. NTFS and Ext3 are not clustered file systems and will corrupt if multiple hosts have access to them. This is not a limitation of ESX.

View solution in original post

Reply
0 Kudos
6 Replies
mcowger
Immortal
Immortal
Jump to solution

make that 16GB disk a part of a 3rd VM, which shares out its contents via NFS....

--Matt

--Matt VCDX #52 blog.cowger.us
tim_k
Contributor
Contributor
Jump to solution

Thanks for your suggestion Matt. That would still leave a single point of failure if that 3rd VM were ever to go down for a reboot, but otherwise I'm sure it would work fine. We are going to try setting up an RDM for both the VMs to access. It's not something we've done before, so we'll see how it goes.

Thanks,

Tim

Reply
0 Kudos
mcowger
Immortal
Immortal
Jump to solution

Which clustered filesystem are you planning to use for the RDM?

--Matt

--Matt VCDX #52 blog.cowger.us
Reply
0 Kudos
tim_k
Contributor
Contributor
Jump to solution

It's not actually a true cluster setup, more like a warm standby. The

"live" server is switched with some manual intervention.

So far we have migrated one server and set up the RDM on it, and it is

working well. Tomorrow we plan to convert the other and make sure both

servers see the shared RDM.

Tim

Reply
0 Kudos
jhanekom
Virtuoso
Virtuoso
Jump to solution

ESX 2.x and 3.x will both allow you to share a VMDK between VMs, provided you set the VMDK up on a separate virtual SCSI controller in the VM (i.e. set the SCSI address to anything other than SCSI0:x) as well as setting the bus sharing type to something other than "None" (if it's a single ESX host, set it to Virtual. If you have more than one ESX host accessing the VMDK, set this to physical.)

Even so: Care should be taken to prevent both VMs from accessing the VMDK unless you have a clustered file system on the VMDK. NTFS and Ext3 are not clustered file systems and will corrupt if multiple hosts have access to them. This is not a limitation of ESX.

Reply
0 Kudos
tim_k
Contributor
Contributor
Jump to solution

Hi Jannie,

That is exactly what we did. On each VM, we added the RDM with a different SCSI ID, and it automatically added an additional SCSI adapter. We set the sharing type to Physical, as we have more than one ESX server potentially accessing it. The only thing that tripped us up for a moment was the boot order of the hard disk. For some reason, the shared disk became the first boot device, so we had to change that in teh VM's BIOS.

Thanks,

Tim

Reply
0 Kudos