部署双节点群集文件服务器Deploying a two-node clustered file server

适用于:Windows Server 2019、Windows Server 2016Applies to: Windows Server 2019, Windows Server 2016

故障转移群集是一组独立的计算机,这些计算机相互协作以提高应用程序和服务的可用性。A failover cluster is a group of independent computers that work together to increase the availability of applications and services. 多台群集服务器(称为节点)通过物理电缆和软件连接。The clustered servers (called nodes) are connected by physical cables and by software. 如果其中一个群集节点出现故障,另一个节点便会开始提供服务(此过程称为故障转移)。If one of the cluster nodes fails, another node begins to provide service (a process known as failover). 从而使用户遭遇服务中断的次数降至最低。Users experience a minimum of disruptions in service.

本指南介绍了安装和配置具有两个节点的常规用途文件服务器故障转移群集的步骤。This guide describes the steps for installing and configuring a general purpose file server failover cluster that has two nodes. 通过在本指南中创建配置,可以了解故障转移群集并熟悉 Windows Server 2019 或 Windows Server 2016 中的故障转移群集管理管理单元接口。By creating the configuration in this guide, you can learn about failover clusters and familiarize yourself with the Failover Cluster Management snap-in interface in Windows Server 2019 or Windows Server 2016.

双节点文件服务器群集概述Overview for a two-node file server cluster

故障转移群集中的服务器可以在各种角色(包括文件服务器、Hyper-v 服务器或数据库服务器的角色)中运行,并且可以为各种其他服务和应用程序提供高可用性。Servers in a failover cluster can function in a variety of roles, including the roles of file server, Hyper-V server, or database server, and can provide high availability for a variety of other services and applications. 本指南描述了如何配置双节点文件服务器群集。This guide describes how to configure a two-node file server cluster.

故障转移群集通常包含一个物理连接到群集中所有服务器的存储单元,但一次只能有一个服务器访问该存储单元中的任何给定卷。A failover cluster usually includes a storage unit that is physically connected to all the servers in the cluster, although any given volume in the storage is only accessed by one server at a time. 下图显示了一个连接到存储单元的双节点故障转移群集。The following diagram shows a two-node failover cluster connected to a storage unit.

双节点群集

向一个群集中节点公开的存储卷或逻辑单元号 (LUN) 不得向其他服务器(包括另一个群集中的服务器)公开。Storage volumes or logical unit numbers (LUNs) exposed to the nodes in a cluster must not be exposed to other servers, including servers in another cluster. 下图说明了这一点。The following diagram illustrates this.

存储中的 Lun

请注意,为了获得任何服务器的最高可用性,请务必遵循服务器管理的最佳方案,例如,仔细管理服务器的物理环境、在完全实现软件更改之前对其进行测试,以及仔细跟踪所有群集服务器上的软件更新和配置更改。Note that for the maximum availability of any server, it is important to follow best practices for server management—for example, carefully managing the physical environment of the servers, testing software changes before fully implementing them, and carefully keeping track of software updates and configuration changes on all clustered servers.

以下方案描述了如何配置文件服务器故障转移群集。The following scenario describes how a file server failover cluster can be configured. 正在共享的文件位于群集存储中,且群集服务器可以作为共享它们的文件服务器。The files being shared are on the cluster storage, and either clustered server can act as the file server that shares them.

故障转移群集中的共享文件夹Shared folders in a failover cluster

以下列表描述了集成到故障转移群集中的共享文件夹配置功能:The following list describes shared folder configuration functionality that is integrated into failover clustering:

  • 显示范围仅限于群集共享文件夹 (没有与非群集共享文件夹混合的) :当用户通过指定群集文件服务器的路径查看共享文件夹时,该显示内容将仅包括属于特定文件服务器角色的共享文件夹。Display is scoped to clustered shared folders only (no mixing with non-clustered shared folders): When a user views shared folders by specifying the path of a clustered file server, the display will include only the shared folders that are part of the specific file server role. 它将排除非群集共享文件夹,并共享发生在群集节点上的独立文件服务器角色的一部分。It will exclude non-clustered shared folders and shares part of separate file server roles that happen to be on a node of the cluster.

  • 基于访问权限的枚举:您可以使用基于访问权限的枚举在用户视图中隐藏特定的文件夹。Access-based enumeration: You can use access-based enumeration to hide a specified folder from users' view. 您可以选择完全不让用户看到文件夹,而不是让用户看到文件夹但无法访问其中的任何内容。Instead of allowing users to see the folder but not access anything on it, you can choose to prevent them from seeing the folder at all. 您可以使用与非群集共享文件夹相同的方式为群集共享文件夹配置基于访问权限的枚举。You can configure access-based enumeration for a clustered shared folder in the same way as for a non-clustered shared folder.

  • 脱机访问:您可以使用与非群集共享文件夹相同的方式为群集共享文件夹配置脱机访问(缓存)。Offline access: You can configure offline access (caching) for a clustered shared folder in the same way as for a nonclustered shared folder.

  • 群集磁盘始终被识别为群集的一部分:无论你使用故障转移群集接口、Windows 资源管理器,还是共享和存储管理管理单元,Windows 都会识别磁盘是否已指定为位于群集存储中。Clustered disks are always recognized as part of the cluster: Whether you use the failover cluster interface, Windows Explorer, or the Share and Storage Management snap-in, Windows recognizes whether a disk has been designated as being in the cluster storage. 如果已在故障转移群集管理中将此类磁盘配置为群集文件服务器的一部分,则可以使用前面提到的任何接口在该磁盘上创建共享。If such a disk has already been configured in Failover Cluster Management as part of a clustered file server, you can then use any of the previously mentioned interfaces to create a share on the disk. 如果没有将这种磁盘配置为群集文件服务器的一部分,则不会错误地在该磁盘上创建共享。If such a disk has not been configured as part of a clustered file server, you cannot mistakenly create a share on it. 而将出现一个错误,指出必须先将该磁盘配置为群集文件服务器的一部分才能进行共享。Instead, an error indicates that the disk must first be configured as part of a clustered file server before it can be shared.

  • 网络文件系统的服务集成: Windows Server 中的文件服务器角色包括称为网络文件系统服务的可选角色服务 (NFS) 。Integration of Services for Network File System: The File Server role in Windows Server includes the optional role service called Services for Network File System (NFS). 通过安装角色服务以及为共享文件夹配置 NFS 服务,您可以创建支持基于 UNIX 的客户端的群集文件服务器。By installing the role service and configuring shared folders with Services for NFS, you can create a clustered file server that supports UNIX-based clients.

