en to zh translation catalogue (80 entries)

note: type: Title ==
en: DRBD volumes in Openstack
zh: Openstack中的DRBD卷

note: type: Plain text
en: indexterm:[Openstack]indexterm:[Cinder]indexterm:[Nova]In this chapter you will learn how to use DRBD in Openstack for persistent, replicated, high-performance block storage.
zh: indexterm:[Openstack]indexterm:[Cinder]indexterm:[Nova]在本章中，您将学习如何在Openstack中使用DRBD实现持久的、复制的、高性能的块存储。

note: type: Title ===
en: Openstack Overview
zh: Openstack概述

note: type: Plain text
en: Openstack itself consists of a big range of individual services; the two that are mostly concerned with DRBD are Cinder and Nova. *Cinder* is the block storage service, while *Nova* is the compute node service that's responsible to make the volumes available for the VMs.
zh: Openstack本身包含大量的独立服务；与DRBD相关的两个主要服务是Cinder和Nova。*Cinder* 是块存储服务，*Nova* 是计算节点服务，负责为虚拟机提供卷。

note: type: Plain text
en: DRBD storage volumes can be accessed in two ways: using the iSCSI protocol (for maximum compatibility), and using DRBD client functionality (being submitted to Openstack).  For a discussion of these two modes and their differences please see <<s-openstack-transport-protocol>>.
zh: 可以通过两种方式访问DRBD存储卷：使用iSCSI协议（实现最大兼容性）和使用DRBD客户端功能（提交给Openstack）。有关这两种模式及其差异的讨论，请参见<<s-openstack-transport-protocol>>。

note: type: Title ===
en: DRBD for Openstack Installation
zh: 用于Openstack安装的DRBD

note: type: Plain text
en: The _drbdmanage driver_ is upstream in Openstack since the Liberty release. It is used (mostly) in the `c-vol` service, so you'll need drbdmanage and DRBD 9 installed on the node(s) running that.
zh: 自Liberty发布以来，_drbdmanagedriver_ 就已经被合并在Openstack的上游。它主要用于 `c-vol` 服务，因此需要在运行该服务的节点上安装drbdmanage和DRBD 9。

note: type: Plain text
en: Depending on the specific Openstack variant being used there are a few differences for paths, user names, etc.:
zh: 根据使用的具体Openstack变量，路径、用户名等有一些不同：

note: type: Block title
en: Distribution dependent settings
zh: 依赖于分发的设置

note: type: Plain text
en: The generalized installations steps are these:
zh: 一般安装步骤如下：

note: type: Plain text
en: In the `cinder.conf` you'll need something like that; the `volume_driver` consists of the class name (last part), and the file path:
zh: 在 `cinder.conf` 中，您需要类似的东西； `volume_driver` 由类名（最后一部分）和文件路径组成：

note: type: Plain text
en: Please see also <<s-openstack-transport-protocol>> for choosing between iSCSI and DRBD transport modes, and <<s-openstack-addtl-conf,other configuration settings>>.
zh: 另请参见<<s-openstack-transport-protocol>>以选择iSCSI和DRBD传输模式，以及<<s-openstack-addtl-conf,other configuration settings>>。

note: type: Plain text
en: Register the backend: (you might need to fetch the authentication environment variables via `source _<admin access data>_`)
zh: 注册后端：（您可能需要通过 `source _<admin access data>_` 以获取身份验证环境变量

note: type: Plain text
en: Allow the user to access the "__org.drbd.drbdmanaged__" service on DBus. For that you need to extend the file `/etc/dbus-1/system.d/org.drbd.drbdmanaged.conf` by an additional stanza like this (replace __USER__ by the username as per the table above):
zh: 允许用户访问DBus上的 "__org.drbd.drbdmanaged__" 服务。为此，您需要将文件 `/etc/dbus-1/system.d/org.drbd.drbdmanaged.conf` 扩展为类似这样的附加节（用上表中的用户名替换用户）：

