en to zh translation catalogue (114 entries)

note: FIXME type: Title ==
en: Integrating DRBD with Pacemaker clusters
zh: 将DRBD与Pacemaker集成

note: type: Plain text
en: indexterm:[Pacemaker]Using DRBD in conjunction with the Pacemaker cluster stack is arguably DRBD's most frequently found use case. Pacemaker is also one of the applications that make DRBD extremely powerful in a wide variety of usage scenarios.
zh: indexterm:[Pacemaker]结合使用DRBD和Pacemaker集群栈可以说是DRBD最常见的用例。Pacemaker也是使DRBD在各种各样的使用场景中非常强大的应用程序之一。

note: type: Plain text
en: DRBD can be used in Pacemaker clusters in two ways:
zh: DRBD可通过两种方式用于Pacemaker集群:

note: type: Plain text
en: DRBD running as a background-service, used like a SAN; or
zh: 作为后台服务运行的DRBD，用作SAN;或

note: type: Plain text
en: DRBD completely managed by Pacemaker.
zh: 完全由Pacemaker管理的DRBD.

note: type: Plain text
en: Both have a few advantages and disadvantages, these will be discussed below.
zh: 两者都有一些优点和缺点，这些将在下面讨论。

note: type: Plain text
en: It's recommended to have some fencing configured.  If your cluster has communication issues (e.g. network switch loses power) and gets split, the parts might start the services (failover)  and cause a *Split-Brain* when the communication resumes again.
zh: 建议配置一些围栏。如果集群有通信问题（如网络交换机断电）并被分割，那么当通信再次恢复时，这些部分可能会启动服务（故障转移）并导致 *裂脑*  。

note: type: Title ===
en: Pacemaker primer
zh: Pacemaker基础概念

note: type: Plain text
en: Pacemaker is a sophisticated, feature-rich, and widely deployed cluster resource manager for the Linux platform. It comes with a rich set of documentation. In order to understand this chapter, reading the following documents is highly recommended:
zh: Pacemaker是一个复杂的、功能丰富的、广泛部署的Linux平台集群资源管理器。它附带了一组丰富的文档。为了理解本章，强烈建议阅读以下文件：

note: type: Plain text
en: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf[Clusters From Scratch], a step-by-step guide to configuring high availability clusters;
zh: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf[Clusters from Scratch]，配置高可用性集群的分步指南；

note: type: Plain text
en: http://crmsh.github.io/documentation/index.html[CRM CLI (command line interface) tool], a manual for the CRM shell, a simple and intuitive command line interface bundled with Pacemaker;
zh: http://crmsh.github.io/documentation/index.html[CRM CLI（命令行界面）工具]，CRM shell手册，一个与Pacemaker捆绑在一起的简单直观的命令行界面；

note: type: Plain text
en: http://clusterlabs.org/doc/en-US/Pacemaker/1.1/html/Pacemaker_Explained/[Pacemaker Configuration Explained], a reference document explaining the concept and design behind Pacemaker.
zh: http://clusterlabs.org/doc/en-US/Pacemaker/1.1/html/Pacemaker_Explained/[解释Pacemaker配置]，解释Pacemaker背后的概念和设计的参考文件。

note: type: Title ===
en: Using DRBD as a background service in a pacemaker cluster
zh: 在Pacemaker集群中使用DRBD作为后台服务

note: type: Plain text
en: In this section you will see that using autonomous DRBD storage can look like local storage; so integrating in a Pacemaker cluster is done by pointing your mount points at DRBD.
zh: 在本节中，您将看到使用自主DRBD存储看起来像本地存储；因此，在Pacemaker集群中集成是通过将挂载点指向DRBD来完成的。

note: type: Plain text
en: First of all, we will use the `auto-promote` feature of DRBD, so that DRBD automatically sets itself _Primary_ when needed. This will probably apply to all of your resources, so setting that a default in the `common` section makes sense:
zh: 首先，我们将使用DRBD的 `auto-promote` 特性，以便DRBD在需要时自动设置自己的 _Primary_ 。这可能适用于您的所有资源，因此设置 `common` 部分中的默认值是有意义的：

note: type: Plain text
en: Now you just need to use your storage, e.g. via a filesystem:
zh: 现在您只需要使用存储，例如通过文件系统：

note: type: Block title
en: Pacemaker configuration for DRBD-backed MySQL service, using `auto-promote`
zh: 使用 `auto promote` 为DRBD支持的MySQL服务配置Pacemaker

