| 1 |
# SOME DESCRIPTIVE TITLE |
| 2 |
# Copyright (C) YEAR Free Software Foundation, Inc. |
| 3 |
# This file is distributed under the same license as the PACKAGE package. |
| 4 |
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
| 5 |
# |
| 6 |
#, fuzzy |
| 7 |
msgid "" |
| 8 |
msgstr "" |
| 9 |
"Project-Id-Version: PACKAGE VERSION\n" |
| 10 |
"POT-Creation-Date: 2020-03-02 15:09+0000\n" |
| 11 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
| 12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
| 13 |
"Language-Team: LANGUAGE <[email protected]>\n" |
| 14 |
"Language: \n" |
| 15 |
"MIME-Version: 1.0\n" |
| 16 |
"Content-Type: text/plain; charset=CHARSET\n" |
| 17 |
"Content-Transfer-Encoding: 8bit\n" |
| 18 |
|
| 19 |
#. FIXME |
| 20 |
#. type: Title == |
| 21 |
#: pacemaker.adoc:3 |
| 22 |
#, no-wrap |
| 23 |
msgid "Integrating DRBD with Pacemaker clusters" |
| 24 |
msgstr "将DRBD与Pacemaker集成" |
| 25 |
|
| 26 |
#. type: Plain text |
| 27 |
#: pacemaker.adoc:9 |
| 28 |
msgid "" |
| 29 |
"indexterm:[Pacemaker]Using DRBD in conjunction with the Pacemaker cluster " |
| 30 |
"stack is arguably DRBD's most frequently found use case. Pacemaker is also " |
| 31 |
"one of the applications that make DRBD extremely powerful in a wide variety " |
| 32 |
"of usage scenarios." |
| 33 |
msgstr "" |
| 34 |
"indexterm:[Pacemaker]结合使用DRBD和Pacemaker集群栈可以说是DRBD最常见的用例。Pacemaker也是使DRBD在各种各样的使用场景中非常强大的应用程序之一。" |
| 35 |
|
| 36 |
#. type: Plain text |
| 37 |
#: pacemaker.adoc:11 |
| 38 |
msgid "DRBD can be used in Pacemaker clusters in two ways:" |
| 39 |
msgstr "DRBD可通过两种方式用于Pacemaker集群:" |
| 40 |
|
| 41 |
#. type: Plain text |
| 42 |
#: pacemaker.adoc:12 |
| 43 |
msgid "DRBD running as a background-service, used like a SAN; or" |
| 44 |
msgstr "作为后台服务运行的DRBD,用作SAN;或" |
| 45 |
|
| 46 |
#. type: Plain text |
| 47 |
#: pacemaker.adoc:13 |
| 48 |
msgid "DRBD completely managed by Pacemaker." |
| 49 |
msgstr "完全由Pacemaker管理的DRBD." |
| 50 |
|
| 51 |
#. type: Plain text |
| 52 |
#: pacemaker.adoc:15 |
| 53 |
msgid "" |
| 54 |
"Both have a few advantages and disadvantages, these will be discussed below." |
| 55 |
msgstr "两者都有一些优点和缺点,这些将在下面讨论。" |
| 56 |
|
| 57 |
#. type: Plain text |
| 58 |
#: pacemaker.adoc:20 |
| 59 |
msgid "" |
| 60 |
"It's recommended to have some fencing configured. If your cluster has " |
| 61 |
"communication issues (e.g. network switch loses power) and gets split, the " |
| 62 |
"parts might start the services (failover) and cause a *Split-Brain* when " |
| 63 |
"the communication resumes again." |
| 64 |
msgstr "" |
| 65 |
"建议配置一些围栏。如果集群有通信问题(如网络交换机断电)并被分割,那么当通信再次恢复时,这些部分可能会启动服务(故障转移)并导致 *裂脑* 。" |
| 66 |
|
| 67 |
#. type: Title === |
| 68 |
#: pacemaker.adoc:24 |
| 69 |
#, no-wrap |
| 70 |
msgid "Pacemaker primer" |
| 71 |
msgstr "Pacemaker基础概念" |
| 72 |
|
| 73 |
#. type: Plain text |
| 74 |
#: pacemaker.adoc:30 |
| 75 |
msgid "" |
| 76 |
"Pacemaker is a sophisticated, feature-rich, and widely deployed cluster " |
| 77 |
"resource manager for the Linux platform. It comes with a rich set of " |
| 78 |
"documentation. In order to understand this chapter, reading the following " |
| 79 |
"documents is highly recommended:" |
| 80 |
msgstr "" |
| 81 |
"Pacemaker是一个复杂的、功能丰富的、广泛部署的Linux平台集群资源管理器。它附带了一组丰富的文档。为了理解本章,强烈建议阅读以下文件:" |
| 82 |
|
| 83 |
#. type: Plain text |
| 84 |
#: pacemaker.adoc:34 |
| 85 |
msgid "" |
| 86 |
"http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf[Clusters From " |
| 87 |
"Scratch], a step-by-step guide to configuring high availability clusters;" |
| 88 |
msgstr "" |
| 89 |
"http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf[Clusters from " |
| 90 |
"Scratch],配置高可用性集群的分步指南;" |
| 91 |
|
| 92 |
#. type: Plain text |
| 93 |
#: pacemaker.adoc:37 |
| 94 |
msgid "" |
| 95 |
"http://crmsh.github.io/documentation/index.html[CRM CLI (command line " |
| 96 |
"interface) tool], a manual for the CRM shell, a simple and intuitive command" |
| 97 |
" line interface bundled with Pacemaker;" |
| 98 |
msgstr "" |
| 99 |
"http://crmsh.github.io/documentation/index.html[CRM CLI(命令行界面)工具],CRM " |
| 100 |
"shell手册,一个与Pacemaker捆绑在一起的简单直观的命令行界面;" |
| 101 |
|
| 102 |
#. type: Plain text |
| 103 |
#: pacemaker.adoc:40 |
| 104 |
msgid "" |
| 105 |
"http://clusterlabs.org/doc/en-" |
| 106 |
"US/Pacemaker/1.1/html/Pacemaker_Explained/[Pacemaker Configuration " |
| 107 |
"Explained], a reference document explaining the concept and design behind " |
| 108 |
"Pacemaker." |
| 109 |
msgstr "" |
| 110 |
"http://clusterlabs.org/doc/en-" |
| 111 |
"US/Pacemaker/1.1/html/Pacemaker_Explained/[解释Pacemaker配置],解释Pacemaker背后的概念和设计的参考文件。" |
| 112 |
|
| 113 |
#. type: Title === |
| 114 |
#: pacemaker.adoc:43 |
| 115 |
#, no-wrap |
| 116 |
msgid "Using DRBD as a background service in a pacemaker cluster" |
| 117 |
msgstr "在Pacemaker集群中使用DRBD作为后台服务" |
| 118 |
|
| 119 |
#. type: Plain text |
| 120 |
#: pacemaker.adoc:48 |
| 121 |
msgid "" |
| 122 |
"In this section you will see that using autonomous DRBD storage can look " |
| 123 |
"like local storage; so integrating in a Pacemaker cluster is done by " |
| 124 |
"pointing your mount points at DRBD." |
| 125 |
msgstr "在本节中,您将看到使用自主DRBD存储看起来像本地存储;因此,在Pacemaker集群中集成是通过将挂载点指向DRBD来完成的。" |
| 126 |
|
| 127 |
#. type: Plain text |
| 128 |
#: pacemaker.adoc:53 |
| 129 |
msgid "" |
| 130 |
"First of all, we will use the `auto-promote` feature of DRBD, so that DRBD " |
| 131 |
"automatically sets itself _Primary_ when needed. This will probably apply to" |
| 132 |
" all of your resources, so setting that a default in the `common` section " |
| 133 |
"makes sense:" |
| 134 |
msgstr "" |
| 135 |
"首先,我们将使用DRBD的 `auto-" |
| 136 |
"promote` 特性,以便DRBD在需要时自动设置自己的 _Primary_ 。这可能适用于您的所有资源,因此设置 `common` 部分中的默认值是有意义的:" |
| 137 |
|
| 138 |
#. type: delimited block - |
| 139 |
#: pacemaker.adoc:62 |
| 140 |
#, no-wrap |
| 141 |
msgid "" |
| 142 |
"common {\n" |
| 143 |
" options {\n" |
| 144 |
" auto-promote yes;\n" |
| 145 |
" ...\n" |
| 146 |
" }\n" |
| 147 |
"}\n" |
| 148 |
msgstr "" |
| 149 |
"common {\n" |
| 150 |
" options {\n" |
| 151 |
" auto-promote yes;\n" |
| 152 |
" ...\n" |
| 153 |
" }\n" |
| 154 |
"}\n" |
| 155 |
|
| 156 |
#. type: Plain text |
| 157 |
#: pacemaker.adoc:65 |
| 158 |
msgid "Now you just need to use your storage, e.g. via a filesystem:" |
| 159 |
msgstr "现在您只需要使用存储,例如通过文件系统:" |
| 160 |
|
| 161 |
#. type: Block title |
| 162 |
#: pacemaker.adoc:66 |
| 163 |
#, no-wrap |
| 164 |
msgid "" |
| 165 |
"Pacemaker configuration for DRBD-backed MySQL service, using `auto-promote`" |
| 166 |
msgstr "使用 `auto promote` 为DRBD支持的MySQL服务配置Pacemaker" |
| 167 |
|
| 168 |
#. type: delimited block - |
| 169 |
#: pacemaker.adoc:79 |
| 170 |
#, no-wrap |
| 171 |
msgid "" |
| 172 |
"crm configure\n" |
| 173 |
"crm(live)configure# primitive fs_mysql ocf:heartbeat:Filesystem \\\n" |
| 174 |
" params device=\"/dev/drbd/by-res/mysql/0\" \\\n" |
| 175 |
" directory=\"/var/lib/mysql\" fstype=\"ext3\"\n" |
| 176 |
"crm(live)configure# primitive ip_mysql ocf:heartbeat:IPaddr2 \\\n" |
| 177 |
" params ip=\"10.9.42.1\" nic=\"eth0\"\n" |
| 178 |
"crm(live)configure# primitive mysqld lsb:mysqld\n" |
| 179 |
"crm(live)configure# group mysql fs_mysql ip_mysql mysqld\n" |
| 180 |
"crm(live)configure# commit\n" |
| 181 |
"crm(live)configure# exit\n" |
| 182 |
"bye\n" |
| 183 |
msgstr "" |
| 184 |
"crm configure\n" |
| 185 |
"crm(live)configure# primitive fs_mysql ocf:heartbeat:Filesystem \\\n" |
| 186 |
" params device=\"/dev/drbd/by-res/mysql/0\" \\\n" |
| 187 |
" directory=\"/var/lib/mysql\" fstype=\"ext3\"\n" |
| 188 |
"crm(live)configure# primitive ip_mysql ocf:heartbeat:IPaddr2 \\\n" |
| 189 |
" params ip=\"10.9.42.1\" nic=\"eth0\"\n" |
| 190 |
"crm(live)configure# primitive mysqld lsb:mysqld\n" |
| 191 |
"crm(live)configure# group mysql fs_mysql ip_mysql mysqld\n" |
| 192 |
"crm(live)configure# commit\n" |
| 193 |
"crm(live)configure# exit\n" |
| 194 |
"bye\n" |
| 195 |
|
| 196 |
#. type: Plain text |
| 197 |
#: pacemaker.adoc:83 |
| 198 |
msgid "" |
| 199 |
"Essentially all that is needed is a mountpoint (`/var/lib/mysql` in this " |
| 200 |
"example) where the DRBD resource gets mounted." |
| 201 |
msgstr "实际上,所需要的只是一个挂载点(在本例中为`/var/lib/mysql`),DRBD资源在这里挂载。" |
| 202 |
|
| 203 |
#. type: Plain text |
| 204 |
#: pacemaker.adoc:86 |
| 205 |
msgid "" |
| 206 |
"As long as Pacemaker has control, it will only allow a single instance of " |
| 207 |
"that mount across your cluster." |
| 208 |
msgstr "只要Pacemaker有控制权,它就只允许在集群中安装一个实例。" |
| 209 |
|
| 210 |
#. type: Title === |
| 211 |
#: pacemaker.adoc:89 |
| 212 |
#, no-wrap |
| 213 |
msgid "" |
| 214 |
"Adding a DRBD-backed service to the cluster configuration, including a " |
| 215 |
"master-slave resource" |
| 216 |
msgstr "向集群配置添加DRBD支持的服务,包括主-从资源" |
| 217 |
|
| 218 |
#. type: Plain text |
| 219 |
#: pacemaker.adoc:93 |
| 220 |
msgid "" |
| 221 |
"This section explains how to enable a DRBD-backed service in a Pacemaker " |
| 222 |
"cluster." |
| 223 |
msgstr "本节介绍如何在Pacemaker集群中启用DRBD支持的服务。" |
| 224 |
|
| 225 |
#. type: Plain text |
| 226 |
#: pacemaker.adoc:98 |
| 227 |
msgid "" |
| 228 |
"If you are employing the DRBD OCF resource agent, it is recommended that you" |
| 229 |
" defer DRBD startup, shutdown, promotion, and demotion _exclusively_ to the " |
| 230 |
"OCF resource agent. That means that you should disable the DRBD init script:" |
| 231 |
msgstr "" |
| 232 |
"如果您使用的是DRBD OCF资源代理,建议您将DRBD的启动、关闭、升级和降级 _专门_ 推迟到OCF资源代理。这意味着您应该禁用DRBD init脚本:" |
| 233 |
|
| 234 |
#. type: delimited block - |
| 235 |
#: pacemaker.adoc:101 |
| 236 |
#, no-wrap |
| 237 |
msgid "chkconfig drbd off\n" |
| 238 |
msgstr "chkconfig drbd off\n" |
| 239 |
|
| 240 |
#. type: Plain text |
| 241 |
#: pacemaker.adoc:109 |
| 242 |
msgid "" |
| 243 |
"The `ocf:linbit:drbd` OCF resource agent provides Master/Slave capability, " |
| 244 |
"allowing Pacemaker to start and monitor the DRBD resource on multiple nodes " |
| 245 |
"and promoting and demoting as needed. You must, however, understand that the" |
| 246 |
" DRBD RA disconnects and detaches all DRBD resources it manages on Pacemaker" |
| 247 |
" shutdown, and also upon enabling standby mode for a node." |
| 248 |
msgstr "" |
| 249 |
"`ocf:linbit:drbd` ocf资源代理提供主/从功能,允许Pacemaker启动和监视多个节点上的drbd资源,并根据需要进行升级和降级。但是,您必须了解,DRBD" |
| 250 |
" RA在Pacemaker关闭时,以及在为节点启用待机模式时,会断开并分离它管理的所有DRBD资源。" |
| 251 |
|
| 252 |
#. type: Plain text |
| 253 |
#: pacemaker.adoc:118 |
| 254 |
msgid "" |
| 255 |
"The OCF resource agent which ships with DRBD belongs to the `linbit` " |
| 256 |
"provider, and hence installs as `/usr/lib/ocf/resource.d/linbit/drbd`. There" |
| 257 |
" is a legacy resource agent that ships as part of the OCF resource agents " |
| 258 |
"package, which uses the `heartbeat` provider and installs into " |
| 259 |
"`/usr/lib/ocf/resource.d/heartbeat/drbd`. The legacy OCF RA is deprecated " |
| 260 |
"and should no longer be used." |
| 261 |
msgstr "" |
| 262 |
"DRBD附带的OCF资源代理属于 `linbit` 提供程序,因此安装为`/usr/lib/OCF/resource.d/linbit/DRBD`。有一个遗留资源代理作为OCF资源代理包的一部分提供,它使用 `heartbeat` 提供程序并安装到 `/usr/lib/OCF/resource.d/heartbeat/drbd` 。旧的OCF" |
| 263 |
" RA已弃用,不应再使用。" |
| 264 |
|
| 265 |
#. type: Plain text |
| 266 |
#: pacemaker.adoc:125 |
| 267 |
msgid "" |
| 268 |
"In order to enable a DRBD-backed configuration for a MySQL database in a " |
| 269 |
"Pacemaker CRM cluster with the `drbd` OCF resource agent, you must create " |
| 270 |
"both the necessary resources, and Pacemaker constraints to ensure your " |
| 271 |
"service only starts on a previously promoted DRBD resource. You may do so " |
| 272 |
"using the `crm` shell, as outlined in the following example:" |
| 273 |
msgstr "" |
| 274 |
"为了使用 `DRBD` OCF资源代理为Pacemaker " |
| 275 |
"CRM集群中的MySQL数据库启用DRBD支持的配置,必须同时创建必要的资源和Pacemaker约束,以确保您的服务仅在以前升级的DRBD资源上启动。您可以使用 `crm` shell执行此操作,如下例所示:" |
| 276 |
|
| 277 |
#. type: Block title |
| 278 |
#: pacemaker.adoc:126 |
| 279 |
#, no-wrap |
| 280 |
msgid "" |
| 281 |
"Pacemaker configuration for DRBD-backed MySQL service, using a `master-" |
| 282 |
"slave` resource" |
| 283 |
msgstr "使用 `master-slave` 资源为DRBD支持的MySQL服务配置Pacemaker" |
| 284 |
|
| 285 |
#. type: delimited block - |
| 286 |
#: pacemaker.adoc:151 |
| 287 |
#, no-wrap |
| 288 |
msgid "" |
| 289 |
"crm configure\n" |
| 290 |
"crm(live)configure# primitive drbd_mysql ocf:linbit:drbd \\\n" |
| 291 |
" params drbd_resource=\"mysql\" \\\n" |
| 292 |
" op monitor interval=\"29s\" role=\"Master\" \\\n" |
| 293 |
" op monitor interval=\"31s\" role=\"Slave\"\n" |
| 294 |
"crm(live)configure# ms ms_drbd_mysql drbd_mysql \\\n" |
| 295 |
" meta master-max=\"1\" master-node-max=\"1\" \\\n" |
| 296 |
" clone-max=\"2\" clone-node-max=\"1\" \\\n" |
| 297 |
" notify=\"true\"\n" |
| 298 |
"crm(live)configure# primitive fs_mysql ocf:heartbeat:Filesystem \\\n" |
| 299 |
" params device=\"/dev/drbd/by-res/mysql/0\" \\\n" |
| 300 |
" directory=\"/var/lib/mysql\" fstype=\"ext3\"\n" |
| 301 |
"crm(live)configure# primitive ip_mysql ocf:heartbeat:IPaddr2 \\\n" |
| 302 |
" params ip=\"10.9.42.1\" nic=\"eth0\"\n" |
| 303 |
"crm(live)configure# primitive mysqld lsb:mysqld\n" |
| 304 |
"crm(live)configure# group mysql fs_mysql ip_mysql mysqld\n" |
| 305 |
"crm(live)configure# colocation mysql_on_drbd \\\n" |
| 306 |
" inf: mysql ms_drbd_mysql:Master\n" |
| 307 |
"crm(live)configure# order mysql_after_drbd \\\n" |
| 308 |
" inf: ms_drbd_mysql:promote mysql:start\n" |
| 309 |
"crm(live)configure# commit\n" |
| 310 |
"crm(live)configure# exit\n" |
| 311 |
"bye\n" |
| 312 |
msgstr "" |
| 313 |
"crm configure\n" |
| 314 |
"crm(live)configure# primitive drbd_mysql ocf:linbit:drbd \\\n" |
| 315 |
" params drbd_resource=\"mysql\" \\\n" |
| 316 |
" op monitor interval=\"29s\" role=\"Master\" \\\n" |
| 317 |
" op monitor interval=\"31s\" role=\"Slave\"\n" |
| 318 |
"crm(live)configure# ms ms_drbd_mysql drbd_mysql \\\n" |
| 319 |
" meta master-max=\"1\" master-node-max=\"1\" \\\n" |
| 320 |
" clone-max=\"2\" clone-node-max=\"1\" \\\n" |
| 321 |
" notify=\"true\"\n" |
| 322 |
"crm(live)configure# primitive fs_mysql ocf:heartbeat:Filesystem \\\n" |
| 323 |
" params device=\"/dev/drbd/by-res/mysql/0\" \\\n" |
| 324 |
" directory=\"/var/lib/mysql\" fstype=\"ext3\"\n" |
| 325 |
"crm(live)configure# primitive ip_mysql ocf:heartbeat:IPaddr2 \\\n" |
| 326 |
" params ip=\"10.9.42.1\" nic=\"eth0\"\n" |
| 327 |
"crm(live)configure# primitive mysqld lsb:mysqld\n" |
| 328 |
"crm(live)configure# group mysql fs_mysql ip_mysql mysqld\n" |
| 329 |
"crm(live)configure# colocation mysql_on_drbd \\\n" |
| 330 |
" inf: mysql ms_drbd_mysql:Master\n" |
| 331 |
"crm(live)configure# order mysql_after_drbd \\\n" |
| 332 |
" inf: ms_drbd_mysql:promote mysql:start\n" |
| 333 |
"crm(live)configure# commit\n" |
| 334 |
"crm(live)configure# exit\n" |
| 335 |
"bye\n" |
| 336 |
|
| 337 |
#. type: Plain text |
| 338 |
#: pacemaker.adoc:156 |
| 339 |
msgid "" |
| 340 |
"After this, your configuration should be enabled. Pacemaker now selects a " |
| 341 |
"node on which it promotes the DRBD resource, and then starts the DRBD-backed" |
| 342 |
" resource group on that same node." |
| 343 |
msgstr "在此之后,应启用配置。Pacemaker现在选择一个节点,在该节点上提升DRBD资源,然后在同一节点上启动DRBD支持的资源组。" |
| 344 |
|
| 345 |
#. type: Title === |
| 346 |
#: pacemaker.adoc:158 |
| 347 |
#, no-wrap |
| 348 |
msgid "Using resource-level fencing in Pacemaker clusters" |
| 349 |
msgstr "在Pacemaker集群中使用资源级围栏" |
| 350 |
|
| 351 |
#. type: Plain text |
| 352 |
#: pacemaker.adoc:165 |
| 353 |
msgid "" |
| 354 |
"This section outlines the steps necessary to prevent Pacemaker from " |
| 355 |
"promoting a DRBD Master/Slave resource when its DRBD replication link has " |
| 356 |
"been interrupted. This keeps Pacemaker from starting a service with outdated" |
| 357 |
" data and causing an unwanted \"time warp\" in the process." |
| 358 |
msgstr "" |
| 359 |
"本节概述了在DRBD复制链接中断时防止Pacemaker升级DRBD主/从资源所需的步骤。这使得Pacemaker不会使用过时的数据启动服务,也不会在启动过程中造成不必要的 `时间扭曲` 。" |
| 360 |
|
| 361 |
#. type: Plain text |
| 362 |
#: pacemaker.adoc:168 |
| 363 |
msgid "" |
| 364 |
"In order to enable any resource-level fencing for DRBD, you must add the " |
| 365 |
"following lines to your resource configuration:" |
| 366 |
msgstr "要为DRBD启用任何资源级围栏,必须在资源配置中添加以下行:" |
| 367 |
|
| 368 |
#. type: delimited block - |
| 369 |
#: pacemaker.adoc:177 |
| 370 |
#, no-wrap |
| 371 |
msgid "" |
| 372 |
"resource <resource> {\n" |
| 373 |
" net {\n" |
| 374 |
" fencing resource-only;\n" |
| 375 |
" ...\n" |
| 376 |
" }\n" |
| 377 |
"}\n" |
| 378 |
msgstr "" |
| 379 |
"resource <resource> {\n" |
| 380 |
" net {\n" |
| 381 |
" fencing resource-only;\n" |
| 382 |
" ...\n" |
| 383 |
" }\n" |
| 384 |
"}\n" |
| 385 |
|
| 386 |
#. type: Plain text |
| 387 |
#: pacemaker.adoc:181 |
| 388 |
msgid "" |
| 389 |
"You will also have to make changes to the `handlers` section depending on " |
| 390 |
"the cluster infrastructure being used:" |
| 391 |
msgstr "您还必须根据使用的集群基础结构更改 `handlers` 部分:" |
| 392 |
|
| 393 |
#. type: Plain text |
| 394 |
#: pacemaker.adoc:184 |
| 395 |
msgid "" |
| 396 |
"Heartbeat-based Pacemaker clusters can employ the configuration outlined in " |
| 397 |
"<<s-pacemaker-fencing-dopd>>." |
| 398 |
msgstr "基于心跳的Pacemaker集群可以采用<<s-pacemaker-fencing-dopd>>中概述的配置。" |
| 399 |
|
| 400 |
#. type: Plain text |
| 401 |
#: pacemaker.adoc:186 |
| 402 |
msgid "" |
| 403 |
"Both Corosync- and Heartbeat-based clusters can use the functionality " |
| 404 |
"explained in <<s-pacemaker-fencing-cib>>." |
| 405 |
msgstr "基于Corosync和Heartbeat的集群都可以使用<<s-pacemaker-fencing-cib>>中解释的功能。" |
| 406 |
|
| 407 |
#. type: Plain text |
| 408 |
#: pacemaker.adoc:193 |
| 409 |
msgid "" |
| 410 |
"It is absolutely vital to configure at least two independent cluster " |
| 411 |
"communications channels for this functionality to work correctly. Heartbeat-" |
| 412 |
"based Pacemaker clusters should define at least two cluster communication " |
| 413 |
"links in their `ha.cf` configuration files. Corosync clusters should list at" |
| 414 |
" least two redundant rings in `corosync.conf`." |
| 415 |
msgstr "" |
| 416 |
"配置至少两个独立的集群通信通道以使此功能正常工作是绝对重要的。基于心跳的Pacemaker集群应该在其 `ha.cf` 配置文件中定义至少两个集群通信链路。Corosync集群应该在 `Corosync.conf` 中列出至少两个冗余环。" |
| 417 |
|
| 418 |
#. type: Title ==== |
| 419 |
#: pacemaker.adoc:195 |
| 420 |
#, no-wrap |
| 421 |
msgid "Resource-level fencing with `dopd`" |
| 422 |
msgstr "使用 `dopd` 设置资源级围栏" |
| 423 |
|
| 424 |
#. type: Plain text |
| 425 |
#: pacemaker.adoc:200 |
| 426 |
msgid "" |
| 427 |
"indexterm:[dopd]In Heartbeat-based Pacemaker clusters, DRBD can use a " |
| 428 |
"resources-level fencing facility named the _DRBD outdate-peer daemon_, or " |
| 429 |
"`dopd` for short." |
| 430 |
msgstr "" |
| 431 |
"indexterm:[dopd]在基于心跳的Pacemaker集群中,DRBD可以使用名为 `DRBD outdate peer " |
| 432 |
"daemon` 或简称 `dopd` 的资源级围栏设施。" |
| 433 |
|
| 434 |
#. type: Title ===== |
| 435 |
#: pacemaker.adoc:203 |
| 436 |
#, no-wrap |
| 437 |
msgid "Heartbeat configuration for `dopd`" |
| 438 |
msgstr " `dopd` 的心跳配置" |
| 439 |
|
| 440 |
#. type: Plain text |
| 441 |
#: pacemaker.adoc:207 |
| 442 |
msgid "" |
| 443 |
"To enable dopd, you must add these lines to your indexterm:[ha.cf (Heartbeat" |
| 444 |
" configuration file)]`/etc/ha.d/ha.cf` file:" |
| 445 |
msgstr "" |
| 446 |
"要启用dopd,必须将这些行添加到indexterm:[ha.cf(Heartbeat configuration " |
| 447 |
"file)] `/etc/ha.d/ha.cf` 文件:" |
| 448 |
|
| 449 |
#. type: delimited block - |
| 450 |
#: pacemaker.adoc:212 |
| 451 |
#, no-wrap |
| 452 |
msgid "" |
| 453 |
"respawn hacluster /usr/lib/heartbeat/dopd\n" |
| 454 |
"apiauth dopd gid=haclient uid=hacluster\n" |
| 455 |
msgstr "" |
| 456 |
"respawn hacluster /usr/lib/heartbeat/dopd\n" |
| 457 |
"apiauth dopd gid=haclient uid=hacluster\n" |
| 458 |
|
| 459 |
#. type: Plain text |
| 460 |
#: pacemaker.adoc:217 |
| 461 |
msgid "" |
| 462 |
"You may have to adjust ``dopd``'s path according to your preferred " |
| 463 |
"distribution. On some distributions and architectures, the correct path is " |
| 464 |
"`/usr/lib64/heartbeat/dopd`." |
| 465 |
msgstr "" |
| 466 |
"您可能需要根据您的首选分布调整 `dopd` 的路径。在某些发行版和体系结构中,正确的路径是 `/usr/lib64/heartbeat/dopd` 。" |
| 467 |
|
| 468 |
#. type: Plain text |
| 469 |
#: pacemaker.adoc:223 |
| 470 |
msgid "" |
| 471 |
"After you have made this change and copied `ha.cf` to the peer node, put " |
| 472 |
"Pacemaker in maintenance mode and run `/etc/init.d/heartbeat reload` to have" |
| 473 |
" Heartbeat re-read its configuration file. Afterwards, you should be able to" |
| 474 |
" verify that you now have a running `dopd` process." |
| 475 |
msgstr "" |
| 476 |
"完成此更改并将 `ha.cf` 复制到对等节点后,将Pacemaker置于维护模式并运行 `/etc/init.d/heartbeat " |
| 477 |
"reload` 以使heartbeat重新读取其配置文件。之后,您应该能够验证您现在是否有一个正在运行的 `dopd` 进程。" |
| 478 |
|
| 479 |
#. type: Plain text |
| 480 |
#: pacemaker.adoc:226 |
| 481 |
msgid "" |
| 482 |
"You can check for this process either by running `ps ax | grep dopd` or by " |
| 483 |
"issuing `killall -0 dopd`." |
| 484 |
msgstr "您可以通过运行 `ps ax | grep dopd` 或发出 `killall-0 dopd` 来检查此进程。" |
| 485 |
|
| 486 |
#. type: Title ===== |
| 487 |
#: pacemaker.adoc:229 |
| 488 |
#, no-wrap |
| 489 |
msgid "DRBD Configuration for `dopd`" |
| 490 |
msgstr "dopd的DRBD配置 `dpod`" |
| 491 |
|
| 492 |
#. type: Plain text |
| 493 |
#: pacemaker.adoc:233 |
| 494 |
msgid "" |
| 495 |
"Once `dopd` is running, add these items to your DRBD resource configuration:" |
| 496 |
msgstr "运行 `dopd` 后,将这些项添加到DRBD资源配置中:" |
| 497 |
|
| 498 |
#. type: delimited block - |
| 499 |
#: pacemaker.adoc:247 |
| 500 |
#, no-wrap |
| 501 |
msgid "" |
| 502 |
"resource <resource> {\n" |
| 503 |
" handlers {\n" |
| 504 |
" fence-peer \"/usr/lib/heartbeat/drbd-peer-outdater -t 5\";\n" |
| 505 |
" ...\n" |
| 506 |
" }\n" |
| 507 |
" net {\n" |
| 508 |
" fencing resource-only;\n" |
| 509 |
" ...\n" |
| 510 |
" }\n" |
| 511 |
" ...\n" |
| 512 |
"}\n" |
| 513 |
msgstr "" |
| 514 |
"resource <resource> {\n" |
| 515 |
" handlers {\n" |
| 516 |
" fence-peer \"/usr/lib/heartbeat/drbd-peer-outdater -t 5\";\n" |
| 517 |
" ...\n" |
| 518 |
" }\n" |
| 519 |
" net {\n" |
| 520 |
" fencing resource-only;\n" |
| 521 |
" ...\n" |
| 522 |
" }\n" |
| 523 |
" ...\n" |
| 524 |
"}\n" |
| 525 |
|
| 526 |
#. type: Plain text |
| 527 |
#: pacemaker.adoc:252 |
| 528 |
msgid "" |
| 529 |
"As with `dopd`, your distribution may place the `drbd-peer-outdater` binary " |
| 530 |
"in `/usr/lib64/heartbeat` depending on your system architecture." |
| 531 |
msgstr "" |
| 532 |
"与 `dopd` 一样,您的发行版可能会将 `drbd peer " |
| 533 |
"outdater` 二进制文件放在 `/usr/lib64/heartbeat` 中,具体取决于您的系统架构。" |
| 534 |
|
| 535 |
#. type: Plain text |
| 536 |
#: pacemaker.adoc:256 |
| 537 |
msgid "" |
| 538 |
"Finally, copy your `drbd.conf` to the peer node and issue `drbdadm adjust " |
| 539 |
"resource` to reconfigure your resource and reflect your changes." |
| 540 |
msgstr "最后,将 `drbd.conf` 复制到对等节点并使用 `drbdadm adjust resource` 以重新配置资源并反映所做的更改。" |
| 541 |
|
| 542 |
#. type: Title ===== |
| 543 |
#: pacemaker.adoc:258 |
| 544 |
#, no-wrap |
| 545 |
msgid "Testing `dopd` functionality" |
| 546 |
msgstr "测试 `dopd` 功能" |
| 547 |
|
| 548 |
#. type: Plain text |
| 549 |
#: pacemaker.adoc:266 |
| 550 |
msgid "" |
| 551 |
"To test whether your `dopd` setup is working correctly, interrupt the " |
| 552 |
"replication link of a configured and connected resource while Heartbeat " |
| 553 |
"services are running normally. You may do so simply by physically unplugging" |
| 554 |
" the network link, but that is fairly invasive. Instead, you may insert a " |
| 555 |
"temporary `iptables` rule to drop incoming DRBD traffic to the TCP port used" |
| 556 |
" by your resource." |
| 557 |
msgstr "" |
| 558 |
"要测试 `dopd` 设置是否正常工作,请在心跳服务正常运行时中断已配置和连接的资源的复制链接。你可以简单地通过物理方式断开网络连接,但这是相当有侵略性的。相反,您可以插入一个临时的 `iptables` 规则,将传入的DRBD流量丢到资源使用的TCP端口。" |
| 559 |
|
| 560 |
#. type: Plain text |
| 561 |
#: pacemaker.adoc:275 |
| 562 |
msgid "" |
| 563 |
"After this, you will be able to observe the resource <<s-connection-" |
| 564 |
"states,connection state>> change from indexterm:[connection " |
| 565 |
"state]indexterm:[Connected (connection state)] _Connected_ to " |
| 566 |
"indexterm:[connection state]indexterm:[Connecting (connection " |
| 567 |
"state)]_Connecting_. Allow a few seconds to pass, and you should see the " |
| 568 |
"<<s-disk-states,disk state>>become indexterm:[disk state]indexterm:[Outdated" |
| 569 |
" (disk state)]_Outdated/DUnknown_. That is what `dopd` is responsible for." |
| 570 |
msgstr "" |
| 571 |
"在此之后,您将能够观察到资源从indexterm:[connection state]indexterm:[Connected (connection state)] " |
| 572 |
"_Connected_ 更改为indexterm:[connection state]indexterm:[Connecting (connection state)] " |
| 573 |
"_Connecting_ 。稍等几秒钟,您就会看到<<s-connection-states,connection " |
| 574 |
"state>>变为indexterm:[disk state]indexterm:[Outdated(disk state)]" |
| 575 |
"_Outdated/DUnnown_。这就是 `dopd` 的责任所在。" |
| 576 |
|
| 577 |
#. type: Plain text |
| 578 |
#: pacemaker.adoc:278 |
| 579 |
msgid "" |
| 580 |
"Any attempt to switch the outdated resource to the primary role will fail " |
| 581 |
"after this." |
| 582 |
msgstr "在此之后,将过期资源切换到主要角色的任何尝试都将失败。" |
| 583 |
|
| 584 |
#. type: Plain text |
| 585 |
#: pacemaker.adoc:287 |
| 586 |
msgid "" |
| 587 |
"When re-instituting network connectivity (either by plugging the physical " |
| 588 |
"link or by removing the temporary `iptables` rule you inserted previously), " |
| 589 |
"the connection state will change to _Connected_, and then promptly to " |
| 590 |
"_SyncTarget_ (assuming changes occurred on the primary node during the " |
| 591 |
"network interruption). Then you will be able to observe a brief " |
| 592 |
"synchronization period, and finally, the previously outdated resource will " |
| 593 |
"be marked as indexterm:[disk state]indexterm:[UpToDate (disk " |
| 594 |
"state)]_UpToDate_ again." |
| 595 |
msgstr "" |
| 596 |
"重新建立网络连接时(通过插入物理链接或删除先前插入的临时 `iptables` 规则),连接状态将更改为 _Connected_ ,然后立即更改为 _SyncTarget_ (假设在网络中断期间主节点上发生了更改)。然后,您将能够观察到一个简短的同步周期,最后,以前过期的资源将再次标记为indexterm:[disk" |
| 597 |
" state]indexterm:[UpToDate(disk state)]_UpToDate_。" |
| 598 |
|
| 599 |
#. type: Title ==== |
| 600 |
#: pacemaker.adoc:290 |
| 601 |
#, no-wrap |
| 602 |
msgid "Resource-level fencing using the Cluster Information Base (CIB)" |
| 603 |
msgstr "使用集群信息库(CIB)的资源级围栏" |
| 604 |
|
| 605 |
#. type: Plain text |
| 606 |
#: pacemaker.adoc:294 |
| 607 |
msgid "" |
| 608 |
"In order to enable resource-level fencing for Pacemaker, you will have to " |
| 609 |
"set two options in `drbd.conf`:" |
| 610 |
msgstr "要为Pacemaker启用资源级围栏,必须在 `drbd.conf` 中设置两个选项:" |
| 611 |
|
| 612 |
#. type: delimited block - |
| 613 |
#: pacemaker.adoc:312 |
| 614 |
#, no-wrap |
| 615 |
msgid "" |
| 616 |
"resource <resource> {\n" |
| 617 |
" net {\n" |
| 618 |
" fencing resource-only;\n" |
| 619 |
" ...\n" |
| 620 |
" }\n" |
| 621 |
" handlers {\n" |
| 622 |
" fence-peer \"/usr/lib/drbd/crm-fence-peer.9.sh\";\n" |
| 623 |
" unfence-peer \"/usr/lib/drbd/crm-unfence-peer.9.sh\";\n" |
| 624 |
" # Note: we used to abuse the after-resync-target handler to do the\n" |
| 625 |
" # unfence, but since 2016 have a dedicated unfence-peer handler.\n" |
| 626 |
" # Using the after-resync-target handler is wrong in some corner cases.\n" |
| 627 |
" ...\n" |
| 628 |
" }\n" |
| 629 |
" ...\n" |
| 630 |
"}\n" |
| 631 |
msgstr "" |
| 632 |
"resource <resource> {\n" |
| 633 |
" net {\n" |
| 634 |
" fencing resource-only;\n" |
| 635 |
" ...\n" |
| 636 |
" }\n" |
| 637 |
" handlers {\n" |
| 638 |
" fence-peer \"/usr/lib/drbd/crm-fence-peer.9.sh\";\n" |
| 639 |
" unfence-peer \"/usr/lib/drbd/crm-unfence-peer.9.sh\";\n" |
| 640 |
" # Note: we used to abuse the after-resync-target handler to do the\n" |
| 641 |
" # unfence, but since 2016 have a dedicated unfence-peer handler.\n" |
| 642 |
" # Using the after-resync-target handler is wrong in some corner cases.\n" |
| 643 |
" ...\n" |
| 644 |
" }\n" |
| 645 |
" ...\n" |
| 646 |
"}\n" |
| 647 |
|
| 648 |
#. type: Plain text |
| 649 |
#: pacemaker.adoc:322 |
| 650 |
msgid "" |
| 651 |
"Thus, if the DRBD replication link becomes disconnected, the `crm-fence-" |
| 652 |
"peer.9.sh` script contacts the cluster manager, determines the Pacemaker " |
| 653 |
"Master/Slave resource associated with this DRBD resource, and ensures that " |
| 654 |
"the Master/Slave resource no longer gets promoted on any node other than the" |
| 655 |
" currently active one. Conversely, when the connection is re-established and" |
| 656 |
" DRBD completes its synchronization process, then that constraint is removed" |
| 657 |
" and the cluster manager is free to promote the resource on any node again." |
| 658 |
msgstr "" |
| 659 |
"因此,如果DRBD复制链接断开连接, `crm-fence-" |
| 660 |
"peer.9.sh` 脚本将联系集群管理器,确定与此DRBD资源关联的Pacemaker主/从资源,并确保主/从资源不再在当前活动的节点以外的任何节点上升级。相反,当重新建立连接并且DRBD完成其同步过程时,则移除该约束,并且集群管理器可以自由地再次提升任何节点上的资源。" |
| 661 |
|
| 662 |
#. type: Title === |
| 663 |
#: pacemaker.adoc:324 |
| 664 |
#, no-wrap |
| 665 |
msgid "Using stacked DRBD resources in Pacemaker clusters" |
| 666 |
msgstr "在Pacemaker集群中使用堆叠的DRBD资源" |
| 667 |
|
| 668 |
#. type: Plain text |
| 669 |
#: pacemaker.adoc:329 |
| 670 |
msgid "" |
| 671 |
"Stacking is deprecated in DRBD version 9.x, as more nodes can be implemented" |
| 672 |
" on a single level. See <<s-drbdconf-conns>> for details." |
| 673 |
msgstr "DRBD版本9.x中不建议使用堆栈,因为可以在单个级别上实现更多节点。有关详细信息,请参见<<s-drbdconf-conns>>。" |
| 674 |
|
| 675 |
#. type: Plain text |
| 676 |
#: pacemaker.adoc:334 |
| 677 |
msgid "" |
| 678 |
"Stacked resources allow DRBD to be used for multi-level redundancy in " |
| 679 |
"multiple-node clusters, or to establish off-site disaster recovery " |
| 680 |
"capability. This section describes how to configure DRBD and Pacemaker in " |
| 681 |
"such configurations." |
| 682 |
msgstr "堆叠资源允许DRBD用于多节点集群中的多级冗余,或建立非现场灾难恢复能力。本节描述如何在这种配置中配置DRBD和Pacemaker。" |
| 683 |
|
| 684 |
#. type: Title ==== |
| 685 |
#: pacemaker.adoc:337 |
| 686 |
#, no-wrap |
| 687 |
msgid "Adding off-site disaster recovery to Pacemaker clusters" |
| 688 |
msgstr "将异地灾难恢复添加到Pacemaker集群" |
| 689 |
|
| 690 |
#. type: Plain text |
| 691 |
#: pacemaker.adoc:344 |
| 692 |
msgid "" |
| 693 |
"In this configuration scenario, we would deal with a two-node high " |
| 694 |
"availability cluster in one site, plus a separate node which would " |
| 695 |
"presumably be housed off-site. The third node acts as a disaster recovery " |
| 696 |
"node and is a standalone server. Consider the following illustration to " |
| 697 |
"describe the concept." |
| 698 |
msgstr "" |
| 699 |
"在这个配置场景中,我们将在一个站点中处理一个两节点高可用性集群,外加一个单独的节点,该节点可能位于异地。第三个节点充当灾难恢复节点,是一个独立的服务器。考虑下面的插图来描述这个概念。" |
| 700 |
|
| 701 |
#. type: Block title |
| 702 |
#: pacemaker.adoc:345 pacemaker.adoc:436 |
| 703 |
#, no-wrap |
| 704 |
msgid "DRBD resource stacking in Pacemaker clusters" |
| 705 |
msgstr "Pacemaker集群中的DRBD资源叠加" |
| 706 |
|
| 707 |
#. type: Target for macro image |
| 708 |
#: pacemaker.adoc:346 |
| 709 |
#, no-wrap |
| 710 |
msgid "images/drbd-resource-stacking-pacemaker-3nodes.svg" |
| 711 |
msgstr "images/drbd-resource-stacking-pacemaker-3nodes.svg" |
| 712 |
|
| 713 |
#. type: Plain text |
| 714 |
#: pacemaker.adoc:350 |
| 715 |
msgid "" |
| 716 |
"In this example, 'alice' and 'bob' form a two-node Pacemaker cluster, " |
| 717 |
"whereas 'charlie' is an off-site node not managed by Pacemaker." |
| 718 |
msgstr "在本例中, `alice` 和 `bob` 组成了一个两节点Pacemaker集群,而 `charlie` 是一个非现场节点,不由Pacemaker管理。" |
| 719 |
|
| 720 |
#. type: Plain text |
| 721 |
#: pacemaker.adoc:354 |
| 722 |
msgid "" |
| 723 |
"To create such a configuration, you would first configure and initialize " |
| 724 |
"DRBD resources as described in <<s-three-nodes>>. Then, configure Pacemaker " |
| 725 |
"with the following CRM configuration:" |
| 726 |
msgstr "" |
| 727 |
"要创建这样的配置,首先要配置和初始化DRBD资源,如<<s-three-nodes>>中所述。然后,使用以下CRM配置配置Pacemaker:" |
| 728 |
|
| 729 |
#. type: delimited block - |
| 730 |
#: pacemaker.adoc:359 |
| 731 |
#, no-wrap |
| 732 |
msgid "" |
| 733 |
"primitive p_drbd_r0 ocf:linbit:drbd \\\n" |
| 734 |
"\tparams drbd_resource=\"r0\"\n" |
| 735 |
msgstr "" |
| 736 |
"primitive p_drbd_r0 ocf:linbit:drbd \\\n" |
| 737 |
"\tparams drbd_resource=\"r0\"\n" |
| 738 |
|
| 739 |
#. type: delimited block - |
| 740 |
#: pacemaker.adoc:362 |
| 741 |
#, no-wrap |
| 742 |
msgid "" |
| 743 |
"primitive p_drbd_r0-U ocf:linbit:drbd \\\n" |
| 744 |
"\tparams drbd_resource=\"r0-U\"\n" |
| 745 |
msgstr "" |
| 746 |
"primitive p_drbd_r0-U ocf:linbit:drbd \\\n" |
| 747 |
"\tparams drbd_resource=\"r0-U\"\n" |
| 748 |
|
| 749 |
#. type: delimited block - |
| 750 |
#: pacemaker.adoc:365 |
| 751 |
#, no-wrap |
| 752 |
msgid "" |
| 753 |
"primitive p_ip_stacked ocf:heartbeat:IPaddr2 \\\n" |
| 754 |
"\tparams ip=\"192.168.42.1\" nic=\"eth0\"\n" |
| 755 |
msgstr "" |
| 756 |
"primitive p_ip_stacked ocf:heartbeat:IPaddr2 \\\n" |
| 757 |
"\tparams ip=\"192.168.42.1\" nic=\"eth0\"\n" |
| 758 |
|
| 759 |
#. type: delimited block - |
| 760 |
#: pacemaker.adoc:370 |
| 761 |
#, no-wrap |
| 762 |
msgid "" |
| 763 |
"ms ms_drbd_r0 p_drbd_r0 \\\n" |
| 764 |
"\tmeta master-max=\"1\" master-node-max=\"1\" \\\n" |
| 765 |
" clone-max=\"2\" clone-node-max=\"1\" \\\n" |
| 766 |
" notify=\"true\" globally-unique=\"false\"\n" |
| 767 |
msgstr "" |
| 768 |
"ms ms_drbd_r0 p_drbd_r0 \\\n" |
| 769 |
"\tmeta master-max=\"1\" master-node-max=\"1\" \\\n" |
| 770 |
" clone-max=\"2\" clone-node-max=\"1\" \\\n" |
| 771 |
" notify=\"true\" globally-unique=\"false\"\n" |
| 772 |
|
| 773 |
#. type: delimited block - |
| 774 |
#: pacemaker.adoc:375 |
| 775 |
#, no-wrap |
| 776 |
msgid "" |
| 777 |
"ms ms_drbd_r0-U p_drbd_r0-U \\\n" |
| 778 |
"\tmeta master-max=\"1\" clone-max=\"1\" \\\n" |
| 779 |
" clone-node-max=\"1\" master-node-max=\"1\" \\\n" |
| 780 |
" notify=\"true\" globally-unique=\"false\"\n" |
| 781 |
msgstr "" |
| 782 |
"ms ms_drbd_r0-U p_drbd_r0-U \\\n" |
| 783 |
"\tmeta master-max=\"1\" clone-max=\"1\" \\\n" |
| 784 |
" clone-node-max=\"1\" master-node-max=\"1\" \\\n" |
| 785 |
" notify=\"true\" globally-unique=\"false\"\n" |
| 786 |
|
| 787 |
#. type: delimited block - |
| 788 |
#: pacemaker.adoc:378 |
| 789 |
#, no-wrap |
| 790 |
msgid "" |
| 791 |
"colocation c_drbd_r0-U_on_drbd_r0 \\\n" |
| 792 |
" inf: ms_drbd_r0-U ms_drbd_r0:Master\n" |
| 793 |
msgstr "" |
| 794 |
"colocation c_drbd_r0-U_on_drbd_r0 \\\n" |
| 795 |
" inf: ms_drbd_r0-U ms_drbd_r0:Master\n" |
| 796 |
|
| 797 |
#. type: delimited block - |
| 798 |
#: pacemaker.adoc:381 |
| 799 |
#, no-wrap |
| 800 |
msgid "" |
| 801 |
"colocation c_drbd_r0-U_on_ip \\\n" |
| 802 |
" inf: ms_drbd_r0-U p_ip_stacked\n" |
| 803 |
msgstr "" |
| 804 |
"colocation c_drbd_r0-U_on_ip \\\n" |
| 805 |
" inf: ms_drbd_r0-U p_ip_stacked\n" |
| 806 |
|
| 807 |
#. type: delimited block - |
| 808 |
#: pacemaker.adoc:384 |
| 809 |
#, no-wrap |
| 810 |
msgid "" |
| 811 |
"colocation c_ip_on_r0_master \\\n" |
| 812 |
" inf: p_ip_stacked ms_drbd_r0:Master\n" |
| 813 |
msgstr "" |
| 814 |
"colocation c_ip_on_r0_master \\\n" |
| 815 |
" inf: p_ip_stacked ms_drbd_r0:Master\n" |
| 816 |
|
| 817 |
#. type: delimited block - |
| 818 |
#: pacemaker.adoc:387 |
| 819 |
#, no-wrap |
| 820 |
msgid "" |
| 821 |
"order o_ip_before_r0-U \\\n" |
| 822 |
" inf: p_ip_stacked ms_drbd_r0-U:start\n" |
| 823 |
msgstr "" |
| 824 |
"order o_ip_before_r0-U \\\n" |
| 825 |
" inf: p_ip_stacked ms_drbd_r0-U:start\n" |
| 826 |
|
| 827 |
#. type: delimited block - |
| 828 |
#: pacemaker.adoc:390 |
| 829 |
#, no-wrap |
| 830 |
msgid "" |
| 831 |
"order o_drbd_r0_before_r0-U \\\n" |
| 832 |
" inf: ms_drbd_r0:promote ms_drbd_r0-U:start\n" |
| 833 |
msgstr "" |
| 834 |
"order o_drbd_r0_before_r0-U \\\n" |
| 835 |
" inf: ms_drbd_r0:promote ms_drbd_r0-U:start\n" |
| 836 |
|
| 837 |
#. type: Plain text |
| 838 |
#: pacemaker.adoc:395 pacemaker.adoc:496 |
| 839 |
msgid "" |
| 840 |
"Assuming you created this configuration in a temporary file named " |
| 841 |
"`/tmp/crm.txt`, you may import it into the live cluster configuration with " |
| 842 |
"the following command:" |
| 843 |
msgstr "假设您在名为 `/tmp/crm.txt` 的临时文件中创建了此配置,则可以使用以下命令将其导入实时集群配置:" |
| 844 |
|
| 845 |
#. type: delimited block - |
| 846 |
#: pacemaker.adoc:398 pacemaker.adoc:499 |
| 847 |
#, no-wrap |
| 848 |
msgid "crm configure < /tmp/crm.txt\n" |
| 849 |
msgstr "crm configure < /tmp/crm.txt\n" |
| 850 |
|
| 851 |
#. type: Plain text |
| 852 |
#: pacemaker.adoc:402 |
| 853 |
msgid "" |
| 854 |
"This configuration will ensure that the following actions occur in the " |
| 855 |
"correct order on the 'alice'/'bob' cluster:" |
| 856 |
msgstr "此配置将确保在 `alice` / `bob` 集群上按正确顺序执行以下操作:" |
| 857 |
|
| 858 |
#. type: Plain text |
| 859 |
#: pacemaker.adoc:405 |
| 860 |
msgid "" |
| 861 |
"Pacemaker starts the DRBD resource `r0` on both cluster nodes, and promotes " |
| 862 |
"one node to the Master (DRBD Primary) role." |
| 863 |
msgstr "Pacemaker在两个集群节点上启动DRBD资源 `r0` ,并将一个节点提升为Master(DRBD Primary)角色。" |
| 864 |
|
| 865 |
#. type: Plain text |
| 866 |
#: pacemaker.adoc:410 |
| 867 |
msgid "" |
| 868 |
"Pacemaker then starts the IP address 192.168.42.1, which the stacked " |
| 869 |
"resource is to use for replication to the third node. It does so on the node" |
| 870 |
" it has previously promoted to the Master role for `r0` DRBD resource." |
| 871 |
msgstr "" |
| 872 |
"Pacemaker然后启动IP地址192.168.42.1,堆叠的资源将用于复制到第三个节点。它在先前提升为 `r0` DRBD资源的Master角色的节点上执行此操作。" |
| 873 |
|
| 874 |
#. type: Plain text |
| 875 |
#: pacemaker.adoc:415 |
| 876 |
msgid "" |
| 877 |
"On the node which now has the Primary role for `r0` and also the replication" |
| 878 |
" IP address for `r0-U`, Pacemaker now starts the `r0-U` DRBD resource, which" |
| 879 |
" connects and replicates to the off-site node." |
| 880 |
msgstr "" |
| 881 |
"在现在具有 `r0` 的主要角色和 `r0-U` 的复制IP地址的节点上,Pacemaker现在启动 `r0-U` DRBD资源,该资源连接并复制到非站点节点。" |
| 882 |
|
| 883 |
#. type: Plain text |
| 884 |
#: pacemaker.adoc:418 |
| 885 |
msgid "" |
| 886 |
"Pacemaker then promotes the `r0-U` resource to the Primary role too, so it " |
| 887 |
"can be used by an application." |
| 888 |
msgstr "然后Pacemaker也将 `r0-U` 资源提升为主要角色,以便应用程序可以使用它。" |
| 889 |
|
| 890 |
#. type: Plain text |
| 891 |
#: pacemaker.adoc:422 |
| 892 |
msgid "" |
| 893 |
"Thus, this Pacemaker configuration ensures that there is not only full data " |
| 894 |
"redundancy between cluster nodes, but also to the third, off-site node." |
| 895 |
msgstr "因此,这种Pacemaker配置确保集群节点之间不仅有完全的数据冗余,而且还有到第三个非现场节点的数据冗余。" |
| 896 |
|
| 897 |
#. type: Plain text |
| 898 |
#: pacemaker.adoc:425 |
| 899 |
msgid "" |
| 900 |
"This type of setup is usually deployed together with <<s-drbd-proxy,DRBD " |
| 901 |
"Proxy>>." |
| 902 |
msgstr "这种设置通常与<<s-drbd-proxy,DRBD Proxy>>一起部署。" |
| 903 |
|
| 904 |
#. type: Title ==== |
| 905 |
#: pacemaker.adoc:427 |
| 906 |
#, no-wrap |
| 907 |
msgid "" |
| 908 |
"Using stacked resources to achieve 4-way redundancy in Pacemaker clusters" |
| 909 |
msgstr "利用堆叠资源实现Pacemaker集群的4路冗余" |
| 910 |
|
| 911 |
#. type: Plain text |
| 912 |
#: pacemaker.adoc:433 |
| 913 |
msgid "" |
| 914 |
"In this configuration, a total of three DRBD resources (two unstacked, one " |
| 915 |
"stacked) are used to achieve 4-way storage redundancy. This means that of a " |
| 916 |
"4-node cluster, up to three nodes can fail while still providing service " |
| 917 |
"availability." |
| 918 |
msgstr "" |
| 919 |
"在这种配置中,总共使用三个DRBD资源(两个未堆叠,一个堆叠)来实现4路存储冗余。这意味着,对于一个4节点集群,最多有3个节点在仍然提供服务可用性的情况下可能会出现故障。" |
| 920 |
|
| 921 |
#. type: Plain text |
| 922 |
#: pacemaker.adoc:435 |
| 923 |
msgid "Consider the following illustration to explain the concept." |
| 924 |
msgstr "考虑下面的插图来解释这个概念。" |
| 925 |
|
| 926 |
#. type: Target for macro image |
| 927 |
#: pacemaker.adoc:437 |
| 928 |
#, no-wrap |
| 929 |
msgid "images/drbd-resource-stacking-pacemaker-4nodes.svg" |
| 930 |
msgstr "images/drbd-resource-stacking-pacemaker-4nodes.svg" |
| 931 |
|
| 932 |
#. type: Plain text |
| 933 |
#: pacemaker.adoc:445 |
| 934 |
msgid "" |
| 935 |
"In this example, 'alice', 'bob', 'charlie', and 'daisy' form two two-node " |
| 936 |
"Pacemaker clusters. 'alice' and 'bob' form the cluster named `left` and " |
| 937 |
"replicate data using a DRBD resource between them, while 'charlie' and " |
| 938 |
"'daisy' do the same with a separate DRBD resource, in a cluster named " |
| 939 |
"`right`. A third, stacked DRBD resource connects the two clusters." |
| 940 |
msgstr "" |
| 941 |
"在本例中, `alice` 、 `bob` 、 `charlie` 和 `daisy` 构成两个双节点Pacemaker集群alice和bob组成了名为 `left` 的集群,并在它们之间使用DRBD资源复制数据,而charlie和daisy在名为 `right` 的集群中使用单独的DRBD资源复制数据。第三者,堆叠的DRBD资源连接两个集群。" |
| 942 |
|
| 943 |
#. type: Plain text |
| 944 |
#: pacemaker.adoc:451 |
| 945 |
msgid "" |
| 946 |
"Due to limitations in the Pacemaker cluster manager as of Pacemaker version " |
| 947 |
"1.0.5, it is not possible to create this setup in a single four-node cluster" |
| 948 |
" without disabling CIB validation, which is an advanced process not " |
| 949 |
"recommended for general-purpose use. It is anticipated that this is being " |
| 950 |
"addressed in future Pacemaker releases." |
| 951 |
msgstr "" |
| 952 |
"由于Pacemaker集群管理器自Pacemaker " |
| 953 |
"1.0.5版起的限制,在不禁用CIB验证的情况下无法在单个四节点集群中创建此设置,这是一个高级过程,不建议用于一般用途。预计这将在未来的Pacemaker版本中得到解决。" |
| 954 |
|
| 955 |
#. type: Plain text |
| 956 |
#: pacemaker.adoc:457 |
| 957 |
msgid "" |
| 958 |
"To create such a configuration, you would first configure and initialize " |
| 959 |
"DRBD resources as described in <<s-three-nodes>> (except that the remote " |
| 960 |
"half of the DRBD configuration is also stacked, not just the local cluster)." |
| 961 |
" Then, configure Pacemaker with the following CRM configuration, starting " |
| 962 |
"with the cluster `left`:" |
| 963 |
msgstr "" |
| 964 |
"要创建这样的配置,您首先要配置和初始化DRBD资源,如<<s-three-" |
| 965 |
"nodes>>中所述(除了DRBD配置的远程部分也是堆叠的,而不仅仅是本地集群)。然后,使用以下CRM配置配置Pacemaker,从集群 `left` 开始:" |
| 966 |
|
| 967 |
#. type: delimited block - |
| 968 |
#: pacemaker.adoc:462 |
| 969 |
#, no-wrap |
| 970 |
msgid "" |
| 971 |
"primitive p_drbd_left ocf:linbit:drbd \\\n" |
| 972 |
"\tparams drbd_resource=\"left\"\n" |
| 973 |
msgstr "" |
| 974 |
"primitive p_drbd_left ocf:linbit:drbd \\\n" |
| 975 |
"\tparams drbd_resource=\"left\"\n" |
| 976 |
|
| 977 |
#. type: delimited block - |
| 978 |
#: pacemaker.adoc:465 pacemaker.adoc:526 |
| 979 |
#, no-wrap |
| 980 |
msgid "" |
| 981 |
"primitive p_drbd_stacked ocf:linbit:drbd \\\n" |
| 982 |
"\tparams drbd_resource=\"stacked\"\n" |
| 983 |
msgstr "" |
| 984 |
"primitive p_drbd_stacked ocf:linbit:drbd \\\n" |
| 985 |
"\tparams drbd_resource=\"stacked\"\n" |
| 986 |
|
| 987 |
#. type: delimited block - |
| 988 |
#: pacemaker.adoc:468 |
| 989 |
#, no-wrap |
| 990 |
msgid "" |
| 991 |
"primitive p_ip_stacked_left ocf:heartbeat:IPaddr2 \\\n" |
| 992 |
"\tparams ip=\"10.9.9.100\" nic=\"eth0\"\n" |
| 993 |
msgstr "" |
| 994 |
"primitive p_ip_stacked_left ocf:heartbeat:IPaddr2 \\\n" |
| 995 |
"\tparams ip=\"10.9.9.100\" nic=\"eth0\"\n" |
| 996 |
|
| 997 |
#. type: delimited block - |
| 998 |
#: pacemaker.adoc:473 |
| 999 |
#, no-wrap |
| 1000 |
msgid "" |
| 1001 |
"ms ms_drbd_left p_drbd_left \\\n" |
| 1002 |
"\tmeta master-max=\"1\" master-node-max=\"1\" \\\n" |
| 1003 |
" clone-max=\"2\" clone-node-max=\"1\" \\\n" |
| 1004 |
" notify=\"true\"\n" |
| 1005 |
msgstr "" |
| 1006 |
"ms ms_drbd_left p_drbd_left \\\n" |
| 1007 |
"\tmeta master-max=\"1\" master-node-max=\"1\" \\\n" |
| 1008 |
" clone-max=\"2\" clone-node-max=\"1\" \\\n" |
| 1009 |
" notify=\"true\"\n" |
| 1010 |
|
| 1011 |
#. type: delimited block - |
| 1012 |
#: pacemaker.adoc:478 |
| 1013 |
#, no-wrap |
| 1014 |
msgid "" |
| 1015 |
"ms ms_drbd_stacked p_drbd_stacked \\\n" |
| 1016 |
"\tmeta master-max=\"1\" clone-max=\"1\" \\\n" |
| 1017 |
" clone-node-max=\"1\" master-node-max=\"1\" \\\n" |
| 1018 |
" notify=\"true\" target-role=\"Master\"\n" |
| 1019 |
msgstr "" |
| 1020 |
"ms ms_drbd_stacked p_drbd_stacked \\\n" |
| 1021 |
"\tmeta master-max=\"1\" clone-max=\"1\" \\\n" |
| 1022 |
" clone-node-max=\"1\" master-node-max=\"1\" \\\n" |
| 1023 |
" notify=\"true\" target-role=\"Master\"\n" |
| 1024 |
|
| 1025 |
#. type: delimited block - |
| 1026 |
#: pacemaker.adoc:481 |
| 1027 |
#, no-wrap |
| 1028 |
msgid "" |
| 1029 |
"colocation c_ip_on_left_master \\\n" |
| 1030 |
" inf: p_ip_stacked_left ms_drbd_left:Master\n" |
| 1031 |
msgstr "" |
| 1032 |
"colocation c_ip_on_left_master \\\n" |
| 1033 |
" inf: p_ip_stacked_left ms_drbd_left:Master\n" |
| 1034 |
|
| 1035 |
#. type: delimited block - |
| 1036 |
#: pacemaker.adoc:484 |
| 1037 |
#, no-wrap |
| 1038 |
msgid "" |
| 1039 |
"colocation c_drbd_stacked_on_ip_left \\\n" |
| 1040 |
" inf: ms_drbd_stacked p_ip_stacked_left\n" |
| 1041 |
msgstr "" |
| 1042 |
"colocation c_drbd_stacked_on_ip_left \\\n" |
| 1043 |
" inf: ms_drbd_stacked p_ip_stacked_left\n" |
| 1044 |
|
| 1045 |
#. type: delimited block - |
| 1046 |
#: pacemaker.adoc:487 |
| 1047 |
#, no-wrap |
| 1048 |
msgid "" |
| 1049 |
"order o_ip_before_stacked_left \\\n" |
| 1050 |
" inf: p_ip_stacked_left ms_drbd_stacked:start\n" |
| 1051 |
msgstr "" |
| 1052 |
"order o_ip_before_stacked_left \\\n" |
| 1053 |
" inf: p_ip_stacked_left ms_drbd_stacked:start\n" |
| 1054 |
|
| 1055 |
#. type: delimited block - |
| 1056 |
#: pacemaker.adoc:490 |
| 1057 |
#, no-wrap |
| 1058 |
msgid "" |
| 1059 |
"order o_drbd_left_before_stacked_left \\\n" |
| 1060 |
" inf: ms_drbd_left:promote ms_drbd_stacked:start\n" |
| 1061 |
msgstr "" |
| 1062 |
"order o_drbd_left_before_stacked_left \\\n" |
| 1063 |
" inf: ms_drbd_left:promote ms_drbd_stacked:start\n" |
| 1064 |
|
| 1065 |
#. type: Plain text |
| 1066 |
#: pacemaker.adoc:503 pacemaker.adoc:555 pacemaker.adoc:666 pacemaker.adoc:695 |
| 1067 |
msgid "" |
| 1068 |
"After adding this configuration to the CIB, Pacemaker will execute the " |
| 1069 |
"following actions:" |
| 1070 |
msgstr "将此配置添加到CIB后,Pacemaker将执行以下操作:" |
| 1071 |
|
| 1072 |
#. type: Plain text |
| 1073 |
#: pacemaker.adoc:506 |
| 1074 |
msgid "" |
| 1075 |
"Bring up the DRBD resource `left` replicating between 'alice' and 'bob' " |
| 1076 |
"promoting the resource to the Master role on one of these nodes." |
| 1077 |
msgstr "调出DRBD资源 `left` ,在 `alice` 和 `bob` 之间复制,将资源提升到其中一个节点上的Master角色。" |
| 1078 |
|
| 1079 |
#. type: Plain text |
| 1080 |
#: pacemaker.adoc:510 |
| 1081 |
msgid "" |
| 1082 |
"Bring up the IP address 10.9.9.100 (on either 'alice' or 'bob', depending on" |
| 1083 |
" which of these holds the Master role for the resource `left`)." |
| 1084 |
msgstr "调出IP地址10.9.9.100(在 `alice` 或 `bob` 上,具体取决于其中哪一个拥有资源 `left` 的主角色)。" |
| 1085 |
|
| 1086 |
#. type: Plain text |
| 1087 |
#: pacemaker.adoc:513 pacemaker.adoc:566 |
| 1088 |
msgid "" |
| 1089 |
"Bring up the DRBD resource `stacked` on the same node that holds the just-" |
| 1090 |
"configured IP address." |
| 1091 |
msgstr "将DRBD资源 `stacked` 调到保存刚才配置的IP地址的同一节点上。" |
| 1092 |
|
| 1093 |
#. type: Plain text |
| 1094 |
#: pacemaker.adoc:515 |
| 1095 |
msgid "Promote the stacked DRBD resource to the Primary role." |
| 1096 |
msgstr "将堆叠的DRBD资源提升为主角色。" |
| 1097 |
|
| 1098 |
#. type: Plain text |
| 1099 |
#: pacemaker.adoc:518 |
| 1100 |
msgid "" |
| 1101 |
"Now, proceed on the cluster `right` by creating the following configuration:" |
| 1102 |
msgstr "现在,在集群 `right` 上继续创建以下配置:" |
| 1103 |
|
| 1104 |
#. type: delimited block - |
| 1105 |
#: pacemaker.adoc:523 |
| 1106 |
#, no-wrap |
| 1107 |
msgid "" |
| 1108 |
"primitive p_drbd_right ocf:linbit:drbd \\\n" |
| 1109 |
"\tparams drbd_resource=\"right\"\n" |
| 1110 |
msgstr "" |
| 1111 |
"primitive p_drbd_right ocf:linbit:drbd \\\n" |
| 1112 |
"\tparams drbd_resource=\"right\"\n" |
| 1113 |
|
| 1114 |
#. type: delimited block - |
| 1115 |
#: pacemaker.adoc:529 |
| 1116 |
#, no-wrap |
| 1117 |
msgid "" |
| 1118 |
"primitive p_ip_stacked_right ocf:heartbeat:IPaddr2 \\\n" |
| 1119 |
"\tparams ip=\"10.9.10.101\" nic=\"eth0\"\n" |
| 1120 |
msgstr "" |
| 1121 |
"primitive p_ip_stacked_right ocf:heartbeat:IPaddr2 \\\n" |
| 1122 |
"\tparams ip=\"10.9.10.101\" nic=\"eth0\"\n" |
| 1123 |
|
| 1124 |
#. type: delimited block - |
| 1125 |
#: pacemaker.adoc:534 |
| 1126 |
#, no-wrap |
| 1127 |
msgid "" |
| 1128 |
"ms ms_drbd_right p_drbd_right \\\n" |
| 1129 |
"\tmeta master-max=\"1\" master-node-max=\"1\" \\\n" |
| 1130 |
" clone-max=\"2\" clone-node-max=\"1\" \\\n" |
| 1131 |
" notify=\"true\"\n" |
| 1132 |
msgstr "" |
| 1133 |
"ms ms_drbd_right p_drbd_right \\\n" |
| 1134 |
"\tmeta master-max=\"1\" master-node-max=\"1\" \\\n" |
| 1135 |
" clone-max=\"2\" clone-node-max=\"1\" \\\n" |
| 1136 |
" notify=\"true\"\n" |
| 1137 |
|
| 1138 |
#. type: delimited block - |
| 1139 |
#: pacemaker.adoc:539 |
| 1140 |
#, no-wrap |
| 1141 |
msgid "" |
| 1142 |
"ms ms_drbd_stacked p_drbd_stacked \\\n" |
| 1143 |
"\tmeta master-max=\"1\" clone-max=\"1\" \\\n" |
| 1144 |
" clone-node-max=\"1\" master-node-max=\"1\" \\\n" |
| 1145 |
" notify=\"true\" target-role=\"Slave\"\n" |
| 1146 |
msgstr "" |
| 1147 |
"ms ms_drbd_stacked p_drbd_stacked \\\n" |
| 1148 |
"\tmeta master-max=\"1\" clone-max=\"1\" \\\n" |
| 1149 |
" clone-node-max=\"1\" master-node-max=\"1\" \\\n" |
| 1150 |
" notify=\"true\" target-role=\"Slave\"\n" |
| 1151 |
|
| 1152 |
#. type: delimited block - |
| 1153 |
#: pacemaker.adoc:542 |
| 1154 |
#, no-wrap |
| 1155 |
msgid "" |
| 1156 |
"colocation c_drbd_stacked_on_ip_right \\\n" |
| 1157 |
" inf: ms_drbd_stacked p_ip_stacked_right\n" |
| 1158 |
msgstr "" |
| 1159 |
"colocation c_drbd_stacked_on_ip_right \\\n" |
| 1160 |
" inf: ms_drbd_stacked p_ip_stacked_right\n" |
| 1161 |
|
| 1162 |
#. type: delimited block - |
| 1163 |
#: pacemaker.adoc:545 |
| 1164 |
#, no-wrap |
| 1165 |
msgid "" |
| 1166 |
"colocation c_ip_on_right_master \\\n" |
| 1167 |
" inf: p_ip_stacked_right ms_drbd_right:Master\n" |
| 1168 |
msgstr "" |
| 1169 |
"colocation c_ip_on_right_master \\\n" |
| 1170 |
" inf: p_ip_stacked_right ms_drbd_right:Master\n" |
| 1171 |
|
| 1172 |
#. type: delimited block - |
| 1173 |
#: pacemaker.adoc:548 |
| 1174 |
#, no-wrap |
| 1175 |
msgid "" |
| 1176 |
"order o_ip_before_stacked_right \\\n" |
| 1177 |
" inf: p_ip_stacked_right ms_drbd_stacked:start\n" |
| 1178 |
msgstr "" |
| 1179 |
"order o_ip_before_stacked_right \\\n" |
| 1180 |
" inf: p_ip_stacked_right ms_drbd_stacked:start\n" |
| 1181 |
|
| 1182 |
#. type: delimited block - |
| 1183 |
#: pacemaker.adoc:551 |
| 1184 |
#, no-wrap |
| 1185 |
msgid "" |
| 1186 |
"order o_drbd_right_before_stacked_right \\\n" |
| 1187 |
" inf: ms_drbd_right:promote ms_drbd_stacked:start\n" |
| 1188 |
msgstr "" |
| 1189 |
"order o_drbd_right_before_stacked_right \\\n" |
| 1190 |
" inf: ms_drbd_right:promote ms_drbd_stacked:start\n" |
| 1191 |
|
| 1192 |
#. type: Plain text |
| 1193 |
#: pacemaker.adoc:559 |
| 1194 |
msgid "" |
| 1195 |
"Bring up the DRBD resource `right` replicating between 'charlie' and " |
| 1196 |
"'daisy', promoting the resource to the Master role on one of these nodes." |
| 1197 |
msgstr "在 `charlie` 和 `daisy` 之间启动DRBD资源 `right` 复制,将资源提升到其中一个节点上的Master角色。" |
| 1198 |
|
| 1199 |
#. type: Plain text |
| 1200 |
#: pacemaker.adoc:563 |
| 1201 |
msgid "" |
| 1202 |
"Bring up the IP address 10.9.10.101 (on either 'charlie' or 'daisy', " |
| 1203 |
"depending on which of these holds the Master role for the resource `right`)." |
| 1204 |
msgstr "调出IP地址10.9.10.101(在 `charlie` 或 `daisy` 上,具体取决于其中哪个拥有资源 `right` 的主角色)。" |
| 1205 |
|
| 1206 |
#. type: Plain text |
| 1207 |
#: pacemaker.adoc:569 |
| 1208 |
msgid "" |
| 1209 |
"Leave the stacked DRBD resource in the Secondary role (due to `target-" |
| 1210 |
"role=\"Slave\"`)." |
| 1211 |
msgstr "将堆叠的DRBD资源保留在次要角色中(由于 `target role=` Slave ``)。" |
| 1212 |
|
| 1213 |
#. type: Title === |
| 1214 |
#: pacemaker.adoc:572 |
| 1215 |
#, no-wrap |
| 1216 |
msgid "" |
| 1217 |
"Configuring DRBD to replicate between two SAN-backed Pacemaker clusters" |
| 1218 |
msgstr "配置DRBD以在两个支持SAN的Pacemaker集群之间进行复制" |
| 1219 |
|
| 1220 |
#. type: Plain text |
| 1221 |
#: pacemaker.adoc:579 |
| 1222 |
msgid "" |
| 1223 |
"indexterm:[IP address, floating peers]This is a somewhat advanced setup " |
| 1224 |
"usually employed in split-site configurations. It involves two separate " |
| 1225 |
"Pacemaker clusters, where each cluster has access to a separate Storage Area" |
| 1226 |
" Network (SAN). DRBD is then used to replicate data stored on that SAN, " |
| 1227 |
"across an IP link between sites." |
| 1228 |
msgstr "" |
| 1229 |
"indexterm:[IP address, floating peers]这是一种比较高级的设置,通常用于拆分站点配置。它包括两个独立的Pacemaker集群,每个集群都可以访问单独的存储区域网络(SAN)。然后使用DRBD通过站点之间的IP链路复制存储在该SAN上的数据。" |
| 1230 |
|
| 1231 |
#. type: Plain text |
| 1232 |
#: pacemaker.adoc:581 |
| 1233 |
msgid "Consider the following illustration to describe the concept." |
| 1234 |
msgstr "考虑下面的插图来描述这个概念。" |
| 1235 |
|
| 1236 |
#. type: Block title |
| 1237 |
#: pacemaker.adoc:582 |
| 1238 |
#, no-wrap |
| 1239 |
msgid "Using DRBD to replicate between SAN-based clusters" |
| 1240 |
msgstr "使用DRBD在基于SAN的集群之间进行复制" |
| 1241 |
|
| 1242 |
#. type: Target for macro image |
| 1243 |
#: pacemaker.adoc:583 |
| 1244 |
#, no-wrap |
| 1245 |
msgid "images/drbd-pacemaker-floating-peers.svg" |
| 1246 |
msgstr "images/drbd-pacemaker-floating-peers.svg" |
| 1247 |
|
| 1248 |
#. type: Plain text |
| 1249 |
#: pacemaker.adoc:589 |
| 1250 |
msgid "" |
| 1251 |
"Which of the individual nodes in each site currently acts as the DRBD peer " |
| 1252 |
"is not explicitly defined -- the DRBD peers <<s-floating-peers,are said to " |
| 1253 |
"_float_>>; that is, DRBD binds to virtual IP addresses not tied to a " |
| 1254 |
"specific physical machine." |
| 1255 |
msgstr "" |
| 1256 |
"每个站点中当前充当DRBD对等点的单个节点中的哪一个没有明确定义 - DRBD对等点<<s-floating-peers, 被称为是 _浮动的_>>," |
| 1257 |
";也就是说,DRBD绑定到没有绑定到特定物理机的虚拟IP地址。" |
| 1258 |
|
| 1259 |
#. type: Plain text |
| 1260 |
#: pacemaker.adoc:594 |
| 1261 |
msgid "" |
| 1262 |
"This type of setup is usually deployed together with <<s-drbd-proxy,DRBD " |
| 1263 |
"Proxy>> and/or <<s-truck-based-replication,truck based replication>>." |
| 1264 |
msgstr "" |
| 1265 |
"这种类型的设置通常与<<s-drbd-proxy,DRBD Proxy>>和/或<<s-truck-based-replication,truck " |
| 1266 |
"based replication>>一起部署。" |
| 1267 |
|
| 1268 |
#. type: Plain text |
| 1269 |
#: pacemaker.adoc:597 |
| 1270 |
msgid "" |
| 1271 |
"Since this type of setup deals with shared storage, configuring and testing " |
| 1272 |
"STONITH is absolutely vital for it to work properly." |
| 1273 |
msgstr "由于这种类型的设置处理共享存储,因此对STONITH进行配置和测试对于它的正常工作至关重要。" |
| 1274 |
|
| 1275 |
#. type: Title ==== |
| 1276 |
#: pacemaker.adoc:600 |
| 1277 |
#, no-wrap |
| 1278 |
msgid "DRBD resource configuration" |
| 1279 |
msgstr "DRBD资源配置" |
| 1280 |
|
| 1281 |
#. type: Plain text |
| 1282 |
#: pacemaker.adoc:604 |
| 1283 |
msgid "" |
| 1284 |
"To enable your DRBD resource to float, configure it in `drbd.conf` in the " |
| 1285 |
"following fashion:" |
| 1286 |
msgstr "要使DRBD资源浮动,请按以下方式在 `DRBD.conf` 中配置它:" |
| 1287 |
|
| 1288 |
#. type: delimited block - |
| 1289 |
#: pacemaker.adoc:615 |
| 1290 |
#, no-wrap |
| 1291 |
msgid "" |
| 1292 |
"resource <resource> {\n" |
| 1293 |
" ...\n" |
| 1294 |
" device /dev/drbd0;\n" |
| 1295 |
" disk /dev/sda1;\n" |
| 1296 |
" meta-disk internal;\n" |
| 1297 |
" floating 10.9.9.100:7788;\n" |
| 1298 |
" floating 10.9.10.101:7788;\n" |
| 1299 |
"}\n" |
| 1300 |
msgstr "" |
| 1301 |
"resource <resource> {\n" |
| 1302 |
" ...\n" |
| 1303 |
" device /dev/drbd0;\n" |
| 1304 |
" disk /dev/sda1;\n" |
| 1305 |
" meta-disk internal;\n" |
| 1306 |
" floating 10.9.9.100:7788;\n" |
| 1307 |
" floating 10.9.10.101:7788;\n" |
| 1308 |
"}\n" |
| 1309 |
|
| 1310 |
#. type: Plain text |
| 1311 |
#: pacemaker.adoc:626 |
| 1312 |
msgid "" |
| 1313 |
"The `floating` keyword replaces the `on <host>` sections normally found in " |
| 1314 |
"the resource configuration. In this mode, DRBD identifies peers by IP " |
| 1315 |
"address and TCP port, rather than by host name. It is important to note that" |
| 1316 |
" the addresses specified must be virtual cluster IP addresses, rather than " |
| 1317 |
"physical node IP addresses, for floating to function properly. As shown in " |
| 1318 |
"the example, in split-site configurations the two floating addresses can be " |
| 1319 |
"expected to belong to two separate IP networks -- it is thus vital for " |
| 1320 |
"routers and firewalls to properly allow DRBD replication traffic between the" |
| 1321 |
" nodes." |
| 1322 |
msgstr "" |
| 1323 |
"`floating` 关键字替换通常在资源配置中找到的 `on <host>` 部分。在这种模式下,DRBD通过IP地址和TCP端口而不是主机名来标识对等点。需要注意的是,指定的地址必须是虚拟集群IP地址,而不是物理节点IP地址,才能使浮点正常工作。如示例所示,在拆分站点配置中,这两个浮动地址可能属于两个独立的IP网络——因此,路由器和防火墙必须正确地允许节点之间的DRBD复制通信。" |
| 1324 |
|
| 1325 |
#. type: Title ==== |
| 1326 |
#: pacemaker.adoc:629 |
| 1327 |
#, no-wrap |
| 1328 |
msgid "Pacemaker resource configuration" |
| 1329 |
msgstr "Pacemaker资源配置" |
| 1330 |
|
| 1331 |
#. type: Plain text |
| 1332 |
#: pacemaker.adoc:634 |
| 1333 |
msgid "" |
| 1334 |
"A DRBD floating peers setup, in terms of Pacemaker configuration, involves " |
| 1335 |
"the following items (in each of the two Pacemaker clusters involved):" |
| 1336 |
msgstr "就Pacemaker配置而言,DRBD浮动对等点设置包括以下各项(在涉及的两个Pacemaker集群中的每一个中):" |
| 1337 |
|
| 1338 |
#. type: Plain text |
| 1339 |
#: pacemaker.adoc:636 |
| 1340 |
msgid "A virtual cluster IP address." |
| 1341 |
msgstr "虚拟集群IP地址。" |
| 1342 |
|
| 1343 |
#. type: Plain text |
| 1344 |
#: pacemaker.adoc:638 |
| 1345 |
msgid "A master/slave DRBD resource (using the DRBD OCF resource agent)." |
| 1346 |
msgstr "主/从DRBD资源(使用DRBD OCF资源代理)。" |
| 1347 |
|
| 1348 |
#. type: Plain text |
| 1349 |
#: pacemaker.adoc:641 |
| 1350 |
msgid "" |
| 1351 |
"Pacemaker constraints ensuring that resources are started on the correct " |
| 1352 |
"nodes, and in the correct order." |
| 1353 |
msgstr "Pacemaker约束确保资源以正确的顺序在正确的节点上启动。" |
| 1354 |
|
| 1355 |
#. type: Plain text |
| 1356 |
#: pacemaker.adoc:645 |
| 1357 |
msgid "" |
| 1358 |
"To configure a resource named `mysql` in a floating peers configuration in a" |
| 1359 |
" 2-node cluster, using the replication address `10.9.9.100`, configure " |
| 1360 |
"Pacemaker with the following `crm` commands:" |
| 1361 |
msgstr "" |
| 1362 |
"要使用复制地址 `10.9.9.100` 在2节点集群的浮动对等配置中配置名为 `mysql` 的资源,请使用以下 `crm` 命令配置Pacemaker:" |
| 1363 |
|
| 1364 |
#. type: delimited block - |
| 1365 |
#: pacemaker.adoc:662 |
| 1366 |
#, no-wrap |
| 1367 |
msgid "" |
| 1368 |
"crm configure\n" |
| 1369 |
"crm(live)configure# primitive p_ip_float_left ocf:heartbeat:IPaddr2 \\\n" |
| 1370 |
" params ip=10.9.9.100\n" |
| 1371 |
"crm(live)configure# primitive p_drbd_mysql ocf:linbit:drbd \\\n" |
| 1372 |
" params drbd_resource=mysql\n" |
| 1373 |
"crm(live)configure# ms ms_drbd_mysql drbd_mysql \\\n" |
| 1374 |
" meta master-max=\"1\" master-node-max=\"1\" \\\n" |
| 1375 |
" clone-max=\"1\" clone-node-max=\"1\" \\\n" |
| 1376 |
" notify=\"true\" target-role=\"Master\"\n" |
| 1377 |
"crm(live)configure# order drbd_after_left \\\n" |
| 1378 |
" inf: p_ip_float_left ms_drbd_mysql\n" |
| 1379 |
"crm(live)configure# colocation drbd_on_left \\\n" |
| 1380 |
" inf: ms_drbd_mysql p_ip_float_left\n" |
| 1381 |
"crm(live)configure# commit\n" |
| 1382 |
"bye\n" |
| 1383 |
msgstr "" |
| 1384 |
"crm configure\n" |
| 1385 |
"crm(live)configure# primitive p_ip_float_left ocf:heartbeat:IPaddr2 \\\n" |
| 1386 |
" params ip=10.9.9.100\n" |
| 1387 |
"crm(live)configure# primitive p_drbd_mysql ocf:linbit:drbd \\\n" |
| 1388 |
" params drbd_resource=mysql\n" |
| 1389 |
"crm(live)configure# ms ms_drbd_mysql drbd_mysql \\\n" |
| 1390 |
" meta master-max=\"1\" master-node-max=\"1\" \\\n" |
| 1391 |
" clone-max=\"1\" clone-node-max=\"1\" \\\n" |
| 1392 |
" notify=\"true\" target-role=\"Master\"\n" |
| 1393 |
"crm(live)configure# order drbd_after_left \\\n" |
| 1394 |
" inf: p_ip_float_left ms_drbd_mysql\n" |
| 1395 |
"crm(live)configure# colocation drbd_on_left \\\n" |
| 1396 |
" inf: ms_drbd_mysql p_ip_float_left\n" |
| 1397 |
"crm(live)configure# commit\n" |
| 1398 |
"bye\n" |
| 1399 |
|
| 1400 |
#. type: Plain text |
| 1401 |
#: pacemaker.adoc:668 |
| 1402 |
msgid "Bring up the IP address 10.9.9.100 (on either 'alice' or 'bob')." |
| 1403 |
msgstr "调出IP地址10.9.9.100(在 `alice` 或 `bob` 上)。" |
| 1404 |
|
| 1405 |
#. type: Plain text |
| 1406 |
#: pacemaker.adoc:669 pacemaker.adoc:699 |
| 1407 |
msgid "Bring up the DRBD resource according to the IP address configured." |
| 1408 |
msgstr "根据配置的IP地址调出DRBD资源。" |
| 1409 |
|
| 1410 |
#. type: Plain text |
| 1411 |
#: pacemaker.adoc:670 |
| 1412 |
msgid "Promote the DRBD resource to the Primary role." |
| 1413 |
msgstr "将DRBD资源提升为主要角色。" |
| 1414 |
|
| 1415 |
#. type: Plain text |
| 1416 |
#: pacemaker.adoc:674 |
| 1417 |
msgid "" |
| 1418 |
"Then, in order to create the matching configuration in the other cluster, " |
| 1419 |
"configure _that_ Pacemaker instance with the following commands:" |
| 1420 |
msgstr "然后,为了在另一个集群中创建匹配的配置,请使用以下命令配置Pacemaker实例:" |
| 1421 |
|
| 1422 |
#. type: delimited block - |
| 1423 |
#: pacemaker.adoc:691 |
| 1424 |
#, no-wrap |
| 1425 |
msgid "" |
| 1426 |
"crm configure\n" |
| 1427 |
"crm(live)configure# primitive p_ip_float_right ocf:heartbeat:IPaddr2 \\\n" |
| 1428 |
" params ip=10.9.10.101\n" |
| 1429 |
"crm(live)configure# primitive drbd_mysql ocf:linbit:drbd \\\n" |
| 1430 |
" params drbd_resource=mysql\n" |
| 1431 |
"crm(live)configure# ms ms_drbd_mysql drbd_mysql \\\n" |
| 1432 |
" meta master-max=\"1\" master-node-max=\"1\" \\\n" |
| 1433 |
" clone-max=\"1\" clone-node-max=\"1\" \\\n" |
| 1434 |
" notify=\"true\" target-role=\"Slave\"\n" |
| 1435 |
"crm(live)configure# order drbd_after_right \\\n" |
| 1436 |
" inf: p_ip_float_right ms_drbd_mysql\n" |
| 1437 |
"crm(live)configure# colocation drbd_on_right\n" |
| 1438 |
" inf: ms_drbd_mysql p_ip_float_right\n" |
| 1439 |
"crm(live)configure# commit\n" |
| 1440 |
"bye\n" |
| 1441 |
msgstr "" |
| 1442 |
"crm configure\n" |
| 1443 |
"crm(live)configure# primitive p_ip_float_right ocf:heartbeat:IPaddr2 \\\n" |
| 1444 |
" params ip=10.9.10.101\n" |
| 1445 |
"crm(live)configure# primitive drbd_mysql ocf:linbit:drbd \\\n" |
| 1446 |
" params drbd_resource=mysql\n" |
| 1447 |
"crm(live)configure# ms ms_drbd_mysql drbd_mysql \\\n" |
| 1448 |
" meta master-max=\"1\" master-node-max=\"1\" \\\n" |
| 1449 |
" clone-max=\"1\" clone-node-max=\"1\" \\\n" |
| 1450 |
" notify=\"true\" target-role=\"Slave\"\n" |
| 1451 |
"crm(live)configure# order drbd_after_right \\\n" |
| 1452 |
" inf: p_ip_float_right ms_drbd_mysql\n" |
| 1453 |
"crm(live)configure# colocation drbd_on_right\n" |
| 1454 |
" inf: ms_drbd_mysql p_ip_float_right\n" |
| 1455 |
"crm(live)configure# commit\n" |
| 1456 |
"bye\n" |
| 1457 |
|
| 1458 |
#. type: Plain text |
| 1459 |
#: pacemaker.adoc:698 |
| 1460 |
msgid "Bring up the IP address 10.9.10.101 (on either 'charlie' or 'daisy')." |
| 1461 |
msgstr "调出IP地址10.9.10.101(在 `charlie` 或 `daisy` 上)。" |
| 1462 |
|
| 1463 |
#. type: Plain text |
| 1464 |
#: pacemaker.adoc:701 |
| 1465 |
msgid "" |
| 1466 |
"Leave the DRBD resource in the Secondary role (due to `target-" |
| 1467 |
"role=\"Slave\"`)." |
| 1468 |
msgstr "将DRBD资源保留在次要角色中(由于 `target role=\"Slave\" `)。" |
| 1469 |
|
| 1470 |
#. type: Title ==== |
| 1471 |
#: pacemaker.adoc:704 |
| 1472 |
#, no-wrap |
| 1473 |
msgid "Site fail-over" |
| 1474 |
msgstr "站点故障转移" |
| 1475 |
|
| 1476 |
#. type: Plain text |
| 1477 |
#: pacemaker.adoc:710 |
| 1478 |
msgid "" |
| 1479 |
"In split-site configurations, it may be necessary to transfer services from " |
| 1480 |
"one site to another. This may be a consequence of a scheduled transition, or" |
| 1481 |
" of a disastrous event. In case the transition is a normal, anticipated " |
| 1482 |
"event, the recommended course of action is this:" |
| 1483 |
msgstr "" |
| 1484 |
"在拆分站点配置中,可能需要将服务从一个站点传输到另一个站点。这可能是计划过渡的结果,也可能是灾难性事件的结果。如果转换是正常的预期事件,建议采取以下行动:" |
| 1485 |
|
| 1486 |
#. type: Plain text |
| 1487 |
#: pacemaker.adoc:716 |
| 1488 |
msgid "" |
| 1489 |
"Connect to the cluster on the site about to relinquish resources, and change" |
| 1490 |
" the affected DRBD resource's `target-role` attribute from `Master` to " |
| 1491 |
"`Slave`. This will shut down any resources depending on the Primary role of " |
| 1492 |
"the DRBD resource, demote it, and continue to run, ready to receive updates " |
| 1493 |
"from a new Primary." |
| 1494 |
msgstr "" |
| 1495 |
"连接到站点上即将放弃资源的集群,并将受影响的DRBD资源的 `target " |
| 1496 |
"role` 属性从 `Master` 更改为 `Slave` 。这将根据DRBD资源的主要角色关闭所有资源,将其降级并继续运行,以便从新的主要资源接收更新。" |
| 1497 |
|
| 1498 |
#. type: Plain text |
| 1499 |
#: pacemaker.adoc:722 |
| 1500 |
msgid "" |
| 1501 |
"Connect to the cluster on the site about to take over resources, and change " |
| 1502 |
"the affected DRBD resource's `target-role` attribute from `Slave` to " |
| 1503 |
"`Master`. This will promote the DRBD resources, start any other Pacemaker " |
| 1504 |
"resources depending on the Primary role of the DRBD resource, and replicate " |
| 1505 |
"updates to the remote site." |
| 1506 |
msgstr "" |
| 1507 |
"连接到站点上即将接管资源的集群,并将受影响的DRBD资源的 `target " |
| 1508 |
"role` 属性从 `Slave` 更改为 `Master` 。这将提升DRBD资源,根据DRBD资源的主要角色启动任何其他Pacemaker资源,并将更新复制到远程站点。" |
| 1509 |
|
| 1510 |
#. type: Plain text |
| 1511 |
#: pacemaker.adoc:724 |
| 1512 |
msgid "To fail back, simply reverse the procedure." |
| 1513 |
msgstr "若要退回,只需颠倒程序即可。" |
| 1514 |
|
| 1515 |
#. type: Plain text |
| 1516 |
#: pacemaker.adoc:728 |
| 1517 |
msgid "" |
| 1518 |
"In the event that of a catastrophic outage on the active site, it can be " |
| 1519 |
"expected that the site is off line and no longer replicated to the backup " |
| 1520 |
"site. In such an event:" |
| 1521 |
msgstr "在活动站点发生灾难性停机的情况下,可以预期该站点已脱机,不再复制到备份站点。在这种情况下:" |
| 1522 |
|
| 1523 |
#. type: Plain text |
| 1524 |
#: pacemaker.adoc:734 |
| 1525 |
msgid "" |
| 1526 |
"Connect to the cluster on the still-functioning site resources, and change " |
| 1527 |
"the affected DRBD resource's `target-role` attribute from `Slave` to " |
| 1528 |
"`Master`. This will promote the DRBD resources, and start any other " |
| 1529 |
"Pacemaker resources depending on the Primary role of the DRBD resource." |
| 1530 |
msgstr "" |
| 1531 |
"连接到仍在运行的站点资源上的集群,并将受影响的DRBD资源的 `target " |
| 1532 |
"role` 属性从 `Slave` 更改为 `Master` 。这将提升DRBD资源,并根据DRBD资源的主要角色启动任何其他Pacemaker资源。" |
| 1533 |
|
| 1534 |
#. type: Plain text |
| 1535 |
#: pacemaker.adoc:738 |
| 1536 |
msgid "" |
| 1537 |
"When the original site is restored or rebuilt, you may connect the DRBD " |
| 1538 |
"resources again, and subsequently fail back using the reverse procedure." |
| 1539 |
msgstr "还原或重建原始站点时,可以再次连接DRBD资源,然后使用相反的过程进行故障恢复。" |