# SOME DESCRIPTIVE TITLE # Copyright (C) YEAR Free Software Foundation, Inc. # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 2020-03-02 15:09+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #. FIXME #. type: Title == #: pacemaker.adoc:3 #, no-wrap msgid "Integrating DRBD with Pacemaker clusters" msgstr "将DRBD与Pacemaker集成" #. type: Plain text #: pacemaker.adoc:9 msgid "" "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." msgstr "" "indexterm:[Pacemaker]结合使用DRBD和Pacemaker集群栈可以说是DRBD最常见的用例。Pacemaker也是使DRBD在各种各样的使用场景中非常强大的应用程序之一。" #. type: Plain text #: pacemaker.adoc:11 msgid "DRBD can be used in Pacemaker clusters in two ways:" msgstr "DRBD可通过两种方式用于Pacemaker集群:" #. type: Plain text #: pacemaker.adoc:12 msgid "DRBD running as a background-service, used like a SAN; or" msgstr "作为后台服务运行的DRBD,用作SAN;或" #. type: Plain text #: pacemaker.adoc:13 msgid "DRBD completely managed by Pacemaker." msgstr "完全由Pacemaker管理的DRBD." #. type: Plain text #: pacemaker.adoc:15 msgid "" "Both have a few advantages and disadvantages, these will be discussed below." msgstr "两者都有一些优点和缺点,这些将在下面讨论。" #. type: Plain text #: pacemaker.adoc:20 msgid "" "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." msgstr "" "建议配置一些围栏。如果集群有通信问题(如网络交换机断电)并被分割,那么当通信再次恢复时,这些部分可能会启动服务(故障转移)并导致 *裂脑* 。" #. type: Title === #: pacemaker.adoc:24 #, no-wrap msgid "Pacemaker primer" msgstr "Pacemaker基础概念" #. type: Plain text #: pacemaker.adoc:30 msgid "" "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:" msgstr "" "Pacemaker是一个复杂的、功能丰富的、广泛部署的Linux平台集群资源管理器。它附带了一组丰富的文档。为了理解本章,强烈建议阅读以下文件:" #. type: Plain text #: pacemaker.adoc:34 msgid "" "http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf[Clusters From " "Scratch], a step-by-step guide to configuring high availability clusters;" msgstr "" "http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf[Clusters from " "Scratch],配置高可用性集群的分步指南;" #. type: Plain text #: pacemaker.adoc:37 msgid "" "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;" msgstr "" "http://crmsh.github.io/documentation/index.html[CRM CLI(命令行界面)工具],CRM " "shell手册,一个与Pacemaker捆绑在一起的简单直观的命令行界面;" #. type: Plain text #: pacemaker.adoc:40 msgid "" "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." msgstr "" "http://clusterlabs.org/doc/en-" "US/Pacemaker/1.1/html/Pacemaker_Explained/[解释Pacemaker配置],解释Pacemaker背后的概念和设计的参考文件。" #. type: Title === #: pacemaker.adoc:43 #, no-wrap msgid "Using DRBD as a background service in a pacemaker cluster" msgstr "在Pacemaker集群中使用DRBD作为后台服务" #. type: Plain text #: pacemaker.adoc:48 msgid "" "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." msgstr "在本节中,您将看到使用自主DRBD存储看起来像本地存储;因此,在Pacemaker集群中集成是通过将挂载点指向DRBD来完成的。" #. type: Plain text #: pacemaker.adoc:53 msgid "" "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:" msgstr "" "首先,我们将使用DRBD的 `auto-" "promote` 特性,以便DRBD在需要时自动设置自己的 _Primary_ 。这可能适用于您的所有资源,因此设置 `common` 部分中的默认值是有意义的:" #. type: delimited block - #: pacemaker.adoc:62 #, no-wrap msgid "" "common {\n" " options {\n" " auto-promote yes;\n" " ...\n" " }\n" "}\n" msgstr "" "common {\n" " options {\n" " auto-promote yes;\n" " ...\n" " }\n" "}\n" #. type: Plain text #: pacemaker.adoc:65 msgid "Now you just need to use your storage, e.g. via a filesystem:" msgstr "现在您只需要使用存储,例如通过文件系统:" #. type: Block title #: pacemaker.adoc:66 #, no-wrap msgid "" "Pacemaker configuration for DRBD-backed MySQL service, using `auto-promote`" msgstr "使用 `auto promote` 为DRBD支持的MySQL服务配置Pacemaker" #. type: delimited block - #: pacemaker.adoc:79 #, no-wrap msgid "" "crm configure\n" "crm(live)configure# primitive fs_mysql ocf:heartbeat:Filesystem \\\n" " params device=\"/dev/drbd/by-res/mysql/0\" \\\n" " directory=\"/var/lib/mysql\" fstype=\"ext3\"\n" "crm(live)configure# primitive ip_mysql ocf:heartbeat:IPaddr2 \\\n" " params ip=\"10.9.42.1\" nic=\"eth0\"\n" "crm(live)configure# primitive mysqld lsb:mysqld\n" "crm(live)configure# group mysql fs_mysql ip_mysql mysqld\n" "crm(live)configure# commit\n" "crm(live)configure# exit\n" "bye\n" msgstr "" "crm configure\n" "crm(live)configure# primitive fs_mysql ocf:heartbeat:Filesystem \\\n" " params device=\"/dev/drbd/by-res/mysql/0\" \\\n" " directory=\"/var/lib/mysql\" fstype=\"ext3\"\n" "crm(live)configure# primitive ip_mysql ocf:heartbeat:IPaddr2 \\\n" " params ip=\"10.9.42.1\" nic=\"eth0\"\n" "crm(live)configure# primitive mysqld lsb:mysqld\n" "crm(live)configure# group mysql fs_mysql ip_mysql mysqld\n" "crm(live)configure# commit\n" "crm(live)configure# exit\n" "bye\n" #. type: Plain text #: pacemaker.adoc:83 msgid "" "Essentially all that is needed is a mountpoint (`/var/lib/mysql` in this " "example) where the DRBD resource gets mounted." msgstr "实际上,所需要的只是一个挂载点(在本例中为`/var/lib/mysql`),DRBD资源在这里挂载。" #. type: Plain text #: pacemaker.adoc:86 msgid "" "As long as Pacemaker has control, it will only allow a single instance of " "that mount across your cluster." msgstr "只要Pacemaker有控制权,它就只允许在集群中安装一个实例。" #. type: Title === #: pacemaker.adoc:89 #, no-wrap msgid "" "Adding a DRBD-backed service to the cluster configuration, including a " "master-slave resource" msgstr "向集群配置添加DRBD支持的服务,包括主-从资源" #. type: Plain text #: pacemaker.adoc:93 msgid "" "This section explains how to enable a DRBD-backed service in a Pacemaker " "cluster." msgstr "本节介绍如何在Pacemaker集群中启用DRBD支持的服务。" #. type: Plain text #: pacemaker.adoc:98 msgid "" "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:" msgstr "" "如果您使用的是DRBD OCF资源代理,建议您将DRBD的启动、关闭、升级和降级 _专门_ 推迟到OCF资源代理。这意味着您应该禁用DRBD init脚本:" #. type: delimited block - #: pacemaker.adoc:101 #, no-wrap msgid "chkconfig drbd off\n" msgstr "chkconfig drbd off\n" #. type: Plain text #: pacemaker.adoc:109 msgid "" "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." msgstr "" "`ocf:linbit:drbd` ocf资源代理提供主/从功能,允许Pacemaker启动和监视多个节点上的drbd资源,并根据需要进行升级和降级。但是,您必须了解,DRBD" " RA在Pacemaker关闭时,以及在为节点启用待机模式时,会断开并分离它管理的所有DRBD资源。" #. type: Plain text #: pacemaker.adoc:118 msgid "" "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." msgstr "" "DRBD附带的OCF资源代理属于 `linbit` 提供程序,因此安装为`/usr/lib/OCF/resource.d/linbit/DRBD`。有一个遗留资源代理作为OCF资源代理包的一部分提供,它使用 `heartbeat` 提供程序并安装到 `/usr/lib/OCF/resource.d/heartbeat/drbd` 。旧的OCF" " RA已弃用,不应再使用。" #. type: Plain text #: pacemaker.adoc:125 msgid "" "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:" msgstr "" "为了使用 `DRBD` OCF资源代理为Pacemaker " "CRM集群中的MySQL数据库启用DRBD支持的配置,必须同时创建必要的资源和Pacemaker约束,以确保您的服务仅在以前升级的DRBD资源上启动。您可以使用 `crm` shell执行此操作,如下例所示:" #. type: Block title #: pacemaker.adoc:126 #, no-wrap msgid "" "Pacemaker configuration for DRBD-backed MySQL service, using a `master-" "slave` resource" msgstr "使用 `master-slave` 资源为DRBD支持的MySQL服务配置Pacemaker" #. type: delimited block - #: pacemaker.adoc:151 #, no-wrap msgid "" "crm configure\n" "crm(live)configure# primitive drbd_mysql ocf:linbit:drbd \\\n" " params drbd_resource=\"mysql\" \\\n" " op monitor interval=\"29s\" role=\"Master\" \\\n" " op monitor interval=\"31s\" role=\"Slave\"\n" "crm(live)configure# ms ms_drbd_mysql drbd_mysql \\\n" " meta master-max=\"1\" master-node-max=\"1\" \\\n" " clone-max=\"2\" clone-node-max=\"1\" \\\n" " notify=\"true\"\n" "crm(live)configure# primitive fs_mysql ocf:heartbeat:Filesystem \\\n" " params device=\"/dev/drbd/by-res/mysql/0\" \\\n" " directory=\"/var/lib/mysql\" fstype=\"ext3\"\n" "crm(live)configure# primitive ip_mysql ocf:heartbeat:IPaddr2 \\\n" " params ip=\"10.9.42.1\" nic=\"eth0\"\n" "crm(live)configure# primitive mysqld lsb:mysqld\n" "crm(live)configure# group mysql fs_mysql ip_mysql mysqld\n" "crm(live)configure# colocation mysql_on_drbd \\\n" " inf: mysql ms_drbd_mysql:Master\n" "crm(live)configure# order mysql_after_drbd \\\n" " inf: ms_drbd_mysql:promote mysql:start\n" "crm(live)configure# commit\n" "crm(live)configure# exit\n" "bye\n" msgstr "" "crm configure\n" "crm(live)configure# primitive drbd_mysql ocf:linbit:drbd \\\n" " params drbd_resource=\"mysql\" \\\n" " op monitor interval=\"29s\" role=\"Master\" \\\n" " op monitor interval=\"31s\" role=\"Slave\"\n" "crm(live)configure# ms ms_drbd_mysql drbd_mysql \\\n" " meta master-max=\"1\" master-node-max=\"1\" \\\n" " clone-max=\"2\" clone-node-max=\"1\" \\\n" " notify=\"true\"\n" "crm(live)configure# primitive fs_mysql ocf:heartbeat:Filesystem \\\n" " params device=\"/dev/drbd/by-res/mysql/0\" \\\n" " directory=\"/var/lib/mysql\" fstype=\"ext3\"\n" "crm(live)configure# primitive ip_mysql ocf:heartbeat:IPaddr2 \\\n" " params ip=\"10.9.42.1\" nic=\"eth0\"\n" "crm(live)configure# primitive mysqld lsb:mysqld\n" "crm(live)configure# group mysql fs_mysql ip_mysql mysqld\n" "crm(live)configure# colocation mysql_on_drbd \\\n" " inf: mysql ms_drbd_mysql:Master\n" "crm(live)configure# order mysql_after_drbd \\\n" " inf: ms_drbd_mysql:promote mysql:start\n" "crm(live)configure# commit\n" "crm(live)configure# exit\n" "bye\n" #. type: Plain text #: pacemaker.adoc:156 msgid "" "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." msgstr "在此之后,应启用配置。Pacemaker现在选择一个节点,在该节点上提升DRBD资源,然后在同一节点上启动DRBD支持的资源组。" #. type: Title === #: pacemaker.adoc:158 #, no-wrap msgid "Using resource-level fencing in Pacemaker clusters" msgstr "在Pacemaker集群中使用资源级围栏" #. type: Plain text #: pacemaker.adoc:165 msgid "" "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." msgstr "" "本节概述了在DRBD复制链接中断时防止Pacemaker升级DRBD主/从资源所需的步骤。这使得Pacemaker不会使用过时的数据启动服务,也不会在启动过程中造成不必要的 `时间扭曲` 。" #. type: Plain text #: pacemaker.adoc:168 msgid "" "In order to enable any resource-level fencing for DRBD, you must add the " "following lines to your resource configuration:" msgstr "要为DRBD启用任何资源级围栏,必须在资源配置中添加以下行:" #. type: delimited block - #: pacemaker.adoc:177 #, no-wrap msgid "" "resource {\n" " net {\n" " fencing resource-only;\n" " ...\n" " }\n" "}\n" msgstr "" "resource {\n" " net {\n" " fencing resource-only;\n" " ...\n" " }\n" "}\n" #. type: Plain text #: pacemaker.adoc:181 msgid "" "You will also have to make changes to the `handlers` section depending on " "the cluster infrastructure being used:" msgstr "您还必须根据使用的集群基础结构更改 `handlers` 部分:" #. type: Plain text #: pacemaker.adoc:184 msgid "" "Heartbeat-based Pacemaker clusters can employ the configuration outlined in " "<>." msgstr "基于心跳的Pacemaker集群可以采用<>中概述的配置。" #. type: Plain text #: pacemaker.adoc:186 msgid "" "Both Corosync- and Heartbeat-based clusters can use the functionality " "explained in <>." msgstr "基于Corosync和Heartbeat的集群都可以使用<>中解释的功能。" #. type: Plain text #: pacemaker.adoc:193 msgid "" "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`." msgstr "" "配置至少两个独立的集群通信通道以使此功能正常工作是绝对重要的。基于心跳的Pacemaker集群应该在其 `ha.cf` 配置文件中定义至少两个集群通信链路。Corosync集群应该在 `Corosync.conf` 中列出至少两个冗余环。" #. type: Title ==== #: pacemaker.adoc:195 #, no-wrap msgid "Resource-level fencing with `dopd`" msgstr "使用 `dopd` 设置资源级围栏" #. type: Plain text #: pacemaker.adoc:200 msgid "" "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." msgstr "" "indexterm:[dopd]在基于心跳的Pacemaker集群中,DRBD可以使用名为 `DRBD outdate peer " "daemon` 或简称 `dopd` 的资源级围栏设施。" #. type: Title ===== #: pacemaker.adoc:203 #, no-wrap msgid "Heartbeat configuration for `dopd`" msgstr " `dopd` 的心跳配置" #. type: Plain text #: pacemaker.adoc:207 msgid "" "To enable dopd, you must add these lines to your indexterm:[ha.cf (Heartbeat" " configuration file)]`/etc/ha.d/ha.cf` file:" msgstr "" "要启用dopd,必须将这些行添加到indexterm:[ha.cf(Heartbeat configuration " "file)] `/etc/ha.d/ha.cf` 文件:" #. type: delimited block - #: pacemaker.adoc:212 #, no-wrap msgid "" "respawn hacluster /usr/lib/heartbeat/dopd\n" "apiauth dopd gid=haclient uid=hacluster\n" msgstr "" "respawn hacluster /usr/lib/heartbeat/dopd\n" "apiauth dopd gid=haclient uid=hacluster\n" #. type: Plain text #: pacemaker.adoc:217 msgid "" "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`." msgstr "" "您可能需要根据您的首选分布调整 `dopd` 的路径。在某些发行版和体系结构中,正确的路径是 `/usr/lib64/heartbeat/dopd` 。" #. type: Plain text #: pacemaker.adoc:223 msgid "" "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." msgstr "" "完成此更改并将 `ha.cf` 复制到对等节点后,将Pacemaker置于维护模式并运行 `/etc/init.d/heartbeat " "reload` 以使heartbeat重新读取其配置文件。之后,您应该能够验证您现在是否有一个正在运行的 `dopd` 进程。" #. type: Plain text #: pacemaker.adoc:226 msgid "" "You can check for this process either by running `ps ax | grep dopd` or by " "issuing `killall -0 dopd`." msgstr "您可以通过运行 `ps ax | grep dopd` 或发出 `killall-0 dopd` 来检查此进程。" #. type: Title ===== #: pacemaker.adoc:229 #, no-wrap msgid "DRBD Configuration for `dopd`" msgstr "dopd的DRBD配置 `dpod`" #. type: Plain text #: pacemaker.adoc:233 msgid "" "Once `dopd` is running, add these items to your DRBD resource configuration:" msgstr "运行 `dopd` 后,将这些项添加到DRBD资源配置中:" #. type: delimited block - #: pacemaker.adoc:247 #, no-wrap msgid "" "resource {\n" " handlers {\n" " fence-peer \"/usr/lib/heartbeat/drbd-peer-outdater -t 5\";\n" " ...\n" " }\n" " net {\n" " fencing resource-only;\n" " ...\n" " }\n" " ...\n" "}\n" msgstr "" "resource {\n" " handlers {\n" " fence-peer \"/usr/lib/heartbeat/drbd-peer-outdater -t 5\";\n" " ...\n" " }\n" " net {\n" " fencing resource-only;\n" " ...\n" " }\n" " ...\n" "}\n" #. type: Plain text #: pacemaker.adoc:252 msgid "" "As with `dopd`, your distribution may place the `drbd-peer-outdater` binary " "in `/usr/lib64/heartbeat` depending on your system architecture." msgstr "" "与 `dopd` 一样,您的发行版可能会将 `drbd peer " "outdater` 二进制文件放在 `/usr/lib64/heartbeat` 中,具体取决于您的系统架构。" #. type: Plain text #: pacemaker.adoc:256 msgid "" "Finally, copy your `drbd.conf` to the peer node and issue `drbdadm adjust " "resource` to reconfigure your resource and reflect your changes." msgstr "最后,将 `drbd.conf` 复制到对等节点并使用 `drbdadm adjust resource` 以重新配置资源并反映所做的更改。" #. type: Title ===== #: pacemaker.adoc:258 #, no-wrap msgid "Testing `dopd` functionality" msgstr "测试 `dopd` 功能" #. type: Plain text #: pacemaker.adoc:266 msgid "" "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." msgstr "" "要测试 `dopd` 设置是否正常工作,请在心跳服务正常运行时中断已配置和连接的资源的复制链接。你可以简单地通过物理方式断开网络连接,但这是相当有侵略性的。相反,您可以插入一个临时的 `iptables` 规则,将传入的DRBD流量丢到资源使用的TCP端口。" #. type: Plain text #: pacemaker.adoc:275 msgid "" "After this, you will be able to observe the resource <> 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 " "<>become indexterm:[disk state]indexterm:[Outdated" " (disk state)]_Outdated/DUnknown_. That is what `dopd` is responsible for." msgstr "" "在此之后,您将能够观察到资源从indexterm:[connection state]indexterm:[Connected (connection state)] " "_Connected_ 更改为indexterm:[connection state]indexterm:[Connecting (connection state)] " "_Connecting_ 。稍等几秒钟,您就会看到<>变为indexterm:[disk state]indexterm:[Outdated(disk state)]" "_Outdated/DUnnown_。这就是 `dopd` 的责任所在。" #. type: Plain text #: pacemaker.adoc:278 msgid "" "Any attempt to switch the outdated resource to the primary role will fail " "after this." msgstr "在此之后,将过期资源切换到主要角色的任何尝试都将失败。" #. type: Plain text #: pacemaker.adoc:287 msgid "" "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." msgstr "" "重新建立网络连接时(通过插入物理链接或删除先前插入的临时 `iptables` 规则),连接状态将更改为 _Connected_ ,然后立即更改为 _SyncTarget_ (假设在网络中断期间主节点上发生了更改)。然后,您将能够观察到一个简短的同步周期,最后,以前过期的资源将再次标记为indexterm:[disk" " state]indexterm:[UpToDate(disk state)]_UpToDate_。" #. type: Title ==== #: pacemaker.adoc:290 #, no-wrap msgid "Resource-level fencing using the Cluster Information Base (CIB)" msgstr "使用集群信息库(CIB)的资源级围栏" #. type: Plain text #: pacemaker.adoc:294 msgid "" "In order to enable resource-level fencing for Pacemaker, you will have to " "set two options in `drbd.conf`:" msgstr "要为Pacemaker启用资源级围栏,必须在 `drbd.conf` 中设置两个选项:" #. type: delimited block - #: pacemaker.adoc:312 #, no-wrap msgid "" "resource {\n" " net {\n" " fencing resource-only;\n" " ...\n" " }\n" " handlers {\n" " fence-peer \"/usr/lib/drbd/crm-fence-peer.9.sh\";\n" " unfence-peer \"/usr/lib/drbd/crm-unfence-peer.9.sh\";\n" " # Note: we used to abuse the after-resync-target handler to do the\n" " # unfence, but since 2016 have a dedicated unfence-peer handler.\n" " # Using the after-resync-target handler is wrong in some corner cases.\n" " ...\n" " }\n" " ...\n" "}\n" msgstr "" "resource {\n" " net {\n" " fencing resource-only;\n" " ...\n" " }\n" " handlers {\n" " fence-peer \"/usr/lib/drbd/crm-fence-peer.9.sh\";\n" " unfence-peer \"/usr/lib/drbd/crm-unfence-peer.9.sh\";\n" " # Note: we used to abuse the after-resync-target handler to do the\n" " # unfence, but since 2016 have a dedicated unfence-peer handler.\n" " # Using the after-resync-target handler is wrong in some corner cases.\n" " ...\n" " }\n" " ...\n" "}\n" #. type: Plain text #: pacemaker.adoc:322 msgid "" "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." msgstr "" "因此,如果DRBD复制链接断开连接, `crm-fence-" "peer.9.sh` 脚本将联系集群管理器,确定与此DRBD资源关联的Pacemaker主/从资源,并确保主/从资源不再在当前活动的节点以外的任何节点上升级。相反,当重新建立连接并且DRBD完成其同步过程时,则移除该约束,并且集群管理器可以自由地再次提升任何节点上的资源。" #. type: Title === #: pacemaker.adoc:324 #, no-wrap msgid "Using stacked DRBD resources in Pacemaker clusters" msgstr "在Pacemaker集群中使用堆叠的DRBD资源" #. type: Plain text #: pacemaker.adoc:329 msgid "" "Stacking is deprecated in DRBD version 9.x, as more nodes can be implemented" " on a single level. See <> for details." msgstr "DRBD版本9.x中不建议使用堆栈,因为可以在单个级别上实现更多节点。有关详细信息,请参见<>。" #. type: Plain text #: pacemaker.adoc:334 msgid "" "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." msgstr "堆叠资源允许DRBD用于多节点集群中的多级冗余,或建立非现场灾难恢复能力。本节描述如何在这种配置中配置DRBD和Pacemaker。" #. type: Title ==== #: pacemaker.adoc:337 #, no-wrap msgid "Adding off-site disaster recovery to Pacemaker clusters" msgstr "将异地灾难恢复添加到Pacemaker集群" #. type: Plain text #: pacemaker.adoc:344 msgid "" "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." msgstr "" "在这个配置场景中,我们将在一个站点中处理一个两节点高可用性集群,外加一个单独的节点,该节点可能位于异地。第三个节点充当灾难恢复节点,是一个独立的服务器。考虑下面的插图来描述这个概念。" #. type: Block title #: pacemaker.adoc:345 pacemaker.adoc:436 #, no-wrap msgid "DRBD resource stacking in Pacemaker clusters" msgstr "Pacemaker集群中的DRBD资源叠加" #. type: Target for macro image #: pacemaker.adoc:346 #, no-wrap msgid "images/drbd-resource-stacking-pacemaker-3nodes.svg" msgstr "images/drbd-resource-stacking-pacemaker-3nodes.svg" #. type: Plain text #: pacemaker.adoc:350 msgid "" "In this example, 'alice' and 'bob' form a two-node Pacemaker cluster, " "whereas 'charlie' is an off-site node not managed by Pacemaker." msgstr "在本例中, `alice` 和 `bob` 组成了一个两节点Pacemaker集群,而 `charlie` 是一个非现场节点,不由Pacemaker管理。" #. type: Plain text #: pacemaker.adoc:354 msgid "" "To create such a configuration, you would first configure and initialize " "DRBD resources as described in <>. Then, configure Pacemaker " "with the following CRM configuration:" msgstr "" "要创建这样的配置,首先要配置和初始化DRBD资源,如<>中所述。然后,使用以下CRM配置配置Pacemaker:" #. type: delimited block - #: pacemaker.adoc:359 #, no-wrap msgid "" "primitive p_drbd_r0 ocf:linbit:drbd \\\n" "\tparams drbd_resource=\"r0\"\n" msgstr "" "primitive p_drbd_r0 ocf:linbit:drbd \\\n" "\tparams drbd_resource=\"r0\"\n" #. type: delimited block - #: pacemaker.adoc:362 #, no-wrap msgid "" "primitive p_drbd_r0-U ocf:linbit:drbd \\\n" "\tparams drbd_resource=\"r0-U\"\n" msgstr "" "primitive p_drbd_r0-U ocf:linbit:drbd \\\n" "\tparams drbd_resource=\"r0-U\"\n" #. type: delimited block - #: pacemaker.adoc:365 #, no-wrap msgid "" "primitive p_ip_stacked ocf:heartbeat:IPaddr2 \\\n" "\tparams ip=\"192.168.42.1\" nic=\"eth0\"\n" msgstr "" "primitive p_ip_stacked ocf:heartbeat:IPaddr2 \\\n" "\tparams ip=\"192.168.42.1\" nic=\"eth0\"\n" #. type: delimited block - #: pacemaker.adoc:370 #, no-wrap msgid "" "ms ms_drbd_r0 p_drbd_r0 \\\n" "\tmeta master-max=\"1\" master-node-max=\"1\" \\\n" " clone-max=\"2\" clone-node-max=\"1\" \\\n" " notify=\"true\" globally-unique=\"false\"\n" msgstr "" "ms ms_drbd_r0 p_drbd_r0 \\\n" "\tmeta master-max=\"1\" master-node-max=\"1\" \\\n" " clone-max=\"2\" clone-node-max=\"1\" \\\n" " notify=\"true\" globally-unique=\"false\"\n" #. type: delimited block - #: pacemaker.adoc:375 #, no-wrap msgid "" "ms ms_drbd_r0-U p_drbd_r0-U \\\n" "\tmeta master-max=\"1\" clone-max=\"1\" \\\n" " clone-node-max=\"1\" master-node-max=\"1\" \\\n" " notify=\"true\" globally-unique=\"false\"\n" msgstr "" "ms ms_drbd_r0-U p_drbd_r0-U \\\n" "\tmeta master-max=\"1\" clone-max=\"1\" \\\n" " clone-node-max=\"1\" master-node-max=\"1\" \\\n" " notify=\"true\" globally-unique=\"false\"\n" #. type: delimited block - #: pacemaker.adoc:378 #, no-wrap msgid "" "colocation c_drbd_r0-U_on_drbd_r0 \\\n" " inf: ms_drbd_r0-U ms_drbd_r0:Master\n" msgstr "" "colocation c_drbd_r0-U_on_drbd_r0 \\\n" " inf: ms_drbd_r0-U ms_drbd_r0:Master\n" #. type: delimited block - #: pacemaker.adoc:381 #, no-wrap msgid "" "colocation c_drbd_r0-U_on_ip \\\n" " inf: ms_drbd_r0-U p_ip_stacked\n" msgstr "" "colocation c_drbd_r0-U_on_ip \\\n" " inf: ms_drbd_r0-U p_ip_stacked\n" #. type: delimited block - #: pacemaker.adoc:384 #, no-wrap msgid "" "colocation c_ip_on_r0_master \\\n" " inf: p_ip_stacked ms_drbd_r0:Master\n" msgstr "" "colocation c_ip_on_r0_master \\\n" " inf: p_ip_stacked ms_drbd_r0:Master\n" #. type: delimited block - #: pacemaker.adoc:387 #, no-wrap msgid "" "order o_ip_before_r0-U \\\n" " inf: p_ip_stacked ms_drbd_r0-U:start\n" msgstr "" "order o_ip_before_r0-U \\\n" " inf: p_ip_stacked ms_drbd_r0-U:start\n" #. type: delimited block - #: pacemaker.adoc:390 #, no-wrap msgid "" "order o_drbd_r0_before_r0-U \\\n" " inf: ms_drbd_r0:promote ms_drbd_r0-U:start\n" msgstr "" "order o_drbd_r0_before_r0-U \\\n" " inf: ms_drbd_r0:promote ms_drbd_r0-U:start\n" #. type: Plain text #: pacemaker.adoc:395 pacemaker.adoc:496 msgid "" "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:" msgstr "假设您在名为 `/tmp/crm.txt` 的临时文件中创建了此配置,则可以使用以下命令将其导入实时集群配置:" #. type: delimited block - #: pacemaker.adoc:398 pacemaker.adoc:499 #, no-wrap msgid "crm configure < /tmp/crm.txt\n" msgstr "crm configure < /tmp/crm.txt\n" #. type: Plain text #: pacemaker.adoc:402 msgid "" "This configuration will ensure that the following actions occur in the " "correct order on the 'alice'/'bob' cluster:" msgstr "此配置将确保在 `alice` / `bob` 集群上按正确顺序执行以下操作:" #. type: Plain text #: pacemaker.adoc:405 msgid "" "Pacemaker starts the DRBD resource `r0` on both cluster nodes, and promotes " "one node to the Master (DRBD Primary) role." msgstr "Pacemaker在两个集群节点上启动DRBD资源 `r0` ,并将一个节点提升为Master(DRBD Primary)角色。" #. type: Plain text #: pacemaker.adoc:410 msgid "" "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." msgstr "" "Pacemaker然后启动IP地址192.168.42.1,堆叠的资源将用于复制到第三个节点。它在先前提升为 `r0` DRBD资源的Master角色的节点上执行此操作。" #. type: Plain text #: pacemaker.adoc:415 msgid "" "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." msgstr "" "在现在具有 `r0` 的主要角色和 `r0-U` 的复制IP地址的节点上,Pacemaker现在启动 `r0-U` DRBD资源,该资源连接并复制到非站点节点。" #. type: Plain text #: pacemaker.adoc:418 msgid "" "Pacemaker then promotes the `r0-U` resource to the Primary role too, so it " "can be used by an application." msgstr "然后Pacemaker也将 `r0-U` 资源提升为主要角色,以便应用程序可以使用它。" #. type: Plain text #: pacemaker.adoc:422 msgid "" "Thus, this Pacemaker configuration ensures that there is not only full data " "redundancy between cluster nodes, but also to the third, off-site node." msgstr "因此,这种Pacemaker配置确保集群节点之间不仅有完全的数据冗余,而且还有到第三个非现场节点的数据冗余。" #. type: Plain text #: pacemaker.adoc:425 msgid "" "This type of setup is usually deployed together with <>." msgstr "这种设置通常与<>一起部署。" #. type: Title ==== #: pacemaker.adoc:427 #, no-wrap msgid "" "Using stacked resources to achieve 4-way redundancy in Pacemaker clusters" msgstr "利用堆叠资源实现Pacemaker集群的4路冗余" #. type: Plain text #: pacemaker.adoc:433 msgid "" "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." msgstr "" "在这种配置中,总共使用三个DRBD资源(两个未堆叠,一个堆叠)来实现4路存储冗余。这意味着,对于一个4节点集群,最多有3个节点在仍然提供服务可用性的情况下可能会出现故障。" #. type: Plain text #: pacemaker.adoc:435 msgid "Consider the following illustration to explain the concept." msgstr "考虑下面的插图来解释这个概念。" #. type: Target for macro image #: pacemaker.adoc:437 #, no-wrap msgid "images/drbd-resource-stacking-pacemaker-4nodes.svg" msgstr "images/drbd-resource-stacking-pacemaker-4nodes.svg" #. type: Plain text #: pacemaker.adoc:445 msgid "" "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." msgstr "" "在本例中, `alice` 、 `bob` 、 `charlie` 和 `daisy` 构成两个双节点Pacemaker集群alice和bob组成了名为 `left` 的集群,并在它们之间使用DRBD资源复制数据,而charlie和daisy在名为 `right` 的集群中使用单独的DRBD资源复制数据。第三者,堆叠的DRBD资源连接两个集群。" #. type: Plain text #: pacemaker.adoc:451 msgid "" "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." msgstr "" "由于Pacemaker集群管理器自Pacemaker " "1.0.5版起的限制,在不禁用CIB验证的情况下无法在单个四节点集群中创建此设置,这是一个高级过程,不建议用于一般用途。预计这将在未来的Pacemaker版本中得到解决。" #. type: Plain text #: pacemaker.adoc:457 msgid "" "To create such a configuration, you would first configure and initialize " "DRBD resources as described in <> (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`:" msgstr "" "要创建这样的配置,您首先要配置和初始化DRBD资源,如<>中所述(除了DRBD配置的远程部分也是堆叠的,而不仅仅是本地集群)。然后,使用以下CRM配置配置Pacemaker,从集群 `left` 开始:" #. type: delimited block - #: pacemaker.adoc:462 #, no-wrap msgid "" "primitive p_drbd_left ocf:linbit:drbd \\\n" "\tparams drbd_resource=\"left\"\n" msgstr "" "primitive p_drbd_left ocf:linbit:drbd \\\n" "\tparams drbd_resource=\"left\"\n" #. type: delimited block - #: pacemaker.adoc:465 pacemaker.adoc:526 #, no-wrap msgid "" "primitive p_drbd_stacked ocf:linbit:drbd \\\n" "\tparams drbd_resource=\"stacked\"\n" msgstr "" "primitive p_drbd_stacked ocf:linbit:drbd \\\n" "\tparams drbd_resource=\"stacked\"\n" #. type: delimited block - #: pacemaker.adoc:468 #, no-wrap msgid "" "primitive p_ip_stacked_left ocf:heartbeat:IPaddr2 \\\n" "\tparams ip=\"10.9.9.100\" nic=\"eth0\"\n" msgstr "" "primitive p_ip_stacked_left ocf:heartbeat:IPaddr2 \\\n" "\tparams ip=\"10.9.9.100\" nic=\"eth0\"\n" #. type: delimited block - #: pacemaker.adoc:473 #, no-wrap msgid "" "ms ms_drbd_left p_drbd_left \\\n" "\tmeta master-max=\"1\" master-node-max=\"1\" \\\n" " clone-max=\"2\" clone-node-max=\"1\" \\\n" " notify=\"true\"\n" msgstr "" "ms ms_drbd_left p_drbd_left \\\n" "\tmeta master-max=\"1\" master-node-max=\"1\" \\\n" " clone-max=\"2\" clone-node-max=\"1\" \\\n" " notify=\"true\"\n" #. type: delimited block - #: pacemaker.adoc:478 #, no-wrap msgid "" "ms ms_drbd_stacked p_drbd_stacked \\\n" "\tmeta master-max=\"1\" clone-max=\"1\" \\\n" " clone-node-max=\"1\" master-node-max=\"1\" \\\n" " notify=\"true\" target-role=\"Master\"\n" msgstr "" "ms ms_drbd_stacked p_drbd_stacked \\\n" "\tmeta master-max=\"1\" clone-max=\"1\" \\\n" " clone-node-max=\"1\" master-node-max=\"1\" \\\n" " notify=\"true\" target-role=\"Master\"\n" #. type: delimited block - #: pacemaker.adoc:481 #, no-wrap msgid "" "colocation c_ip_on_left_master \\\n" " inf: p_ip_stacked_left ms_drbd_left:Master\n" msgstr "" "colocation c_ip_on_left_master \\\n" " inf: p_ip_stacked_left ms_drbd_left:Master\n" #. type: delimited block - #: pacemaker.adoc:484 #, no-wrap msgid "" "colocation c_drbd_stacked_on_ip_left \\\n" " inf: ms_drbd_stacked p_ip_stacked_left\n" msgstr "" "colocation c_drbd_stacked_on_ip_left \\\n" " inf: ms_drbd_stacked p_ip_stacked_left\n" #. type: delimited block - #: pacemaker.adoc:487 #, no-wrap msgid "" "order o_ip_before_stacked_left \\\n" " inf: p_ip_stacked_left ms_drbd_stacked:start\n" msgstr "" "order o_ip_before_stacked_left \\\n" " inf: p_ip_stacked_left ms_drbd_stacked:start\n" #. type: delimited block - #: pacemaker.adoc:490 #, no-wrap msgid "" "order o_drbd_left_before_stacked_left \\\n" " inf: ms_drbd_left:promote ms_drbd_stacked:start\n" msgstr "" "order o_drbd_left_before_stacked_left \\\n" " inf: ms_drbd_left:promote ms_drbd_stacked:start\n" #. type: Plain text #: pacemaker.adoc:503 pacemaker.adoc:555 pacemaker.adoc:666 pacemaker.adoc:695 msgid "" "After adding this configuration to the CIB, Pacemaker will execute the " "following actions:" msgstr "将此配置添加到CIB后,Pacemaker将执行以下操作:" #. type: Plain text #: pacemaker.adoc:506 msgid "" "Bring up the DRBD resource `left` replicating between 'alice' and 'bob' " "promoting the resource to the Master role on one of these nodes." msgstr "调出DRBD资源 `left` ,在 `alice` 和 `bob` 之间复制,将资源提升到其中一个节点上的Master角色。" #. type: Plain text #: pacemaker.adoc:510 msgid "" "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`)." msgstr "调出IP地址10.9.9.100(在 `alice` 或 `bob` 上,具体取决于其中哪一个拥有资源 `left` 的主角色)。" #. type: Plain text #: pacemaker.adoc:513 pacemaker.adoc:566 msgid "" "Bring up the DRBD resource `stacked` on the same node that holds the just-" "configured IP address." msgstr "将DRBD资源 `stacked` 调到保存刚才配置的IP地址的同一节点上。" #. type: Plain text #: pacemaker.adoc:515 msgid "Promote the stacked DRBD resource to the Primary role." msgstr "将堆叠的DRBD资源提升为主角色。" #. type: Plain text #: pacemaker.adoc:518 msgid "" "Now, proceed on the cluster `right` by creating the following configuration:" msgstr "现在,在集群 `right` 上继续创建以下配置:" #. type: delimited block - #: pacemaker.adoc:523 #, no-wrap msgid "" "primitive p_drbd_right ocf:linbit:drbd \\\n" "\tparams drbd_resource=\"right\"\n" msgstr "" "primitive p_drbd_right ocf:linbit:drbd \\\n" "\tparams drbd_resource=\"right\"\n" #. type: delimited block - #: pacemaker.adoc:529 #, no-wrap msgid "" "primitive p_ip_stacked_right ocf:heartbeat:IPaddr2 \\\n" "\tparams ip=\"10.9.10.101\" nic=\"eth0\"\n" msgstr "" "primitive p_ip_stacked_right ocf:heartbeat:IPaddr2 \\\n" "\tparams ip=\"10.9.10.101\" nic=\"eth0\"\n" #. type: delimited block - #: pacemaker.adoc:534 #, no-wrap msgid "" "ms ms_drbd_right p_drbd_right \\\n" "\tmeta master-max=\"1\" master-node-max=\"1\" \\\n" " clone-max=\"2\" clone-node-max=\"1\" \\\n" " notify=\"true\"\n" msgstr "" "ms ms_drbd_right p_drbd_right \\\n" "\tmeta master-max=\"1\" master-node-max=\"1\" \\\n" " clone-max=\"2\" clone-node-max=\"1\" \\\n" " notify=\"true\"\n" #. type: delimited block - #: pacemaker.adoc:539 #, no-wrap msgid "" "ms ms_drbd_stacked p_drbd_stacked \\\n" "\tmeta master-max=\"1\" clone-max=\"1\" \\\n" " clone-node-max=\"1\" master-node-max=\"1\" \\\n" " notify=\"true\" target-role=\"Slave\"\n" msgstr "" "ms ms_drbd_stacked p_drbd_stacked \\\n" "\tmeta master-max=\"1\" clone-max=\"1\" \\\n" " clone-node-max=\"1\" master-node-max=\"1\" \\\n" " notify=\"true\" target-role=\"Slave\"\n" #. type: delimited block - #: pacemaker.adoc:542 #, no-wrap msgid "" "colocation c_drbd_stacked_on_ip_right \\\n" " inf: ms_drbd_stacked p_ip_stacked_right\n" msgstr "" "colocation c_drbd_stacked_on_ip_right \\\n" " inf: ms_drbd_stacked p_ip_stacked_right\n" #. type: delimited block - #: pacemaker.adoc:545 #, no-wrap msgid "" "colocation c_ip_on_right_master \\\n" " inf: p_ip_stacked_right ms_drbd_right:Master\n" msgstr "" "colocation c_ip_on_right_master \\\n" " inf: p_ip_stacked_right ms_drbd_right:Master\n" #. type: delimited block - #: pacemaker.adoc:548 #, no-wrap msgid "" "order o_ip_before_stacked_right \\\n" " inf: p_ip_stacked_right ms_drbd_stacked:start\n" msgstr "" "order o_ip_before_stacked_right \\\n" " inf: p_ip_stacked_right ms_drbd_stacked:start\n" #. type: delimited block - #: pacemaker.adoc:551 #, no-wrap msgid "" "order o_drbd_right_before_stacked_right \\\n" " inf: ms_drbd_right:promote ms_drbd_stacked:start\n" msgstr "" "order o_drbd_right_before_stacked_right \\\n" " inf: ms_drbd_right:promote ms_drbd_stacked:start\n" #. type: Plain text #: pacemaker.adoc:559 msgid "" "Bring up the DRBD resource `right` replicating between 'charlie' and " "'daisy', promoting the resource to the Master role on one of these nodes." msgstr "在 `charlie` 和 `daisy` 之间启动DRBD资源 `right` 复制,将资源提升到其中一个节点上的Master角色。" #. type: Plain text #: pacemaker.adoc:563 msgid "" "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`)." msgstr "调出IP地址10.9.10.101(在 `charlie` 或 `daisy` 上,具体取决于其中哪个拥有资源 `right` 的主角色)。" #. type: Plain text #: pacemaker.adoc:569 msgid "" "Leave the stacked DRBD resource in the Secondary role (due to `target-" "role=\"Slave\"`)." msgstr "将堆叠的DRBD资源保留在次要角色中(由于 `target role=` Slave ``)。" #. type: Title === #: pacemaker.adoc:572 #, no-wrap msgid "" "Configuring DRBD to replicate between two SAN-backed Pacemaker clusters" msgstr "配置DRBD以在两个支持SAN的Pacemaker集群之间进行复制" #. type: Plain text #: pacemaker.adoc:579 msgid "" "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." msgstr "" "indexterm:[IP address, floating peers]这是一种比较高级的设置,通常用于拆分站点配置。它包括两个独立的Pacemaker集群,每个集群都可以访问单独的存储区域网络(SAN)。然后使用DRBD通过站点之间的IP链路复制存储在该SAN上的数据。" #. type: Plain text #: pacemaker.adoc:581 msgid "Consider the following illustration to describe the concept." msgstr "考虑下面的插图来描述这个概念。" #. type: Block title #: pacemaker.adoc:582 #, no-wrap msgid "Using DRBD to replicate between SAN-based clusters" msgstr "使用DRBD在基于SAN的集群之间进行复制" #. type: Target for macro image #: pacemaker.adoc:583 #, no-wrap msgid "images/drbd-pacemaker-floating-peers.svg" msgstr "images/drbd-pacemaker-floating-peers.svg" #. type: Plain text #: pacemaker.adoc:589 msgid "" "Which of the individual nodes in each site currently acts as the DRBD peer " "is not explicitly defined -- the DRBD peers <>; that is, DRBD binds to virtual IP addresses not tied to a " "specific physical machine." msgstr "" "每个站点中当前充当DRBD对等点的单个节点中的哪一个没有明确定义 - DRBD对等点<>," ";也就是说,DRBD绑定到没有绑定到特定物理机的虚拟IP地址。" #. type: Plain text #: pacemaker.adoc:594 msgid "" "This type of setup is usually deployed together with <> and/or <>." msgstr "" "这种类型的设置通常与<>和/或<>一起部署。" #. type: Plain text #: pacemaker.adoc:597 msgid "" "Since this type of setup deals with shared storage, configuring and testing " "STONITH is absolutely vital for it to work properly." msgstr "由于这种类型的设置处理共享存储,因此对STONITH进行配置和测试对于它的正常工作至关重要。" #. type: Title ==== #: pacemaker.adoc:600 #, no-wrap msgid "DRBD resource configuration" msgstr "DRBD资源配置" #. type: Plain text #: pacemaker.adoc:604 msgid "" "To enable your DRBD resource to float, configure it in `drbd.conf` in the " "following fashion:" msgstr "要使DRBD资源浮动,请按以下方式在 `DRBD.conf` 中配置它:" #. type: delimited block - #: pacemaker.adoc:615 #, no-wrap msgid "" "resource {\n" " ...\n" " device /dev/drbd0;\n" " disk /dev/sda1;\n" " meta-disk internal;\n" " floating 10.9.9.100:7788;\n" " floating 10.9.10.101:7788;\n" "}\n" msgstr "" "resource {\n" " ...\n" " device /dev/drbd0;\n" " disk /dev/sda1;\n" " meta-disk internal;\n" " floating 10.9.9.100:7788;\n" " floating 10.9.10.101:7788;\n" "}\n" #. type: Plain text #: pacemaker.adoc:626 msgid "" "The `floating` keyword replaces the `on ` 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." msgstr "" "`floating` 关键字替换通常在资源配置中找到的 `on ` 部分。在这种模式下,DRBD通过IP地址和TCP端口而不是主机名来标识对等点。需要注意的是,指定的地址必须是虚拟集群IP地址,而不是物理节点IP地址,才能使浮点正常工作。如示例所示,在拆分站点配置中,这两个浮动地址可能属于两个独立的IP网络——因此,路由器和防火墙必须正确地允许节点之间的DRBD复制通信。" #. type: Title ==== #: pacemaker.adoc:629 #, no-wrap msgid "Pacemaker resource configuration" msgstr "Pacemaker资源配置" #. type: Plain text #: pacemaker.adoc:634 msgid "" "A DRBD floating peers setup, in terms of Pacemaker configuration, involves " "the following items (in each of the two Pacemaker clusters involved):" msgstr "就Pacemaker配置而言,DRBD浮动对等点设置包括以下各项(在涉及的两个Pacemaker集群中的每一个中):" #. type: Plain text #: pacemaker.adoc:636 msgid "A virtual cluster IP address." msgstr "虚拟集群IP地址。" #. type: Plain text #: pacemaker.adoc:638 msgid "A master/slave DRBD resource (using the DRBD OCF resource agent)." msgstr "主/从DRBD资源(使用DRBD OCF资源代理)。" #. type: Plain text #: pacemaker.adoc:641 msgid "" "Pacemaker constraints ensuring that resources are started on the correct " "nodes, and in the correct order." msgstr "Pacemaker约束确保资源以正确的顺序在正确的节点上启动。" #. type: Plain text #: pacemaker.adoc:645 msgid "" "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:" msgstr "" "要使用复制地址 `10.9.9.100` 在2节点集群的浮动对等配置中配置名为 `mysql` 的资源,请使用以下 `crm` 命令配置Pacemaker:" #. type: delimited block - #: pacemaker.adoc:662 #, no-wrap msgid "" "crm configure\n" "crm(live)configure# primitive p_ip_float_left ocf:heartbeat:IPaddr2 \\\n" " params ip=10.9.9.100\n" "crm(live)configure# primitive p_drbd_mysql ocf:linbit:drbd \\\n" " params drbd_resource=mysql\n" "crm(live)configure# ms ms_drbd_mysql drbd_mysql \\\n" " meta master-max=\"1\" master-node-max=\"1\" \\\n" " clone-max=\"1\" clone-node-max=\"1\" \\\n" " notify=\"true\" target-role=\"Master\"\n" "crm(live)configure# order drbd_after_left \\\n" " inf: p_ip_float_left ms_drbd_mysql\n" "crm(live)configure# colocation drbd_on_left \\\n" " inf: ms_drbd_mysql p_ip_float_left\n" "crm(live)configure# commit\n" "bye\n" msgstr "" "crm configure\n" "crm(live)configure# primitive p_ip_float_left ocf:heartbeat:IPaddr2 \\\n" " params ip=10.9.9.100\n" "crm(live)configure# primitive p_drbd_mysql ocf:linbit:drbd \\\n" " params drbd_resource=mysql\n" "crm(live)configure# ms ms_drbd_mysql drbd_mysql \\\n" " meta master-max=\"1\" master-node-max=\"1\" \\\n" " clone-max=\"1\" clone-node-max=\"1\" \\\n" " notify=\"true\" target-role=\"Master\"\n" "crm(live)configure# order drbd_after_left \\\n" " inf: p_ip_float_left ms_drbd_mysql\n" "crm(live)configure# colocation drbd_on_left \\\n" " inf: ms_drbd_mysql p_ip_float_left\n" "crm(live)configure# commit\n" "bye\n" #. type: Plain text #: pacemaker.adoc:668 msgid "Bring up the IP address 10.9.9.100 (on either 'alice' or 'bob')." msgstr "调出IP地址10.9.9.100(在 `alice` 或 `bob` 上)。" #. type: Plain text #: pacemaker.adoc:669 pacemaker.adoc:699 msgid "Bring up the DRBD resource according to the IP address configured." msgstr "根据配置的IP地址调出DRBD资源。" #. type: Plain text #: pacemaker.adoc:670 msgid "Promote the DRBD resource to the Primary role." msgstr "将DRBD资源提升为主要角色。" #. type: Plain text #: pacemaker.adoc:674 msgid "" "Then, in order to create the matching configuration in the other cluster, " "configure _that_ Pacemaker instance with the following commands:" msgstr "然后,为了在另一个集群中创建匹配的配置,请使用以下命令配置Pacemaker实例:" #. type: delimited block - #: pacemaker.adoc:691 #, no-wrap msgid "" "crm configure\n" "crm(live)configure# primitive p_ip_float_right ocf:heartbeat:IPaddr2 \\\n" " params ip=10.9.10.101\n" "crm(live)configure# primitive drbd_mysql ocf:linbit:drbd \\\n" " params drbd_resource=mysql\n" "crm(live)configure# ms ms_drbd_mysql drbd_mysql \\\n" " meta master-max=\"1\" master-node-max=\"1\" \\\n" " clone-max=\"1\" clone-node-max=\"1\" \\\n" " notify=\"true\" target-role=\"Slave\"\n" "crm(live)configure# order drbd_after_right \\\n" " inf: p_ip_float_right ms_drbd_mysql\n" "crm(live)configure# colocation drbd_on_right\n" " inf: ms_drbd_mysql p_ip_float_right\n" "crm(live)configure# commit\n" "bye\n" msgstr "" "crm configure\n" "crm(live)configure# primitive p_ip_float_right ocf:heartbeat:IPaddr2 \\\n" " params ip=10.9.10.101\n" "crm(live)configure# primitive drbd_mysql ocf:linbit:drbd \\\n" " params drbd_resource=mysql\n" "crm(live)configure# ms ms_drbd_mysql drbd_mysql \\\n" " meta master-max=\"1\" master-node-max=\"1\" \\\n" " clone-max=\"1\" clone-node-max=\"1\" \\\n" " notify=\"true\" target-role=\"Slave\"\n" "crm(live)configure# order drbd_after_right \\\n" " inf: p_ip_float_right ms_drbd_mysql\n" "crm(live)configure# colocation drbd_on_right\n" " inf: ms_drbd_mysql p_ip_float_right\n" "crm(live)configure# commit\n" "bye\n" #. type: Plain text #: pacemaker.adoc:698 msgid "Bring up the IP address 10.9.10.101 (on either 'charlie' or 'daisy')." msgstr "调出IP地址10.9.10.101(在 `charlie` 或 `daisy` 上)。" #. type: Plain text #: pacemaker.adoc:701 msgid "" "Leave the DRBD resource in the Secondary role (due to `target-" "role=\"Slave\"`)." msgstr "将DRBD资源保留在次要角色中(由于 `target role=\"Slave\" `)。" #. type: Title ==== #: pacemaker.adoc:704 #, no-wrap msgid "Site fail-over" msgstr "站点故障转移" #. type: Plain text #: pacemaker.adoc:710 msgid "" "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:" msgstr "" "在拆分站点配置中,可能需要将服务从一个站点传输到另一个站点。这可能是计划过渡的结果,也可能是灾难性事件的结果。如果转换是正常的预期事件,建议采取以下行动:" #. type: Plain text #: pacemaker.adoc:716 msgid "" "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." msgstr "" "连接到站点上即将放弃资源的集群,并将受影响的DRBD资源的 `target " "role` 属性从 `Master` 更改为 `Slave` 。这将根据DRBD资源的主要角色关闭所有资源,将其降级并继续运行,以便从新的主要资源接收更新。" #. type: Plain text #: pacemaker.adoc:722 msgid "" "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." msgstr "" "连接到站点上即将接管资源的集群,并将受影响的DRBD资源的 `target " "role` 属性从 `Slave` 更改为 `Master` 。这将提升DRBD资源,根据DRBD资源的主要角色启动任何其他Pacemaker资源,并将更新复制到远程站点。" #. type: Plain text #: pacemaker.adoc:724 msgid "To fail back, simply reverse the procedure." msgstr "若要退回,只需颠倒程序即可。" #. type: Plain text #: pacemaker.adoc:728 msgid "" "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:" msgstr "在活动站点发生灾难性停机的情况下,可以预期该站点已脱机,不再复制到备份站点。在这种情况下:" #. type: Plain text #: pacemaker.adoc:734 msgid "" "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." msgstr "" "连接到仍在运行的站点资源上的集群,并将受影响的DRBD资源的 `target " "role` 属性从 `Slave` 更改为 `Master` 。这将提升DRBD资源,并根据DRBD资源的主要角色启动任何其他Pacemaker资源。" #. type: Plain text #: pacemaker.adoc:738 msgid "" "When the original site is restored or rebuilt, you may connect the DRBD " "resources again, and subsequently fail back using the reverse procedure." msgstr "还原或重建原始站点时,可以再次连接DRBD资源,然后使用相反的过程进行故障恢复。"