none
Shared LUN between VM's RRS feed

  • Question

  • 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
    Friday, January 13, 2012 3:33 PM

Answers

  • 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.
    Friday, January 13, 2012 4:16 PM
    Moderator
  • Hy Guys!

    Interesting in this case is, that it works, when you map a SAS Volume to multiple W2K12 HyperV Nodes.
    The thing is, you will see on the initial Map the same files and folders, but when you add a new folder on NodeA it will not show up on NodeB.

    Wenn you delete files or folders on NodeA, they will shown furthermore on NodeB.

    Tricky?

    Regards
    Stefan

    No it's not :))

    You're trying to use non-clustered file system (NTFS) within a clustered scenarios. Unless extra arbiter is used (CSV filter or third-party software like MetaSAN) you're going to destroy your volume metadata pretty quicky. See this thread:

    http://www.starwindsoftware.com/forums/starwind-f5/trying-clear-this-use-iscsi-instead-smb-t1392.html

    the concept is the same for ANY SAN (FC, iSCSI, FCoE etc) and any non-clustered file system.

     

    StarWind iSCSI SAN & NAS

    Thursday, February 28, 2013 5:15 PM

All replies

  • 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.
    Friday, January 13, 2012 4:16 PM
    Moderator
  • 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
    Friday, January 13, 2012 6:18 PM
  • 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)
    Saturday, January 14, 2012 3:23 AM
  • Hy Guys!

    Interesting in this case is, that it works, when you map a SAS Volume to multiple W2K12 HyperV Nodes.
    The thing is, you will see on the initial Map the same files and folders, but when you add a new folder on NodeA it will not show up on NodeB.

    Wenn you delete files or folders on NodeA, they will shown furthermore on NodeB.

    Tricky?

    Regards
    Stefan

    • Proposed as answer by VR38DETTMVP Thursday, February 28, 2013 5:12 PM
    • Unproposed as answer by VR38DETTMVP Thursday, February 28, 2013 5:12 PM
    Thursday, February 28, 2013 10:06 AM
  • Hy Guys!

    Interesting in this case is, that it works, when you map a SAS Volume to multiple W2K12 HyperV Nodes.
    The thing is, you will see on the initial Map the same files and folders, but when you add a new folder on NodeA it will not show up on NodeB.

    Wenn you delete files or folders on NodeA, they will shown furthermore on NodeB.

    Tricky?

    Regards
    Stefan

    No it's not :))

    You're trying to use non-clustered file system (NTFS) within a clustered scenarios. Unless extra arbiter is used (CSV filter or third-party software like MetaSAN) you're going to destroy your volume metadata pretty quicky. See this thread:

    http://www.starwindsoftware.com/forums/starwind-f5/trying-clear-this-use-iscsi-instead-smb-t1392.html

    the concept is the same for ANY SAN (FC, iSCSI, FCoE etc) and any non-clustered file system.

     

    StarWind iSCSI SAN & NAS

    Thursday, February 28, 2013 5:15 PM
  • Precisely what is happening.

    This is why CSV was invented by MSFT - specifically to enable volume sharing (natively). 

    NTFS / Windows natively works at the volume level and is only designed for one owner.  If one LUN is exposed to two Server without some coordination layer (Clustering with CSV) then your volume will go sideways rather quickly.  Drop offline with one host, corrupt, etc.

    Now, if that is what you are trying to accomplish.  Go ahead.


    Brian Ehlert
    http://ITProctology.blogspot.com
    Learn. Apply. Repeat.
    Disclaimer: Attempting change is of your own free will.

    Thursday, February 28, 2013 6:13 PM
    Moderator