note: type: Plain text
en: That's it; after a restart of the `c-vol` service you should be able to create your DRBD volumes.
zh: 就这样；重启 `c-vol` 服务之后，您应该能够创建您的DRBD卷。

note: type: Title ====
en: Additional Configuration
zh: 附加配置

note: type: Plain text
en: The `drbdmanage` backend configuration in `cinder.conf` can contain a few additional settings that modify the exact behaviour.
zh: `cinder.conf` 中的 `drbdmanage` 后端配置可以包含一些修改确切行为的附加设置。

note: type: Plain text
en: (((OpenStack,Redundancy))) `drbdmanage_redundancy = 2` e.g. would declare that each volume needs to have 2 storage locations, i.e. be replicated once. This means that two times the storage will be used, and that the reported free space <<s-openstack-free-space,looks limited>>.
zh: （（OpenStack，Redundancy））`drbdmanage_redundancy=2`例如，将声明每个卷需要有两个存储位置，即复制一次。这意味着将使用两倍的存储空间，并且报告的可用空间看起来是有限的。

note: type: Plain text
en: You can request more than two copies of the data; the limit is given by DRBD 9 and the number of storage hosts you have defined.
zh: 您可以请求两个以上的数据副本；限制由DRBD 9和您定义的存储主机数量给出。

note: type: Plain text
en: `drbdmanage_devs_on_controller = True`: By default each volume will get a DRBD client mapped on the Cinder controller node; apart from being used for iSCSI exports, this might prove helpful for debugging, too.
zh: `drbdmanage_devs_on_controller=True` ：默认情况下，每个卷都会在Cinder控制器节点上映射一个DRBD客户机；除了用于iSCSI导出之外，这也可能有助于调试。

note: type: Plain text
en: indexterm:[iSCSI, in OpenStack Cinder]indexterm:[OpenStack, Cinder iSCSI transport]In case you need to choose a different iSCSI backend, you can provide an additional configuration to set it, like `iscsi_helper=lioadm`.
zh: indexterm:[iSCSI，in OpenStack Cinder]indexterm:[OpenStack，Cinder iSCSI transport]如果需要选择不同的iSCSI后端，可以提供其他配置来设置它，如 `iscsi_helper=lioadm`。

note: type: Plain text
en: (((OpenStack,resize policy)))`drbdmanage_resize_policy`, (((OpenStack,resource policy)))`drbdmanage_resource_policy`, and (((OpenStack,snapshot policy)))`drbdmanage_snapshot_policy` configure
zh: （（OpenStack，resize policy））`drbdmanage_resize_policy`，（（OpenStack，resource policy））`drbdmanage_resource_policy`，（（OpenStack，snapshot policy））`drbdmanage_snapshot_policy` 配置

note: type: Plain text
en: the behaviour when resizing volumes, resp. creating snapshots or new resources (freshly create or from a snapshot, etc.)
zh: 重新调整卷大小时的行为。创建快照或新资源（新创建或从快照等）

note: type: Plain text
en: These are strings that have to be parseable as JSON blobs, for example
zh: 例如，这些字符串必须可以解析为JSON blob

note: type: Plain text
en: See <<s-drbdmanage-deployment-policy>> for details about the available policies and their configuration items.
zh: 有关可用策略及其配置项的详细信息，请参见<<s-drbdmanage-deployment-policy>>。

note: type: Plain text
en: Please be aware that Python's JSON parser is strict - you'll need to use single quotes, for instance, and take other JSON specifications and restrictions into account as well!
zh: 请注意，Python的JSON解析器是严格的 - 例如，您需要使用单引号，并考虑其他JSON规范和限制！

note: type: Plain text
en: In case you want to call different plugins for this purpose, the `drbdmanage_resize_plugin`, `drbdmanage_resource_plugin`, and `drbdmanage_snapshot_plugin` configuration items exist as well.
zh: 如果您想为此目的调用不同的插件，还存在 `drbdmanage_resize_plugin` 、`drbdmanage_resource_plugin` 和 `drbdmanage_snapshot_plugin`配置项。