note: type: Plain text
en: Essentially all that is needed is a mountpoint (`/var/lib/mysql` in this example) where the DRBD resource gets mounted.
zh: 实际上，所需要的只是一个挂载点（在本例中为`/var/lib/mysql`），DRBD资源在这里挂载。

note: type: Plain text
en: As long as Pacemaker has control, it will only allow a single instance of that mount across your cluster.
zh: 只要Pacemaker有控制权，它就只允许在集群中安装一个实例。

note: type: Title ===
en: Adding a DRBD-backed service to the cluster configuration, including a master-slave resource
zh: 向集群配置添加DRBD支持的服务，包括主-从资源

note: type: Plain text
en: This section explains how to enable a DRBD-backed service in a Pacemaker cluster.
zh: 本节介绍如何在Pacemaker集群中启用DRBD支持的服务。

note: type: Plain text
en: If you are employing the DRBD OCF resource agent, it is recommended that you defer DRBD startup, shutdown, promotion, and demotion _exclusively_ to the OCF resource agent. That means that you should disable the DRBD init script:
zh: 如果您使用的是DRBD OCF资源代理，建议您将DRBD的启动、关闭、升级和降级 _专门_ 推迟到OCF资源代理。这意味着您应该禁用DRBD init脚本：

note: type: Plain text
en: The `ocf:linbit:drbd` OCF resource agent provides Master/Slave capability, allowing Pacemaker to start and monitor the DRBD resource on multiple nodes and promoting and demoting as needed. You must, however, understand that the DRBD RA disconnects and detaches all DRBD resources it manages on Pacemaker shutdown, and also upon enabling standby mode for a node.
zh: `ocf:linbit:drbd` ocf资源代理提供主/从功能，允许Pacemaker启动和监视多个节点上的drbd资源，并根据需要进行升级和降级。但是，您必须了解，DRBD RA在Pacemaker关闭时，以及在为节点启用待机模式时，会断开并分离它管理的所有DRBD资源。

note: type: Plain text
en: The OCF resource agent which ships with DRBD belongs to the `linbit` provider, and hence installs as `/usr/lib/ocf/resource.d/linbit/drbd`. There is a legacy resource agent that ships as part of the OCF resource agents package, which uses the `heartbeat` provider and installs into `/usr/lib/ocf/resource.d/heartbeat/drbd`. The legacy OCF RA is deprecated and should no longer be used.
zh: DRBD附带的OCF资源代理属于 `linbit` 提供程序，因此安装为`/usr/lib/OCF/resource.d/linbit/DRBD`。有一个遗留资源代理作为OCF资源代理包的一部分提供，它使用 `heartbeat` 提供程序并安装到 `/usr/lib/OCF/resource.d/heartbeat/drbd` 。旧的OCF RA已弃用，不应再使用。

note: type: Plain text
en: In order to enable a DRBD-backed configuration for a MySQL database in a Pacemaker CRM cluster with the `drbd` OCF resource agent, you must create both the necessary resources, and Pacemaker constraints to ensure your service only starts on a previously promoted DRBD resource. You may do so using the `crm` shell, as outlined in the following example:
zh: 为了使用 `DRBD` OCF资源代理为Pacemaker CRM集群中的MySQL数据库启用DRBD支持的配置，必须同时创建必要的资源和Pacemaker约束，以确保您的服务仅在以前升级的DRBD资源上启动。您可以使用 `crm` shell执行此操作，如下例所示：

note: type: Block title
en: Pacemaker configuration for DRBD-backed MySQL service, using a `master-slave` resource
zh: 使用 `master-slave` 资源为DRBD支持的MySQL服务配置Pacemaker

note: type: Plain text
en: After this, your configuration should be enabled. Pacemaker now selects a node on which it promotes the DRBD resource, and then starts the DRBD-backed resource group on that same node.
zh: 在此之后，应启用配置。Pacemaker现在选择一个节点，在该节点上提升DRBD资源，然后在同一节点上启动DRBD支持的资源组。

note: type: Title ===
en: Using resource-level fencing in Pacemaker clusters
zh: 在Pacemaker集群中使用资源级围栏

note: type: Plain text
en: This section outlines the steps necessary to prevent Pacemaker from promoting a DRBD Master/Slave resource when its DRBD replication link has been interrupted. This keeps Pacemaker from starting a service with outdated data and causing an unwanted "time warp" in the process.
zh: 本节概述了在DRBD复制链接中断时防止Pacemaker升级DRBD主/从资源所需的步骤。这使得Pacemaker不会使用过时的数据启动服务，也不会在启动过程中造成不必要的 `时间扭曲` 。