双节点故障转移群集要求Requirements for a two-node failover cluster

对于 Windows Server 2016 或 Windows Server 2019 中的故障转移群集,若要将其视为受 Microsoft 支持的解决方案,该解决方案必须符合以下条件。For a failover cluster in Windows Server 2016 or Windows Server 2019 to be considered an officially supported solution by Microsoft, the solution must meet the following criteria.

  • 所有硬件和软件组件必须符合相应徽标的资格要求。All hardware and software components must meet the qualifications for the appropriate logo. 对于 Windows Server 2016,这是 "针对 Windows Server 2016 进行了认证" 徽标。For Windows Server 2016, this is the "Certified for Windows Server 2016" logo. 对于 Windows Server 2019,这是 "针对 Windows Server 2019 进行了认证" 徽标。For Windows Server 2019, this is the "Certified for Windows Server 2019" logo. 有关哪些硬件和软件系统经过认证的详细信息,请访问 Microsoft Windows Server 目录站点。For more information about what hardware and software systems have been certified, please visit the Microsoft Windows Server Catalog site.

  • 完全配置的解决方案 (服务器、网络和存储) 必须通过验证向导中的所有测试,这是 "故障转移群集" 管理单元的一部分。The fully configured solution (servers, network, and storage) must pass all tests in the validation wizard, which is part of the failover cluster snap-in.