note: type: Plain text
en: `drbdmanage_net_options` resp. `drbdmanage_resource_options` can be used to set DRBD configuration values on each newly created resource. These already have sane default values; if you want to override, don't forget to add these in again!
zh: `drbdmanage_net_选项` resp。`drbdmanage_resource_options` 可用于在每个新创建的资源上设置DRBD配置值。这些已经有了正常的默认值；如果要重写，不要忘记再次添加这些值！

note: type: Plain text
en: Again, these strings get parsed as JSON blobs. The defaults are
zh: 同样，这些字符串被解析为JSON blob。默认值是

note: type: Plain text
en: `drbdmanage_late_local_assign` and `drbdmanage_late_local_assign_exclude` is a performance optimization for hyperconverged setups; this needs a bit of discussion, so please look at the dedicated chapter <<s-openstack-late-local-assign>>.
zh: `drbdmanage_late_local_assign`和'drbdmanage_late_local_assign_exclude'是超收敛设置的性能优化；这需要一点讨论，因此请参阅专用章节<<s-openstack-late-local-assign>>。

note: type: Plain text
en: These configuration settings can be different from one backend to another.
zh: 这些配置设置可以不同于一个后端到另一个后端。

note: type: Title ===
en: Choosing the Transport Protocol
zh: 选择传输协议

note: type: Plain text
en: There are two main ways to run DRBD with Cinder:
zh: 使用Cinder运行DRBD的方法主要有两种：

note: type: Plain text
en: accessing storage via <<s-openstack-iscsi,iSCSI exports>>, and
zh: 通过<<s-openstack-iscsi,iSCSI exports>>和

note: type: Plain text
en: using <<s-openstack-drbd,the DRBD protocol>> on the wire.
zh: 使用线路上的drbd协议。

note: type: Plain text
en: These are not exclusive; you can define multiple backends, have some of them use iSCSI, and others the DRBD protocol.
zh: 这些不是独占的；您可以定义多个后端，其中一些使用iSCSI，另一些使用DRBD协议。

note: type: Title ====
en: iSCSI Transport
zh: iSCSI传输

note: type: Plain text
en: The default way to export Cinder volumes is via iSCSI. This brings the advantage of maximum compatibility - iSCSI can be used with every hypervisor, be it VMWare, Xen, HyperV, or KVM.
zh: 导出Cinder卷的默认方法是通过iSCSI。这带来了最大兼容性的优势—无论是VMWare、Xen、HyperV还是KVM，iSCSI都可以用于每个虚拟机监控程序。

note: type: Plain text
en: The drawback is that all data has to be sent to a Cinder node, to be processed by an (userspace) iSCSI daemon; that means that the data needs to pass the kernel/userspace border, and these transitions will cost some performance.
zh: 缺点是，所有数据都必须发送到Cinder节点，由（userspace）iSCSI守护进程处理；这意味着数据需要通过内核/userspace边界，这些转换将消耗一些性能。

note: type: Plain text
en: TODO: performance comparision
zh: TODO:性能比较

note: type: Title ====
en: DRBD Transport
zh: DRBD传输

note: type: Plain text
en: The alternative is to get the data to the VMs by using DRBD as the transport protocol. This means that DRBD 9footnote:[The kernel module and userspace, and currently the DRBD Manage daemon too; but please see the note at <<s-openstack-drbd-external-NOTE>>.] needs to be installed on the Nova nodes too, and so restricts them to Linux with KVM at the moment.
zh: 另一种方法是使用DRBD作为传输协议将数据传输到VMs。这意味着DRBD 9footnote:[内核模块和用户空间，以及当前DRBD管理守护进程；但是请参见<<s-openstack-DRBD-external-note>.]中的说明，也需要安装在Nova节点上，因此目前将它们限制为带KVM的Linux。

