en to zh translation catalogue (47 entries)

note: type: Title ==
en: Using Xen with DRBD
zh: 在DRBD中使用Xen

note: type: Plain text
en: indexterm:[Xen]This chapter outlines the use of DRBD as a Virtual Block Device (VBD) for virtualization environments using the Xen hypervisor.
zh: indexterm:[Xen]本章概述了将DRBD用作虚拟块设备（VBD）的方法，用于使用Xen虚拟机监控程序的虚拟化环境。

note: type: Title ===
en: Xen primer
zh: Xen基础

note: type: Plain text
en: Xen is a virtualization framework originally developed at the University of Cambridge (UK), and later being maintained by XenSource, Inc. (now a part of Citrix). It is included in reasonably recent releases of most Linux distributions, such as Debian GNU/Linux (since version 4.0), SUSE Linux Enterprise Server (since release 10), Red Hat Enterprise Linux (since release 5), and many others.
zh: Xen是一个虚拟化框架，最初在剑桥大学（英国）开发，后来由XenSource，Inc.维护（现在是Citrix的一部分）。它包含在大多数Linux发行版的最新版本中，如Debian GNU/Linux（4.0版以后）、SUSE Linux Enterprise Server（10版以后）、Red Hat Enterprise Linux（5版以后）和许多其他发行版。

note: type: Plain text
en: Xen uses paravirtualization — a virtualization method involving a high degree of cooperation between the virtualization host and guest virtual machines — with selected guest operating systems for improved performance in comparison to conventional virtualization solutions (which are typically based on hardware emulation). Xen also supports full hardware emulation on CPUs that support the appropriate virtualization extensions; in Xen parlance, this is known as HVM ( "hardware-assisted virtual machine").
zh: Xen使用半虚拟化（一种虚拟化方法，涉及虚拟化主机和来宾虚拟机之间的高度协作）和选定的来宾操作系统，与传统的虚拟化解决方案（通常基于硬件仿真）相比，可提高性能。Xen还支持在支持适当虚拟化扩展的cpu上进行完全硬件仿真；用Xen的话说，这就是HVM（ "硬件辅助虚拟机" ）。

note: type: Plain text
en: At the time of writing, CPU extensions supported by Xen for HVM are Intel's Virtualization Technology (VT, formerly codenamed "Vanderpool"), and AMD's Secure Virtual Machine (SVM, formerly known as "Pacifica").
zh: 在撰写本文时，Xen for HVM支持的CPU扩展是英特尔的虚拟化技术（VT，以前的代号为 "Vanderpool"）和AMD的安全虚拟机（SVM，以前的代号为 "Pacifica"）。

note: type: Plain text
en: Xen supports indexterm:[Xen, live migration]_live migration_, which refers to the capability of transferring a running guest operating system from one physical host to another, without interruption.
zh: Xen支持indexterm:[Xen，live migration]_live migration_，它是指在不中断的情况下，将正在运行的来宾操作系统从一个物理主机传输到另一个物理主机的能力。

note: type: Plain text
en: When a DRBD resource is used as a replicated Virtual Block Device (VBD) for Xen, it serves to make the entire contents of a domU's virtual disk available on two servers, which can then be configured for automatic fail-over. That way, DRBD does not only provide redundancy for Linux servers (as in non-virtualized DRBD deployment scenarios), but also for any other operating system that can be virtualized under Xen — which, in essence, includes any operating system available on 32- or 64-bit Intel compatible architectures.
zh: 当DRBD资源用作Xen的复制虚拟块设备（VBD）时，它用于使domU虚拟磁盘的全部内容在两台服务器上可用，然后可以将其配置为自动故障转移。这样，DRBD不仅为Linux服务器提供冗余（在非虚拟化DRBD部署场景中），而且也为可以在Xen下虚拟化的任何其他操作系统提供冗余，Xen实际上包括32位或64位Intel兼容体系结构上可用的任何操作系统。

note: type: Title ===
en: Setting DRBD module parameters for use with Xen
zh: 设置DRBD模块参数以用于Xen

note: type: Plain text
en: For Xen Domain-0 kernels, it is recommended to load the DRBD module with the parameter `disable_sendpage` set to `1`. To do so, create (or open) the file `/etc/modprobe.d/drbd.conf` and enter the following line:
zh: 对于Xen Domain-0内核，建议加载DRBD模块，并将参数 `disable_sendpage` 设置为 `1`。为此，创建（或打开）文件 `/etc/modprobe.d/drbd.conf` ，并输入以下行：

note: type: Title ===
en: Creating a DRBD resource suitable to act as a Xen VBD
zh: 创建适合用作Xen VBD的DRBD资源

