Sql server 2008 r2 正在从虚拟机访问SAN磁盘/LUN。可能吗?

Sql server 2008 r2 正在从虚拟机访问SAN磁盘/LUN。可能吗?,sql-server-2008-r2,virtual-machine,virtualization,hyper-v,windows-clustering,Sql Server 2008 R2,Virtual Machine,Virtualization,Hyper V,Windows Clustering,资源: node1: Physical cluster node 1. node2: Physical cluster node 2. cluster1: Cluster containing node1 and node2 used to host virtual machines. san1: Dell md3200 highly available storage device (SAN). lun1: A lun dedicated to file

资源:

node1:     Physical cluster node 1.
node2:     Physical cluster node 2.
cluster1:  Cluster containing node1 and node2 used to host virtual machines.
san1:      Dell md3200 highly available storage device (SAN).
lun1:      A lun dedicated to file server storage located on san1.
driveZ:    A hard drive currently a resource on node1 that is 100GB and has the
           drive letter Z:\.  This drive letter is lun1 that resides on san1.
virtual1:  A virtual server used as a file server only.
- I currently have created the SAN (san1), created a disk group with the
  virtual disk (storage), and assigned a LUN (lun1) to it.
- I have set up two physical servers that are connected to the SAN via SAS
  cables (multi paths).
- I have set up the clustering feature on those two servers and have hyper-v
  role installed on each as well.
- I have created a cluster (cluster1) with server members node1 and node2.
- I have created a virtual server (virtual1) and made it highly available
  on the cluster (cluster1).
大纲/目标: 我的网络上有两个节点/服务器。这两个节点(node1和node2)是集群(cluster1)的一部分,用于托管所有虚拟机。有一个SAN(san1),其中有许多LUN是在其上创建的,其中一个LUN(lun1)将用于存储专用于虚拟机(virtual1)的所有数据。最终创建了lun1,命名为“storage”,并严格用于虚拟机“virtual1”存储和访问数据

我目前拥有的内容:

node1:     Physical cluster node 1.
node2:     Physical cluster node 2.
cluster1:  Cluster containing node1 and node2 used to host virtual machines.
san1:      Dell md3200 highly available storage device (SAN).
lun1:      A lun dedicated to file server storage located on san1.
driveZ:    A hard drive currently a resource on node1 that is 100GB and has the
           drive letter Z:\.  This drive letter is lun1 that resides on san1.
virtual1:  A virtual server used as a file server only.
- I currently have created the SAN (san1), created a disk group with the
  virtual disk (storage), and assigned a LUN (lun1) to it.
- I have set up two physical servers that are connected to the SAN via SAS
  cables (multi paths).
- I have set up the clustering feature on those two servers and have hyper-v
  role installed on each as well.
- I have created a cluster (cluster1) with server members node1 and node2.
- I have created a virtual server (virtual1) and made it highly available
  on the cluster (cluster1).
问题: 是否可以让virtual1启动并访问lun1(驱动器z)

我尝试过的: 我让lun1又名driveZ出现在node1的磁盘管理中。然后,我将其作为资源添加到集群存储区域。我试着做两件不同的事情。(1) 我尝试将其添加为群集共享卷,不久后我意识到只有群集成员才能看到/访问它,而虚拟机却不能,即使它们是作为群集中的服务创建的。(2) 我试图将资源(driveZ)移动到cluster1中的虚拟机(virtual1)。完成后,我进入虚拟机设置,将驱动器添加为SCSI驱动器(使用lun1@100GB),并刷新虚拟机上的磁盘管理(virtual1)。驱动器出现了,允许我分配一个驱动器号,然后问我是否要格式化它。。。那上面我所有的数据呢??那是半身像吗?不管怎样,这就是我现在的处境。。。想法

想法: 我很清楚,所有这些都是为了测试atm。。。生产中资源的实际规模差别很大。我正在考虑将driveZ(lun1)添加为群集共享卷,然后向我的虚拟机添加一个新的Hyper-V虚拟SCSI驱动器(比如50G,以便稍后我可以尝试扩展到100G,即物理/SAN驱动器的完整大小)。将固定VHD(虚拟硬盘)存储在群集共享卷“driveZ”中。我现在正在测试它。。。但我有点担心。。。1) 当我尝试创建一个非常大的VHD(大约7TB)时会发生什么?2) 固定磁盘VHD可以以任何方式扩展吗?我计划在将来使我的新SAN虚拟磁盘大于7TB。。。目前它将保持在7TB,但在某个时候会扩展…

解决了这个问题

正确的方法是

  • 设置SAN,创建包含两个虚拟磁盘的磁盘组,并为其分配LUN
  • 使用Win Server 2008 R2设置两台物理服务器,将它们都连接到SAN
  • 向这两台服务器添加故障转移群集功能和Hyper-V角色
  • 对于这两个驱动器(来自SAN),将其联机并对其进行初始化。如果愿意,可以在每个驱动器上创建一个简单的卷,甚至可以根据需要格式化它们
  • 创建群集,从SAN中添加1个虚拟磁盘作为群集共享卷。这将用于在上存储虚拟机
  • 创建虚拟机并将其存储在CSV ex:C:\ClusterStorage\Volume1\上,然后将其通电
  • 您需要脱机使用的第二个驱动器。这应该只是主机服务器上的一个驱动器。它必须离线!当您右键单击并选择“脱机”时,请继续并右键单击,然后转到“属性”。在该页上查找LUN编号并将其记录下来
  • 打开虚拟机设置,转到Scsi控制器并添加驱动器。选择物理驱动器并选择正确的LUN编号。点击OK,它将显示在VM存储管理器中
  • 作为一个有用的工具,请查看这些页面…


    因此,如果我想在多个来宾虚拟机上连接/创建共享虚拟硬盘,我需要通过转到虚拟机设置、SCSI控制器、物理驱动器并选择LUN来连接所有虚拟机,然后才能在所有虚拟机上看到共享硬盘?这是正确的程序和最终结果吗?不正确。据我所知,您不能与多个虚拟机(同时)共享同一个驱动器。“我认为”只要驱动器处于脱机状态,就可以在VM设置GUI中将相同的驱动器添加到2个VM。但我知道你不能同时使用它。你必须把它想象成一个真正的硬盘。您将如何与2台电脑“共享”该驱动器?(设置文件服务器/NAS)。SAN和LUN用于直接访问,就像旧的IDE/SATA电缆一样。这是怎么回事?应该可以在虚拟机之间共享vhdx?是的,这是一个虚拟硬盘。与SAN上的LUN完全不同。;)那是可能的。