note: type: Plain text
en: One advantage of that solution is that the storage access requests of the VMs can be sent via the DRBD kernel module to the storage nodes, which can then directly access the allocated LVs; this means no Kernel/Userspace transitions on the data path, and consequently better performance. Combined with RDMA capable hardware you should get about the same performance as with VMs accessing a FC backend directly.
zh: 该解决方案的一个优点是，vm的存储访问请求可以通过DRBD内核模块发送到存储节点，然后存储节点可以直接访问分配的lv；这意味着数据路径上没有内核/用户空间转换，因此性能更好。结合支持RDMA的硬件，您应该获得与VMs直接访问FC后端相同的性能。

note: type: Plain text
en: Another advantage is that you will be implicitly benefitting from the HA background of DRBD: using multiple storage nodes, possibly available over different network connections, means redundancy and avoiding a single point of failure.
zh: 另一个优点是，您将从DRBD的HA背景中隐式获益：使用多个存储节点（可能在不同的网络连接上可用）意味着冗余并避免单点故障。

note: type: Plain text
en: Currently, you'll need to have the hypervisor nodes be part of the DRBD Manage cluster.
zh: 目前，您需要让hypervisor节点成为DRBD Manage集群的一部分。

note: type: Plain text
en: When DRBD Manage becomes able to process "__external nodes__", the requirements on the hypervisor nodes will shrink to DRBD 9 kernel module and -userspace only.
zh: 当DRBD Manage能够处理 "外部节点" 时，hypervisor节点上的需求将缩小到仅限DRBD 9内核模块和-用户空间。

note: type: Title ====
en: Configuring the Transport Protocol
zh: 配置传输协议

note: type: Plain text
en: In the storage stanzas in `cinder.conf` you can define the volume driver to use; you can use different drivers for different backend configurations, i.e. you can define a 2-way-redundancy iSCSI backend, a 2-way-redundancy DRBD backend, and a 3-way DRBD backend at the same time. Horizonfootnote:[The Openstack GUI] should offer these storage backends at volume creation time.
zh: 在 `cinder.conf` 中的存储节中，您可以定义要使用的卷驱动程序；您可以为不同的后端配置使用不同的驱动程序，即，您可以同时定义一个双向冗余的iSCSI后端、一个双向冗余的DRBD后端和一个三向DRBD后端。Horizon footnote:[Openstack GUI]应该在卷创建时提供这些存储后端。

note: type: Plain text
en: The available configuration items for the two drivers are
zh: 两个驱动程序的可用配置项是

note: type: Plain text
en: for iSCSI:
zh: 对于iSCSI：

note: type: Plain text
en: and
zh: 和

note: type: Plain text
en: for DRBD:
zh: 对于DRBD：

note: type: Plain text
en: The old class name "DrbdManageDriver" is being kept for the time because of compatibility reasons; it's just an alias to the iSCSI driver.
zh: 由于兼容性原因，旧类名 "DrbdManageDriver" 暂时保留；它只是iSCSI驱动程序的别名。

note: type: Title ===
en: Some further notes
zh: 一些进一步的说明

note: type: Title ====
en: Free space reporting
zh: 可用空间报告

note: type: Plain text
en: The free space that the cinder driver reports is fetched from DRBD Manage, using the defined <<s-openstack-addtl-conf,`drbdmanage_redundancy`>> setting.
zh: 使用定义的<<s-openstack-addtl-conf,`drbdmanage_redundancy`>>设置从DRBD Manage获取cinder驱动程序报告的可用空间。

note: type: Plain text
en: This will return the size for the single largest volume that can be created with this replication count; so, with 10 storage nodes each having 1TiB free space, the value returned for a redundancy count of three will be 1TiB, and allocating such a volume will not change the free space value, as there are three more nodes with that much free space available. For storage nodes with 20GiB, 15GiB, 10GiB, and 5GiB space available, the free space for `drbdmanage_redundancy` being 3 will be 10GiB, and 15GiB for 2.
zh: 这将返回可使用此复制计数创建的单个最大卷的大小；因此，如果10个存储节点每个都有1TiB可用空间，则为3个冗余计数返回的值将为1TiB，并且分配这样的卷不会更改可用空间值，因为还有三个节点有那么多可用空间。对于具有20GiB、15GiB、10GiB和5GiB可用空间的存储节点， `drbdmanage` 冗余的可用空间为: 3冗余时将为10GiB，而2冗余时将为15GiB。