双节点故障转移群集需要以下各项。The following will be needed for a two-node failover cluster.

  • 服务器: 建议使用具有相同或相似组件的匹配计算机。Servers: We recommend using matching computers with the same or similar components. 双节点故障转移群集的服务器必须运行同一版本的 Windows Server。The servers for a two-node failover cluster must run the same version of Windows Server. 它们还应该具有相同的软件更新 (修补程序) 。They should also have the same software updates (patches).

  • 网络适配器和电缆: 与故障转移群集解决方案中的其他组件一样,网络硬件必须与 Windows Server 2016 或 Windows Server 2019 兼容。Network Adapters and cable: The network hardware, like other components in the failover cluster solution, must be compatible with Windows Server 2016 or Windows Server 2019. 如果使用 iSCSI,则必须将网络适配器专用于网络通信或 iSCSI,而不能同时用于两者。If you use iSCSI, the network adapters must be dedicated to either network communication or iSCSI, not both. 在连接群集节点的网络基础结构中,应避免出现单点故障。In the network infrastructure that connects your cluster nodes, avoid having single points of failure. 实现这一点有多种方法。There are multiple ways of accomplishing this. 可以通过多个不同网络来连接群集节点。You can connect your cluster nodes by multiple, distinct networks. 或者,还可以使用一个由以下项组成的网络来连接群集节点:成组网络适配器、冗余交换机、冗余路由器或消除了单一故障点的类似硬件。Alternatively, you can connect your cluster nodes with one network that is constructed with teamed network adapters, redundant switches, redundant routers, or similar hardware that removes single points of failure.

    备注

    如果群集节点已连接到单个网络,则网络将通过 "验证配置向导" 中的冗余要求。If the cluster nodes are connected with a single network, the network will pass the redundancy requirement in the Validate a Configuration wizard. 但是,报表将包含一条警告,指出网络不应具有单点故障。However, the report will include a warning that the network should not have a single point of failure.

  • 用于存储的设备控制器或相应适配器:Device Controllers or appropriate adapters for storage:

    • 串行连接 SCSI 或光纤通道: 如果使用串行连接 SCSI 或光纤通道,则在所有群集服务器中,存储堆栈的所有组件都应相同。Serial Attached SCSI or Fibre Channel: If you are using Serial Attached SCSI or Fibre Channel, in all clustered servers, all components of the storage stack should be identical. 要求多路径 i/o (MPIO) 软件和设备特定模块 (DSM) 软件组件相同。It is required that the multipath I/O (MPIO) software and Device Specific Module (DSM) software components be identical. 建议连接到群集存储的大容量存储设备控制器—即主机总线适配器 (HBA)、HBA 驱动程序以及 HBA 固件都相同。It is recommended that the mass-storage device controllers—that is, the host bus adapter (HBA), HBA drivers, and HBA firmware—that are attached to cluster storage be identical. 如果使用不同的 HBA,则应向存储供应商验证你是否采用了其支持或推荐的配置。If you use dissimilar HBAs, you should verify with the storage vendor that you are following their supported or recommended configurations.
    • iSCSI: 如果使用的是 iSCSI,则每台群集服务器必须具有一个或多个专用于 ISCSI 存储的网络适配器或主机总线适配器。iSCSI: If you are using iSCSI, each clustered server must have one or more network adapters or host bus adapters that are dedicated to the ISCSI storage. 不能将用于 iSCSI 的网络用于网络通信。The network you use for iSCSI cannot be used for network communication. 在所有群集服务器中,用于连接 iSCSI 存储目标的网络适配器都应相同,建议使用千兆或更高速度的以太网。In all clustered servers, the network adapters you use to connect to the iSCSI storage target should be identical, and we recommend that you use Gigabit Ethernet or higher.
  • 存储: 必须使用针对 Windows Server 2016 或 Windows Server 2019 认证的共享存储。Storage: You must use shared storage that is certified for Windows Server 2016 or Windows Server 2019.

    对于双节点故障转移群集,如果使用见证磁盘进行仲裁,存储应至少包含两个单独的卷 (Lun) 。For a two-node failover cluster, the storage should contain at least two separate volumes (LUNs) if using a witness disk for quorum. 见证磁盘是群集存储中的一个磁盘,它被指定用于保存群集配置数据库的副本。The witness disk is a disk in the cluster storage that is designated to hold a copy of the cluster configuration database. 对于这两节点群集示例,仲裁配置将是 "节点和磁盘多数"。For this two-node cluster example, the quorum configuration will be Node and Disk Majority. “节点和磁盘多数”意味着每个节点和见证磁盘都包含群集配置的副本,只要这些副本的多数(三个中的两个)可用,该群集就具有仲裁。Node and Disk Majority means that the nodes and the witness disk each contain copies of the cluster configuration, and the cluster has quorum as long as a majority (two out of three) of these copies are available. 其他卷 (LUN) 将包含用户共享的文件。The other volume (LUN) will contain the files that are being shared to users.

    存储要求如下:Storage requirements include the following:

    • 若要使用故障转移群集中包含的本机磁盘支持,请使用基本磁盘(而非动态磁盘)。To use the native disk support included in failover clustering, use basic disks, not dynamic disks.
    • 建议您以 NTFS 格式对分区进行格式化(对于见证磁盘,分区必须为 NTFS 格式)。We recommend that you format the partitions with NTFS (for the witness disk, the partition must be NTFS).
    • 对于磁盘分区形式,可使用主启动记录 (MBR) 或 GUID 分区表 (GPT)。For the partition style of the disk, you can use either master boot record (MBR) or GUID partition table (GPT).
    • 存储必须正确响应特定 SCSI 命令,存储必须遵循名为 SCSI 主要命令 3 (SPC-3) 的标准。The storage must respond correctly to specific SCSI commands, the storage must follow the standard called SCSI Primary Commands-3 (SPC-3). 尤其是,存储必须支持“永久预留”(正如 SPC-3 标准中所规定的)。In particular, the storage must support Persistent Reservations as specified in the SPC-3 standard.
    • 用于存储的微型端口驱动程序必须与 Microsoft Storport 存储驱动程序配合使用。The miniport driver used for the storage must work with the Microsoft Storport storage driver.

使用故障转移群集部署存储区域网络Deploying storage area networks with failover clusters

使用故障转移群集部署存储区域网络 (SAN) 时,应遵循以下准则。When deploying a storage area network (SAN) with a failover cluster, the following guidelines should be observed.

  • 确认存储的证书: 使用Windows Server 目录站点,确认供应商的存储(包括驱动程序、固件和软件)是否经过 Windows server 2016 或 windows server 2019 的认证。Confirm certification of the storage: Using the Windows Server Catalog site, confirm the vendor's storage, including drivers, firmware and software, is certified for Windows Server 2016 or Windows Server 2019.

  • 隔离存储设备,每个设备一个群集: 来自不同群集的服务器不能访问同一存储设备。Isolate storage devices, one cluster per device: Servers from different clusters must not be able to access the same storage devices. 多数情况下,应该通过 LUN 屏蔽或分区将用于一组群集服务器的 LUN 与所有其他服务器隔离。In most cases, a LUN that is used for one set of cluster servers should be isolated from all other servers through LUN masking or zoning.

  • 请考虑使用多路径 i/o 软件: 在高度可用的存储构造中,你可以使用多路径 i/o 软件来部署带有多个主机总线适配器的故障转移群集。Consider using multipath I/O software: In a highly available storage fabric, you can deploy failover clusters with multiple host bus adapters by using multipath I/O software. 这可以提供最高级别的冗余和可用性。This provides the highest level of redundancy and availability. 多路径解决方案必须基于 Microsoft 多路径 i/o (MPIO) 。The multipath solution must be based on Microsoft Multipath I/O (MPIO). 尽管 Windows Server 2016 和 Windows Server 2019 包含一个或多个 Dsm 作为操作系统的一部分,但存储硬件供应商可以为硬件提供 MPIO 设备特定模块 (DSM) 。The storage hardware vendor may supply an MPIO device-specific module (DSM) for your hardware, although Windows Server 2016 and Windows Server 2019 include one or more DSMs as part of the operating system.

