Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We are currently in the process of moving from a single web server to two load balanced web servers and are facing some challenges we don't quite know how to fix. One of these is that the current single server hosts applications that write stuff to disk. The applications running on the server expects that when something is written to disk it later will in fact exist, so it's important that this premise is fulfilled with the dual server architecture as well.

The dual server setup is a couple of VMWare instances with Windows Server 2008 R2 as the guest operating system. Out of the box, these instances does not share any kind of file system, so just moving the applications over would make them break since one instance would write something to the file system that doesn't exist on the other.

Thus we need to share a file system between the two virtual servers. Our host has proposed to create a network share on a SAN and map this share individually on each virtual machine. This doesn't work too well due to NTFS permissions, etc., because the share needs to be accessed by several independent web applications that won't even be in the same application pool.

The only solution that kind of works is to hard code an "identity" for each web application into its web.config file, but this means password in clear text which doesn't sit well with me.

Since the servers are virtual, I'm thinknig: Wouldn't it be possible to make a NAS area available as a physical disk in the gues operating system somehow? Since VMWare has full control of the virtual hardware, you'd think it would be able to "fake" a local hard drive in the virtual machine that in reality is a folder on a NAS, but so far I haven't found anything that states how and if this is possible.

So I have to ask the wonderful Server Fault community: Can a folder on a NAS be made available as a physical drive (typical D:) in both of the virtual machines?

share|improve this question

3 Answers 3

up vote 1 down vote accepted

In short, what you are trying to do will not work, I am not sure whether or not VMWare can use the shared folder as a disk, but what I do know is that 2 Virtual Servers cannot share the same disk and access it at the same time for the same reason that almost no other application can, both machines cannot write to the same disk at the same time. Basically VMWare would throw an error when you tried to start the second server telling you the disk file was locked.

share|improve this answer

What you can do, is use the SAN as a shared SCSI drive, so that the drive shows up as D: on both machines, but only one of them can use it at the same time. You won't get load balancing that way, but you do get the redundancy - if the other VM fails, you can swap over to the other one and it will take over the drive and continue.

As previously stated, the same storage cannot be actively used in two places. This is why you would usually have a database backend handling the data for this kind of application, so that you can have several clients concurrently accessing it.

share|improve this answer

You can have a back-end storage server (or use one of the web servers) and share the data directory to the other server via NFS, which is supported on 2008R2. This should take care of your concurrency issues and make the storage appear local to the servers.

If your NAS supports NFS, you should be able to do this with it.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.