note: type: Plain text
en: In order to enable any resource-level fencing for DRBD, you must add the following lines to your resource configuration:
zh: 要为DRBD启用任何资源级围栏，必须在资源配置中添加以下行：

note: type: Plain text
en: You will also have to make changes to the `handlers` section depending on the cluster infrastructure being used:
zh: 您还必须根据使用的集群基础结构更改 `handlers` 部分：

note: type: Plain text
en: Heartbeat-based Pacemaker clusters can employ the configuration outlined in <<s-pacemaker-fencing-dopd>>.
zh: 基于心跳的Pacemaker集群可以采用<<s-pacemaker-fencing-dopd>>中概述的配置。

note: type: Plain text
en: Both Corosync- and Heartbeat-based clusters can use the functionality explained in <<s-pacemaker-fencing-cib>>.
zh: 基于Corosync和Heartbeat的集群都可以使用<<s-pacemaker-fencing-cib>>中解释的功能。

note: type: Plain text
en: It is absolutely vital to configure at least two independent cluster communications channels for this functionality to work correctly. Heartbeat-based Pacemaker clusters should define at least two cluster communication links in their `ha.cf` configuration files. Corosync clusters should list at least two redundant rings in `corosync.conf`.
zh: 配置至少两个独立的集群通信通道以使此功能正常工作是绝对重要的。基于心跳的Pacemaker集群应该在其 `ha.cf` 配置文件中定义至少两个集群通信链路。Corosync集群应该在 `Corosync.conf` 中列出至少两个冗余环。

note: type: Title ====
en: Resource-level fencing with `dopd`
zh: 使用 `dopd` 设置资源级围栏

note: type: Plain text
en: indexterm:[dopd]In Heartbeat-based Pacemaker clusters, DRBD can use a resources-level fencing facility named the _DRBD outdate-peer daemon_, or `dopd` for short.
zh: indexterm:[dopd]在基于心跳的Pacemaker集群中，DRBD可以使用名为 `DRBD outdate peer daemon` 或简称 `dopd` 的资源级围栏设施。

note: type: Title =====
en: Heartbeat configuration for `dopd`
zh:  `dopd` 的心跳配置

note: type: Plain text
en: To enable dopd, you must add these lines to your indexterm:[ha.cf (Heartbeat configuration file)]`/etc/ha.d/ha.cf` file:
zh: 要启用dopd，必须将这些行添加到indexterm:[ha.cf（Heartbeat configuration file）] `/etc/ha.d/ha.cf` 文件：

note: type: Plain text
en: You may have to adjust ``dopd``'s path according to your preferred distribution. On some distributions and architectures, the correct path is `/usr/lib64/heartbeat/dopd`.
zh: 您可能需要根据您的首选分布调整 `dopd` 的路径。在某些发行版和体系结构中，正确的路径是 `/usr/lib64/heartbeat/dopd` 。

note: type: Plain text
en: After you have made this change and copied `ha.cf` to the peer node, put Pacemaker in maintenance mode and run `/etc/init.d/heartbeat reload` to have Heartbeat re-read its configuration file. Afterwards, you should be able to verify that you now have a running `dopd` process.
zh: 完成此更改并将 `ha.cf` 复制到对等节点后，将Pacemaker置于维护模式并运行 `/etc/init.d/heartbeat reload` 以使heartbeat重新读取其配置文件。之后，您应该能够验证您现在是否有一个正在运行的 `dopd` 进程。

note: type: Plain text
en: You can check for this process either by running `ps ax | grep dopd` or by issuing `killall -0 dopd`.
zh: 您可以通过运行 `ps ax | grep dopd` 或发出 `killall-0 dopd` 来检查此进程。

note: type: Title =====
en: DRBD Configuration for `dopd`
zh: dopd的DRBD配置 `dpod`

note: type: Plain text
en: Once `dopd` is running, add these items to your DRBD resource configuration:
zh: 运行 `dopd` 后，将这些项添加到DRBD资源配置中：

note: type: Plain text
en: As with `dopd`, your distribution may place the `drbd-peer-outdater` binary in `/usr/lib64/heartbeat` depending on your system architecture.
zh: 与 `dopd` 一样，您的发行版可能会将 `drbd peer outdater` 二进制文件放在 `/usr/lib64/heartbeat` 中，具体取决于您的系统架构。