note: type: Plain text
en: This issue is further muddled by thin LVM pools (one or multiple, depending on storage backend in DRBD Manage), and snapshots taken from Cinder volumes.
zh: 瘦LVM池（一个或多个，取决于DRBD Manage中的存储后端）和从Cinder卷中获取的快照进一步混淆了此问题。

note: type: Plain text
en: For further information, please see the Openstack Specs about Thin Provisioning
zh: 有关详细信息，请参阅有关精简配置的Openstack规范

note: type: Plain text
en: there's the https://blueprints.launchpad.net/cinder/+spec/over-subscription-in-thin-provisioning[blueprint] and the https://github.com/openstack/cinder-specs/blob/master/specs/kilo/over-subscription-in-thin-provisioning.rst[text].
zh: 参阅 https://blueprints.launchpad.net/cinder/+spec/over-subscription-in-thin-provisioning[blueprint] 和 https://github.com/openstack/cinder-specs/blob/master/specs/kilo/over-subscription-in-thin-provisioning.rst[text].

note: type: Title ====
en: Hyperconverged Setups
zh: 超收敛设置

note: type: Plain text
en: The configuration item `drbdmanage_late_local_assign` (available in the DRBD Manage Cinder driver from 1.2.0 on, requiring DRBD Manage 0.98.3 or better) is a performance optimization for hyperconverged setups. + With that feature, the driver tries to get a local copy of the data assigned to the hypervisor; that in turn will speed up read IOs, as these won't have to go across the network.
zh: 配置项 `drbdmanage_late_local_assign`（从1.2.0开始在DRBD Manage Cinder驱动程序中提供，要求DRBD Manage 0.98.3或更高版本）是用于超收敛设置的性能优化。+ 有了这个特性，驱动程序会尝试获取分配给hypervisor的数据的本地副本；这反过来会加快读取IO的速度，因为这些IO不必通过网络。

note: type: Plain text
en: At the time of writing, Nova doesn't pass enough information to Cinder; Cinder isn't told which hypervisor will be used. + So the DRBD Manage driver assigns all but one copies at `create_volume` time; the last one is done in the `attach_volume` step, when the hypervisor is known. If this hypervisor is out of space, defined as a storage-less node in DRBD Manage, or otherwise not eligible to receive a copy, any other storage node is used instead, and the target node will receive a _client_ assignment only.
zh: 在编写本文时，Nova没有向Cinder传递足够的信息；Cinder没有被告知将使用哪个hypervisor。+ 因此，DRBD Manage驱动程序在 `create_volume` 时间分配除了一个拷贝之外的所有拷贝；最后一个拷贝是在 `attach_volume` 步骤中完成的，这时hypervisor是已知的。如果此虚拟机监控程序空间不足，在DRBD Manage中被定义为无存储节点，或者没有资格接收副本，则使用任何其他存储节点，目标节点将仅接收一个客户机分配。

note: type: Plain text
en: Because an image might be copied to the volume before it gets attached to a VM, the "local" assignment can't simply be done on the first accessfootnote:[If it assigned on first access, the image copy node (Glance) would receive the copy of the data]. The Cinder driver must be told which nodes are not eligible for local copies; this can be done via `drbdmanage_late_local_assign_exclude`.
zh: 由于映像可能在附加到虚拟机之前复制到卷，因此 "本地" 分配不能简单地在第一次访问时完成footprint:[如果在第一次访问时分配，则映像复制节点（Glance）将接收数据的副本]。必须告知Cinder驱动程序哪些节点不符合本地副本的条件；这可以通过 `drbdmanage_late_local_assign_exclude` 完成。