网络基础结构和域帐户要求Network infrastructure and domain account requirements

您将需要以下双节点故障转移群集的网络基础结构和拥有以下域权限的管理帐户:You will need the following network infrastructure for a two-node failover cluster and an administrative account with the following domain permissions:

  • 网络设置和 IP 地址: 当你为网络使用相同的网络适配器时,还可以在这些适配器上使用相同的通信设置 (例如,速度、双工模式、流控制和媒体类型) 。Network settings and IP addresses: When you use identical network adapters for a network, also use identical communication settings on those adapters (for example, Speed, Duplex Mode, Flow Control, and Media Type). 此外,还要比较网络适配器和它连接到的交换机之间的设置,并确保设置不冲突。Also, compare the settings between the network adapter and the switch it connects to and make sure that no settings are in conflict.

    如果你有还未路由到网络基础结构其余部分的专用网络,请确保每个专用网络都使用唯一的子网。If you have private networks that are not routed to the rest of your network infrastructure, ensure that each of these private networks uses a unique subnet. 即使你为每个网络适配器提供了唯一的 IP 地址,此操作也是必需的。This is necessary even if you give each network adapter a unique IP address. 例如,如果你在使用一个物理网络的中央办公室中有群集节点并在使用单独物理网络的分支机构中有另一个节点,不要为这两个网络指定 10.0.0.0/24,即使你为每个适配器提供了唯一的 IP 地址。For example, if you have a cluster node in a central office that uses one physical network, and another node in a branch office that uses a separate physical network, do not specify 10.0.0.0/24 for both networks, even if you give each adapter a unique IP address.

    有关网络适配器的详细信息,请参阅本指南前面的双节点故障转移群集的硬件要求。For more information about the network adapters, see Hardware requirements for a two-node failover cluster, earlier in this guide.

  • DNS: 群集中的服务器必须使用域名系统 (DNS) 进行名称解析。DNS: The servers in the cluster must be using Domain Name System (DNS) for name resolution. 可以使用 DNS 动态更新协议。The DNS dynamic update protocol can be used.

  • 域角色: 群集中的所有服务器必须位于同一个 Active Directory 域中。Domain role: All servers in the cluster must be in the same Active Directory domain. 作为最佳做法,所有群集服务器都应具有相同的域角色(成员服务器或域控制器)。As a best practice, all clustered servers should have the same domain role (either member server or domain controller). 推荐的角色为成员服务器。The recommended role is member server.

  • 域控制器: 建议将群集服务器作为成员服务器。Domain controller: We recommend that your clustered servers be member servers. 如果它们是成员服务器,则您需要其他服务器来充当包含故障转移群集的域中的域控制器。If they are, you need an additional server that acts as the domain controller in the domain that contains your failover cluster.

  • 客户端: 根据测试的需要,你可以将一个或多个联网的客户端连接到你创建的故障转移群集,并在将群集文件服务器从一个群集节点移动或故障转移到另一个群集节点时,观察客户端上的影响。Clients: As needed for testing, you can connect one or more networked clients to the failover cluster that you create, and observe the effect on a client when you move or fail over the clustered file server from one cluster node to the other.

  • 用于管理群集的帐户: 首次创建群集或向其中添加服务器时,必须使用对该群集中的所有服务器具有管理员权限的帐户登录到域。Account for administering the cluster: When you first create a cluster or add servers to it, you must be logged on to the domain with an account that has administrator rights and permissions on all servers in that cluster. 该帐户不需要是域管理员帐户,但可以是域用户帐户,该帐户位于每个群集服务器的 Administrators 组中。The account does not need to be a Domain Admins account, but can be a Domain Users account that is in the Administrators group on each clustered server. 此外,如果该帐户不是域管理员帐户,则必须为该帐户 (或该帐户所属的组) 必须在将驻留的域组织单位 (OU) 的 "创建计算机对象" 和 "读取全部属性" 权限中指定该帐户。In addition, if the account is not a Domain Admins account, the account (or the group that the account is a member of) must be given the Create Computer Objects and Read All Properties permissions in the domain organizational unit (OU) that is will reside in.

安装双节点文件服务器群集的步骤Steps for installing a two-node file server cluster

要安装双节点文件服务器故障转移群集,必须完成以下步骤。You must complete the following steps to install a two-node file server failover cluster.

步骤 1:将群集服务器连接到网络和存储Step 1: Connect the cluster servers to the networks and storage

步骤 2:安装故障转移群集功能Step 2: Install the failover cluster feature

步骤 3:验证群集配置Step 3: Validate the cluster configuration

步骤 4:创建群集Step 4: Create the cluster