note: type: Plain text
en: Finally, copy your `drbd.conf` to the peer node and issue `drbdadm adjust resource` to reconfigure your resource and reflect your changes.
zh: 最后，将 `drbd.conf` 复制到对等节点并使用 `drbdadm adjust resource` 以重新配置资源并反映所做的更改。

note: type: Title =====
en: Testing `dopd` functionality
zh: 测试 `dopd` 功能

note: type: Plain text
en: To test whether your `dopd` setup is working correctly, interrupt the replication link of a configured and connected resource while Heartbeat services are running normally. You may do so simply by physically unplugging the network link, but that is fairly invasive. Instead, you may insert a temporary `iptables` rule to drop incoming DRBD traffic to the TCP port used by your resource.
zh: 要测试 `dopd` 设置是否正常工作，请在心跳服务正常运行时中断已配置和连接的资源的复制链接。你可以简单地通过物理方式断开网络连接，但这是相当有侵略性的。相反，您可以插入一个临时的 `iptables` 规则，将传入的DRBD流量丢到资源使用的TCP端口。

note: type: Plain text
en: After this, you will be able to observe the resource <<s-connection-states,connection state>> change from indexterm:[connection state]indexterm:[Connected (connection state)] _Connected_ to indexterm:[connection state]indexterm:[Connecting (connection state)]_Connecting_. Allow a few seconds to pass, and you should see the <<s-disk-states,disk state>>become indexterm:[disk state]indexterm:[Outdated (disk state)]_Outdated/DUnknown_. That is what `dopd` is responsible for.
zh: 在此之后，您将能够观察到资源从indexterm:[connection state]indexterm:[Connected (connection state)] _Connected_ 更改为indexterm:[connection state]indexterm:[Connecting (connection state)] _Connecting_ 。稍等几秒钟，您就会看到<<s-connection-states,connection state>>变为indexterm:[disk state]indexterm:[Outdated（disk state）]_Outdated/DUnnown_。这就是 `dopd` 的责任所在。

note: type: Plain text
en: Any attempt to switch the outdated resource to the primary role will fail after this.
zh: 在此之后，将过期资源切换到主要角色的任何尝试都将失败。

note: type: Plain text
en: When re-instituting network connectivity (either by plugging the physical link or by removing the temporary `iptables` rule you inserted previously), the connection state will change to _Connected_, and then promptly to _SyncTarget_ (assuming changes occurred on the primary node during the network interruption). Then you will be able to observe a brief synchronization period, and finally, the previously outdated resource will be marked as indexterm:[disk state]indexterm:[UpToDate (disk state)]_UpToDate_ again.
zh: 重新建立网络连接时（通过插入物理链接或删除先前插入的临时 `iptables` 规则），连接状态将更改为 _Connected_ ，然后立即更改为 _SyncTarget_ （假设在网络中断期间主节点上发生了更改）。然后，您将能够观察到一个简短的同步周期，最后，以前过期的资源将再次标记为indexterm:[disk state]indexterm:[UpToDate（disk state）]_UpToDate_。

note: type: Title ====
en: Resource-level fencing using the Cluster Information Base (CIB)
zh: 使用集群信息库（CIB）的资源级围栏

note: type: Plain text
en: In order to enable resource-level fencing for Pacemaker, you will have to set two options in `drbd.conf`:
zh: 要为Pacemaker启用资源级围栏，必须在 `drbd.conf` 中设置两个选项：

note: type: Plain text
en: Thus, if the DRBD replication link becomes disconnected, the `crm-fence-peer.9.sh` script contacts the cluster manager, determines the Pacemaker Master/Slave resource associated with this DRBD resource, and ensures that the Master/Slave resource no longer gets promoted on any node other than the currently active one. Conversely, when the connection is re-established and DRBD completes its synchronization process, then that constraint is removed and the cluster manager is free to promote the resource on any node again.
zh: 因此，如果DRBD复制链接断开连接， `crm-fence-peer.9.sh` 脚本将联系集群管理器，确定与此DRBD资源关联的Pacemaker主/从资源，并确保主/从资源不再在当前活动的节点以外的任何节点上升级。相反，当重新建立连接并且DRBD完成其同步过程时，则移除该约束，并且集群管理器可以自由地再次提升任何节点上的资源。

note: type: Title ===
en: Using stacked DRBD resources in Pacemaker clusters
zh: 在Pacemaker集群中使用堆叠的DRBD资源

