在容錯移轉叢集中使用叢集共用磁片區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. (請注意,Scale-Out 檔案伺服器不支援 ReFS ) 。如需 Scale-Out 檔案伺服器的詳細資訊,請參閱 應用程式資料向外延展檔案伺服器(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.

注意

如需針對虛擬桌面基礎結構 (VDI) 情況,在 CSV 上使用重複資料刪除的相關資訊,請參閱部落格文章 將重複資刪除部署至 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 來設定網路的 Role 屬性。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 流量在叢集中多個網路之間串流,並利用支援遠端直接記憶體存取 (RMDA) 的網路介面卡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). 根據預設,CSV 流量會使用 SMB 多重通道 。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 multi-subnet 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. 如需詳細資訊,請參閱 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. 它也會出現在 get-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 快照時,當 CSV 磁碟區以手動方式放置在重新導向的 I/O 模式時。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.

重要

  • 請注意,使用在 San 上的 ReFS 預先格式化的 Csv 不會使用直接 i/o,不論是否符合直接 i/o 的所有其他需求。Please note that CSVs pre-formatted with ReFS used on top of SANs will NOT use Direct I/O, regardless of all other requirements for Direct I/O being met.
  • 如果您打算在與 SAN ( 前端) 連接的磁片的連接中使用 CSV,請先將磁片磁碟機格式化為 NTFS,再將它們轉換成 CSV,以利用直接 i/o 的效能優勢。If you plan to use CSV in junction with SAN(-FrontEnd) attached disks, format drives with NTFS before converting them to a CSV to leverage the performance benefits of Direct I/O.
  • 這是設計的行為。This behavior is by design. 請參閱下面的 詳細資訊 一節中連結的頁面。Please consult the pages linked in the section More information below.
  • 因為 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.

注意

  • 在 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. 磁片會以編號磁片區的形式公開給每個叢集節點, (掛接點) 在% SystemDrive% ClusterStorage 資料夾下。The disks are exposed to each cluster node as numbered volumes (mount points) under the %SystemDrive%ClusterStorage folder. 磁碟區會顯示在 CSVFS 檔案系統中。The volumes appear in the CSVFS file system.

注意

您可以重新命名% SystemDrive% ClusterStorage 資料夾中的 CSV 磁片區。You can rename CSV volumes in the %SystemDrive%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個 gib (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 快取保留多少記憶體 (MB)。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 中,若要在名為 Cluster Disk 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 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