如果你已经安装了群集节点并想要配置文件服务器故障转移群集,请参阅本指南后面的配置双节点文件服务器群集的步骤。If you have already installed the cluster nodes and want to configure a file server failover cluster, see Steps for configuring a two-node file server cluster, later in this guide.

步骤 1:将群集服务器连接到网络和存储Step 1: Connect the cluster servers to the networks and storage

对于故障转移群集网络,要避免具有单故障点。For a failover cluster network, avoid having single points of failure. 实现这一点有多种方法。There are multiple ways of accomplishing this. 可以通过多个不同网络来连接群集节点。You can connect your cluster nodes by multiple, distinct networks. 或者,您可以通过一个网络来连接群集节点,该网络由成组网络适配器、冗余交换机、冗余路由器或可消除单故障点的相似硬件组成(如果您使用 iSCSI 的网络,则除其他网络之外还必须创建此网络)。Alternatively, you can connect your cluster nodes with one network that is constructed with teamed network adapters, redundant switches, redundant routers, or similar hardware that removes single points of failure (If you use a network for iSCSI, you must create this network in addition to the other networks).

对于双节点文件服务器群集,将服务器连接到群集存储时,必须至少公开两个卷 (LUN)。For a two-node file server cluster, when you connect the servers to the cluster storage, you must expose at least two volumes (LUNs). 你可以根据需要公开其他卷来彻底测试配置。You can expose additional volumes as needed for thorough testing of your configuration. 不要向群集之外的服务器公开群集卷。Do not expose the clustered volumes to servers that are not in the cluster.

将群集服务器连接到网络和存储的步骤To connect the cluster servers to the networks and storage

  1. 有关双节点故障转移群集和网络基础结构的详细信息,请参阅本指南前面的双节点故障转移群集的网络基础结构和域帐户要求。Review the details about networks in Hardware requirements for a two-node failover cluster and Network infrastructure and domain account requirements for a two-node failover cluster, earlier in this guide.

  2. 连接和配置群集中的服务器将使用的网络。Connect and configure the networks that the servers in the cluster will use.

  3. 如果您的测试配置包括客户端或非群集域控制器,请确保这些计算机至少可以通过一个网络连接到群集服务器。If your test configuration includes clients or a non-clustered domain controller, make sure that these computers can connect to the clustered servers through at least one network.

  4. 按照制造商的有关将服务器物理连接到存储的说明进行操作。Follow the manufacturer's instructions for physically connecting the servers to the storage.

  5. 确保向你将群集的服务器公开(仅公开这些服务器)你要在群集中使用的磁盘 (LUN)。Ensure that the disks (LUNs) that you want to use in the cluster are exposed to the servers that you will cluster (and only those servers). 您可使用下列接口之一来公开磁盘或 LUN:You can use any of the following interfaces to expose disks or LUNs:

    • 该接口由存储的制造商提供。The interface provided by the manufacturer of the storage.

    • 如果使用的是 iSCSI,则需要使用相应的 iSCSI 接口。If you are using iSCSI, an appropriate iSCSI interface.

  6. 如果你已购买控制磁盘格式或功能的软件,请按照供应商提供的有关如何将该软件用于 Windows Server 的说明进行操作。If you have purchased software that controls the format or function of the disk, follow instructions from the vendor about how to use that software with Windows Server.

  7. 在要进行群集的一台服务器上,单击“开始”,单击“管理工具”,单击“计算机管理”,然后单击“磁盘管理”。On one of the servers that you want to cluster, click Start, click Administrative Tools, click Computer Management, and then click Disk Management. (如果显示了 "用户帐户控制" 对话框,请确认它显示的是所需操作,然后单击 "继续"。 ) 在 "磁盘管理" 中,确认群集磁盘可见。(If the User Account Control dialog box appears, confirm that the action it displays is what you want, and then click Continue.) In Disk Management, confirm that the cluster disks are visible.

  8. 如果你想要有大于 2 TB 的存储卷,并且使用 Windows 接口来控制磁盘的格式,则将该磁盘转换为称为 GUID 分区表 (GPT) 的分区形式。If you want to have a storage volume larger than 2 terabytes, and you are using the Windows interface to control the format of the disk, convert that disk to the partition style called GUID partition table (GPT). 若要执行此操作,请备份该磁盘上的所有数据,删除磁盘上的所有卷,然后在“磁盘管理”中,右键单击磁盘(而不是一个分区),然后单击“转换为 GPT 磁盘”。To do this, back up any data on the disk, delete all volumes on the disk and then, in Disk Management, right-click the disk (not a partition) and click Convert to GPT Disk. 对于小于 2 TB 的卷,你可以使用称为主启动记录 (MBR) 的分区形式,而不是使用 GPT。For volumes smaller than 2 terabytes, instead of using GPT, you can use the partition style called master boot record (MBR).

  9. 检查公开的任何卷或 LUN 的格式。Check the format of any exposed volume or LUN. 建议格式为 NTFS(对于见证磁盘,必须使用 NTFS)。We recommend NTFS for the format (for the witness disk, you must use NTFS).

步骤2:安装文件服务器角色和故障转移群集功能Step 2: Install the file server role and failover cluster feature