note: type: Plain text
en: Stacking is deprecated in DRBD version 9.x, as more nodes can be implemented on a single level. See <<s-drbdconf-conns>> for details.
zh: DRBD版本9.x中不建议使用堆栈，因为可以在单个级别上实现更多节点。有关详细信息，请参见<<s-drbdconf-conns>>。

note: type: Plain text
en: Stacked resources allow DRBD to be used for multi-level redundancy in multiple-node clusters, or to establish off-site disaster recovery capability. This section describes how to configure DRBD and Pacemaker in such configurations.
zh: 堆叠资源允许DRBD用于多节点集群中的多级冗余，或建立非现场灾难恢复能力。本节描述如何在这种配置中配置DRBD和Pacemaker。

note: type: Title ====
en: Adding off-site disaster recovery to Pacemaker clusters
zh: 将异地灾难恢复添加到Pacemaker集群

note: type: Plain text
en: In this configuration scenario, we would deal with a two-node high availability cluster in one site, plus a separate node which would presumably be housed off-site. The third node acts as a disaster recovery node and is a standalone server. Consider the following illustration to describe the concept.
zh: 在这个配置场景中，我们将在一个站点中处理一个两节点高可用性集群，外加一个单独的节点，该节点可能位于异地。第三个节点充当灾难恢复节点，是一个独立的服务器。考虑下面的插图来描述这个概念。

note: type: Block title
en: DRBD resource stacking in Pacemaker clusters
zh: Pacemaker集群中的DRBD资源叠加

note: type: Plain text
en: In this example, 'alice' and 'bob' form a two-node Pacemaker cluster, whereas 'charlie' is an off-site node not managed by Pacemaker.
zh: 在本例中， `alice` 和 `bob` 组成了一个两节点Pacemaker集群，而 `charlie` 是一个非现场节点，不由Pacemaker管理。

note: type: Plain text
en: To create such a configuration, you would first configure and initialize DRBD resources as described in <<s-three-nodes>>. Then, configure Pacemaker with the following CRM configuration:
zh: 要创建这样的配置，首先要配置和初始化DRBD资源，如<<s-three-nodes>>中所述。然后，使用以下CRM配置配置Pacemaker：

note: type: Plain text
en: Assuming you created this configuration in a temporary file named `/tmp/crm.txt`, you may import it into the live cluster configuration with the following command:
zh: 假设您在名为 `/tmp/crm.txt` 的临时文件中创建了此配置，则可以使用以下命令将其导入实时集群配置：

note: type: Plain text
en: This configuration will ensure that the following actions occur in the correct order on the 'alice'/'bob' cluster:
zh: 此配置将确保在 `alice` / `bob` 集群上按正确顺序执行以下操作：

note: type: Plain text
en: Pacemaker starts the DRBD resource `r0` on both cluster nodes, and promotes one node to the Master (DRBD Primary) role.
zh: Pacemaker在两个集群节点上启动DRBD资源 `r0` ，并将一个节点提升为Master（DRBD Primary）角色。

note: type: Plain text
en: Pacemaker then starts the IP address 192.168.42.1, which the stacked resource is to use for replication to the third node. It does so on the node it has previously promoted to the Master role for `r0` DRBD resource.
zh: Pacemaker然后启动IP地址192.168.42.1，堆叠的资源将用于复制到第三个节点。它在先前提升为 `r0` DRBD资源的Master角色的节点上执行此操作。

note: type: Plain text
en: On the node which now has the Primary role for `r0` and also the replication IP address for `r0-U`, Pacemaker now starts the `r0-U` DRBD resource, which connects and replicates to the off-site node.
zh: 在现在具有 `r0` 的主要角色和 `r0-U` 的复制IP地址的节点上，Pacemaker现在启动 `r0-U` DRBD资源，该资源连接并复制到非站点节点。

note: type: Plain text
en: Pacemaker then promotes the `r0-U` resource to the Primary role too, so it can be used by an application.
zh: 然后Pacemaker也将 `r0-U` 资源提升为主要角色，以便应用程序可以使用它。

note: type: Plain text
en: Thus, this Pacemaker configuration ensures that there is not only full data redundancy between cluster nodes, but also to the third, off-site node.
zh: 因此，这种Pacemaker配置确保集群节点之间不仅有完全的数据冗余，而且还有到第三个非现场节点的数据冗余。

note: type: Plain text
en: This type of setup is usually deployed together with <<s-drbd-proxy,DRBD Proxy>>.
zh: 这种设置通常与<<s-drbd-proxy,DRBD Proxy>>一起部署。

