# SOME DESCRIPTIVE TITLE # Copyright (C) YEAR Free Software Foundation, Inc. # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 2020-03-02 15:09+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. type: Title == #: xen.adoc:2 #, no-wrap msgid "Using Xen with DRBD" msgstr "在DRBD中使用Xen" #. type: Plain text #: xen.adoc:7 msgid "" "indexterm:[Xen]This chapter outlines the use of DRBD as a Virtual Block " "Device (VBD) for virtualization environments using the Xen hypervisor." msgstr "indexterm:[Xen]本章概述了将DRBD用作虚拟块设备(VBD)的方法,用于使用Xen虚拟机监控程序的虚拟化环境。" #. type: Title === #: xen.adoc:9 #, no-wrap msgid "Xen primer" msgstr "Xen基础" #. type: Plain text #: xen.adoc:17 msgid "" "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." msgstr "" "Xen是一个虚拟化框架,最初在剑桥大学(英国)开发,后来由XenSource,Inc.维护(现在是Citrix的一部分)。它包含在大多数Linux发行版的最新版本中,如Debian" " GNU/Linux(4.0版以后)、SUSE Linux Enterprise Server(10版以后)、Red Hat Enterprise " "Linux(5版以后)和许多其他发行版。" #. type: Plain text #: xen.adoc:26 msgid "" "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\")." msgstr "" "Xen使用半虚拟化(一种虚拟化方法,涉及虚拟化主机和来宾虚拟机之间的高度协作)和选定的来宾操作系统,与传统的虚拟化解决方案(通常基于硬件仿真)相比,可提高性能。Xen还支持在支持适当虚拟化扩展的cpu上进行完全硬件仿真;用Xen的话说,这就是HVM( \"硬件辅助虚拟机\" )。" #. type: Plain text #: xen.adoc:31 msgid "" "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\")." msgstr "" "在撰写本文时,Xen for " "HVM支持的CPU扩展是英特尔的虚拟化技术(VT,以前的代号为 \"Vanderpool\")和AMD的安全虚拟机(SVM,以前的代号为 \"Pacifica\")。" #. type: Plain text #: xen.adoc:35 msgid "" "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." msgstr "" "Xen支持indexterm:[Xen,live migration]_live " "migration_,它是指在不中断的情况下,将正在运行的来宾操作系统从一个物理主机传输到另一个物理主机的能力。" #. type: Plain text #: xen.adoc:44 msgid "" "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." msgstr "" "当DRBD资源用作Xen的复制虚拟块设备(VBD)时,它用于使domU虚拟磁盘的全部内容在两台服务器上可用,然后可以将其配置为自动故障转移。这样,DRBD不仅为Linux服务器提供冗余(在非虚拟化DRBD部署场景中),而且也为可以在Xen下虚拟化的任何其他操作系统提供冗余,Xen实际上包括32位或64位Intel兼容体系结构上可用的任何操作系统。" #. type: Title === #: xen.adoc:46 #, no-wrap msgid "Setting DRBD module parameters for use with Xen" msgstr "设置DRBD模块参数以用于Xen" #. type: Plain text #: xen.adoc:51 msgid "" "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:" msgstr "" "对于Xen Domain-0内核,建议加载DRBD模块,并将参数 `disable_" "sendpage` 设置为 `1`。为此,创建(或打开)文件 `/etc/modprobe.d/drbd.conf` ,并输入以下行:" #. type: delimited block - #: xen.adoc:55 #, no-wrap msgid "options drbd disable_sendpage=1\n" msgstr "options drbd disable_sendpage=1\n" #. type: Title === #: xen.adoc:58 #, no-wrap msgid "Creating a DRBD resource suitable to act as a Xen VBD" msgstr "创建适合用作Xen VBD的DRBD资源" #. type: Plain text #: xen.adoc:66 msgid "" "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]<>for this resource:" msgstr "" "配置将用作Xen虚拟块设备的DRBD资源相当简单 - 实际上,典型配置与用于任何其他目的的DRBD资源的配置相匹配。但是,如果要为来宾实例启用实时迁移,则需要为此资源启用indexterm:[Dual-Primary mode]<>:" #. type: delimited block - #: xen.adoc:76 #, no-wrap msgid "" "resource {\n" " net {\n" " allow-two-primaries yes;\n" " ...\n" " }\n" " ...\n" "}\n" msgstr "" "resource {\n" " net {\n" " allow-two-primaries yes;\n" " ...\n" " }\n" " ...\n" "}\n" #. type: Plain text #: xen.adoc:82 msgid "" "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." msgstr "启用dual-primary模式是必要的,因为Xen在启动实时迁移之前,会检查资源配置为在源主机和目标主机上用于迁移的所有VBD上的写访问。" #. type: Title === #: xen.adoc:84 #, no-wrap msgid "Using DRBD VBDs" msgstr "使用DRBD VBDs" #. type: Plain text #: xen.adoc:89 msgid "" "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]" msgstr "为了将DRBD资源用作虚拟块设备,必须在Xen domU配置中添加如下行:indexterm:[Xen]" #. type: delimited block - #: xen.adoc:93 #, no-wrap msgid "disk = [ 'drbd:,xvda,w' ]\n" msgstr "disk = [ 'drbd:,xvda,w' ]\n" #. type: Plain text #: xen.adoc:97 msgid "" "This example configuration makes the DRBD resource named _resource_ " "available to the domU as `/dev/xvda` in read/write mode (`w`)." msgstr "此示例配置使名为 _resource_ 的DRBD资源在读/写模式(`w`)下以 `/dev/xvda` 的形式对domU可用。" #. type: Plain text #: xen.adoc:101 msgid "" "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." msgstr "当然,您可以将多个DRBD资源与一个domU一起使用。在这种情况下,只需在 `disk` 选项中添加更多类似于示例中提供的条目,并用逗号分隔。" #. type: Plain text #: xen.adoc:105 msgid "" "There are three sets of circumstances under which you cannot use this " "approach:" msgstr "在以下三种情况下,您不能使用此方法:" #. type: Plain text #: xen.adoc:107 msgid "You are configuring a fully virtualized (HVM) domU." msgstr "您正在配置完全虚拟化(HVM)domU。" #. type: Plain text #: xen.adoc:110 msgid "" "You are installing your domU using a graphical installation utility, _and_ " "that graphical installer does not support the `drbd:` syntax." msgstr "您正在使用图形安装实用程序安装domU,图形安装程序不支持 `drbd:` 语法。" #. type: Plain text #: xen.adoc:115 msgid "" "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." msgstr "" "您正在配置一个没有 `kernel`、 `initrd` 和 `extra` 选项的domU,依赖 `bootloader` 和 `bootloader_args` 参数来使用Xen" " pseudo-bootloader,该pseudo-bootloader不支持 `drbd:` 语法。" #. type: Plain text #: xen.adoc:120 msgid "" "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." msgstr "" "pygrub+(在Xen 3.3之前)和 `domUloader.py`(在SUSE " "Linux企业服务器10上随Xen一起提供)是两个不支持 `drbd:` 虚拟块设备配置语法的伪引导加载程序示例。" #. type: Plain text #: xen.adoc:123 msgid "" "`pygrub` from Xen 3.3 forward, and the `domUloader.py` version that ships " "with SLES 11 _do_ support this syntax." msgstr "自Xen 3.3 以后的 `pygrub` 和SLES 11后附带的 `domUloader.py` 版本都支持这种语法。" #. type: Plain text #: xen.adoc:129 msgid "" "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." msgstr "" "在这些情况下,必须使用传统的 `phy:` 设备语法和与资源关联的DRBD设备名,而不是资源名。但是,这要求您在Xen之外管理DRBD状态转换,这是一种比 `DRBD` 资源类型提供的更不灵活的方法。" #. type: Title === #: xen.adoc:131 #, no-wrap msgid "Starting, stopping, and migrating DRBD-backed domU's" msgstr "启动、停止和迁移DRBD支持的domU" #. type: Block title #: xen.adoc:133 #, no-wrap msgid "Starting the domU" msgstr "启动domU" #. type: Plain text #: xen.adoc:136 msgid "" "Once you have configured your DRBD-backed domU, you may start it as you " "would any other domU:" msgstr "一旦配置了DRBD支持的domU,就可以像启动其他domU一样启动它:" #. type: delimited block - #: xen.adoc:140 #, no-wrap msgid "" "# xm create \n" "Using config file \"/etc/xen/\".\n" "Started domain \n" msgstr "" "# xm create \n" "Using config file \"/etc/xen/\".\n" "Started domain \n" #. type: Plain text #: xen.adoc:144 msgid "" "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." msgstr "在此过程中,您配置为VBD的DRBD资源将提升为主要角色,并按预期让Xen访问。" #. type: Block title #: xen.adoc:146 #, no-wrap msgid "Stopping the domU" msgstr "停止domU" #. type: Plain text #: xen.adoc:148 msgid "This is equally straightforward:" msgstr "这同样直截了当:" #. type: delimited block - #: xen.adoc:151 #, no-wrap msgid "" "# xm shutdown -w \n" "Domain terminated.\n" msgstr "" "# xm shutdown -w \n" "Domain terminated.\n" #. type: Plain text #: xen.adoc:155 msgid "" "Again, as you would expect, the DRBD resource is returned to the secondary " "role after the domU is successfully shut down." msgstr "同样,如您所料,在domU成功关闭后,DRBD资源将返回到次要角色。" #. type: Block title #: xen.adoc:157 #, no-wrap msgid "Migrating the domU" msgstr "迁移domU" #. type: Plain text #: xen.adoc:159 msgid "This, too, is done using the usual Xen tools:" msgstr "这也是使用常用的Xen工具完成的:" #. type: delimited block - #: xen.adoc:161 #, no-wrap msgid "# xm migrate --live \n" msgstr "# xm migrate --live \n" #. type: Plain text #: xen.adoc:165 msgid "" "In this case, several administrative steps are automatically taken in rapid " "succession:" msgstr "在这种情况下,会自动连续快速地执行几个管理步骤:" #. type: Plain text #: xen.adoc:166 msgid "The resource is promoted to the primary role on _destination-host_." msgstr "资源将提升为目标主机上的主要角色。" #. type: Plain text #: xen.adoc:167 msgid "Live migration of _domU_ is initiated on the local host." msgstr "本地主机上启动了 _domU_ 的实时迁移。" #. type: Plain text #: xen.adoc:169 msgid "" "When migration to the destination host has completed, the resource is " "demoted to the secondary role locally." msgstr "迁移到目标主机完成后,资源将在本地降级为次要角色。" #. type: Plain text #: xen.adoc:173 msgid "" "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." msgstr "两个资源必须在两台主机上以主角色短暂运行,这是首先必须以dual-primary模式配置资源的原因。" #. type: Title === #: xen.adoc:176 #, no-wrap msgid "Internals of DRBD/Xen integration" msgstr "DRBD/Xen集成的内部机制" #. type: Plain text #: xen.adoc:179 msgid "Xen supports two Virtual Block Device types natively:" msgstr "Xen本机支持两种虚拟块设备类型:" #. type: Block title #: xen.adoc:180 #, no-wrap msgid "`phy`" msgstr "`phy`" #. type: Plain text #: xen.adoc:184 msgid "" "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." msgstr "此设备类型用于将主机环境中可用的 \"physical\" 块设备以基本透明的方式移交给来宾domU。" #. type: Block title #: xen.adoc:185 #, no-wrap msgid "`file`" msgstr "`file`" #. type: Plain text #: xen.adoc:190 msgid "" "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." msgstr "" "此设备类型用于使基于文件的块设备映像对来宾domU可用。它的工作原理是从原始图像文件创建一个循环块设备,然后以与 `phy` 设备类型几乎相同的方式将该块设备传递给domU。" #. type: Plain text #: xen.adoc:196 msgid "" "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`." msgstr "" "如果在domU配置的 `disk` 选项中配置的虚拟块设备使用除 `phy:` 、 `file:` 之外的任何前缀,或者根本不使用前缀(在这种情况下,Xen默认使用 `phy` 设备类型),Xen希望在Xen" " scripts目录(通常是 `/etc/Xen/scripts` )中找到名为 ``block-`` _prefix_ 的助手脚本。" #. type: Plain text #: xen.adoc:201 msgid "" "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." msgstr "" "DRBD发行版为 `drbd` 设备类型提供了这样一个脚本,名为 `/etc/xen/scripts/block-" "drbd` 。该脚本处理必要的DRBD资源状态转换,如本章前面所述。" #. type: Title === #: xen.adoc:203 #, no-wrap msgid "Integrating Xen with Pacemaker" msgstr "Xen与Pacemaker的集成" #. type: Plain text #: xen.adoc:209 msgid "" "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." msgstr "" "indexterm:[Xen]indexterm:[Heartbeat]为了充分利用由DRBD支持的Xen " "VBD提供的好处,建议让Heartbeat将关联的domU作为Heartbeat资源进行管理。" #. type: Plain text #: xen.adoc:215 msgid "" "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." msgstr "" "您可以将Xen domU配置为Pacemaker资源,并自动进行资源故障转移。为此,请使用Xen " "OCF资源代理。如果您使用本章中描述的 `drbd` Xen设备类型,则不需要配置任何单独的 `drbd` 资源以供Xen群集资源使用。相反,`block-" "drbd` 助手脚本将为您执行所有必要的资源转换。"