在此步骤中,将安装文件服务器角色和故障转移群集功能。In this step, the file server role and failover cluster feature will be installed. 这两台服务器都必须运行 Windows Server 2016 或 Windows Server 2019。Both servers must be running either Windows Server 2016 or Windows Server 2019.

使用服务器管理器Using Server Manager

  1. 打开服务器管理器并在 "管理" 下拉下,选择 "添加角色和功能"。Open Server Manager and under the Manage drop down, select Add Roles and Features.

    添加功能

  2. 如果 "开始之前" 窗口打开,请选择 "下一步"。If the Before you begin window opens, choose Next.

  3. 对于安装类型,请选择 "基于角色或基于功能的安装",然后选择 "下一步"。For the Installation Type, select Role-based or feature-based installation and Next.

  4. 确保选择 "从服务器池中选择服务器",将突出显示计算机的名称,然后单击 "下一步"。Ensure Select a server from the server pool is selected, the name of the machine is highlighted, and Next.

  5. 对于服务器角色,请在角色列表中打开 "文件服务",选择 "文件服务器",然后单击 "下一步"。For the Server Role, from the list of roles, open File Services, select File Server, and Next.

    添加角色

  6. 对于功能,从功能列表中选择 "故障转移群集"。For the Features, from the list of features, select Failover Clustering. 将显示一个弹出对话框,其中列出了也要安装的管理工具。A popup dialog will show that lists the administration tools also being installed. 保留所有选定的,选择 "添加功能",然后选择 "下一步"。Keep all the selected, choose Add Features and Next.

    添加功能

  7. 在“确认”页上选择“安装”。 On the Confirmation page, select Install.

  8. 安装完成后,重新启动计算机。Once the installation completes, restart the computer.

  9. 在第二台计算机上重复上述步骤。Repeat the steps on the second machine.

使用 PowerShellUsing PowerShell

  1. 右键单击 "开始" 按钮,然后选择 " **Windows powershell (管理") **,打开管理 powershell 会话。Open an administrative PowerShell session by right-clicking the Start button and then selecting Windows PowerShell (Admin).

  2. 若要安装文件服务器角色,请运行以下命令:To install the File Server Role, run the command:

    Install-WindowsFeature -Name FS-FileServer
    
  3. 若要安装故障转移群集功能及其管理工具,请运行以下命令:To install the Failover Clustering feature and its management tools, run the command:

    Install-WindowsFeature -Name Failover-Clustering -IncludeManagementTools
    
  4. 完成后,可以使用以下命令来验证它们是否已安装:Once they have completed, you can verify they are installed with the commands:

    Get-WindowsFeature -Name FS-FileServer
    Get-WindowsFeature -Name Failover-Clustering
    
  5. 确认它们安装完成后,请通过以下命令重新启动计算机:Once verified they are installed, restart the machine with the command:

    Restart-Computer
    
  6. 在第二个服务器上重复上述步骤。Repeat the steps on the second server.

步骤 3:验证群集配置Step 3: Validate the cluster configuration

在创建群集之前,我们强烈建议您验证配置。Before creating a cluster, we strongly recommend that you validate your configuration. 验证帮助您确认服务器、网络和存储的配置是否符合故障转移群集的特定要求。Validation helps you confirm that the configuration of your servers, network, and storage meets a set of specific requirements for failover clusters.

使用故障转移群集管理器Using Failover Cluster Manager

  1. 服务器管理器中,选择 "工具" 下拉菜单,然后选择 "故障转移群集管理器"。From Server Manager, choose the Tools drop down and select Failover Cluster Manager.

  2. 故障转移群集管理器中,请参阅 "管理" 下的中间列,然后选择 "验证配置"。In Failover Cluster Manager, go to the middle column under Management and choose Validate Configuration.

  3. 如果 "开始之前" 窗口打开,请选择 "下一步"。If the Before you begin window opens, choose Next.

  4. 在 "选择服务器或群集" 窗口中,添加将成为群集节点的两台计算机的名称。In the Select Servers or a Cluster window, add in the names of the two machines that will be the nodes of the cluster. 例如,如果名称为节点1和节点2,则输入名称,然后选择 "添加"。For example, if the names are NODE1 and NODE2, enter the name and select Add. 还可以选择 "浏览" 按钮,搜索名称 Active Directory。You can also choose the Browse button to search Active Directory for the names. 一旦 "选定的服务器" 下列出,请选择 "下一步"。Once both are listed under Selected Servers, choose Next.

  5. 在 "测试选项" 窗口中,选择 "**运行所有测试 (建议) **",然后选择 "下一步"。In the Testing Options window, select Run all tests (recommended), and Next.

  6. 在 "确认" 页上,将显示它将检查的所有测试的列表。On the Confirmation page, it will give you the listing of all the tests it will check. 选择 "下一步",将开始测试。Choose Next and the tests will begin.

  7. 完成后,"摘要" 页会在测试运行后出现。Once completed, the Summary page appears after the tests run. 若要查看帮助主题以帮助你解释结果,请单击 "有关群集验证测试的详细信息"。To view Help topics that will help you interpret the results, click More about cluster validation tests.

  8. 在“摘要”页仍然打开时,单击“查看报告”可以阅读测试结果。While still on the Summary page, click View Report and read the test results. 在配置中进行任何必要的更改,然后重新运行测试。Make any necessary changes in the configuration and rerun the tests.
    若要在关闭向导后查看测试结果,请参阅SystemRoot\Cluster\Reports\Validation Report date and time.htmlTo view the results of the tests after you close the wizard, see SystemRoot\Cluster\Reports\Validation Report date and time.html.

  9. 若要在关闭向导后查看关于群集验证的帮助主题,在“故障转移群集管理”中,依次单击“帮助”、“帮助主题”和“内容”选项卡,展开故障转移群集帮助的内容并单击“验证故障转移群集配置”。To view Help topics about cluster validation after you close the wizard, in Failover Cluster Management, click Help, click Help Topics, click the Contents tab, expand the contents for the failover cluster Help, and click Validating a Failover Cluster Configuration.

