Shared LUN between VM's
-
Friday, January 13, 2012 3:33 PM
I am new to Hyper-V and have a question about a shared LUN between two VM's. I Have a LUN on a Dell SAN and I have granted access to it to a group of servers within the Dell Storage Manager. I can mount the volume on both VM's but when I put data on the volume on one server the other server does not see the same data. Is this by design or am I doing something wrong? Can I not mount a shared LUN on two VM's at the same time so they both see the same data?
Thanks in advance!
Chad Guiney
Answers
-
Friday, January 13, 2012 4:16 PMModerator
Windows servers cannot just 'share LUNS' unless they are clustered. Never have been, back to the introduction of clustering in the NT4 days.
And even then it does not work in the way you describe - only Cluster Shared Volumes work that way today and they are limited to machines with the Hyper-V role or Hyper-V server.
If you want multiple Windows servers to see the same files, and the same time, and be able to access them, you must use a share.
The other option is to use a VHD. Create a differencing disk from it for each VM. Attach a unique differencing disk to each VM. Then mount it in the OS of the VMs. Each VM will bea ble to read what is on the root VHD, but not lock it, nor write to it - read only. This gets around Windows volume level file locking.
The caveot is - you can change the files in the root VHD, but the VMs might never see new files - due to the way differencing disks work. Unless you just need to present the same files to the machines all the time and they just need to read them. Azure uses this trick.
So, your best bet puts you back to using a share.
Brian Ehlert (hopefully you have found this useful) http://ITProctology.blogspot.com
Learn. Apply. Repeat.
Disclaimer: Backup, test your backup, try new things. Attempting change is of your own free will.- Marked As Answer by Vincent HuMicrosoft Contingent Staff, Moderator Sunday, January 15, 2012 3:00 PM
All Replies
-
Friday, January 13, 2012 4:16 PMModerator
Windows servers cannot just 'share LUNS' unless they are clustered. Never have been, back to the introduction of clustering in the NT4 days.
And even then it does not work in the way you describe - only Cluster Shared Volumes work that way today and they are limited to machines with the Hyper-V role or Hyper-V server.
If you want multiple Windows servers to see the same files, and the same time, and be able to access them, you must use a share.
The other option is to use a VHD. Create a differencing disk from it for each VM. Attach a unique differencing disk to each VM. Then mount it in the OS of the VMs. Each VM will bea ble to read what is on the root VHD, but not lock it, nor write to it - read only. This gets around Windows volume level file locking.
The caveot is - you can change the files in the root VHD, but the VMs might never see new files - due to the way differencing disks work. Unless you just need to present the same files to the machines all the time and they just need to read them. Azure uses this trick.
So, your best bet puts you back to using a share.
Brian Ehlert (hopefully you have found this useful) http://ITProctology.blogspot.com
Learn. Apply. Repeat.
Disclaimer: Backup, test your backup, try new things. Attempting change is of your own free will.- Marked As Answer by Vincent HuMicrosoft Contingent Staff, Moderator Sunday, January 15, 2012 3:00 PM
-
Friday, January 13, 2012 6:18 PM
What you are trying to do is like trying to connect one physical hard drive to two different servers. This is not possible.
If you are looking to make that data redundant so that if one server fails the other keeps sharing it then you need a failover cluster.
In that case two physical machines are connected to the same storage and run Hyper-V in Failover Cluster mode. On top of Hyper-V will run what is called a Highly Available Virtual Machine with Windows Server 2008 R2 SP1 as an Operating System. That Virtual Machine would be set up to connect to the shared storage and deliver the shared folders to your network.
If Node 1 in the failover cluster fails then Node 2 takes over. If the VM was running on Node 1 at the time of the failure then the VM will behave just like a physical server would if the reset button was hit. The VM will transfer to Node 2 and boot the OS back up.
If the VM was already on Node 2 then things keep humming along while the problems with Node 1 are addressed.
If Node 1 fails and the shared storage is hosted on Node 1 all of the Reads/Writes to that storage get cached by the cluster until Node 2 takes the shared storage over. Once Node 2 takes over, this can take a few seconds, all of the Reads/Writes to that shared storage get done on the actual SAN.
Windows Server 8 looks like it may have a somewhat different approach to this dilemma but we have not approached it beyond building a standard Hyper-V Failover Cluster using 2 nodes and a DAS SAN on the Developer Preview currently available as of this writing.
Philip Elder SBS MVP Blog: http://blog.mpecsinc.ca -
Saturday, January 14, 2012 3:23 AM
I am not affiliated, but Sanbolic's Melio FS can do this for physical and VMs. With their product you can simultaneously share access to the same volume between systems.
http://www.sanbolic.com/melioFS.htm
It is a similar concept to CSVs that allows simultaneous access from multiple nodes in a Hyper-V cluster, except the Sanbolic product can be used for any type use, File Server, VMs, SQL, etc...
Rob McShinsky (VirtuallyAware.com)
VirtuallyAware - Experiences in a Virtual World (Microsoft MVP - Virtual Machine)