note: type: Plain text
en: For volumes that get cloned from an image stored within Cinder (via a DRBD Manage snapshot), the new resource will be empty until the `attach_volume` call; at that time the Cinder driver can decide on which nodes the volumes will be deployed, and can actually clone the volume on these.
zh: 对于从存储在Cinder中的映像（通过DRBD管理快照）中克隆的卷，在调用 `附加卷` 之前，新资源将为空；此时Cinder驱动程序可以决定将部署卷的节点，并可以实际在这些节点上克隆卷。

note: type: Block title
en: Free Space Misreported
zh: 虚报自由空间

note: type: Plain text
en: Late allocation invariably means that the free space numbers are wrong. You might prepare 300 VMs, only to find out that you're running out of disk space when their volumes are in the middle of synchronizing.
zh: 延迟分配总是意味着可用空间号是错误的。您可能准备了300个虚拟机，但在它们的卷正在同步时发现磁盘空间不足。

note: type: Plain text
en: But that is a common problem with all thin allocation schemes, so we won't discuss that in more details here.
zh: 但是这是所有瘦分配方案的一个常见问题，因此我们在这里不再详细讨论这个问题。

note: type: Plain text
en: To summarize:
zh: 总结一下：

note: type: Plain text
en: You'll need the DRBD Manage Cinder driver 1.2.0 or later, and DRBD Manage 0.98.3 or later.
zh: 您将需要DRBD Manage Cinder driver 1.2.0或更高版本，以及DRBD Manage 0.98.3或更高版本。

note: type: Plain text
en: The <<s-openstack-drbd,DRBD transport protocol>> must be used; iSCSI won't offer any locality benefits.
zh: 必须使用<<s-openstack-drbd,DRBD transport protocol>>；iSCSI不会提供任何本地好处。

note: type: Plain text
en: The <<s-openstack-redundancy,`drbdmanage_redundancy` setting>> must be set to at least two copies.
zh: 必须将<<s-openstack-redundancy,`drbdmanage_redundancy` setting>>设置为至少两个副本。

note: type: Plain text
en: To generally enable this feature, set `drbdmanage_late_local_assign` to `True`.
zh: 要一般启用此功能，请将 `drbdmanage_late_local_assign` 设置为 `True` 。

note: type: Plain text
en: To specify which hosts should *not* get a local copy, set `drbdmanage_late_local_assign_exclude` to a comma-separated list of hostnames; this should typically include Glance and the Cinder-controller nodes (but not the Cinder-storage nodes!).
zh: 若要指定哪些主机 *不应* 获取本地副本，请将 `drbdmanage_late_local_assign_exclude` 设置为以逗号分隔的主机名列表；这通常应包括Glance和Cinder控制器节点（但不包括Cinder存储节点！）。

note: type: Plain text
en: Take care to not run out of disk space.
zh: 注意不要用完磁盘空间。

note: There is a performance comparison in preparion, showing iSCSI/local/DRBD hyperconverged type: Plain text
en: Here are a few links that show you collected performance data.
zh: 这里有几个链接，显示您收集的性能数据。

note: type: Plain text
en: https://www.3ware.co.jp[Thirdware Inc.] did a Ceph vs. DRBD9 comparison, too; the japanese original can be found in their https://www.3ware.co.jp/download/technical-docs[technical documentation] area.
zh: https://www.3ware.co.jp[Thirdware Inc.]也对Ceph和DRBD9进行了比较；日语原版可以在其 https://www.3ware.co.jp/download/technical docs[technical documentation]区域找到。

note: type: Plain text
en: A translated (English) version is available on request at sales@linbit.com.
zh: 如有要求，可通过sales@linbit.com获得翻译（英文）版本。

note: type: Plain text
en: http://links.linbit.com/Ceph-DRBD9["__Ceph vs. DRBD9 Performance
zh: http://links.linbit.com/Ceph-DRBD9["__Ceph vs. DRBD9性能

note: type: Plain text
en: Comparison__"] discusses IOPs, bandwidth, and IO latency; this one needs a free registration on the LINBIT site.
zh: "]讨论了IOPs、带宽和IO延迟；这需要在LINBIT站点上进行免费注册。