使用 PowerShellUsing PowerShell

  1. 右键单击 "开始" 按钮,然后选择 " **Windows powershell (管理") **,打开管理 powershell 会话。Open an administrative PowerShell session by right-clicking the Start button and then selecting Windows PowerShell (Admin).

  2. 若要验证计算机 (例如,计算机名称与故障转移群集的节点1和节点 2) ,请运行以下命令:To validate the machines (for example, the machine names being NODE1 and NODE2) for Failover Clustering, run the command:

    Test-Cluster -Node "NODE1","NODE2"
    
  3. 若要在关闭向导后查看测试结果,请查看 SystemRoot\Cluster\Reports 中指定 (的文件 ) ,然后在配置中进行任何必要的更改,然后重新运行测试。To view the results of the tests after you close the wizard, see the file specified (in SystemRoot\Cluster\Reports), then make any necessary changes in the configuration and rerun the tests.

有关详细信息,请参阅验证故障转移群集配置For more info, see Validating a Failover Cluster Configuration.

步骤4:创建群集Step 4: Create the Cluster

以下将在计算机上创建群集,并创建群集。The following will create a cluster out of the machines and configuration you have.

使用故障转移群集管理器Using Failover Cluster Manager

  1. 服务器管理器中,选择 "工具" 下拉菜单,然后选择 "故障转移群集管理器"。From Server Manager, choose the Tools drop down and select Failover Cluster Manager.

  2. 故障转移群集管理器中,请参阅 "管理" 下的中间列,然后选择 "创建群集"。In Failover Cluster Manager, go to the middle column under Management and choose Create Cluster.

  3. 如果 "开始之前" 窗口打开,请选择 "下一步"。If the Before you begin window opens, choose Next.

  4. 在 "选择服务器" 窗口中,添加将成为群集节点的两台计算机的名称。In the Select Servers window, add in the names of the two machines that will be the nodes of the cluster. 例如,如果名称为节点1和节点2,则输入名称,然后选择 "添加"。For example, if the names are NODE1 and NODE2, enter the name and select Add. 还可以选择 "浏览" 按钮,搜索名称 Active Directory。You can also choose the Browse button to search Active Directory for the names. 一旦 "选定的服务器" 下列出,请选择 "下一步"。Once both are listed under Selected Servers, choose Next.

  5. 在 "用于管理群集的访问点" 窗口中,输入要使用的群集的名称。In the Access Point for Administering the Cluster window, input the name of the cluster you will be using. 请注意,这不是你将用于连接到文件共享的名称。Please note that this is not the name you will be using to connect to your file shares with. 这仅用于管理群集。This is for simply administrating the cluster.

    备注

    如果你使用的是静态 IP 地址,则需要选择要使用的网络,并输入它将用于群集名称的 IP 地址。If you are using static IP Addresses, you will need to select the network to use and input the IP Address it will use for the cluster name. 如果使用 DHCP 作为 IP 地址,将自动为你配置 IP 地址。If you are using DHCP for your IP Addresses, the IP Address will be configured automatically for you.

  6. 选择“下一步”。Choose Next.

  7. 在 "确认" 页上,验证已配置的内容,然后选择 "下一步" 以创建群集。On the Confirmation page, verify what you have configured and select Next to create the Cluster.

  8. 在 "摘要" 页上,它将为你提供创建它的配置。On the Summary page, it will give you the configuration it has created. 您可以选择 "查看报告" 以查看创建的报告。You can select View Report to see the report of the creation.

使用 PowerShellUsing PowerShell

  1. 右键单击 "开始" 按钮,然后选择 " **Windows powershell (管理") **,打开管理 powershell 会话。Open an administrative PowerShell session by right-clicking the Start button and then selecting Windows PowerShell (Admin).

  2. 如果使用的是静态 IP 地址,请运行以下命令创建群集。Run the following command to create the cluster if you are using static IP Addresses. 例如,计算机名称是节点1和节点2,群集名称将是群集,IP 地址将为1.1.1.1。For example, the machine names are NODE1 and NODE2, the name of the cluster will be CLUSTER, and the IP Address will be 1.1.1.1.

     New-Cluster -Name CLUSTER -Node "NODE1","NODE2" -StaticAddress 1.1.1.1
    
  3. 如果使用 DHCP 进行 IP 地址,请运行以下命令创建群集。Run the following command to create the cluster if you are using DHCP for IP Addresses. 例如,计算机名称是节点1和节点2,群集的名称将为 "群集"。For example, the machine names are NODE1 and NODE2, and the name of the cluster will be CLUSTER.

    New-Cluster -Name CLUSTER -Node "NODE1","NODE2"
    

