| 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 |
#. type: Title == |
| 20 |
#: lvm.adoc:2 |
| 21 |
#, no-wrap |
| 22 |
msgid "Using LVM with DRBD" |
| 23 |
msgstr "在DRBD中使用LVM" |
| 24 |
|
| 25 |
#. type: Plain text |
| 26 |
#: lvm.adoc:6 |
| 27 |
msgid "" |
| 28 |
"indexterm:[LVM]indexterm:[Logical Volume Management]This chapter deals with " |
| 29 |
"managing DRBD in conjunction with LVM2. In particular, it covers" |
| 30 |
msgstr "" |
| 31 |
"indexterm:[LVM]indexterm:[Logical Volume " |
| 32 |
"Management]本章讨论如何结合LVM2管理DRBD。特别是,它包括" |
| 33 |
|
| 34 |
#. type: Plain text |
| 35 |
#: lvm.adoc:8 |
| 36 |
msgid "using LVM Logical Volumes as backing devices for DRBD;" |
| 37 |
msgstr "使用LVM逻辑卷作为DRBD的备份设备;" |
| 38 |
|
| 39 |
#. type: Plain text |
| 40 |
#: lvm.adoc:10 |
| 41 |
msgid "using DRBD devices as Physical Volumes for LVM;" |
| 42 |
msgstr "使用DRBD设备作为LVM的物理卷;" |
| 43 |
|
| 44 |
#. type: Plain text |
| 45 |
#: lvm.adoc:13 |
| 46 |
msgid "" |
| 47 |
"combining these to concepts to implement a layered LVM approach using DRBD." |
| 48 |
msgstr "结合这些概念,使用DRBD实现分层LVM方法。" |
| 49 |
|
| 50 |
#. type: Plain text |
| 51 |
#: lvm.adoc:18 |
| 52 |
msgid "" |
| 53 |
"If you happen to be unfamiliar with these terms to begin with, <<s-lvm-" |
| 54 |
"primer>> may serve as your LVM starting point -- although you are always " |
| 55 |
"encouraged, of course, to familiarize yourself with LVM in some more detail " |
| 56 |
"than this section provides." |
| 57 |
msgstr "" |
| 58 |
"如果您碰巧不熟悉这些术语,那么<<s-lvm-primer>>可以作为您的lvm起点 - 当然,我们始终鼓励您在本节提供的更多细节中熟悉lvm。" |
| 59 |
|
| 60 |
#. type: Title === |
| 61 |
#: lvm.adoc:20 |
| 62 |
#, no-wrap |
| 63 |
msgid "LVM primer" |
| 64 |
msgstr "LVM基础" |
| 65 |
|
| 66 |
#. type: Plain text |
| 67 |
#: lvm.adoc:27 |
| 68 |
msgid "" |
| 69 |
"LVM2 is an implementation of logical volume management in the context of the" |
| 70 |
" Linux device mapper framework. It has practically nothing in common, other " |
| 71 |
"than the name and acronym, with the original LVM implementation. The old " |
| 72 |
"implementation (now retroactively named \"LVM1\") is considered obsolete; it" |
| 73 |
" is not covered in this section." |
| 74 |
msgstr "" |
| 75 |
"LVM2是Linux device mapper框架上下文中逻辑卷管理的实现。它实际上与原始LVM实现没有任何共同点,除了名称和缩写。旧的实现(现在追溯命名为 \"LVM1\")被认为是过时的;本节不涉及它。" |
| 76 |
|
| 77 |
#. type: Plain text |
| 78 |
#: lvm.adoc:30 |
| 79 |
msgid "" |
| 80 |
"When working with LVM, it is important to understand its most basic " |
| 81 |
"concepts:" |
| 82 |
msgstr "在使用LVM时,必须了解其最基本的概念:" |
| 83 |
|
| 84 |
#. type: Block title |
| 85 |
#: lvm.adoc:32 |
| 86 |
#, no-wrap |
| 87 |
msgid "Physical Volume (PV)" |
| 88 |
msgstr "物理卷(PV)" |
| 89 |
|
| 90 |
#. type: Plain text |
| 91 |
#: lvm.adoc:38 |
| 92 |
msgid "" |
| 93 |
"indexterm:[LVM]indexterm:[Physical Volume (LVM)]A PV is an underlying block " |
| 94 |
"device exclusively managed by LVM. PVs can either be entire hard disks or " |
| 95 |
"individual partitions. It is common practice to create a partition table on " |
| 96 |
"the hard disk where one partition is dedicated to the use by the Linux LVM." |
| 97 |
msgstr "" |
| 98 |
"indexterm:[LVM]indexterm:[Physical " |
| 99 |
"Volume(LVM)]PV是由LVM独占管理的底层块设备。pv可以是整个硬盘,也可以是单独的分区。通常的做法是在硬盘上创建一个分区表,其中一个分区专用于Linux" |
| 100 |
" LVM的使用。" |
| 101 |
|
| 102 |
#. type: Plain text |
| 103 |
#: lvm.adoc:43 |
| 104 |
msgid "" |
| 105 |
"The partition type \"Linux LVM\" (signature `0x8E`) can be used to identify " |
| 106 |
"partitions for exclusive use by LVM. This, however, is not required -- LVM " |
| 107 |
"recognizes PVs by way of a signature written to the device upon PV " |
| 108 |
"initialization." |
| 109 |
msgstr "" |
| 110 |
"分区类型 \"Linux " |
| 111 |
"LVM\"(签名 `0x8E`)可用于标识供LVM独占使用的分区。然而,这并不是必需的 - LVM通过在PV初始化时写入设备的签名来识别PV。" |
| 112 |
|
| 113 |
#. type: Block title |
| 114 |
#: lvm.adoc:44 |
| 115 |
#, no-wrap |
| 116 |
msgid "Volume Group (VG)" |
| 117 |
msgstr "卷组(VG)" |
| 118 |
|
| 119 |
#. type: Plain text |
| 120 |
#: lvm.adoc:49 |
| 121 |
msgid "" |
| 122 |
"indexterm:[LVM]indexterm:[Volume Group (LVM)]A VG is the basic " |
| 123 |
"administrative unit of the LVM. A VG may include one or more several PVs. " |
| 124 |
"Every VG has a unique name. A VG may be extended during runtime by adding " |
| 125 |
"additional PVs, or by enlarging an existing PV." |
| 126 |
msgstr "" |
| 127 |
"indexterm:[LVM]indexterm:[Volume " |
| 128 |
"Group(LVM)]VG是LVM的基本管理单元。VG可以包括一个或多个pv。每个VG都有一个唯一的名称。VG可以在运行时通过添加额外的PV或通过扩大现有的PV来扩展。" |
| 129 |
|
| 130 |
#. type: Block title |
| 131 |
#: lvm.adoc:50 |
| 132 |
#, no-wrap |
| 133 |
msgid "Logical Volume (LV)" |
| 134 |
msgstr "逻辑卷(LV)" |
| 135 |
|
| 136 |
#. type: Plain text |
| 137 |
#: lvm.adoc:58 |
| 138 |
msgid "" |
| 139 |
"indexterm:[LVM]indexterm:[Logical Volume (LVM)]LVs may be created during " |
| 140 |
"runtime within VGs and are available to the other parts of the kernel as " |
| 141 |
"regular block devices. As such, they may be used to hold a file system, or " |
| 142 |
"for any other purpose block devices may be used for. LVs may be resized " |
| 143 |
"while they are online, and they may also be moved from one PV to another (as" |
| 144 |
" long as the PVs are part of the same VG)." |
| 145 |
msgstr "" |
| 146 |
"indexterm:[LVM]indexterm:[Logical " |
| 147 |
"Volume(LVM)]LVs可以在VGs中的运行时创建,并且可以作为常规块设备供内核的其他部分使用。因此,它们可用于保存文件系统,或用于任何其他目的,块设备可用于。LVs可以在联机时调整大小,也可以从一个PV移动到另一个PV(只要PV是同一VG的一部分)。" |
| 148 |
|
| 149 |
#. type: Block title |
| 150 |
#: lvm.adoc:59 |
| 151 |
#, no-wrap |
| 152 |
msgid "Snapshot Logical Volume (SLV)" |
| 153 |
msgstr "快照逻辑卷(SLV)" |
| 154 |
|
| 155 |
#. type: Plain text |
| 156 |
#: lvm.adoc:65 |
| 157 |
msgid "" |
| 158 |
"indexterm:[snapshots (LVM)]indexterm:[LVM]Snapshots are temporary point-in-" |
| 159 |
"time copies of LVs. Creating snapshots is an operation that completes almost" |
| 160 |
" instantly, even if the original LV (the _origin volume_) has a size of " |
| 161 |
"several hundred GiByte. Usually, a snapshot requires significantly less " |
| 162 |
"space than the original LV." |
| 163 |
msgstr "" |
| 164 |
"indexterm:[snapshots(LVM)]indexterm:[LVM]快照是LVs的临时时间点副本。创建快照是一个几乎立即完成的操作,即使原始LV(原始卷)的大小为几百吉比特。通常,快照需要的空间比原始LV少得多。" |
| 165 |
|
| 166 |
#. type: Block title |
| 167 |
#: lvm.adoc:67 |
| 168 |
#, no-wrap |
| 169 |
msgid "LVM overview" |
| 170 |
msgstr "LVM概述" |
| 171 |
|
| 172 |
#. type: Target for macro image |
| 173 |
#: lvm.adoc:68 |
| 174 |
#, no-wrap |
| 175 |
msgid "images/lvm.svg" |
| 176 |
msgstr "images/lvm.svg" |
| 177 |
|
| 178 |
#. type: Title === |
| 179 |
#: lvm.adoc:72 |
| 180 |
#, no-wrap |
| 181 |
msgid "Using a Logical Volume as a DRBD backing device" |
| 182 |
msgstr "使用逻辑卷作为DRBD备份设备" |
| 183 |
|
| 184 |
#. type: Plain text |
| 185 |
#: lvm.adoc:79 |
| 186 |
msgid "" |
| 187 |
"indexterm:[LVM]indexterm:[Logical Volume (LVM)]Since an existing Logical " |
| 188 |
"Volume is simply a block device in Linux terms, you may of course use it as " |
| 189 |
"a DRBD backing device. To use LV's in this manner, you simply create them, " |
| 190 |
"and then initialize them for DRBD as you normally would." |
| 191 |
msgstr "" |
| 192 |
"indexterm:[LVM]indexterm:[Logical " |
| 193 |
"Volume(LVM)]要以这种方式使用LV,只需创建它们,然后像通常那样为DRBD初始化它们。" |
| 194 |
|
| 195 |
#. type: Plain text |
| 196 |
#: lvm.adoc:84 |
| 197 |
msgid "" |
| 198 |
"This example assumes that a Volume Group named `foo` already exists on both " |
| 199 |
"nodes of on your LVM-enabled system, and that you wish to create a DRBD " |
| 200 |
"resource named `r0` using a Logical Volume in that Volume Group." |
| 201 |
msgstr "此示例假设在启用LVM的系统上的两个节点上都已存在名为 `foo` 的卷组,并且您希望使用该卷组中的逻辑卷创建名为 `r0` 的DRBD资源。" |
| 202 |
|
| 203 |
#. type: Plain text |
| 204 |
#: lvm.adoc:87 |
| 205 |
msgid "" |
| 206 |
"First, you create the Logical Volume: indexterm:[LVM]indexterm:[lvcreate " |
| 207 |
"(LVM command)]" |
| 208 |
msgstr "首先,创建逻辑卷:indexterm:[LVM]indexterm:[lvcreate (LVM command)]" |
| 209 |
|
| 210 |
#. type: delimited block - |
| 211 |
#: lvm.adoc:90 |
| 212 |
#, no-wrap |
| 213 |
msgid "" |
| 214 |
"# lvcreate --name bar --size 10G foo\n" |
| 215 |
"Logical volume \"bar\" created\n" |
| 216 |
msgstr "" |
| 217 |
"# lvcreate --name bar --size 10G foo\n" |
| 218 |
"Logical volume \"bar\" created\n" |
| 219 |
|
| 220 |
#. type: Plain text |
| 221 |
#: lvm.adoc:95 |
| 222 |
msgid "" |
| 223 |
"Of course, you must complete this command on both nodes of your DRBD " |
| 224 |
"cluster. After this, you should have a block device named `/dev/foo/bar` on " |
| 225 |
"either node." |
| 226 |
msgstr "当然,您必须在DRBD集群的两个节点上完成此命令。之后,在任一节点上都应该有一个名为 `/dev/foo/bar` 的块设备。" |
| 227 |
|
| 228 |
#. type: Plain text |
| 229 |
#: lvm.adoc:98 |
| 230 |
msgid "" |
| 231 |
"Then, you can simply enter the newly-created volumes in your resource " |
| 232 |
"configuration:" |
| 233 |
msgstr "然后,只需在资源配置中输入新创建的卷:" |
| 234 |
|
| 235 |
#. type: delimited block - |
| 236 |
#: lvm.adoc:114 |
| 237 |
#, no-wrap |
| 238 |
msgid "" |
| 239 |
"resource r0 {\n" |
| 240 |
" ...\n" |
| 241 |
" on alice {\n" |
| 242 |
" device /dev/drbd0;\n" |
| 243 |
" disk /dev/foo/bar;\n" |
| 244 |
" ...\n" |
| 245 |
" }\n" |
| 246 |
" on bob {\n" |
| 247 |
" device /dev/drbd0;\n" |
| 248 |
" disk /dev/foo/bar;\n" |
| 249 |
" ...\n" |
| 250 |
" }\n" |
| 251 |
"}\n" |
| 252 |
msgstr "" |
| 253 |
"resource r0 {\n" |
| 254 |
" ...\n" |
| 255 |
" on alice {\n" |
| 256 |
" device /dev/drbd0;\n" |
| 257 |
" disk /dev/foo/bar;\n" |
| 258 |
" ...\n" |
| 259 |
" }\n" |
| 260 |
" on bob {\n" |
| 261 |
" device /dev/drbd0;\n" |
| 262 |
" disk /dev/foo/bar;\n" |
| 263 |
" ...\n" |
| 264 |
" }\n" |
| 265 |
"}\n" |
| 266 |
|
| 267 |
#. type: Plain text |
| 268 |
#: lvm.adoc:118 |
| 269 |
msgid "" |
| 270 |
"Now you can <<s-first-time-up,continue to bring your resource up>>, just as " |
| 271 |
"you would if you were using non-LVM block devices." |
| 272 |
msgstr "" |
| 273 |
"现在您可以<<s-first-time-up,continue to bring your resource up>>,就像使用非LVM块设备一样。" |
| 274 |
|
| 275 |
#. type: Title === |
| 276 |
#: lvm.adoc:120 |
| 277 |
#, no-wrap |
| 278 |
msgid "Using automated LVM snapshots during DRBD synchronization" |
| 279 |
msgstr "在DRBD同步期间使用自动LVM快照" |
| 280 |
|
| 281 |
#. type: Plain text |
| 282 |
#: lvm.adoc:127 |
| 283 |
msgid "" |
| 284 |
"While DRBD is synchronizing, the __SyncTarget__'s state is _Inconsistent_ " |
| 285 |
"until the synchronization completes. If in this situation the _SyncSource_ " |
| 286 |
"happens to fail (beyond repair), this puts you in an unfortunate position: " |
| 287 |
"the node with good data is dead, and the surviving node has bad " |
| 288 |
"(inconsistent) data." |
| 289 |
msgstr "" |
| 290 |
"当DRBD正在同步时,同步目标的状态是不一致的,直到同步完成。如果在这种情况下,SyncSource发生故障(无法修复),这将使您处于一个不幸的位置:具有良好数据的节点已死亡,而幸存的节点具有不良(不一致)数据。" |
| 291 |
|
| 292 |
#. type: Plain text |
| 293 |
#: lvm.adoc:132 |
| 294 |
msgid "" |
| 295 |
"When serving DRBD off an LVM Logical Volume, you can mitigate this problem " |
| 296 |
"by creating an automated snapshot when synchronization starts, and " |
| 297 |
"automatically removing that same snapshot once synchronization has completed" |
| 298 |
" successfully." |
| 299 |
msgstr "当从LVM逻辑卷上服务DRBD时,可以通过在同步启动时创建自动快照,并在同步成功完成后自动删除同一快照来缓解此问题。" |
| 300 |
|
| 301 |
#. type: Plain text |
| 302 |
#: lvm.adoc:135 |
| 303 |
msgid "" |
| 304 |
"In order to enable automated snapshotting during resynchronization, add the " |
| 305 |
"following lines to your resource configuration:" |
| 306 |
msgstr "为了在重新同步期间启用自动快照,请在资源配置中添加以下行:" |
| 307 |
|
| 308 |
#. type: Block title |
| 309 |
#: lvm.adoc:136 |
| 310 |
#, no-wrap |
| 311 |
msgid "Automating snapshots before DRBD synchronization" |
| 312 |
msgstr "在DRBD同步之前自动生成快照" |
| 313 |
|
| 314 |
#. type: delimited block - |
| 315 |
#: lvm.adoc:144 |
| 316 |
#, no-wrap |
| 317 |
msgid "" |
| 318 |
"resource r0 {\n" |
| 319 |
" handlers {\n" |
| 320 |
" before-resync-target \"/usr/lib/drbd/snapshot-resync-target-lvm.sh\";\n" |
| 321 |
" after-resync-target \"/usr/lib/drbd/unsnapshot-resync-target-lvm.sh\";\n" |
| 322 |
" }\n" |
| 323 |
"}\n" |
| 324 |
msgstr "" |
| 325 |
"resource r0 {\n" |
| 326 |
" handlers {\n" |
| 327 |
" before-resync-target \"/usr/lib/drbd/snapshot-resync-target-lvm.sh\";\n" |
| 328 |
" after-resync-target \"/usr/lib/drbd/unsnapshot-resync-target-lvm.sh\";\n" |
| 329 |
" }\n" |
| 330 |
"}\n" |
| 331 |
|
| 332 |
#. type: Plain text |
| 333 |
#: lvm.adoc:152 |
| 334 |
msgid "" |
| 335 |
"The two scripts parse the `$DRBD_RESOURCE` environment variable which DRBD " |
| 336 |
"automatically passes to any `handler` it invokes. The `snapshot-resync-" |
| 337 |
"target-lvm.sh` script then creates an LVM snapshot for any volume the " |
| 338 |
"resource contains, then synchronization kicks off. In case the script fails," |
| 339 |
" the synchronization _does not commence_." |
| 340 |
msgstr "" |
| 341 |
"这两个脚本解析DRBD自动传递给它调用的任何 `handler` 的 `$DRBD_RESOURCE` 环境变量。然后, `snapshot-resync-" |
| 342 |
"target-lvm.sh` 脚本为资源包含的任何卷创建一个lvm快照,然后开始同步。如果脚本失败,则同步不会开始。" |
| 343 |
|
| 344 |
#. type: Plain text |
| 345 |
#: lvm.adoc:156 |
| 346 |
msgid "" |
| 347 |
"Once synchronization completes, the `unsnapshot-resync-target-lvm.sh` script" |
| 348 |
" removes the snapshot, which is then no longer needed. In case " |
| 349 |
"unsnapshotting fails, the snapshot continues to linger around." |
| 350 |
msgstr "同步完成后, `unsnapshot-resync-target-lvm.sh` 脚本将删除不再需要的快照。如果取消快照失败,快照将继续徘徊。" |
| 351 |
|
| 352 |
#. type: Plain text |
| 353 |
#: lvm.adoc:160 |
| 354 |
msgid "" |
| 355 |
"You should review dangling snapshots as soon as possible. A full snapshot " |
| 356 |
"causes both the snapshot itself _and its origin volume_ to fail." |
| 357 |
msgstr "你应该尽快检查悬挂的快照。完整快照会导致快照本身及其原始卷失败。" |
| 358 |
|
| 359 |
#. type: Plain text |
| 360 |
#: lvm.adoc:164 |
| 361 |
msgid "" |
| 362 |
"If at any time your _SyncSource_ does fail beyond repair and you decide to " |
| 363 |
"revert to your latest snapshot on the peer, you may do so by issuing the " |
| 364 |
"`lvconvert -M` command." |
| 365 |
msgstr "" |
| 366 |
"如果您的同步源在任何时候确实出现无法修复的故障,并且您决定还原到对等机上的最新快照,则可以通过输入 `lvconvert -M` 命令来执行此操作。" |
| 367 |
|
| 368 |
#. type: Title === |
| 369 |
#: lvm.adoc:166 |
| 370 |
#, no-wrap |
| 371 |
msgid "Configuring a DRBD resource as a Physical Volume" |
| 372 |
msgstr "将DRBD资源配置为物理卷" |
| 373 |
|
| 374 |
#. type: Plain text |
| 375 |
#: lvm.adoc:173 |
| 376 |
msgid "" |
| 377 |
"indexterm:[LVM]indexterm:[Physical Volume (LVM)]In order to prepare a DRBD " |
| 378 |
"resource for use as a Physical Volume, it is necessary to create a PV " |
| 379 |
"signature on the DRBD device. In order to do so, issue one of the following " |
| 380 |
"commands on the node where the resource is currently in the primary role: " |
| 381 |
"indexterm:[LVM]indexterm:[pvcreate (LVM command)]" |
| 382 |
msgstr "" |
| 383 |
"indexterm:[LVM]indexterm:[Physical " |
| 384 |
"Volume (LVM)]。为此,请在资源当前处于主要角色的节点上发出以下命令之一:indexterm:[LVM]indexterm:[pvcreate (LVM command)]" |
| 385 |
|
| 386 |
#. type: delimited block - |
| 387 |
#: lvm.adoc:176 |
| 388 |
#, no-wrap |
| 389 |
msgid "# pvcreate /dev/drbdX\n" |
| 390 |
msgstr "# pvcreate /dev/drbdX\n" |
| 391 |
|
| 392 |
#. type: Plain text |
| 393 |
#: lvm.adoc:179 |
| 394 |
msgid "or" |
| 395 |
msgstr "或" |
| 396 |
|
| 397 |
#. type: delimited block - |
| 398 |
#: lvm.adoc:182 |
| 399 |
#, no-wrap |
| 400 |
msgid "# pvcreate /dev/drbd/by-res/<resource>/0\n" |
| 401 |
msgstr "# pvcreate /dev/drbd/by-res/<resource>/0\n" |
| 402 |
|
| 403 |
#. type: Plain text |
| 404 |
#: lvm.adoc:185 |
| 405 |
msgid "This example assumes a single-volume resource." |
| 406 |
msgstr "本例假设一个含有单个卷的资源。" |
| 407 |
|
| 408 |
#. type: Plain text |
| 409 |
#: lvm.adoc:194 |
| 410 |
msgid "" |
| 411 |
"Now, it is necessary to include this device in the list of devices LVM scans" |
| 412 |
" for PV signatures. In order to do this, you must edit the LVM configuration" |
| 413 |
" file, normally named indexterm:[LVM]`/etc/lvm/lvm.conf`. Find the line in " |
| 414 |
"the `devices` section that contains the `filter` keyword and edit it " |
| 415 |
"accordingly. If _all_ your PVs are to be stored on DRBD devices, the " |
| 416 |
"following is an appropriate `filter` option: " |
| 417 |
"indexterm:[LVM]indexterm:[filter expression (LVM)]" |
| 418 |
msgstr "" |
| 419 |
"现在,有必要将这个设备包含在LVM扫描PV签名的设备列表中。为此,必须编辑LVM配置文件,通常命名为indexterm:[LVM]`/etc/LVM/LVM.conf`。在 `devices` 部分找到包含 `filter` 关键字的行,并相应地对其进行编辑。如果要将所有pv存储在DRBD设备上,则以下是适当的 `filter` 选项:indexterm:[LVM]indexterm:[filter" |
| 420 |
" expression(LVM)]" |
| 421 |
|
| 422 |
#. type: delimited block - |
| 423 |
#: lvm.adoc:198 |
| 424 |
#, no-wrap |
| 425 |
msgid "filter = [ \"a|drbd.*|\", \"r|.*|\" ]\n" |
| 426 |
msgstr "filter = [ \"a|drbd.*|\", \"r|.*|\" ]\n" |
| 427 |
|
| 428 |
#. type: Plain text |
| 429 |
#: lvm.adoc:202 |
| 430 |
msgid "" |
| 431 |
"This filter expression accepts PV signatures found on any DRBD devices, " |
| 432 |
"while rejecting (ignoring) all others." |
| 433 |
msgstr "此筛选器表达式接受在任何DRBD设备上找到的PV签名,同时拒绝(忽略)所有其他签名。" |
| 434 |
|
| 435 |
#. type: Plain text |
| 436 |
#: lvm.adoc:205 |
| 437 |
msgid "" |
| 438 |
"By default, LVM scans all block devices found in `/dev` for PV signatures. " |
| 439 |
"This is equivalent to `filter = [ \"a|.*|\" ]`." |
| 440 |
msgstr "默认情况下,LVM扫描在 `/dev` 中找到的所有块设备以获取PV签名。这相当于 `filter=[ \"a |.*|\" ]`。" |
| 441 |
|
| 442 |
#. type: Plain text |
| 443 |
#: lvm.adoc:213 |
| 444 |
msgid "" |
| 445 |
"If you want to use stacked resources as LVM PVs, then you will need a more " |
| 446 |
"explicit filter configuration. You need to make sure that LVM detects PV " |
| 447 |
"signatures on stacked resources, while ignoring them on the corresponding " |
| 448 |
"lower-level resources and backing devices. This example assumes that your " |
| 449 |
"lower-level DRBD resources use device minors 0 through 9, whereas your " |
| 450 |
"stacked resources are using device minors from 10 upwards:" |
| 451 |
msgstr "" |
| 452 |
"如果要将堆叠资源用作LVM " |
| 453 |
"pv,则需要更明确的筛选器配置。您需要确保LVM在堆栈资源上检测到PV签名,而在相应的低级资源和备份设备上忽略它们。此示例假设较低级别的DRBD资源使用设备子级0到9,而堆叠的资源使用的设备子级从10到9:" |
| 454 |
|
| 455 |
#. type: delimited block - |
| 456 |
#: lvm.adoc:217 |
| 457 |
#, no-wrap |
| 458 |
msgid "filter = [ \"a|drbd1[0-9]|\", \"r|.*|\" ]\n" |
| 459 |
msgstr "filter = [ \"a|drbd1[0-9]|\", \"r|.*|\" ]\n" |
| 460 |
|
| 461 |
#. type: Plain text |
| 462 |
#: lvm.adoc:222 |
| 463 |
msgid "" |
| 464 |
"This filter expression accepts PV signatures found only on the DRBD devices " |
| 465 |
"`/dev/drbd10` through `/dev/drbd19`, while rejecting (ignoring) all others." |
| 466 |
msgstr "此筛选器表达式接受仅在DRBD设备 `/dev/drbd10` 到 `/dev/drbd19' 上找到的PV签名,同时拒绝(忽略)所有其他签名。" |
| 467 |
|
| 468 |
#. type: Plain text |
| 469 |
#: lvm.adoc:227 lvm.adoc:374 |
| 470 |
msgid "" |
| 471 |
"After modifying the `lvm.conf` file, you must run the " |
| 472 |
"indexterm:[LVM]indexterm:[vgscan (LVM command)]`vgscan` command so LVM " |
| 473 |
"discards its configuration cache and re-scans devices for PV signatures." |
| 474 |
msgstr "" |
| 475 |
"修改 `lvm.conf` 文件后,必须运行indexterm:[lvm]indexterm:[vgscan(lvm " |
| 476 |
"command)] `vgscan` 命令,以便lvm放弃其配置缓存并重新扫描设备以获取PV签名。" |
| 477 |
|
| 478 |
#. type: Plain text |
| 479 |
#: lvm.adoc:231 |
| 480 |
msgid "" |
| 481 |
"You may of course use a different `filter` configuration to match your " |
| 482 |
"particular system configuration. What is important to remember, however, is " |
| 483 |
"that you need to" |
| 484 |
msgstr "当然,您可以使用不同的 `filter` 配置来匹配您的特定系统配置。然而,重要的是要记住,你需要" |
| 485 |
|
| 486 |
#. type: Plain text |
| 487 |
#: lvm.adoc:233 |
| 488 |
msgid "Accept (include) the DRBD devices you wish to use as PVs;" |
| 489 |
msgstr "接受(包括)您希望用作pv的DRBD设备;" |
| 490 |
|
| 491 |
#. type: Plain text |
| 492 |
#: lvm.adoc:235 |
| 493 |
msgid "" |
| 494 |
"Reject (exclude) the corresponding lower-level devices, so as to avoid LVM " |
| 495 |
"finding duplicate PV signatures." |
| 496 |
msgstr "拒绝(排除)相应的低级设备,以避免LVM发现重复的PV签名。" |
| 497 |
|
| 498 |
#. type: Plain text |
| 499 |
#: lvm.adoc:237 |
| 500 |
msgid "In addition, you should disable the LVM cache by setting:" |
| 501 |
msgstr "此外,应通过设置以下内容禁用LVM缓存:" |
| 502 |
|
| 503 |
#. type: delimited block - |
| 504 |
#: lvm.adoc:241 lvm.adoc:383 |
| 505 |
#, no-wrap |
| 506 |
msgid "write_cache_state = 0\n" |
| 507 |
msgstr "write_cache_state = 0\n" |
| 508 |
|
| 509 |
#. type: Plain text |
| 510 |
#: lvm.adoc:245 lvm.adoc:387 |
| 511 |
msgid "" |
| 512 |
"After disabling the LVM cache, make sure you remove any stale cache entries " |
| 513 |
"by deleting `/etc/lvm/cache/.cache`." |
| 514 |
msgstr "禁用LVM缓存后,请确保通过删除 `/etc/LVM/cache/.cache` ,删除所有过时的缓存条目。" |
| 515 |
|
| 516 |
#. type: Plain text |
| 517 |
#: lvm.adoc:247 |
| 518 |
msgid "You must repeat the above steps on the peer nodes, too." |
| 519 |
msgstr "您还必须在对等节点上重复上述步骤。" |
| 520 |
|
| 521 |
#. type: Plain text |
| 522 |
#: lvm.adoc:255 |
| 523 |
msgid "" |
| 524 |
"If your system has its root filesystem on LVM, Volume Groups will be " |
| 525 |
"activated from your initial ramdisk (initrd) during boot. In doing so, the " |
| 526 |
"LVM tools will evaluate an `lvm.conf` file included in the initrd image. " |
| 527 |
"Thus, after you make any changes to your `lvm.conf`, you should be certain " |
| 528 |
"to update your initrd with the utility appropriate for your distribution " |
| 529 |
"(`mkinitrd`, `update-initramfs` etc.)." |
| 530 |
msgstr "" |
| 531 |
"如果系统的根文件系统位于LVM上,则卷组将在引导期间从初始ramdisk(initrd)激活。" |
| 532 |
"这样,LVM工具将计算initrd映像中包含的 `LVM.conf` 文件。因此," |
| 533 |
"在对 `lvm.conf` 进行任何更改之后,您应该确定使用适合您" |
| 534 |
"的发行版的实用程序( `mkinitrd` 、`update-" |
| 535 |
"initramfs` 等)更新initrd。" |
| 536 |
|
| 537 |
#. type: Plain text |
| 538 |
#: lvm.adoc:260 |
| 539 |
msgid "" |
| 540 |
"When you have configured your new PV, you may proceed to add it to a Volume " |
| 541 |
"Group, or create a new Volume Group from it. The DRBD resource must, of " |
| 542 |
"course, be in the primary role while doing so. " |
| 543 |
"indexterm:[LVM]indexterm:[vgcreate (LVM command)]" |
| 544 |
msgstr "" |
| 545 |
"配置新的PV后,可以继续将其添加到卷组,或从中创建新的卷组。" |
| 546 |
"当然,DRBD资源在执行此操作时必须处于主要角色。indexterm:[LVM]indexterm:[vgcreate(LVM command)]" |
| 547 |
|
| 548 |
#. type: delimited block - |
| 549 |
#: lvm.adoc:263 |
| 550 |
#, no-wrap |
| 551 |
msgid "# vgcreate <name> /dev/drbdX\n" |
| 552 |
msgstr "# vgcreate <name> /dev/drbdX\n" |
| 553 |
|
| 554 |
#. type: Plain text |
| 555 |
#: lvm.adoc:268 |
| 556 |
msgid "" |
| 557 |
"While it is possible to mix DRBD and non-DRBD Physical Volumes within the " |
| 558 |
"same Volume Group, doing so is not recommended and unlikely to be of any " |
| 559 |
"practical value." |
| 560 |
msgstr "虽然可以在同一个卷组中混合DRBD和非DRBD物理卷,但不建议这样做,也不太可能有任何实际价值。" |
| 561 |
|
| 562 |
#. type: Plain text |
| 563 |
#: lvm.adoc:272 |
| 564 |
msgid "" |
| 565 |
"When you have created your VG, you may start carving Logical Volumes out of " |
| 566 |
"it, using the indexterm:[LVM]indexterm:[lvcreate (LVM command)]`lvcreate` " |
| 567 |
"command (as with a non-DRBD-backed Volume Group)." |
| 568 |
msgstr "" |
| 569 |
"创建VG后,可以使用indexterm:[LVM]indexterm:[lvcreate(LVM " |
| 570 |
"command)] `lvcreate` 命令(与非DRBD支持的卷组一样)开始从中切分逻辑卷。" |
| 571 |
|
| 572 |
#. type: Title === |
| 573 |
#: lvm.adoc:274 |
| 574 |
#, no-wrap |
| 575 |
msgid "Adding a new DRBD volume to an existing Volume Group" |
| 576 |
msgstr "将新的DRBD卷添加到现有卷组" |
| 577 |
|
| 578 |
#. type: Plain text |
| 579 |
#: lvm.adoc:280 |
| 580 |
msgid "" |
| 581 |
"Occasionally, you may want to add new DRBD-backed Physical Volumes to a " |
| 582 |
"Volume Group. Whenever you do so, a new volume should be added to an " |
| 583 |
"existing resource configuration. This preserves the replication stream and " |
| 584 |
"ensures write fidelity across all PVs in the VG." |
| 585 |
msgstr "" |
| 586 |
"有时,您可能希望向卷组中添加新的DRBD支持的物理卷。无论何时执行此操作,都应将新卷添加到现有资源配置中。这将保留复制流并确保VG中所有pv的写入保真度。" |
| 587 |
|
| 588 |
#. type: Plain text |
| 589 |
#: lvm.adoc:285 |
| 590 |
msgid "" |
| 591 |
"if your LVM volume group is managed by Pacemaker as explained in <<s-lvm-" |
| 592 |
"pacemaker>>, it is _imperative_ to place the cluster in maintenance mode " |
| 593 |
"prior to making changes to the DRBD configuration." |
| 594 |
msgstr "如果您的LVM卷组由Pacemaker管理,如<<s-lvm-pacemaker>>中所述,则在更改DRBD配置之前,必须将集群置于维护模式。" |
| 595 |
|
| 596 |
#. type: Plain text |
| 597 |
#: lvm.adoc:288 |
| 598 |
msgid "" |
| 599 |
"Extend your resource configuration to include an additional volume, as in " |
| 600 |
"the following example:" |
| 601 |
msgstr "扩展资源配置以包括附加卷,如下例所示:" |
| 602 |
|
| 603 |
#. type: delimited block - |
| 604 |
#: lvm.adoc:308 |
| 605 |
#, no-wrap |
| 606 |
msgid "" |
| 607 |
"resource r0 {\n" |
| 608 |
" volume 0 {\n" |
| 609 |
" device /dev/drbd1;\n" |
| 610 |
" disk /dev/sda7;\n" |
| 611 |
" meta-disk internal;\n" |
| 612 |
" }\n" |
| 613 |
" volume 1 {\n" |
| 614 |
" device /dev/drbd2;\n" |
| 615 |
" disk /dev/sda8;\n" |
| 616 |
" meta-disk internal;\n" |
| 617 |
" }\n" |
| 618 |
" on alice {\n" |
| 619 |
" address 10.1.1.31:7789;\n" |
| 620 |
" }\n" |
| 621 |
" on bob {\n" |
| 622 |
" address 10.1.1.32:7789;\n" |
| 623 |
" }\n" |
| 624 |
"}\n" |
| 625 |
msgstr "" |
| 626 |
"resource r0 {\n" |
| 627 |
" volume 0 {\n" |
| 628 |
" device /dev/drbd1;\n" |
| 629 |
" disk /dev/sda7;\n" |
| 630 |
" meta-disk internal;\n" |
| 631 |
" }\n" |
| 632 |
" volume 1 {\n" |
| 633 |
" device /dev/drbd2;\n" |
| 634 |
" disk /dev/sda8;\n" |
| 635 |
" meta-disk internal;\n" |
| 636 |
" }\n" |
| 637 |
" on alice {\n" |
| 638 |
" address 10.1.1.31:7789;\n" |
| 639 |
" }\n" |
| 640 |
" on bob {\n" |
| 641 |
" address 10.1.1.32:7789;\n" |
| 642 |
" }\n" |
| 643 |
"}\n" |
| 644 |
|
| 645 |
#. type: Plain text |
| 646 |
#: lvm.adoc:312 |
| 647 |
msgid "" |
| 648 |
"Make sure your DRBD configuration is identical across nodes, then issue:" |
| 649 |
msgstr "确保您的DRBD配置在节点间是相同的,然后输入:" |
| 650 |
|
| 651 |
#. type: delimited block - |
| 652 |
#: lvm.adoc:315 |
| 653 |
#, no-wrap |
| 654 |
msgid "# drbdadm adjust r0\n" |
| 655 |
msgstr "# drbdadm adjust r0\n" |
| 656 |
|
| 657 |
#. type: Plain text |
| 658 |
#: lvm.adoc:320 |
| 659 |
msgid "" |
| 660 |
"This will implicitly call `drbdsetup new-minor r0 1` to enable the new " |
| 661 |
"volume `1` in the resource `r0`. Once the new volume has been added to the " |
| 662 |
"replication stream, you may initialize and add it to the volume group:" |
| 663 |
msgstr "" |
| 664 |
"这将隐式调用 `drbdsetup new-minor r0 1`,以启用资源 `r0` 中的新卷 `1`。将新卷添加到复制流后,可以初始化并将其添加到卷组:" |
| 665 |
|
| 666 |
#. type: delimited block - |
| 667 |
#: lvm.adoc:324 |
| 668 |
#, no-wrap |
| 669 |
msgid "" |
| 670 |
"# pvcreate /dev/drbd/by-res/<resource>/1\n" |
| 671 |
"# vgextend <name> /dev/drbd/by-res/<resource>/1\n" |
| 672 |
msgstr "" |
| 673 |
"# pvcreate /dev/drbd/by-res/<resource>/1\n" |
| 674 |
"# vgextend <name> /dev/drbd/by-res/<resource>/1\n" |
| 675 |
|
| 676 |
#. type: Plain text |
| 677 |
#: lvm.adoc:328 |
| 678 |
msgid "" |
| 679 |
"This will add the new PV `/dev/drbd/by-res/<resource>/1` to the `<name>` VG," |
| 680 |
" preserving write fidelity across the entire VG." |
| 681 |
msgstr "这将把新的PV `/dev/drbd/by res/<resource>/1` 添加到 `<name>` VG中,从而在整个VG中保持写保真度。" |
| 682 |
|
| 683 |
#. type: Title === |
| 684 |
#: lvm.adoc:331 |
| 685 |
#, no-wrap |
| 686 |
msgid "Nested LVM configuration with DRBD" |
| 687 |
msgstr "带DRBD的嵌套LVM配置" |
| 688 |
|
| 689 |
#. type: Plain text |
| 690 |
#: lvm.adoc:338 |
| 691 |
msgid "" |
| 692 |
"It is possible, if slightly advanced, to both use " |
| 693 |
"indexterm:[LVM]indexterm:[Logical Volume (LVM)]Logical Volumes as backing " |
| 694 |
"devices for DRBD _and_ at the same time use a DRBD device itself as a " |
| 695 |
"indexterm:[LVM]indexterm:[Physical Volume (LVM)]Physical Volume. To provide " |
| 696 |
"an example, consider the following configuration:" |
| 697 |
msgstr "" |
| 698 |
"如果稍微高级一点,可以同时使用indexterm:[LVM]indexterm:[Logical Volume(LVM)]Logical " |
| 699 |
"Volumes作为DRBD的备份设备,同时使用DRBD设备本身作为indexterm:[LVM]indexterm:[Physical " |
| 700 |
"Volume(LVM)]Physical Volume。要提供示例,请考虑以下配置:" |
| 701 |
|
| 702 |
#. type: Plain text |
| 703 |
#: lvm.adoc:341 |
| 704 |
msgid "" |
| 705 |
"We have two partitions, named `/dev/sda1`, and `/dev/sdb1`, which we intend " |
| 706 |
"to use as Physical Volumes." |
| 707 |
msgstr "我们有两个分区,名为 `/dev/sda1` ,和 `/dev/sdb1` ,打算用作物理卷。" |
| 708 |
|
| 709 |
#. type: Plain text |
| 710 |
#: lvm.adoc:344 |
| 711 |
msgid "Both of these PVs are to become part of a Volume Group named `local`." |
| 712 |
msgstr "这两个pv都将成为名为 `local` 的卷组的一部分。" |
| 713 |
|
| 714 |
#. type: Plain text |
| 715 |
#: lvm.adoc:346 |
| 716 |
msgid "" |
| 717 |
"We want to create a 10-GiB Logical Volume in this VG, to be named `r0`." |
| 718 |
msgstr "我们想在这个VG中创建一个10 GiB的逻辑卷,名为 `r0`。" |
| 719 |
|
| 720 |
#. type: Plain text |
| 721 |
#: lvm.adoc:349 |
| 722 |
msgid "" |
| 723 |
"This LV will become the local backing device for our DRBD resource, also " |
| 724 |
"named `r0`, which corresponds to the device `/dev/drbd0`." |
| 725 |
msgstr "这个LV将成为DRBD资源的本地备份设备,也称为 `r0`,它对应于设备 `/dev/drbd0`。" |
| 726 |
|
| 727 |
#. type: Plain text |
| 728 |
#: lvm.adoc:352 |
| 729 |
msgid "" |
| 730 |
"This device will be the sole PV for another Volume Group, named " |
| 731 |
"`replicated`." |
| 732 |
msgstr "此设备将是另一个名为 `replicated` 的卷组的唯一PV。" |
| 733 |
|
| 734 |
#. type: Plain text |
| 735 |
#: lvm.adoc:355 |
| 736 |
msgid "" |
| 737 |
"This VG is to contain two more logical volumes named `foo`(4 GiB) and " |
| 738 |
"`bar`(6 GiB)." |
| 739 |
msgstr "这个VG将包含另外两个名为 `foo`(4 GiB)和 `bar`(6 GiB)的逻辑卷。" |
| 740 |
|
| 741 |
#. type: Plain text |
| 742 |
#: lvm.adoc:357 |
| 743 |
msgid "In order to enable this configuration, follow these steps:" |
| 744 |
msgstr "要启用此配置,请执行以下步骤:" |
| 745 |
|
| 746 |
#. type: Plain text |
| 747 |
#: lvm.adoc:359 |
| 748 |
msgid "Set an appropriate `filter` option in your `/etc/lvm/lvm.conf`:" |
| 749 |
msgstr "在 `/etc/lvm/lvm.conf` 中设置适当的 `filter` 选项:" |
| 750 |
|
| 751 |
#. type: Plain text |
| 752 |
#: lvm.adoc:362 |
| 753 |
msgid "indexterm:[LVM]indexterm:[filter expression (LVM)]" |
| 754 |
msgstr "indexterm:[LVM]indexterm:[filter expression (LVM)]" |
| 755 |
|
| 756 |
#. type: delimited block - |
| 757 |
#: lvm.adoc:365 |
| 758 |
#, no-wrap |
| 759 |
msgid "filter = [\"a|sd.*|\", \"a|drbd.*|\", \"r|.*|\"]\n" |
| 760 |
msgstr "filter = [\"a|sd.*|\", \"a|drbd.*|\", \"r|.*|\"]\n" |
| 761 |
|
| 762 |
#. type: Plain text |
| 763 |
#: lvm.adoc:369 |
| 764 |
msgid "" |
| 765 |
"This filter expression accepts PV signatures found on any SCSI and DRBD " |
| 766 |
"devices, while rejecting (ignoring) all others." |
| 767 |
msgstr "这个过滤器表达式接受在任何SCSI和DRBD设备上找到的PV签名,同时拒绝(忽略)所有其他的。" |
| 768 |
|
| 769 |
#. type: Plain text |
| 770 |
#: lvm.adoc:378 |
| 771 |
msgid "Disable the LVM cache by setting:" |
| 772 |
msgstr "通过设置禁用LVM缓存:" |
| 773 |
|
| 774 |
#. type: Plain text |
| 775 |
#: lvm.adoc:391 |
| 776 |
msgid "" |
| 777 |
"Now, you may initialize your two SCSI partitions as PVs: " |
| 778 |
"indexterm:[LVM]indexterm:[pvcreate (LVM command)]" |
| 779 |
msgstr "现在,您可以将两个SCSI分区初始化为PVs:indexterm:[LVM]indexterm:[pvcreate(LVM command)]" |
| 780 |
|
| 781 |
#. type: delimited block - |
| 782 |
#: lvm.adoc:398 |
| 783 |
#, no-wrap |
| 784 |
msgid "" |
| 785 |
"# pvcreate /dev/sda1\n" |
| 786 |
"Physical volume \"/dev/sda1\" successfully created\n" |
| 787 |
"# pvcreate /dev/sdb1\n" |
| 788 |
"Physical volume \"/dev/sdb1\" successfully created\n" |
| 789 |
msgstr "" |
| 790 |
"# pvcreate /dev/sda1\n" |
| 791 |
"Physical volume \"/dev/sda1\" successfully created\n" |
| 792 |
"# pvcreate /dev/sdb1\n" |
| 793 |
"Physical volume \"/dev/sdb1\" successfully created\n" |
| 794 |
|
| 795 |
#. type: Plain text |
| 796 |
#: lvm.adoc:405 |
| 797 |
msgid "" |
| 798 |
"The next step is creating your low-level VG named `local`, consisting of the" |
| 799 |
" two PVs you just initialized: indexterm:[LVM]indexterm:[vgcreate (LVM " |
| 800 |
"command)]" |
| 801 |
msgstr "" |
| 802 |
"下一步是创建名为 `local` 的低级VG,它由刚刚初始化的两个pv组成:indexterm:[LVM]indexterm:[vgcreate (LVM command)]" |
| 803 |
|
| 804 |
#. type: delimited block - |
| 805 |
#: lvm.adoc:409 |
| 806 |
#, no-wrap |
| 807 |
msgid "" |
| 808 |
"# vgcreate local /dev/sda1 /dev/sda2\n" |
| 809 |
"Volume group \"local\" successfully created\n" |
| 810 |
msgstr "" |
| 811 |
"# vgcreate local /dev/sda1 /dev/sda2\n" |
| 812 |
"Volume group \"local\" successfully created\n" |
| 813 |
|
| 814 |
#. type: Plain text |
| 815 |
#: lvm.adoc:413 |
| 816 |
msgid "" |
| 817 |
"Now you may create your Logical Volume to be used as DRBD's backing device: " |
| 818 |
"indexterm:[LVM]indexterm:[lvcreate (LVM command)]" |
| 819 |
msgstr "现在您可以创建用作DRBD的备份设备的逻辑卷:indexterm:[LVM]indexterm:[lvcreate (LVM command)]" |
| 820 |
|
| 821 |
#. type: delimited block - |
| 822 |
#: lvm.adoc:417 |
| 823 |
#, no-wrap |
| 824 |
msgid "" |
| 825 |
"# lvcreate --name r0 --size 10G local\n" |
| 826 |
"Logical volume \"r0\" created\n" |
| 827 |
msgstr "" |
| 828 |
"# lvcreate --name r0 --size 10G local\n" |
| 829 |
"Logical volume \"r0\" created\n" |
| 830 |
|
| 831 |
#. type: Plain text |
| 832 |
#: lvm.adoc:420 |
| 833 |
msgid "Repeat all steps, up to this point, on the peer node." |
| 834 |
msgstr "在对等节点上重复所有步骤,直到现在。" |
| 835 |
|
| 836 |
#. type: Plain text |
| 837 |
#: lvm.adoc:423 |
| 838 |
msgid "" |
| 839 |
"Then, edit your `/etc/drbd.conf` to create a new resource named `r0`: " |
| 840 |
"indexterm:[drbd.conf]" |
| 841 |
msgstr "然后,编辑 `/etc/drbd.conf` 以创建名为 `r0` 的新资源:indexterm:[drbd.conf]" |
| 842 |
|
| 843 |
#. type: delimited block - |
| 844 |
#: lvm.adoc:434 |
| 845 |
#, no-wrap |
| 846 |
msgid "" |
| 847 |
"resource r0 {\n" |
| 848 |
" device /dev/drbd0;\n" |
| 849 |
" disk /dev/local/r0;\n" |
| 850 |
" meta-disk internal;\n" |
| 851 |
" on <host> { address <address>:<port>; }\n" |
| 852 |
" on <host> { address <address>:<port>; }\n" |
| 853 |
"}\n" |
| 854 |
msgstr "" |
| 855 |
"resource r0 {\n" |
| 856 |
" device /dev/drbd0;\n" |
| 857 |
" disk /dev/local/r0;\n" |
| 858 |
" meta-disk internal;\n" |
| 859 |
" on <host> { address <address>:<port>; }\n" |
| 860 |
" on <host> { address <address>:<port>; }\n" |
| 861 |
"}\n" |
| 862 |
|
| 863 |
#. type: Plain text |
| 864 |
#: lvm.adoc:438 |
| 865 |
msgid "" |
| 866 |
"After you have created your new resource configuration, be sure to copy your" |
| 867 |
" `drbd.conf` contents to the peer node." |
| 868 |
msgstr "创建新的资源配置后,请确保将 `drbd.conf` 内容复制到对等节点。" |
| 869 |
|
| 870 |
#. type: Plain text |
| 871 |
#: lvm.adoc:442 |
| 872 |
msgid "" |
| 873 |
"After this, initialize your resource as described in <<s-first-time-up>>(on " |
| 874 |
"both nodes)." |
| 875 |
msgstr "在此之后,按<<s-first-time-up>>中所述初始化资源(在两个节点上)。" |
| 876 |
|
| 877 |
#. type: Plain text |
| 878 |
#: lvm.adoc:444 |
| 879 |
msgid "" |
| 880 |
"Then, promote your resource (on one node): indexterm:[drbdadm, primary]" |
| 881 |
msgstr "然后,提升资源(在一个节点上):indexterm:[drbdadm,primary]" |
| 882 |
|
| 883 |
#. type: delimited block - |
| 884 |
#: lvm.adoc:447 |
| 885 |
#, no-wrap |
| 886 |
msgid "# drbdadm primary r0\n" |
| 887 |
msgstr "# drbdadm primary r0\n" |
| 888 |
|
| 889 |
#. type: Plain text |
| 890 |
#: lvm.adoc:451 |
| 891 |
msgid "" |
| 892 |
"Now, on the node where you just promoted your resource, initialize your DRBD" |
| 893 |
" device as a new Physical Volume:" |
| 894 |
msgstr "现在,在刚刚升级资源的节点上,将DRBD设备初始化为一个新的物理卷:" |
| 895 |
|
| 896 |
#. type: Plain text |
| 897 |
#: lvm.adoc:454 |
| 898 |
msgid "indexterm:[LVM]indexterm:[pvcreate (LVM command)]" |
| 899 |
msgstr "indexterm:[LVM]indexterm:[pvcreate (LVM command)]" |
| 900 |
|
| 901 |
#. type: delimited block - |
| 902 |
#: lvm.adoc:458 |
| 903 |
#, no-wrap |
| 904 |
msgid "" |
| 905 |
"# pvcreate /dev/drbd0\n" |
| 906 |
"Physical volume \"/dev/drbd0\" successfully created\n" |
| 907 |
msgstr "" |
| 908 |
"# pvcreate /dev/drbd0\n" |
| 909 |
"Physical volume \"/dev/drbd0\" successfully created\n" |
| 910 |
|
| 911 |
#. type: Plain text |
| 912 |
#: lvm.adoc:464 |
| 913 |
msgid "" |
| 914 |
"Create your VG named `replicated`, using the PV you just initialized, on the" |
| 915 |
" same node: indexterm:[LVM]indexterm:[vgcreate (LVM command)]" |
| 916 |
msgstr "" |
| 917 |
"使用刚刚初始化的PV在同一节点上创建名为 `replicated` 的VG:indexterm:[LVM]indexterm:[VG " |
| 918 |
"Create (LVM command)]" |
| 919 |
|
| 920 |
#. type: delimited block - |
| 921 |
#: lvm.adoc:469 |
| 922 |
#, no-wrap |
| 923 |
msgid "" |
| 924 |
"# vgcreate replicated /dev/drbd0\n" |
| 925 |
"Volume group \"replicated\" successfully created\n" |
| 926 |
msgstr "" |
| 927 |
"# vgcreate replicated /dev/drbd0\n" |
| 928 |
"Volume group \"replicated\" successfully created\n" |
| 929 |
|
| 930 |
#. type: Plain text |
| 931 |
#: lvm.adoc:473 |
| 932 |
msgid "" |
| 933 |
"Finally, create your new Logical Volumes within this newly-created VG via " |
| 934 |
"indexterm:[LVM]indexterm:[lvcreate (LVM command)]" |
| 935 |
msgstr "最后,通过indexterm:[LVM]indexterm:[lvcreate (LVM command)]" |
| 936 |
|
| 937 |
#. type: delimited block - |
| 938 |
#: lvm.adoc:480 |
| 939 |
#, no-wrap |
| 940 |
msgid "" |
| 941 |
"# lvcreate --name foo --size 4G replicated\n" |
| 942 |
"Logical volume \"foo\" created\n" |
| 943 |
"# lvcreate --name bar --size 6G replicated\n" |
| 944 |
"Logical volume \"bar\" created\n" |
| 945 |
msgstr "" |
| 946 |
"# lvcreate --name foo --size 4G replicated\n" |
| 947 |
"Logical volume \"foo\" created\n" |
| 948 |
"# lvcreate --name bar --size 6G replicated\n" |
| 949 |
"Logical volume \"bar\" created\n" |
| 950 |
|
| 951 |
#. type: Plain text |
| 952 |
#: lvm.adoc:485 |
| 953 |
msgid "" |
| 954 |
"The Logical Volumes `foo` and `bar` will now be available as " |
| 955 |
"`/dev/replicated/foo` and `/dev/replicated/bar` on the local node." |
| 956 |
msgstr "" |
| 957 |
"逻辑卷 `foo` 和 `bar` 现在可以作为本地节点上的 `/dev/replicated/foo` 和 `/dev/replicated/bar` 使用。" |
| 958 |
|
| 959 |
#. type: Title ==== |
| 960 |
#: lvm.adoc:487 |
| 961 |
#, no-wrap |
| 962 |
msgid "Switching the VG to the other node" |
| 963 |
msgstr "将VG切换到另一个节点" |
| 964 |
|
| 965 |
#. type: Plain text |
| 966 |
#: lvm.adoc:492 |
| 967 |
msgid "" |
| 968 |
"To make them available on the other node, first issue the following sequence" |
| 969 |
" of commands on the primary node: indexterm:[LVM]indexterm:[vgchange (LVM " |
| 970 |
"command)]" |
| 971 |
msgstr "" |
| 972 |
"要使它们在另一个节点上可用,请首先在主节点上发出以下命令序列:indexterm:[LVM]indexterm:[vgchange(LVM " |
| 973 |
"command)]" |
| 974 |
|
| 975 |
#. type: delimited block - |
| 976 |
#: lvm.adoc:497 |
| 977 |
#, no-wrap |
| 978 |
msgid "" |
| 979 |
"# vgchange -a n replicated\n" |
| 980 |
"0 logical volume(s) in volume group \"replicated\" now active\n" |
| 981 |
"# drbdadm secondary r0\n" |
| 982 |
msgstr "" |
| 983 |
"# vgchange -a n replicated\n" |
| 984 |
"0 logical volume(s) in volume group \"replicated\" now active\n" |
| 985 |
"# drbdadm secondary r0\n" |
| 986 |
|
| 987 |
#. type: Plain text |
| 988 |
#: lvm.adoc:502 |
| 989 |
msgid "" |
| 990 |
"Then, issue these commands on the other (still secondary) node: " |
| 991 |
"indexterm:[drbdadm, primary]indexterm:[LVM]indexterm:[vgchange (LVM " |
| 992 |
"command)]" |
| 993 |
msgstr "" |
| 994 |
"然后,在另一个(仍然是辅助)节点上发出以下命令:indexterm:[drbdadm,primary]indexterm:[LVM]indexterm:[vgchange(LVM命令)]" |
| 995 |
|
| 996 |
#. type: delimited block - |
| 997 |
#: lvm.adoc:507 |
| 998 |
#, no-wrap |
| 999 |
msgid "" |
| 1000 |
"# drbdadm primary r0\n" |
| 1001 |
"# vgchange -a y replicated\n" |
| 1002 |
"2 logical volume(s) in volume group \"replicated\" now active\n" |
| 1003 |
msgstr "" |
| 1004 |
"# drbdadm primary r0\n" |
| 1005 |
"# vgchange -a y replicated\n" |
| 1006 |
"2 logical volume(s) in volume group \"replicated\" now active\n" |
| 1007 |
|
| 1008 |
#. type: Plain text |
| 1009 |
#: lvm.adoc:511 |
| 1010 |
msgid "" |
| 1011 |
"After this, the block devices `/dev/replicated/foo` and " |
| 1012 |
"`/dev/replicated/bar` will be available on the other (now primary) node." |
| 1013 |
msgstr "之后,块设备 `/dev/replicated/foo` 和 `/dev/replicated/bar` 将在另一个(现在是主)节点上可用。" |
| 1014 |
|
| 1015 |
#. type: Title === |
| 1016 |
#: lvm.adoc:514 |
| 1017 |
#, no-wrap |
| 1018 |
msgid "Highly available LVM with Pacemaker" |
| 1019 |
msgstr "带Pacemaker的高可用LVM" |
| 1020 |
|
| 1021 |
#. type: Plain text |
| 1022 |
#: lvm.adoc:519 |
| 1023 |
msgid "" |
| 1024 |
"The process of transferring volume groups between peers and making the " |
| 1025 |
"corresponding logical volumes available can be automated. The Pacemaker LVM " |
| 1026 |
"resource agent is designed for exactly that purpose." |
| 1027 |
msgstr "在对等机之间传输卷组并使相应的逻辑卷可用的过程可以自动化。PacemakerLVM资源代理正是为此目的而设计的。" |
| 1028 |
|
| 1029 |
#. type: Plain text |
| 1030 |
#: lvm.adoc:522 |
| 1031 |
msgid "" |
| 1032 |
"In order to put an existing, DRBD-backed volume group under Pacemaker " |
| 1033 |
"management, run the following commands in the `crm` shell:" |
| 1034 |
msgstr "要将现有的、由DRBD支持的卷组置于Pacemaker管理下,请在 `crm` shell中运行以下命令:" |
| 1035 |
|
| 1036 |
#. type: Block title |
| 1037 |
#: lvm.adoc:523 |
| 1038 |
#, no-wrap |
| 1039 |
msgid "Pacemaker configuration for DRBD-backed LVM Volume Group" |
| 1040 |
msgstr "支持DRBD的LVM卷组的Pacemaker配置" |
| 1041 |
|
| 1042 |
#. type: delimited block - |
| 1043 |
#: lvm.adoc:538 |
| 1044 |
#, no-wrap |
| 1045 |
msgid "" |
| 1046 |
"primitive p_drbd_r0 ocf:linbit:drbd \\\n" |
| 1047 |
" params drbd_resource=\"r0\" \\\n" |
| 1048 |
" op monitor interval=\"29s\" role=\"Master\" \\\n" |
| 1049 |
" op monitor interval=\"31s\" role=\"Slave\"\n" |
| 1050 |
"ms ms_drbd_r0 p_drbd_r0 \\\n" |
| 1051 |
" meta master-max=\"1\" master-node-max=\"1\" \\\n" |
| 1052 |
" clone-max=\"2\" clone-node-max=\"1\" \\\n" |
| 1053 |
" notify=\"true\"\n" |
| 1054 |
"primitive p_lvm_r0 ocf:heartbeat:LVM \\\n" |
| 1055 |
" params volgrpname=\"r0\"\n" |
| 1056 |
"colocation c_lvm_on_drbd inf: p_lvm_r0 ms_drbd_r0:Master\n" |
| 1057 |
"order o_drbd_before_lvm inf: ms_drbd_r0:promote p_lvm_r0:start\n" |
| 1058 |
"commit\n" |
| 1059 |
msgstr "" |
| 1060 |
"primitive p_drbd_r0 ocf:linbit:drbd \\\n" |
| 1061 |
" params drbd_resource=\"r0\" \\\n" |
| 1062 |
" op monitor interval=\"29s\" role=\"Master\" \\\n" |
| 1063 |
" op monitor interval=\"31s\" role=\"Slave\"\n" |
| 1064 |
"ms ms_drbd_r0 p_drbd_r0 \\\n" |
| 1065 |
" meta master-max=\"1\" master-node-max=\"1\" \\\n" |
| 1066 |
" clone-max=\"2\" clone-node-max=\"1\" \\\n" |
| 1067 |
" notify=\"true\"\n" |
| 1068 |
"primitive p_lvm_r0 ocf:heartbeat:LVM \\\n" |
| 1069 |
" params volgrpname=\"r0\"\n" |
| 1070 |
"colocation c_lvm_on_drbd inf: p_lvm_r0 ms_drbd_r0:Master\n" |
| 1071 |
"order o_drbd_before_lvm inf: ms_drbd_r0:promote p_lvm_r0:start\n" |
| 1072 |
"commit\n" |
| 1073 |
|
| 1074 |
#. type: Plain text |
| 1075 |
#: lvm.adoc:542 |
| 1076 |
msgid "" |
| 1077 |
"After you have committed this configuration, Pacemaker will automatically " |
| 1078 |
"make the `r0` volume group available on whichever node currently has the " |
| 1079 |
"Primary (Master) role for the DRBD resource." |
| 1080 |
msgstr "提交此配置后,Pacemaker将自动使 `r0` 卷组在当前具有DRBD资源主(Master)角色的节点上可用。" |