note: type: Title ====
en: Using stacked resources to achieve 4-way redundancy in Pacemaker clusters
zh: 利用堆叠资源实现Pacemaker集群的4路冗余

note: type: Plain text
en: In this configuration, a total of three DRBD resources (two unstacked, one stacked) are used to achieve 4-way storage redundancy. This means that of a 4-node cluster, up to three nodes can fail while still providing service availability.
zh: 在这种配置中，总共使用三个DRBD资源（两个未堆叠，一个堆叠）来实现4路存储冗余。这意味着，对于一个4节点集群，最多有3个节点在仍然提供服务可用性的情况下可能会出现故障。

note: type: Plain text
en: Consider the following illustration to explain the concept.
zh: 考虑下面的插图来解释这个概念。

note: type: Plain text
en: In this example, 'alice', 'bob', 'charlie', and 'daisy' form two two-node Pacemaker clusters. 'alice' and 'bob' form the cluster named `left` and replicate data using a DRBD resource between them, while 'charlie' and 'daisy' do the same with a separate DRBD resource, in a cluster named `right`. A third, stacked DRBD resource connects the two clusters.
zh: 在本例中， `alice` 、 `bob` 、 `charlie` 和 `daisy` 构成两个双节点Pacemaker集群alice和bob组成了名为 `left` 的集群，并在它们之间使用DRBD资源复制数据，而charlie和daisy在名为 `right` 的集群中使用单独的DRBD资源复制数据。第三者，堆叠的DRBD资源连接两个集群。

note: type: Plain text
en: Due to limitations in the Pacemaker cluster manager as of Pacemaker version 1.0.5, it is not possible to create this setup in a single four-node cluster without disabling CIB validation, which is an advanced process not recommended for general-purpose use. It is anticipated that this is being addressed in future Pacemaker releases.
zh: 由于Pacemaker集群管理器自Pacemaker 1.0.5版起的限制，在不禁用CIB验证的情况下无法在单个四节点集群中创建此设置，这是一个高级过程，不建议用于一般用途。预计这将在未来的Pacemaker版本中得到解决。

note: type: Plain text
en: To create such a configuration, you would first configure and initialize DRBD resources as described in <<s-three-nodes>> (except that the remote half of the DRBD configuration is also stacked, not just the local cluster). Then, configure Pacemaker with the following CRM configuration, starting with the cluster `left`:
zh: 要创建这样的配置，您首先要配置和初始化DRBD资源，如<<s-three-nodes>>中所述（除了DRBD配置的远程部分也是堆叠的，而不仅仅是本地集群）。然后，使用以下CRM配置配置Pacemaker，从集群 `left` 开始：

note: type: Plain text
en: After adding this configuration to the CIB, Pacemaker will execute the following actions:
zh: 将此配置添加到CIB后，Pacemaker将执行以下操作：

note: type: Plain text
en: Bring up the DRBD resource `left` replicating between 'alice' and 'bob' promoting the resource to the Master role on one of these nodes.
zh: 调出DRBD资源 `left` ，在 `alice` 和 `bob` 之间复制，将资源提升到其中一个节点上的Master角色。

note: type: Plain text
en: Bring up the IP address 10.9.9.100 (on either 'alice' or 'bob', depending on which of these holds the Master role for the resource `left`).
zh: 调出IP地址10.9.9.100（在 `alice` 或 `bob` 上，具体取决于其中哪一个拥有资源 `left` 的主角色）。

note: type: Plain text
en: Bring up the DRBD resource `stacked` on the same node that holds the just-configured IP address.
zh: 将DRBD资源 `stacked` 调到保存刚才配置的IP地址的同一节点上。

note: type: Plain text
en: Promote the stacked DRBD resource to the Primary role.
zh: 将堆叠的DRBD资源提升为主角色。

note: type: Plain text
en: Now, proceed on the cluster `right` by creating the following configuration:
zh: 现在，在集群 `right` 上继续创建以下配置：

note: type: Plain text
en: Bring up the DRBD resource `right` replicating between 'charlie' and 'daisy', promoting the resource to the Master role on one of these nodes.
zh: 在 `charlie` 和 `daisy` 之间启动DRBD资源 `right` 复制，将资源提升到其中一个节点上的Master角色。

note: type: Plain text
en: Bring up the IP address 10.9.10.101 (on either 'charlie' or 'daisy', depending on which of these holds the Master role for the resource `right`).
zh: 调出IP地址10.9.10.101（在 `charlie` 或 `daisy` 上，具体取决于其中哪个拥有资源 `right` 的主角色）。