配置文件服务器故障转移群集的步骤Steps for configuring a file server failover cluster

若要配置文件服务器故障转移群集,请执行以下步骤。To configure a file server failover cluster, follow the below steps.

  1. 服务器管理器中,选择 "工具" 下拉菜单,然后选择 "故障转移群集管理器"。From Server Manager, choose the Tools drop down and select Failover Cluster Manager.

  2. 当故障转移群集管理器打开时,它应自动引入你创建的群集的名称。When Failover Cluster Manager opens, it should automatically bring in the name of the cluster you created. 如果没有,请在 "管理" 下参阅中间列,然后选择 "连接到群集"。If it does not, go to the middle column under Management and choose Connect to Cluster. 输入创建的群集的名称并确定Input the name of the cluster you created and OK.

  3. 在控制台树中,单击你创建的群集旁边的 ">" 符号,展开其下的项。In the console tree, click the ">" sign next to the cluster that you created to expand the items underneath it.

  4. 右键单击 "角色",然后选择 "配置角色"。Right mouse click on Roles and select Configure Role.

  5. 如果 "开始之前" 窗口打开,请选择 "下一步"。If the Before you begin window opens, choose Next.

  6. 在角色列表中,选择 "文件服务器" 和 "下一步"。In the list of roles, choose File Server and Next.

  7. 对于 "文件服务器类型",请选择 "文件服务器" "常规" 和 "下一步"。For the File Server Type, select File Server for general use and Next.
    有关横向扩展文件服务器的信息,请参阅横向扩展文件服务器概述For info about Scale-Out File Server, see Scale-Out File Server overview.

    文件服务器类型

  8. 在 "客户端访问点" 窗口中,输入要使用的文件服务器的名称。In the Client Access Point window, input the name of the file server you will be using. 请注意,这不是群集的名称。Please note that this is not the name of the cluster. 这适用于文件共享连接。This is for the file share connectivity. 例如,如果我想连接到 \ 服务器,则名称输入为 "服务器"。For example, if I want to connect to \SERVER, the name inputted would be SERVER.

    备注

    如果你使用的是静态 IP 地址,则需要选择要使用的网络,并输入它将用于群集名称的 IP 地址。If you are using static IP Addresses, you will need to select the network to use and input the IP Address it will use for the cluster name. 如果使用 DHCP 作为 IP 地址,将自动为你配置 IP 地址。If you are using DHCP for your IP Addresses, the IP Address will be configured automatically for you.

  9. 选择“下一步”。Choose Next.

  10. 在 "选择存储" 窗口中,选择额外的驱动器 (不包含共享的见证) ,然后单击 "下一步"。In the Select Storage window, select the additional drive (not the witness) that will hold your shares, and click Next.

  11. 在 "确认" 页上,验证你的配置,然后选择 "下一步"。On the Confirmation page, verify your configuration and select Next.

  12. 在 "摘要" 页上,它将为你提供创建它的配置。On the Summary page, it will give you the configuration it has created. 您可以选择 "查看报告" 以查看文件服务器角色创建的报告。You can select View Report to see the report of the file server role creation.

备注

如果角色没有正确添加或启动,则 CNO (群集名称对象) 可能没有在 Active Directory 中创建对象的权限。If the role does not add or start correctly, the CNO (Cluster Name Object) may not have permission to create objects in Active Directory. 文件服务器角色需要与步骤8中提供的 "客户端访问点" 同名的计算机对象。The File Server role requires a Computer object of the same name as the "Client Access Point" provided in Step 8.

  1. 在控制台树中的 "角色" 下,你将看到你创建的新角色列出为你创建的名称。Under Roles in the console tree, you will see the new role you created listed as the name you created. 突出显示后,在右侧的 "操作" 窗格中,选择 "添加共享"。With it highlighted, under the Actions pane on the right, choose Add a share.

  2. 运行共享向导并输入以下内容:Run through the share wizard inputting the following:

    • 共享的类型Type of share it will be
    • 共享文件夹的位置/路径Location/path the folder shared will be
    • 用户将连接到的共享的名称The name of the share users will connect to
    • 其他设置,例如基于访问的枚举、缓存、加密等。Additional settings such as Access-based enumeration, caching, encryption, etc.
    • 文件级权限(如果它们将不是默认值)File level permissions if they will be other than the defaults
  3. 在 "确认" 页上,验证已配置的内容,然后选择 "创建" 以创建文件服务器共享。On the Confirmation page, verify what you have configured, and select Create to create the file server share.

  4. 如果创建了共享,请在 "结果" 页上选择 "关闭"。On the Results page, select Close if it created the share. 如果它无法创建共享,则会出现错误。If it could not create the share, it will give you the errors incurred.

  5. 选择“关闭”。Choose Close.

  6. 对任何其他共享重复此过程。Repeat this process for any additional shares.