VMware Cloud Community
Brian_Chang
Contributor
Contributor
Jump to solution

1 Raw Device Mapped to 2 Windows VMs Do Not Show the Same Files

I have a question I'm hoping someone can answer. I have 2 Windows based VMs with a second drive mapped to a LUN. Both see and access the drive space without any problems and the mapping is set to physical.

The question is, shouldn't I see the same files on the mapped LUN within the 2 OS's? Right now, when I create a file on one VM, I don't see it on the other. What I'm seeing is each VM having it's own set of files. Not sure why this is occurring.

Stats:

VI3

ESX 3.0.x

VC 2.5

SAN EMC Clariion

FiberChannel

0 Kudos
1 Solution

Accepted Solutions
mrosenecker
Enthusiast
Enthusiast
Jump to solution

You are correct that NTFS is not a clustered filesystem, and therefore can't be used by two different servers (whether they be physical or virtual) at the same time. However, there is a product out there (my company has used it) that allows you to use a single LUN on multiple servers concurrently. It's called MelioFS, and a company named Sanbolic produces it. No, I don't work for them...

It was a pretty neat product, but it is recommended to have a separate network setup for just the clustered filesystem chatter. Basically, the software uses the network to communicate between nodes, and to relay information about what's being written, where on the LUN it resides, and who is writing to it (so that the other nodes can access the data, but also so the other nodes don't overwrite the data, either).

View solution in original post

0 Kudos
8 Replies
Troy_Clavell
Immortal
Immortal
Jump to solution

No, you should not. Each VM is idependent of itself. The LUN presented is to the HOST, right? This is just shared storage. Each VM will see it's on drive and data as if it is there own.

kharbin
Commander
Commander
Jump to solution

You can only share a file system between 2 VMs if the operating system supports shared file systems, and you have formatted the common LUN as a shared file system. You cannot use NTFS as a shared file system, it will not work as expected, as you have noticed.

You will need to format using a shared file system format. In Linux it would be GPFS, I do not recall Windows having a silimar file system.

my 2 cents

Ken Harbin

www.esXpress.com

mrosenecker
Enthusiast
Enthusiast
Jump to solution

You are correct that NTFS is not a clustered filesystem, and therefore can't be used by two different servers (whether they be physical or virtual) at the same time. However, there is a product out there (my company has used it) that allows you to use a single LUN on multiple servers concurrently. It's called MelioFS, and a company named Sanbolic produces it. No, I don't work for them...

It was a pretty neat product, but it is recommended to have a separate network setup for just the clustered filesystem chatter. Basically, the software uses the network to communicate between nodes, and to relay information about what's being written, where on the LUN it resides, and who is writing to it (so that the other nodes can access the data, but also so the other nodes don't overwrite the data, either).

0 Kudos
Brian_Chang
Contributor
Contributor
Jump to solution

Thanks for the info. The LUN is presented to the guest as a raw device not to the hosts. And yes, the format is NTFS. I'm assuming then that even if this was a shared VMDK file it would be the same situation? I was under the assumption that this would be similar to a shared scsi disk for physical machines. If each VM shows separate files I'm unclear how this would work for clustering, i.e. quorum disk. I'm not clustering but what I'm trying to accomplish is to have a shared disk space among Windows VMs so I don't have to copy files back and forth. Any thoughts?

0 Kudos
kharbin
Commander
Commander
Jump to solution

Without clustering, easiest would be to have one VM own the VMDK. That VM would in turn advertise that drive as a network share. Then both can use it, and all operates properly and no comlicated clustering. Only thing is file transfers will take place over the wire.

Ken Harbin

www.esXpress.com

0 Kudos
mrosenecker
Enthusiast
Enthusiast
Jump to solution

As I mentioned before, you can use the MelioFS product to have a single LUN (or RDM, in your case) connected to both servers concurrently, with both servers accessing (reading and writing) to it concurrently. It is a multi-master scenario, whereas mounting it on one server and sharing it out creates a single-point-of-failure problem (if the master server dies, the slave can't access the drive any longer). NTFS cannot have multiple servers accessing the same volume concurrently, and if you try, it is highly likely that you will end up having the servers corrupt each other's data.

You are able to use RDM to two different VMs for a clustered environment, creating quorum disks and data disks presented to both cluster nodes, but then you MUST install MS Clustering, in order to manage who owns the drive (the non-owner will make it unavailable for local use). Present and create the volumes on one server first, then add the second cluster node, and present the already created LUN and volumes to the second cluster node.

0 Kudos
Brian_Chang
Contributor
Contributor
Jump to solution

Ok, thanks everyone for the intel. For now, I'll have to deal with file shares. The concern was that it would go through the network and would be limited by the bandwidth. On VM's that are hosted on different ESX hosts, the data would traverse the physical network. I suppose that if the VM's were on the same host the data would go through the virtual network backplane of the host since they are on the same virtual switch. I'll also look into MeliosFS as a possible solution. Thanks again.

0 Kudos
jhanekom
Virtuoso
Virtuoso
Jump to solution

Another popular workaround is to use DFS file replication to replicate content between the servers. This works well for relatively static content, such as web content. It will not work for applications that require any form of locking on files.

0 Kudos