note: type: Plain text
en: Configuring a DRBD resource that is to be used as a Virtual Block Device for Xen is fairly straightforward -- in essence, the typical configuration matches that of a DRBD resource being used for any other purpose. However, if you want to enable live migration for your guest instance, you need to enable indexterm:[Dual-Primary mode]<<s-dual-primary-mode,dual-primary mode>>for this resource:
zh: 配置将用作Xen虚拟块设备的DRBD资源相当简单 - 实际上，典型配置与用于任何其他目的的DRBD资源的配置相匹配。但是，如果要为来宾实例启用实时迁移，则需要为此资源启用indexterm:[Dual-Primary mode]<<s-dual-primary-mode,dual-primary mode>>：

note: type: Plain text
en: Enabling dual-primary mode is necessary because Xen, before initiating live migration, checks for write access on all VBDs a resource is configured to use on both the source and the destination host for the migration.
zh: 启用dual-primary模式是必要的，因为Xen在启动实时迁移之前，会检查资源配置为在源主机和目标主机上用于迁移的所有VBD上的写访问。

note: type: Title ===
en: Using DRBD VBDs
zh: 使用DRBD VBDs

note: type: Plain text
en: In order to use a DRBD resource as the virtual block device, you must add a line like the following to your Xen domU configuration: indexterm:[Xen]
zh: 为了将DRBD资源用作虚拟块设备，必须在Xen domU配置中添加如下行：indexterm:[Xen]

note: type: Plain text
en: This example configuration makes the DRBD resource named _resource_ available to the domU as `/dev/xvda` in read/write mode (`w`).
zh: 此示例配置使名为 _resource_ 的DRBD资源在读/写模式（`w`）下以 `/dev/xvda` 的形式对domU可用。

note: type: Plain text
en: Of course, you may use multiple DRBD resources with a single domU. In that case, simply add more entries like the one provided in the example to the `disk` option, separated by commas.
zh: 当然，您可以将多个DRBD资源与一个domU一起使用。在这种情况下，只需在 `disk` 选项中添加更多类似于示例中提供的条目，并用逗号分隔。

note: type: Plain text
en: There are three sets of circumstances under which you cannot use this approach:
zh: 在以下三种情况下，您不能使用此方法：

note: type: Plain text
en: You are configuring a fully virtualized (HVM) domU.
zh: 您正在配置完全虚拟化（HVM）domU。

note: type: Plain text
en: You are installing your domU using a graphical installation utility, _and_ that graphical installer does not support the `drbd:` syntax.
zh: 您正在使用图形安装实用程序安装domU，图形安装程序不支持 `drbd:` 语法。

note: type: Plain text
en: You are configuring a domU without the `kernel`, `initrd`, and `extra` options, relying instead on `bootloader` and `bootloader_args` to use a Xen pseudo-bootloader, _and_ that pseudo-bootloader does not support the `drbd:` syntax.
zh: 您正在配置一个没有 `kernel`、 `initrd` 和 `extra` 选项的domU，依赖 `bootloader` 和 `bootloader_args` 参数来使用Xen pseudo-bootloader，该pseudo-bootloader不支持 `drbd:` 语法。

note: type: Plain text
en: pygrub+ (prior to Xen 3.3) and `domUloader.py` (shipped with Xen on SUSE Linux Enterprise Server 10) are two examples of pseudo-bootloaders that do not support the `drbd:` virtual block device configuration syntax.
zh: pygrub+（在Xen 3.3之前）和 `domUloader.py`（在SUSE Linux企业服务器10上随Xen一起提供）是两个不支持 `drbd:` 虚拟块设备配置语法的伪引导加载程序示例。

note: type: Plain text
en: `pygrub` from Xen 3.3 forward, and the `domUloader.py` version that ships with SLES 11 _do_ support this syntax.
zh: 自Xen 3.3 以后的 `pygrub` 和SLES 11后附带的 `domUloader.py` 版本都支持这种语法。

note: type: Plain text
en: Under these circumstances, you must use the traditional `phy:` device syntax and the DRBD device name that is associated with your resource, not the resource name. That, however, requires that you manage DRBD state transitions outside Xen, which is a less flexible approach than that provided by the `drbd` resource type.
zh: 在这些情况下，必须使用传统的 `phy:` 设备语法和与资源关联的DRBD设备名，而不是资源名。但是，这要求您在Xen之外管理DRBD状态转换，这是一种比 `DRBD` 资源类型提供的更不灵活的方法。

note: type: Title ===
en: Starting, stopping, and migrating DRBD-backed domU's
zh: 启动、停止和迁移DRBD支持的domU

note: type: Block title
en: Starting the domU
zh: 启动domU

note: type: Plain text
en: Once you have configured your DRBD-backed domU, you may start it as you would any other domU:
zh: 一旦配置了DRBD支持的domU，就可以像启动其他domU一样启动它：

note: type: Plain text
en: In the process, the DRBD resource you configured as the VBD will be promoted to the primary role, and made accessible to Xen as expected.
zh: 在此过程中，您配置为VBD的DRBD资源将提升为主要角色，并按预期让Xen访问。