note: type: Plain text
en: Leave the stacked DRBD resource in the Secondary role (due to `target-role="Slave"`).
zh: 将堆叠的DRBD资源保留在次要角色中（由于 `target role=` Slave ``）。

note: type: Title ===
en: Configuring DRBD to replicate between two SAN-backed Pacemaker clusters
zh: 配置DRBD以在两个支持SAN的Pacemaker集群之间进行复制

note: type: Plain text
en: indexterm:[IP address, floating peers]This is a somewhat advanced setup usually employed in split-site configurations. It involves two separate Pacemaker clusters, where each cluster has access to a separate Storage Area Network (SAN). DRBD is then used to replicate data stored on that SAN, across an IP link between sites.
zh: indexterm:[IP address, floating peers]这是一种比较高级的设置，通常用于拆分站点配置。它包括两个独立的Pacemaker集群，每个集群都可以访问单独的存储区域网络（SAN）。然后使用DRBD通过站点之间的IP链路复制存储在该SAN上的数据。

note: type: Plain text
en: Consider the following illustration to describe the concept.
zh: 考虑下面的插图来描述这个概念。

note: type: Block title
en: Using DRBD to replicate between SAN-based clusters
zh: 使用DRBD在基于SAN的集群之间进行复制

note: type: Plain text
en: Which of the individual nodes in each site currently acts as the DRBD peer is not explicitly defined -- the DRBD peers <<s-floating-peers,are said to _float_>>; that is, DRBD binds to virtual IP addresses not tied to a specific physical machine.
zh: 每个站点中当前充当DRBD对等点的单个节点中的哪一个没有明确定义 - DRBD对等点<<s-floating-peers, 被称为是 _浮动的_>>,；也就是说，DRBD绑定到没有绑定到特定物理机的虚拟IP地址。

note: type: Plain text
en: This type of setup is usually deployed together with <<s-drbd-proxy,DRBD Proxy>> and/or <<s-truck-based-replication,truck based replication>>.
zh: 这种类型的设置通常与<<s-drbd-proxy,DRBD Proxy>>和/或<<s-truck-based-replication,truck based replication>>一起部署。

note: type: Plain text
en: Since this type of setup deals with shared storage, configuring and testing STONITH is absolutely vital for it to work properly.
zh: 由于这种类型的设置处理共享存储，因此对STONITH进行配置和测试对于它的正常工作至关重要。

note: type: Title ====
en: DRBD resource configuration
zh: DRBD资源配置

note: type: Plain text
en: To enable your DRBD resource to float, configure it in `drbd.conf` in the following fashion:
zh: 要使DRBD资源浮动，请按以下方式在 `DRBD.conf` 中配置它：

note: type: Plain text
en: The `floating` keyword replaces the `on <host>` sections normally found in the resource configuration. In this mode, DRBD identifies peers by IP address and TCP port, rather than by host name. It is important to note that the addresses specified must be virtual cluster IP addresses, rather than physical node IP addresses, for floating to function properly. As shown in the example, in split-site configurations the two floating addresses can be expected to belong to two separate IP networks -- it is thus vital for routers and firewalls to properly allow DRBD replication traffic between the nodes.
zh: `floating` 关键字替换通常在资源配置中找到的 `on <host>` 部分。在这种模式下，DRBD通过IP地址和TCP端口而不是主机名来标识对等点。需要注意的是，指定的地址必须是虚拟集群IP地址，而不是物理节点IP地址，才能使浮点正常工作。如示例所示，在拆分站点配置中，这两个浮动地址可能属于两个独立的IP网络——因此，路由器和防火墙必须正确地允许节点之间的DRBD复制通信。

note: type: Title ====
en: Pacemaker resource configuration
zh: Pacemaker资源配置

note: type: Plain text
en: A DRBD floating peers setup, in terms of Pacemaker configuration, involves the following items (in each of the two Pacemaker clusters involved):
zh: 就Pacemaker配置而言，DRBD浮动对等点设置包括以下各项（在涉及的两个Pacemaker集群中的每一个中）：

note: type: Plain text
en: A virtual cluster IP address.
zh: 虚拟集群IP地址。

note: type: Plain text
en: A master/slave DRBD resource (using the DRBD OCF resource agent).
zh: 主/从DRBD资源（使用DRBD OCF资源代理）。

