VMware Cloud Community
Learn2012
Contributor
Contributor
Jump to solution

Configure shared disks on 2 VMs hosted on 2 seperate ESXI hosts

Hi all,

I am having this issue now and want to check if anyone encounter this issue.

I have 2 VMs running on Guest OS Win 2012 R2 Std on 2 seperate ESXI hosts 5.5 Update 1. I created a RDM and add this RDM to the first VM.

Next, I share this RDM from the first VM to the second VM.

I am able to mount this RDM on both VMs and able to create, update and write data to both VMs. However, the data changes made in the first VM is not updated on the second VM vice versa.

I have to reboot these VMs in order to view the updated files.

I configured a new SCSI Controller for this RDM and the same SCSI ID is set for each VM. This is a physical RDM.

Can anyone advise what must I do to ensure that this RDM is updated real-time by the Guest OS?

Thank you.

Li Xi

0 Kudos
1 Solution

Accepted Solutions
MKguy
Virtuoso
Virtuoso
Jump to solution

We are looking at this setup as my application team request a shared disk to be presented to both VMs with read-write access.

I'm afraid that's not how Windows NTFS works. NTFS is NOT a clustered file system and as such does not support simultaneous write access from multiple hosts to the same block storage device.

Microsoft developed an extension called Cluster Shared Volumes (CSV) to allow multiple hosts having write access to the same block storage device mainly for Hyper-V, but I'm not sure if it's supported outside of classic clustering, see:

Deploying Cluster Shared Volumes (CSV) in Windows Server 2008 R2 Failover Clustering - Clustering a...

-- http://alpacapowered.wordpress.com

View solution in original post

0 Kudos
8 Replies
rcporto
Leadership
Leadership
Jump to solution

If the RDM disk is the same for both ESXi/VMs the data is updated in real time... anyway, let me know from where you get this RDM device... it is from your SAN (FC, iSCSI) ? And the Failover Cluster feature is installed on Windows virtual machines ? If not you will corrupt the data on disk if both VMs access the same RDM disk.

---

Richardson Porto
Senior Infrastructure Specialist
LinkedIn: http://linkedin.com/in/richardsonporto
0 Kudos
Learn2012
Contributor
Contributor
Jump to solution

Hi Richardson,

This RDM is created from our storage via FC protocol. I had enabled multi-writer flag on the VMs mounted with this RDM to allow simultaneous write-access to this RDM by referring to the following article.

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=103416...

However, this RDM disk on the VM do not refresh itself real-time when a file is added to this disk. For example, this RDM is mounted as E:\ drive on both VM.

In VM 1, when a file (test1.txt) is added to this RDM, VM 2 RDM (the same E:\) is not seeing this file (test1.txt). This is the same when another file (test2.txt) is added on this RDM in VM2.

VM1 is not able to view this file (test2.txt).

I know I can configure NFS as a mapped network drive for both VM to access and have its information updated real-time.

We are looking at this setup as my application team request a shared disk to be presented to both VMs with read-write access.

0 Kudos
MKguy
Virtuoso
Virtuoso
Jump to solution

We are looking at this setup as my application team request a shared disk to be presented to both VMs with read-write access.

I'm afraid that's not how Windows NTFS works. NTFS is NOT a clustered file system and as such does not support simultaneous write access from multiple hosts to the same block storage device.

Microsoft developed an extension called Cluster Shared Volumes (CSV) to allow multiple hosts having write access to the same block storage device mainly for Hyper-V, but I'm not sure if it's supported outside of classic clustering, see:

Deploying Cluster Shared Volumes (CSV) in Windows Server 2008 R2 Failover Clustering - Clustering a...

-- http://alpacapowered.wordpress.com
0 Kudos
Learn2012
Contributor
Contributor
Jump to solution

Hi MKGuy,

Thanks for your reply. I understand that the iSCSI protocol is only use for block storage devices. Thus, it is not able to track file level changes when it is mounted to a Guest OS.

In order for me to view the file-level changes real-time, I have to use the CIFS protocol on these Windows Guest OS.

My current RDM configuration will allow me to simultaneously write to this LUN since the LUN writes command will be sent directly to the storage which I believe the storage file system (We are using NetApp) supports that.

0 Kudos
MKguy
Virtuoso
Virtuoso
Jump to solution

My current RDM configuration will allow me to simultaneously write to this LUN since the LUN writes command will be sent directly to the storage which I believe the storage file system (We are using NetApp) supports that.

Yes on the SCSI block storage layer this is not a problem, but this is irrelevant. It's about the filesystem your Guest OS uses to access the storage device.

For example, VMware's VMFS is a clustered filesystem that was specifically built to support simultaneous write access of many hosts to the same SCSI block storage device. NTFS however does not support something like this and needs Microsoft's CSV extension or third party software that makes plain Windows NTFS cluster-aware.

You would face the same issue with two physical windows hosts accessing the same LUN.

In order for me to view the file-level changes real-time, I have to use the CIFS protocol on these Windows Guest OS.

CIFS/SMB is a network based file access protocol, it's completely oblivious to the underlying filesystem or storage device/protocol being used.

-- http://alpacapowered.wordpress.com
0 Kudos
Learn2012
Contributor
Contributor
Jump to solution

Hi MKGuy,

Thanks for your the explanation provided. We have decided to setup the MSCS 2012 R2 for these 2 VMs with the RDM configured as a shared storage to both VMs.

Cheers!

0 Kudos
Gepe89
Contributor
Contributor
Jump to solution

Hello,

I have a similar problem.

I shared a virtual disk between two machines Windows server 2012 R2 with the option of "multi-writer", but I have the problem when I save a file from a virtual machine in the disk it does not appear inmediately in the other machine. I need restart the machine for I can to see the file.

These machines must be operational the 24 hours, so I can not restart. What I can do to see the file that I save from one machine in the other immediately?

0 Kudos
MKguy
Virtuoso
Virtuoso
Jump to solution

I thought the messages in this thread and the other one you created should have made the point clear, but here is some more spoonfeeding, which basically just reiterates what's written a little above:

Your guest OS file system (NTFS) does not support simultaneous access of two independent systems on the same SCSI block storage device (aka disk).

it boils down to these options:

- Try CSV (Cluster Shared Volumes), a technology Microsoft developed to allow multiple nodes in a Windows cluster access the same SCSI block storage device simultaneously (mainly for Hyper-V clusters). Still it may not work as you expect it to because this was built for a specific case where while muliple hosts have access to the disk, every file is only writable by a single host at a time (SCSI locks etc).

- Buy some 3rd party software such as MetaSAN to circumvent the NTFS restrictions

- Abandon the "nice idea" and think of a solution for your problem that is within the scope of the technology you are using.

-- http://alpacapowered.wordpress.com
0 Kudos