在故障转移群集中使用群集共享卷Use Cluster Shared Volumes in a failover cluster

适用于: Windows Server 2019、Windows Server 2016、Windows Server 2012、Windows Server 2012 R2Applies to: Windows Server 2019, Windows Server 2016, Windows Server 2012, Windows Server 2012 R2

群集共享卷 (CSV) 允许故障转移群集中多个节点同时具有对已设置为 NTFS 卷的同一 LUN(磁盘)的读写访问权限。Cluster Shared Volumes (CSV) enable multiple nodes in a failover cluster to simultaneously have read-write access to the same LUN (disk) that is provisioned as an NTFS volume. (在 Windows Server 2012 R2 中,可以将该磁盘设置为 NTFS 或弹性文件系统 (ReFS) 。 ) 使用 CSV 时,群集角色可以从一个节点快速故障转移到另一个节点,而无需更改驱动器所有权,或者卸载并重新装载卷。(In Windows Server 2012 R2, the disk can be provisioned as NTFS or Resilient File System (ReFS).) With CSV, clustered roles can fail over quickly from one node to another node without requiring a change in drive ownership, or dismounting and remounting a volume. CSV 还帮助简化管理故障转移群集中潜在大量 LUN 的管理的操作。CSV also help simplify the management of a potentially large number of LUNs in a failover cluster.