note: type: Block title
en: Stopping the domU
zh: 停止domU

note: type: Plain text
en: This is equally straightforward:
zh: 这同样直截了当：

note: type: Plain text
en: Again, as you would expect, the DRBD resource is returned to the secondary role after the domU is successfully shut down.
zh: 同样，如您所料，在domU成功关闭后，DRBD资源将返回到次要角色。

note: type: Block title
en: Migrating the domU
zh: 迁移domU

note: type: Plain text
en: This, too, is done using the usual Xen tools:
zh: 这也是使用常用的Xen工具完成的：

note: type: Plain text
en: In this case, several administrative steps are automatically taken in rapid succession:
zh: 在这种情况下，会自动连续快速地执行几个管理步骤:

note: type: Plain text
en: The resource is promoted to the primary role on _destination-host_.
zh: 资源将提升为目标主机上的主要角色。

note: type: Plain text
en: Live migration of _domU_ is initiated on the local host.
zh: 本地主机上启动了 _domU_ 的实时迁移。

note: type: Plain text
en: When migration to the destination host has completed, the resource is demoted to the secondary role locally.
zh: 迁移到目标主机完成后，资源将在本地降级为次要角色。

note: type: Plain text
en: The fact that both resources must briefly run in the primary role on both hosts is the reason for having to configure the resource in dual-primary mode in the first place.
zh: 两个资源必须在两台主机上以主角色短暂运行，这是首先必须以dual-primary模式配置资源的原因。

note: type: Title ===
en: Internals of DRBD/Xen integration
zh: DRBD/Xen集成的内部机制

note: type: Plain text
en: Xen supports two Virtual Block Device types natively:
zh: Xen本机支持两种虚拟块设备类型：

note: type: Plain text
en: This device type is used to hand "physical" block devices, available in the host environment, off to a guest domU in an essentially transparent fashion.
zh: 此设备类型用于将主机环境中可用的 "physical" 块设备以基本透明的方式移交给来宾domU。

note: type: Plain text
en: This device type is used to make file-based block device images available to the guest domU. It works by creating a loop block device from the original image file, and then handing that block device off to the domU in much the same fashion as the `phy` device type does.
zh: 此设备类型用于使基于文件的块设备映像对来宾domU可用。它的工作原理是从原始图像文件创建一个循环块设备，然后以与 `phy` 设备类型几乎相同的方式将该块设备传递给domU。

note: type: Plain text
en: If a Virtual Block Device configured in the `disk` option of a domU configuration uses any prefix other than `phy:`, `file:`, or no prefix at all (in which case Xen defaults to using the `phy` device type), Xen expects to find a helper script named ``block-``_prefix_ in the Xen scripts directory, commonly `/etc/xen/scripts`.
zh: 如果在domU配置的 `disk` 选项中配置的虚拟块设备使用除 `phy:` 、 `file:` 之外的任何前缀，或者根本不使用前缀（在这种情况下，Xen默认使用 `phy` 设备类型），Xen希望在Xen scripts目录（通常是 `/etc/Xen/scripts` ）中找到名为 ``block-`` _prefix_ 的助手脚本。

note: type: Plain text
en: The DRBD distribution provides such a script for the `drbd` device type, named `/etc/xen/scripts/block-drbd`. This script handles the necessary DRBD resource state transitions as described earlier in this chapter.
zh: DRBD发行版为 `drbd` 设备类型提供了这样一个脚本，名为 `/etc/xen/scripts/block-drbd` 。该脚本处理必要的DRBD资源状态转换，如本章前面所述。

note: type: Title ===
en: Integrating Xen with Pacemaker
zh: Xen与Pacemaker的集成

note: type: Plain text
en: indexterm:[Xen]indexterm:[Heartbeat]In order to fully capitalize on the benefits provided by having a DRBD-backed Xen VBD's, it is recommended to have Heartbeat manage the associated domU's as Heartbeat resources.
zh: indexterm:[Xen]indexterm:[Heartbeat]为了充分利用由DRBD支持的Xen VBD提供的好处，建议让Heartbeat将关联的domU作为Heartbeat资源进行管理。

note: type: Plain text
en: You may configure a Xen domU as a Pacemaker resource, and automate resource failover. To do so, use the Xen OCF resource agent. If you are using the `drbd` Xen device type described in this chapter, you will _not_ need to configure any separate `drbd` resource for use by the Xen cluster resource. Instead, the `block-drbd` helper script will do all the necessary resource transitions for you.
zh: 您可以将Xen domU配置为Pacemaker资源，并自动进行资源故障转移。为此，请使用Xen OCF资源代理。如果您使用本章中描述的 `drbd` Xen设备类型，则不需要配置任何单独的 `drbd` 资源以供Xen群集资源使用。相反，`block-drbd` 助手脚本将为您执行所有必要的资源转换。