note: type: Plain text
en: Pacemaker constraints ensuring that resources are started on the correct nodes, and in the correct order.
zh: Pacemaker约束确保资源以正确的顺序在正确的节点上启动。

note: type: Plain text
en: To configure a resource named `mysql` in a floating peers configuration in a 2-node cluster, using the replication address `10.9.9.100`, configure Pacemaker with the following `crm` commands:
zh: 要使用复制地址 `10.9.9.100` 在2节点集群的浮动对等配置中配置名为 `mysql` 的资源，请使用以下 `crm` 命令配置Pacemaker：

note: type: Plain text
en: Bring up the IP address 10.9.9.100 (on either 'alice' or 'bob').
zh: 调出IP地址10.9.9.100（在 `alice` 或 `bob` 上）。

note: type: Plain text
en: Bring up the DRBD resource according to the IP address configured.
zh: 根据配置的IP地址调出DRBD资源。

note: type: Plain text
en: Promote the DRBD resource to the Primary role.
zh: 将DRBD资源提升为主要角色。

note: type: Plain text
en: Then, in order to create the matching configuration in the other cluster, configure _that_ Pacemaker instance with the following commands:
zh: 然后，为了在另一个集群中创建匹配的配置，请使用以下命令配置Pacemaker实例：

note: type: Plain text
en: Bring up the IP address 10.9.10.101 (on either 'charlie' or 'daisy').
zh: 调出IP地址10.9.10.101（在 `charlie` 或 `daisy` 上）。

note: type: Plain text
en: Leave the DRBD resource in the Secondary role (due to `target-role="Slave"`).
zh: 将DRBD资源保留在次要角色中（由于 `target role="Slave" `）。

note: type: Title ====
en: Site fail-over
zh: 站点故障转移

note: type: Plain text
en: In split-site configurations, it may be necessary to transfer services from one site to another. This may be a consequence of a scheduled transition, or of a disastrous event. In case the transition is a normal, anticipated event, the recommended course of action is this:
zh: 在拆分站点配置中，可能需要将服务从一个站点传输到另一个站点。这可能是计划过渡的结果，也可能是灾难性事件的结果。如果转换是正常的预期事件，建议采取以下行动：

note: type: Plain text
en: Connect to the cluster on the site about to relinquish resources, and change the affected DRBD resource's `target-role` attribute from `Master` to `Slave`. This will shut down any resources depending on the Primary role of the DRBD resource, demote it, and continue to run, ready to receive updates from a new Primary.
zh: 连接到站点上即将放弃资源的集群，并将受影响的DRBD资源的 `target role` 属性从 `Master` 更改为 `Slave` 。这将根据DRBD资源的主要角色关闭所有资源，将其降级并继续运行，以便从新的主要资源接收更新。

note: type: Plain text
en: Connect to the cluster on the site about to take over resources, and change the affected DRBD resource's `target-role` attribute from `Slave` to `Master`. This will promote the DRBD resources, start any other Pacemaker resources depending on the Primary role of the DRBD resource, and replicate updates to the remote site.
zh: 连接到站点上即将接管资源的集群，并将受影响的DRBD资源的 `target role` 属性从 `Slave` 更改为 `Master` 。这将提升DRBD资源，根据DRBD资源的主要角色启动任何其他Pacemaker资源，并将更新复制到远程站点。

note: type: Plain text
en: To fail back, simply reverse the procedure.
zh: 若要退回，只需颠倒程序即可。

note: type: Plain text
en: In the event that of a catastrophic outage on the active site, it can be expected that the site is off line and no longer replicated to the backup site. In such an event:
zh: 在活动站点发生灾难性停机的情况下，可以预期该站点已脱机，不再复制到备份站点。在这种情况下：

note: type: Plain text
en: Connect to the cluster on the still-functioning site resources, and change the affected DRBD resource's `target-role` attribute from `Slave` to `Master`. This will promote the DRBD resources, and start any other Pacemaker resources depending on the Primary role of the DRBD resource.
zh: 连接到仍在运行的站点资源上的集群，并将受影响的DRBD资源的 `target role` 属性从 `Slave` 更改为 `Master` 。这将提升DRBD资源，并根据DRBD资源的主要角色启动任何其他Pacemaker资源。

note: type: Plain text
en: When the original site is restored or rebuilt, you may connect the DRBD resources again, and subsequently fail back using the reverse procedure.
zh: 还原或重建原始站点时，可以再次连接DRBD资源，然后使用相反的过程进行故障恢复。