CSV 提供常规用途的群集文件系统,该系统在 Windows Server 2012 R2) 的 NTFS (或 ReFS 之上分层。CSV provide a general-purpose, clustered file system, which is layered above NTFS (or ReFS in Windows Server 2012 R2). CSV 应用程序包括:CSV applications include:

  • 群集 Hyper-V 虚拟机的群集虚拟硬盘 (VHD) 文件Clustered virtual hard disk (VHD) files for clustered Hyper-V virtual machines
  • 用于存储横向扩展文件服务器群集角色的应用程序数据的横向扩展文件共享。Scale-out file shares to store application data for the Scale-Out File Server clustered role. 此角色的应用程序数据的示例包括 Hyper-V 虚拟机文件和 Microsoft SQL Server 数据。Examples of the application data for this role include Hyper-V virtual machine files and Microsoft SQL Server data. (请注意,横向扩展文件服务器不支持 ReFS。 ) 有关横向扩展文件服务器的详细信息,请参阅 应用程序数据的横向扩展文件服务器(Be aware that ReFS is not supported for a Scale-Out File Server.) For more information about Scale-Out File Server, see Scale-Out File Server for Application Data.

备注

Csv 不支持 SQL Server 2012 和早期版本 SQL Server 中 Microsoft SQL Server 群集工作负载。CSVs don't support the Microsoft SQL Server clustered workload in SQL Server 2012 and earlier versions of SQL Server.

在 Windows Server 2012 中,CSV 功能得到显著增强。In Windows Server 2012, CSV functionality was significantly enhanced. 例如,已删除 Active Directory 域服务上的依赖关系。For example, dependencies on Active Directory Domain Services were removed. 已对 chkdsk 中的功能改进、与防病毒和备份应用程序的互操作性以及与常规存储功能(如 BitLocker 加密卷和存储空间)的集成的支持。Support was added for the functional improvements in chkdsk, for interoperability with antivirus and backup applications, and for integration with general storage features such as BitLocker-encrypted volumes and Storage Spaces. 有关 Windows Server 2012 中引入的 CSV 功能的概述,请参阅Windows server 2012 [ ] 中故障转移群集的新增功能。For an overview of CSV functionality that was introduced in Windows Server 2012, see What's New in Failover Clustering in Windows Server 2012 [redirected].

Windows Server 2012 R2 引入了附加功能,如分布式 CSV 所有权、通过服务器服务的可用性增加了复原能力、可以分配给 CSV 缓存的物理内存量的灵活性、更好的诊断能力和增强的互操作性(包括对 ReFS 和重复数据删除的支持)。Windows Server 2012 R2 introduces additional functionality, such as distributed CSV ownership, increased resiliency through availability of the Server service, greater flexibility in the amount of physical memory that you can allocate to CSV cache, better diagnosibility, and enhanced interoperability that includes support for ReFS and deduplication. 有关详细信息,请参阅 故障转移群集中的新增功能For more information, see What's New in Failover Clustering.

备注

有关将 CSV 上的数据重复删除用于虚拟桌面基础结构 (VDI) 方案的信息,请参阅博客文章 在 Windows Server 2012 R2 中部署 VDI 存储的数据重复删除在 Windows Server 2012 R2 中将数据重复删除扩展到新的工作负荷For information about using data deduplication on CSV for Virtual Desktop Infrastructure (VDI) scenarios, see the blog posts Deploying Data Deduplication for VDI storage in Windows Server 2012 R2 and Extending Data Deduplication to new workloads in Windows Server 2012 R2.

查看在故障转移群集中使用 CSV 的要求和注意事项Review requirements and considerations for using CSV in a failover cluster

在故障转移群集中使用 CSV 之前,请查看本部分中的网络、存储以及其他要求和注意事项。Before using CSV in a failover cluster, review the network, storage, and other requirements and considerations in this section.

网络配置注意事项Network configuration considerations

当你配置支持 CSV 的网络时,请考虑以下内容。Consider the following when you configure the networks that support CSV.

  • 多个网络和多个网络适配器Multiple networks and multiple network adapters. 若要在发生网络故障时启用容错能力,我们建议多个群集网络执行 CSV 通信,或者配置成组网络适配器。To enable fault tolerance in the event of a network failure, we recommend that multiple cluster networks carry CSV traffic or that you configure teamed network adapters.

    如果群集节点已连接到不应由该群集使用的网络,则应该禁用它们。If the cluster nodes are connected to networks that should not be used by the cluster, you should disable them. 例如,我们建议你禁用 iSCSI 网络,以供群集禁止这些网络上的 CSV 通信。For example, we recommend that you disable iSCSI networks for cluster use to prevent CSV traffic on those networks. 若要禁用网络,请在故障转移群集管理器中 ,选择 "网络", 选择 "网络",选择 " 属性 " 操作,然后选择 "不 允许在此网络上进行群集网络通信"To disable a network, in Failover Cluster Manager, select Networks, select the network, select the Properties action, and then select Do not allow cluster network communication on this network. 或者,你可以使用Get-clusternetwork Windows PowerShell cmdlet 配置网络的角色属性。Alternatively, you can configure the Role property of the network by using the Get-ClusterNetwork Windows PowerShell cmdlet.

  • 网络适配器属性Network adapter properties. 在执行群集通信的所有适配器的属性中,确保以下设置处于启用状态:In the properties for all adapters that carry cluster communication, make sure that the following settings are enabled:

    • “Microsoft 网络的客户端”**** 和“Microsoft 网络的文件和打印机共享”****。Client for Microsoft Networks and File and Printer Sharing for Microsoft Networks. 这些设置支持服务器消息块 (SMB) 3.0,默认情况下用于在节点之间执行 CSV 通信。These settings support Server Message Block (SMB) 3.0, which is used by default to carry CSV traffic between nodes. 若要启用 SMB,还请确保服务器服务和工作站服务正在运行,并且将它们配置为在每个群集节点上自动启动。To enable SMB, also ensure that the Server service and the Workstation service are running and that they are configured to start automatically on each cluster node.

      备注

      在 Windows Server 2012 R2 中,每个故障转移群集节点都有多个服务器服务实例。In Windows Server 2012 R2, there are multiple Server service instances per failover cluster node. 存在两个实例:可处理来自访问常规文件共享的 SMB 客户端的传入通信和仅可处理节点间 CSV 通信的第二个 CSV 实例。There is the default instance that handles incoming traffic from SMB clients that access regular file shares, and a second CSV instance that handles only inter-node CSV traffic. 此外,如果节点上的服务器服务变得不正常,CSV 所有权将自动转换到另一个节点。Also, if the Server service on a node becomes unhealthy, CSV ownership automatically transitions to another node.

      SMB 3.0 包括 SMB 多通道和 SMB 直通功能,使 CSV 通信能够在群集中跨多个网络进行流式传输并且利用支持远程直接内存访问 (RDMA) 的网络适配器。SMB 3.0 includes the SMB Multichannel and SMB Direct features, which enable CSV traffic to stream across multiple networks in the cluster and to leverage network adapters that support Remote Direct Memory Access (RDMA). 默认情况下,SMB 多通道用于 CSV 通信。By default, SMB Multichannel is used for CSV traffic. 有关详细信息,请参阅服务器消息块概述For more information, see Server Message Block overview.

    • “Microsoft 故障转移群集虚拟适配器性能筛选器”****。Microsoft Failover Cluster Virtual Adapter Performance Filter. 此设置可改进节点功能以在需要到达 CSV 时执行 I/O 重定向,例如,当连接故障阻止节点直接连接到 CSV 磁盘时。This setting improves the ability of nodes to perform I/O redirection when it is required to reach CSV, for example, when a connectivity failure prevents a node from connecting directly to the CSV disk. 有关详细信息,请参阅本主题后面的 关于 CSV 通信中的 i/o 同步和 i/o 重定向For more information, see About I/O synchronization and I/O redirection in CSV communication later in this topic.

  • 群集网络优先级Cluster network prioritization. 通常,我们建议你不要更改网络的群集配置首选项。We generally recommend that you do not change the cluster-configured preferences for the networks.

  • IP 子网配置IP subnet configuration. 使用 CSV 的网络中的节点不需要特定的子网配置。No specific subnet configuration is required for nodes in a network that use CSV. CSV 可以支持多子网群集。CSV can support multisubnet clusters.

  • 基于策略的服务质量 (QoS)Policy-based Quality of Service (QoS). 我们建议你在使用 CSV 时,针对每个节点的网络通信配置 QoS 优先级策略和最小带宽策略。We recommend that you configure a QoS priority policy and a minimum bandwidth policy for network traffic to each node when you use CSV. 有关详细信息,请参阅 Service Quality (QoS) For more information, see Quality of Service (QoS).

  • 存储网络Storage network. 有关存储网络建议,请查看你的存储供应商提供的指南。For storage network recommendations, review the guidelines that are provided by your storage vendor. 有关 CSV 存储的其他注意事项,请参阅本主题后面的 存储和磁盘配置要求For additional considerations about storage for CSV, see Storage and disk configuration requirements later in this topic.

有关故障转移群集的硬件、网络和存储要求的概述,请参阅故障转移群集硬件要求和存储选项For an overview of the hardware, network, and storage requirements for failover clusters, see Failover Clustering Hardware Requirements and Storage Options.

有关 CSV 通信中的 I/O 同步和 I/O 重定向About I/O synchronization and I/O redirection in CSV communication

  • I/o 同步: CSV 允许多个节点同时具有对同一共享存储的读写访问权限。I/O synchronization: CSV enables multiple nodes to have simultaneous read-write access to the same shared storage. 当某个节点在 CSV 卷上执行磁盘输入/输出 (I/O) 时,该节点将直接与存储进行通信(例如,通过存储区域网络 (SAN))。When a node performs disk input/output (I/O) on a CSV volume, the node communicates directly with the storage, for example, through a storage area network (SAN). 但是,在任何时候,称为协调器节点的单个节点 () "拥有" 与该 LUN 关联的物理磁盘资源。However, at any time, a single node (called the coordinator node) "owns" the physical disk resource that is associated with the LUN. CSV 卷的协调器节点作为“磁盘”**** 下的“所有者节点”**** 显示在故障转移群集管理器中。The coordinator node for a CSV volume is displayed in Failover Cluster Manager as Owner Node under Disks. 它还显示在 Add-clustersharedvolume Windows PowerShell cmdlet 的输出中。It also appears in the output of the Get-ClusterSharedVolume Windows PowerShell cmdlet.

    备注

    在 Windows Server 2012 R2 中,CSV 所有权根据每个节点所拥有的 CSV 卷的数量均匀地分布在故障转移群集节点上。In Windows Server 2012 R2, CSV ownership is evenly distributed across the failover cluster nodes based on the number of CSV volumes that each node owns. 此外,当存在以下条件时自动重新平衡所有权:CSV 故障转移、某个节点重新加入该群集、将新节点添加到该群集、重新启动群集节点,或者在关闭故障转移群集后启动该群集。Additionally, ownership is automatically rebalanced when there are conditions such as CSV failover, a node rejoins the cluster, you add a new node to the cluster, you restart a cluster node, or you start the failover cluster after it has been shut down.

    当 CSV 卷上的文件系统中出现某些很小的更改时,则不仅在单个协调器节点上,而且必须在访问 LUN 的每个物理节点上同步此元数据。When certain small changes occur in the file system on a CSV volume, this metadata must be synchronized on each of the physical nodes that access the LUN, not only on the single coordinator node. 例如,当启动、创建或删除 CSV 卷上的虚拟机或迁移虚拟机时,需要在每访问虚拟机的每个物理节点上同步此信息。For example, when a virtual machine on a CSV volume is started, created, or deleted, or when a virtual machine is migrated, this information needs to be synchronized on each of the physical nodes that access the virtual machine. 通过使用 SMB 3.0,这些元数据更新操作会并行发生在群集网络上。These metadata update operations occur in parallel across the cluster networks by using SMB 3.0. 这些操作不需要所有物理节点与共享存储进行通信。These operations do not require all the physical nodes to communicate with the shared storage.

  • I/o 重定向:存储连接故障和某些存储操作可以阻止给定节点直接与存储进行通信。I/O redirection: Storage connectivity failures and certain storage operations can prevent a given node from communicating directly with the storage. 若要在节点无法与存储进行通信时保持功能,该节点通过群集网络将磁盘 I/O 重定向到当前装载该磁盘的协调器节点。To maintain function while the node is not communicating with the storage, the node redirects the disk I/O through a cluster network to the coordinator node where the disk is currently mounted. 如果当前协调器节点遇到存储连接故障,则在建立作为协调器节点的新节点时,所有磁盘 I/O 操作将暂时排队。If the current coordinator node experiences a storage connectivity failure, all disk I/O operations are queued temporarily while a new node is established as a coordinator node.

服务器使用以下的 I/O 重定向模式之一,具体取决于相应情况:The server uses one of the following I/O redirection modes, depending on the situation:

  • 文件系统重定向 在每个卷上进行重定向 — 例如,如果备份应用程序在将 CSV 卷手动放置在重定向 I/O 模式中时拍摄的 CSV 快照。File system redirection Redirection is per volume—for example, when CSV snapshots are taken by a backup application when a CSV volume is manually placed in redirected I/O mode.
  • 阻止重定向 在文件块级别上进行重定向 — 例如,当卷丢失存储连接时。Block redirection Redirection is at the file-block level—for example, when storage connectivity is lost to a volume. 块重定向比文件系统重定向快很多。Block redirection is significantly faster than file system redirection.

在 Windows Server 2012 R2 中,可以基于每个节点查看 CSV 卷的状态。In Windows Server 2012 R2, you can view the state of a CSV volume on a per node basis. 例如,你可以看到 I/O 是直接定向还是重定向,或者 CSV 卷是否不可用。For example, you can see whether I/O is direct or redirected, or whether the CSV volume is unavailable. 如果 CSV 卷在 I/O 重定向模式下,则还可以查看原因。If a CSV volume is in I/O redirected mode, you can also view the reason. 使用 Windows PowerShell cmdlet Get-ClusterSharedVolumeState 以查看此信息。Use the Windows PowerShell cmdlet Get-ClusterSharedVolumeState to view this information.

备注

  • 在 Windows Server 2012 中,由于 CSV 设计中的改进,CSV 在直接 i/o 模式下执行的操作比 Windows Server 2008 R2 中的更多。In Windows Server 2012, because of improvements in CSV design, CSV perform more operations in direct I/O mode than occurred in Windows Server 2008 R2.
  • 由于借助将 CSV 与 SMB 3.0 功能(如 SMB 多通道和 SMB 直通)相集成,重定向 I/O 通信可以在多个群集网络上进行流式传输。Because of the integration of CSV with SMB 3.0 features such as SMB Multichannel and SMB Direct, redirected I/O traffic can stream across multiple cluster networks.
  • 你应该计划群集网络,以允许在 I/O 重定向期间潜在增加协调器节点的网络通信。You should plan your cluster networks to allow for the potential increase in network traffic to the coordinator node during I/O redirection.

存储和磁盘配置要求Storage and disk configuration requirements

若要使用 CSV,你的存储和磁盘必须满足以下要求:To use CSV, your storage and disks must meet the following requirements:

  • 文件系统格式File system format. 在 Windows Server 2012 R2 中,CSV 卷的磁盘或存储空间必须是使用 NTFS 或 ReFS 分区的基本磁盘。In Windows Server 2012 R2, a disk or storage space for a CSV volume must be a basic disk that is partitioned with NTFS or ReFS. 在 Windows Server 2012 中,CSV 卷的磁盘或存储空间必须是使用 NTFS 分区的基本磁盘。In Windows Server 2012, a disk or storage space for a CSV volume must be a basic disk that is partitioned with NTFS.

    CSV 具有以下附加要求:A CSV has the following additional requirements:

    • 在 Windows Server 2012 R2 中,不能将磁盘用于使用 FAT 或 FAT32 进行格式化的 CSV。In Windows Server 2012 R2, you cannot use a disk for a CSV that is formatted with FAT or FAT32.
    • 在 Windows Server 2012 中,不能将磁盘用于使用 FAT、FAT32 或 ReFS 进行格式化的 CSV。In Windows Server 2012, you cannot use a disk for a CSV that is formatted with FAT, FAT32, or ReFS.
    • 如果你想要使用 CSV 的存储空间,则可以配置简单空间或镜像空间。If you want to use a storage space for a CSV, you can configure a simple space or a mirror space. 在 Windows Server 2012 R2 中,还可以配置奇偶校验空间。In Windows Server 2012 R2, you can also configure a parity space. (在 Windows Server 2012 中,CSV 不支持奇偶校验空间。 ) (In Windows Server 2012, CSV does not support parity spaces.)
    • CSV 不能用作仲裁见证磁盘。A CSV cannot be used as a quorum witness disk. 有关群集仲裁的详细信息,请参阅 了解存储空间直通中的仲裁For more information about the cluster quorum, see Understanding Quorum in Storage Spaces Direct.
    • 将磁盘添加为 CSV 后,采用 CSVFS 格式(适用于 CSV 文件系统)指定它。After you add a disk as a CSV, it is designated in the CSVFS format (for CSV File System). 这允许群集和其他软件将 CSV 存储从其他 NTFS 或 ReFS 存储中区分开。This allows the cluster and other software to differentiate the CSV storage from other NTFS or ReFS storage. 通常情况下,CSVFS 支持与 NTFS 或 ReFS 相同的功能。Generally, CSVFS supports the same functionality as NTFS or ReFS. 但是,某些功能不受支持。However, certain features are not supported. 例如,在 Windows Server 2012 R2 中,不能在 CSV 上启用压缩。For example, in Windows Server 2012 R2, you cannot enable compression on CSV. 在 Windows Server 2012 中,不能在 CSV 上启用重复数据删除或压缩。In Windows Server 2012, you cannot enable data deduplication or compression on CSV.
  • 群集中的资源类型Resource type in the cluster. 对于 CSV 卷,必须使用物理磁盘资源类型。For a CSV volume, you must use the Physical Disk resource type. 默认情况下,添加到群集存储的磁盘或存储空间将会采用此方式自动配置。By default, a disk or storage space that is added to cluster storage is automatically configured in this way.

  • 选择群集存储中的 CSV 磁盘或其他磁盘Choice of CSV disks or other disks in cluster storage. 当选择群集虚拟机的一个或多个磁盘时,请考虑将如何使用每个磁盘。When choosing one or more disks for a clustered virtual machine, consider how each disk will be used. 如果将磁盘用于存储由 Hyper-V 创建的文件(如 VHD 文件或配置文件),则可以从 CSV 磁盘或群集存储中的其他可用磁盘中进行选择。If a disk will be used to store files that are created by Hyper-V, such as VHD files or configuration files, you can choose from the CSV disks or the other available disks in cluster storage. 如果磁盘是直接附加到虚拟机的物理磁盘(也称为传递磁盘),则你不能选择 CSV 磁盘,并且必须从群集存储中其他可用磁盘中进行选择。If a disk will be a physical disk that is directly attached to the virtual machine (also called a pass-through disk), you cannot choose a CSV disk, and you must choose from the other available disks in cluster storage.

  • 用于标识磁盘的路径名称Path name for identifying disks. 使用路径名称标识 CSV 中的磁盘。Disks in CSV are identified with a path name. 每个路径在节点的系统驱动器上显示为** \ ClusterStorage**文件夹下带编号的卷。Each path appears to be on the system drive of the node as a numbered volume under the \ClusterStorage folder. 当从群集中的任何节点进行查看时,此路径相同。This path is the same when viewed from any node in the cluster. 可以重命名这些卷(如果需要)。You can rename the volumes if needed.

有关 CSV 的存储要求,请查看你的存储供应商提供的指南。For storage requirements for CSV, review the guidelines that are provided by your storage vendor. 有关 CSV 的其他存储计划注意事项,请参阅本主题后面的计划在故障转移群集中使用 CSVFor additional storage planning considerations for CSV, see Plan to use CSV in a failover cluster later in this topic.

节点要求Node requirements

若要使用 CSV,你的节点必须满足以下要求:To use CSV, your nodes must meet the following requirements:

  • 系统磁盘的驱动器号Drive letter of system disk. 在所有节点上,系统磁盘的驱动器号必须相同。On all nodes, the drive letter for the system disk must be the same.
  • 身份验证协议Authentication protocol. 必须在所有节点上启用 NTLM 协议。The NTLM protocol must be enabled on all nodes. 此项已默认启用。This is enabled by default.

计划在故障转移群集中使用 CSVPlan to use CSV in a failover cluster

本部分列出了在运行 Windows Server 2012 R2 或 Windows Server 2012 的故障转移群集中使用 CSV 的计划注意事项和建议。This section lists planning considerations and recommendations for using CSV in a failover cluster running Windows Server 2012 R2 or Windows Server 2012.

重要

向存储供应商询问有关如何为 CSV 配置特定存储单位的建议。Ask your storage vendor for recommendations about how to configure your specific storage unit for CSV. 如果存储供应商提供的建议与本主题中的信息不同,请使用存储供应商提供的建议。If the recommendations from the storage vendor differ from information in this topic, use the recommendations from the storage vendor.

LUN、卷和 VHD 文件的排列Arrangement of LUNs, volumes, and VHD files

若要最有效地使用 CSV 来为群集虚拟机提供存储,它有助于在你配置物理服务器时查看排列 LUN(磁盘)的方式。To make the best use of CSV to provide storage for clustered virtual machines, it is helpful to review how you would arrange the LUNs (disks) when you configure physical servers. 当你配置相应的虚拟机时,请尝试采用相似方式排列 VHD 文件。When you configure the corresponding virtual machines, try to arrange the VHD files in a similar way.

请考虑你可以如下所示组织磁盘和文件的物理服务器:Consider a physical server for which you would organize the disks and files as follows:

  • 一个物理磁盘上的系统文件(包括页面文件)System files, including a page file, on one physical disk
  • 另一个物理磁盘上的数据文件Data files on another physical disk

对于等效的群集虚拟机,你应采用相似方式整理卷和文件:For an equivalent clustered virtual machine, you should organize the volumes and files in a similar way:

  • 一个 CSV 上的 VHD 文件中的系统文件(包括页面文件)System files, including a page file, in a VHD file on one CSV
  • 另一个 CSV 上的 VHD 文件中的数据文件Data files in a VHD file on another CSV

如果你添加另一台虚拟机,则应该保留该虚拟机上 VHD 的相同排列(如果可能)。If you add another virtual machine, where possible, you should keep the same arrangement for the VHDs on that virtual machine.

LUN 以及卷的数量和大小Number and size of LUNs and volumes

当你为使用 CSV 的故障转移群集计划存储配置时,请考虑以下建议:When you plan the storage configuration for a failover cluster that uses CSV, consider the following recommendations:

  • 若要决定配置多少 LUN,请咨询你的存储供应商。To decide how many LUNs to configure, consult your storage vendor. 例如,你的存储供应商可能会建议你使用一个分区配置每个 LUN,并在其上放置一个 CSV 卷。For example, your storage vendor may recommend that you configure each LUN with one partition and place one CSV volume on it.

  • 对在单个 CSV 卷上受支持的虚拟机的数量没有限制。There are no limitations for the number of virtual machines that can be supported on a single CSV volume. 但是,应该为每台虚拟机考虑你计划在群集和工作负载(每秒 I/O 操作)中使用的虚拟机的数量。However, you should consider the number of virtual machines that you plan to have in the cluster and the workload (I/O operations per second) for each virtual machine. 请考虑以下示例:Consider the following examples:

    • 一个组织正在部署将支持虚拟桌面基础结构 (VDI) 的虚拟机,它的工作负载相对较轻。One organization is deploying virtual machines that will support a virtual desktop infrastructure (VDI), which is a relatively light workload. 该群集使用高性能存储。The cluster uses high-performance storage. 群集管理员在咨询存储供应商后,可确定在每个 CSV 卷上放置相对较大数量的虚拟机。The cluster administrator, after consulting with the storage vendor, decides to place a relatively large number of virtual machines per CSV volume.
    • 另一个组织正在部署将支持大量使用的数据库应用程序的大量虚拟机,它的工作负载较重。Another organization is deploying a large number of virtual machines that will support a heavily used database application, which is a heavier workload. 该群集使用低性能存储。The cluster uses lower-performing storage. 群集管理员在咨询存储供应商后,可确定在每个 CSV 卷上放置相对较小数量的虚拟机。The cluster administrator, after consulting with the storage vendor, decides to place a relatively small number of virtual machines per CSV volume.
  • 当为特定虚拟机计划存储配置时,请考虑虚拟机将支持的服务、应用程序或角色的磁盘要求。When you plan the storage configuration for a particular virtual machine, consider the disk requirements of the service, application, or role that the virtual machine will support. 了解这些要求可帮助你避免导致性能下降的磁盘争用。Understanding these requirements helps you avoid disk contention that can result in poor performance. 虚拟机的存储配置应该非常类似于你将用于运行相同的服务、应用程序或角色的物理服务器的存储配置。The storage configuration for the virtual machine should closely resemble the storage configuration that you would use for a physical server that is running the same service, application, or role. 有关详细信息,请参阅本主题前面部分 的 lun、卷和 VHD 文件的排列方式For more information, see Arrangement of LUNs, volumes, and VHD files earlier in this topic.

    你还可以通过拥有大量独立的物理硬盘的存储来缓解磁盘争用。You can also mitigate disk contention by having storage with a large number of independent physical hard disks. 相应地选择你的存储硬件,并咨询你的供应商如何优化存储的性能。Choose your storage hardware accordingly, and consult with your vendor to optimize the performance of your storage.

  • 根据群集工作负载及其 I/O 操作需求,你可以考虑仅配置一部分虚拟机来访问每个 LUN,同时不会连接其他虚拟机,这些虚拟机专门用于计算操作。Depending on your cluster workloads and their need for I/O operations, you can consider configuring only a percentage of the virtual machines to access each LUN, while other virtual machines do not have connectivity and are instead dedicated to compute operations.

将磁盘添加到故障转移群集上的 CSVAdd a disk to CSV on a failover cluster

默认情况下,CSV 功能在故障转移群集中处于启用状态。The CSV feature is enabled by default in Failover Clustering. 若要将磁盘添加到 CSV,你必须将磁盘添加到群集的“可用存储”**** 组(如果尚未添加),然后将磁盘添加到该群集上 CSV。To add a disk to CSV, you must add a disk to the Available Storage group of the cluster (if it is not already added), and then add the disk to CSV on the cluster. 你可以使用故障转移群集管理器或故障转移群集 Windows PowerShell cmdlet 来执行这些过程。You can use Failover Cluster Manager or the Failover Clusters Windows PowerShell cmdlets to perform these procedures.

将磁盘添加到可用存储Add a disk to Available Storage

  1. 在故障转移群集管理器的控制台树中,展开该群集的名称,然后展开“存储”****。In Failover Cluster Manager, in the console tree, expand the name of the cluster, and then expand Storage.

  2. 右键单击 " 磁盘",然后选择 " 添加磁盘"。Right-click Disks, and then select Add Disk. 将出现一个列表,显示可添加的以供在故障转移群集中使用的磁盘。A list appears showing the disks that can be added for use in a failover cluster.

  3. 选择要添加的磁盘,然后选择 "确定"Select the disk or disks you want to add, and then select OK.

    现在将磁盘分配给“可用存储”**** 组。The disks are now assigned to the Available Storage group.

Windows PowerShell 等效命令 (将磁盘添加到可用存储) Windows PowerShell equivalent commands (add a disk to Available Storage)

下面一个或多个 Windows PowerShell cmdlet 执行的功能与前面的过程相同。The following Windows PowerShell cmdlet or cmdlets perform the same function as the preceding procedure. 在同一行输入每个 cmdlet(即使此处可能因格式限制而出现多行换行)。Enter each cmdlet on a single line, even though they may appear word-wrapped across several lines here because of formatting constraints.

以下示例将标识已准备好添加到群集的磁盘,然后将它们添加到“可用存储”**** 组。The following example identifies the disks that are ready to be added to the cluster, and then adds them to the Available Storage group.

Get-ClusterAvailableDisk | Add-ClusterDisk

将可用存储中的磁盘添加到 CSVAdd a disk in Available Storage to CSV

  1. 在故障转移群集管理器的控制台树中,展开群集名称,展开 " 存储",然后选择 " 磁盘"。In Failover Cluster Manager, in the console tree, expand the name of the cluster, expand Storage, and then select Disks.

  2. 选择分配给 可用存储的一个或多个磁盘,右键单击所选内容,然后选择 " 添加到群集共享卷"。Select one or more disks that are assigned to Available Storage, right-click the selection, and then select Add to Cluster Shared Volumes.

    现在将磁盘分配给群集中的“群集共享卷”**** 组。The disks are now assigned to the Cluster Shared Volume group in the cluster. 在 %SystemDisk%ClusterStorage 文件夹下,向每个群集节点公开作为带编号的卷(装入点)的磁盘。The disks are exposed to each cluster node as numbered volumes (mount points) under the %SystemDisk%ClusterStorage folder. 这些卷将出现在 CSVFS 文件系统中。The volumes appear in the CSVFS file system.

备注

你可以在 %SystemDisk%ClusterStorage 文件夹中重命名 CSV 卷。You can rename CSV volumes in the %SystemDisk%ClusterStorage folder.

Windows PowerShell 等效命令 (将磁盘添加到 CSV) Windows PowerShell equivalent commands (add a disk to CSV)

下面一个或多个 Windows PowerShell cmdlet 执行的功能与前面的过程相同。The following Windows PowerShell cmdlet or cmdlets perform the same function as the preceding procedure. 在同一行输入每个 cmdlet(即使此处可能因格式限制而出现多行换行)。Enter each cmdlet on a single line, even though they may appear word-wrapped across several lines here because of formatting constraints.

以下示例将“可用存储”**** 中的群集磁盘 1 添加到本地群集上的 CSV。The following example adds Cluster Disk 1 in Available Storage to CSV on the local cluster.

Add-ClusterSharedVolume –Name "Cluster Disk 1"

为读密集型工作负载启用 CSV 缓存(可选)Enable the CSV cache for read-intensive workloads (optional)

CSV 缓存通过将系统内存 (RAM) 分配为直写缓存,在只读无缓冲 I/O 操作的块级别上提供了缓存。The CSV cache provides caching at the block level of read-only unbuffered I/O operations by allocating system memory (RAM) as a write-through cache. 缓存管理器不缓存 (无缓冲 i/o 操作。 ) 这可以提高应用程序(例如 Hyper-v)的性能,这些应用程序在访问 VHD 时执行未缓冲的 i/o 操作。(Unbuffered I/O operations are not cached by the cache manager.) This can improve performance for applications such as Hyper-V, which conducts unbuffered I/O operations when accessing a VHD. CSV 缓存可以提高读取请求的性能,而无需缓存写入请求。The CSV cache can boost the performance of read requests without caching write requests. 对于横向扩展文件服务器方案,启用 CSV 缓存也非常有用。Enabling the CSV cache is also useful for Scale-Out File Server scenarios.

备注

我们建议为所有群集 Hyper-V 和横向扩展文件服务器部署启用 CSV 缓存。We recommend that you enable the CSV cache for all clustered Hyper-V and Scale-Out File Server deployments.

在 Windows Server 2019 中,默认情况下,CSV 缓存启用了1个 gibibyte (GiB) 分配。In Windows Server 2019, the CSV cache is on by default with 1 gibibyte (GiB) allocated. 在 Windows Server 2016 和 Windows Server 2012 中,它在默认情况下处于关闭状态。In Windows Server 2016 and Windows Server 2012, it's off by default. 在 Windows Server 2012 R2 中,CSV 缓存在默认情况下处于启用状态;但是,您仍必须分配要保留的块缓存大小。In Windows Server 2012 R2, the CSV cache is enabled by default; however, you must still allocate the size of the block cache to reserve.

下表介绍了控制 CSV 缓存的两个配置设置。The following table describes the two configuration settings that control the CSV cache.

Windows Server 2012 R2 及更高版本Windows Server 2012 R2 and later Windows Server 2012Windows Server 2012 说明Description
BlockCacheSizeBlockCacheSize SharedVolumeBlockCacheSizeInMBSharedVolumeBlockCacheSizeInMB 这是群集公用属性,它允许你定义要为群集中每个节点上的 CSV 保留的内存量(以兆字节为单位)。This is a cluster common property that allows you to define how much memory (in megabytes) to reserve for the CSV cache on each node in the cluster. 例如,如果定义了值 512,则在每个节点上保留 512 MB 的系统内存。For example, if a value of 512 is defined, then 512 MB of system memory is reserved on each node. (在多个群集中,建议使用 512 MB 值。 ) 默认设置对于禁用的) (为0。(In many clusters, 512 MB is a recommended value.) The default setting is 0 (for disabled).
EnableBlockCacheEnableBlockCache CsvEnableBlockCacheCsvEnableBlockCache 这是群集物理磁盘资源的专用属性。This is a private property of the cluster Physical Disk resource. 它允许你在添加到 CSV 的单个磁盘上启用 CSV 缓存。It allows you to enable CSV cache on an individual disk that is added to CSV. 在 Windows Server 2012 中,禁用) 的默认设置为 0 (。In Windows Server 2012, the default setting is 0 (for disabled). 若要在磁盘上启用 CSV 缓存,请配置值 1。To enable CSV cache on a disk, configure a value of 1. 默认情况下,在 Windows Server 2012 R2 中启用此设置。By default, in Windows Server 2012 R2, this setting is enabled.

通过在“群集 CSV 卷缓存”**** 下添加计数器,可在性能监视器中监视 CSV 缓存。You can monitor the CSV cache in Performance Monitor by adding the counters under Cluster CSV Volume Cache.

配置 CSV 缓存Configure the CSV cache

  1. 以管理员身份启动 Windows PowerShell。Start Windows PowerShell as an administrator.

  2. 若要定义要在每个节点上保留的 512 MB 的缓存,请键入以下内容:To define a cache of 512 MB to be reserved on each node, type the following:

    • 对于 Windows Server 2012 R2 及更高版本:For Windows Server 2012 R2 and later:

      (Get-Cluster).BlockCacheSize = 512
      
    • 对于 Windows Server 2012:For Windows Server 2012:

      (Get-Cluster).SharedVolumeBlockCacheSizeInMB = 512
      
  3. 在 Windows Server 2012 中,若要在名为 群集磁盘 1的 csv 上启用 csv 缓存,请输入以下内容:In Windows Server 2012, to enable the CSV cache on a CSV named Cluster Disk 1, enter the following:

    Get-ClusterSharedVolume "Cluster Disk 1" | Set-ClusterParameter CsvEnableBlockCache 1
    

备注

  • 在 Windows Server 2012 中,你只能将总物理 RAM 的20% 分配给 CSV 缓存。In Windows Server 2012, you can allocate only 20% of the total physical RAM to the CSV cache. 在 Windows Server 2012 R2 及更高版本中,最多可分配80%。In Windows Server 2012 R2 and later, you can allocate up to 80%. 由于横向扩展文件服务器通常不受内存的约束,因此可以通过使用 CSV 缓存的额外内存来完成较大的性能增益。Because Scale-Out File Servers are not typically memory constrained, you can accomplish large performance gains by using the extra memory for the CSV cache.
  • 若要避免资源争用,请在修改分配给 CSV 缓存的内存后,重新启动群集中的每个节点。To avoid resource contention, you should restart each node in the cluster after you modify the memory that is allocated to the CSV cache. 在 Windows Server 2012 R2 及更高版本中,不再需要重新启动。In Windows Server 2012 R2 and later, a restart is no longer required.
  • 在单个磁盘上启用或禁用CSV 缓存后,必须使物理磁盘资源脱机并将其重新联机,才能使设置生效。After you enable or disable CSV cache on an individual disk, for the setting to take effect, you must take the Physical Disk resource offline and bring it back online. 默认情况下,在 Windows Server 2012 R2 和更高版本中,默认情况下 (启用 CSV 缓存。 ) (By default, in Windows Server 2012 R2 and later, the CSV cache is enabled.)
  • 有关包括性能计数器相关信息的 CSV 缓存的详细信息,请参阅博客文章 如何启用 CSV 缓存For more information about CSV cache that includes information about performance counters, see the blog post How to Enable CSV Cache.

备份 CsvBacking up CSVs

有多种方法可备份存储在故障转移群集中的 Csv 上的信息。There are multiple methods to back up information that is stored on CSVs in a failover cluster. 你可以使用 Microsoft 备份应用程序或非 Microsoft 应用程序。You can use a Microsoft backup application or a non-Microsoft application. 通常,对于那些使用 NTFS 或 ReFS 格式化的群集存储之外的存储,CSV 不会施加特殊的备份要求。In general, CSV do not impose special backup requirements beyond those for clustered storage formatted with NTFS or ReFS. CSV 备份也不会中断其他 CSV 存储操作。CSV backups also do not disrupt other CSV storage operations.

当你选择 CSV 的备份应用程序和备份计划时,应考虑以下因素:You should consider the following factors when you select a backup application and backup schedule for CSV:

  • 可以从连接到 CSV 卷的任何节点运行 CSV 卷的卷级备份。Volume-level backup of a CSV volume can be run from any node that connects to the CSV volume.
  • 备份应用程序可以使用软件快照或硬件快照。Your backup application can use software snapshots or hardware snapshots. 备份可以使用应用程序一致和崩溃一致的卷影复制服务 (VSS) 快照,具体取决于备份应用程序能否支持它们。Depending on the ability of your backup application to support them, backups can use application-consistent and crash-consistent Volume Shadow Copy Service (VSS) snapshots.
  • 如果你正在备份具有多个运行的虚拟机的 CSV,通常应选择基于管理操作系统的备份方法。If you are backing up CSV that have multiple running virtual machines, you should generally choose a management operating system-based backup method. 如果你的备份应用程序支持它,则可以同时备份多个虚拟机。If your backup application supports it, multiple virtual machines can be backed up simultaneously.
  • CSV 支持运行 Windows Server 2012 R2 备份、Windows Server 2012 备份或 Windows Server 2008 R2 备份的备份请求者。CSV support backup requestors that are running Windows Server 2012 R2 Backup, Windows Server 2012 Backup or Windows Server 2008 R2 Backup. 但是,Windows Server Backup 通常仅提供可能不适合具有较大群集的组织的基本备份解决方案。However, Windows Server Backup generally provides only a basic backup solution that may not be suited for organizations with larger clusters. Windows Server Backup 不支持 CSV 上应用程序一致的虚拟机备份。Windows Server Backup does not support application-consistent virtual machine backup on CSV. 它仅支持崩溃一致的卷级备份。It supports crash-consistent volume-level backup only. (如果你还原崩溃一致的备份,则虚拟机将处于相同的状态。如果虚拟机在进行备份时出现故障,则该虚拟机将处于相同的状态。 ) CSV 卷上的虚拟机备份将会成功,但会记录一个错误事件,指出这不受支持。(If you restore a crash-consistent backup, the virtual machine will be in the same state it was if the virtual machine had crashed at the exact moment that the backup was taken.) A backup of a virtual machine on a CSV volume will succeed, but an error event will be logged indicating that this is not supported.
  • 当备份故障转移群集时,你可能需要管理凭据。You may require administrative credentials when backing up a failover cluster.

重要

请确保仔细查看备份应用程序将备份和还原的数据、它支持的 CSV 功能,以及每个群集节点上的应用程序的资源要求。Be sure to carefully review what data your backup application backs up and restores, which CSV features it supports, and the resource requirements for the application on each cluster node.

警告

如果需要在 CSV 卷上还原备份数据,请注意备份应用程序在群集节点上维护和还原应用程序一致的数据时的功能和限制。If you need to restore the backup data onto a CSV volume, be aware of the capabilities and limitations of the backup application to maintain and restore application-consistent data across the cluster nodes. 例如,借助某些应用程序,如果在不同于备份 CSV 卷所在的节点上还原 CSV,则你可能会无意中覆盖正在进行还原的节点上的有关应用程序状态的重要数据。For example, with some applications, if the CSV is restored on a node that is different from the node where the CSV volume was backed up, you might inadvertently overwrite important data about the application state on the node where the restore is taking place.

详细信息More information