en to zh translation catalogue (50 entries)

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

note: type: Plain text
en: indexterm:[OCFS2]indexterm:[Oracle Cluster File System]This chapter outlines the steps necessary to set up a DRBD resource as a block device holding a shared Oracle Cluster File System, version 2 (OCFS2).
zh: indexterm:[OCFS2]indexterm:[Oracle Cluster File System]本章概述了将DRBD资源设置为包含共享Oracle Cluster文件系统版本2（OCFS2）的块设备所需的步骤。

note: type: delimited block =
en: All cluster file systems _require_ fencing - not only via the DRBD resource, but STONITH! A faulty member _must_ be killed.
zh: 所有的群集文件系统都需要围栏-不仅通过DRBD资源，而且还需要STONITH！必须kill掉有问题的成员。

note: type: delimited block =
en: You'll want these settings:
zh: 您需要这些设置：

note: type: delimited block =
en: There must be _no_ volatile caches! You might take a few hints of the page at https://fedorahosted.org/cluster/wiki/DRBD_Cookbook, although that's about GFS2, not OCFS2.
zh: 一定有不稳定的缓存！你可能会在https://fedorahosted.org/cluster/wiki/DRBD_Cookbook 上得到一些提示，尽管那是关于GFS2的，而不是OCFS2的。

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

note: type: Plain text
en: The Oracle Cluster File System, version 2 (OCFS2) is a concurrent access shared storage file system developed by Oracle Corporation. Unlike its predecessor OCFS, which was specifically designed and only suitable for Oracle database payloads, OCFS2 is a general-purpose filesystem that implements most POSIX semantics. The most common use case for OCFS2 is arguably Oracle Real Application Cluster (RAC), but OCFS2 may also be used for load-balanced NFS clusters, for example.
zh: Oracle集群文件系统（OCFS2）是Oracle公司开发的一个并发访问共享存储文件系统。与它的前身OCFS不同，OCFS是专门设计的，只适用于Oracle数据库有效负载，OCFS2是实现大多数POSIX语义的通用文件系统。OCFS2最常见的用例可以说是Oracle Real Application Cluster（RAC），但是OCFS2也可以用于实现比如负载平衡的NFS集群。

note: type: Plain text
en: Although originally designed for use with conventional shared storage devices, OCFS2 is equally well suited to be deployed on <<s-dual-primary-mode,dual-Primary DRBD>>. Applications reading from the filesystem may benefit from reduced read latency due to the fact that DRBD reads from and writes to local storage, as opposed to the SAN devices OCFS2 otherwise normally runs on. In addition, DRBD adds redundancy to OCFS2 by adding an additional copy to every filesystem image, as opposed to just a single filesystem image that is merely shared.
zh: 虽然OCFS2最初设计用于传统的共享存储设备，但它同样非常适合部署在<<s-dual-primary-mode,dual-Primary DRBD>>上。从文件系统中读取的应用程序可能会受益于减少的读取延迟，这是因为DRBD从本地存储中读取和写入，而不是在正常情况下运行的SAN设备OCFS2。此外，DRBD通过向每个文件系统映像添加一个额外的副本来增加OCFS2的冗余，而不是仅仅共享一个文件系统映像。

note: type: Plain text
en: Like other shared cluster file systems such as <<ch-gfs,GFS>>, OCFS2 allows multiple nodes to access the same storage device, in read/write mode, simultaneously without risking data corruption. It does so by using a Distributed Lock Manager (DLM) which manages concurrent access from cluster nodes. The DLM itself uses a virtual file system (`ocfs2_dlmfs`) which is separate from the actual OCFS2 file systems present on the system.
zh: 与其他共享群集文件系统（如<<ch-gfs,GFS>>）一样，OCFS2允许多个节点以读/写模式同时访问同一存储设备，而不会导致数据损坏。它通过使用分布式锁管理器（DLM）来管理来自集群节点的并发访问。DLM本身使用一个虚拟文件系统（`ocfs2_dlmfs`），它独立于系统上的实际ocfs2文件系统。

note: type: Plain text
en: OCFS2 may either use an intrinsic cluster communication layer to manage cluster membership and filesystem mount and unmount operation, or alternatively defer those tasks to the <<ch-pacemaker,Pacemaker>>cluster infrastructure.
zh: OCFS2可以使用一个内在的集群通信层来管理集群成员和文件系统的装载和卸载操作，或者将这些任务推迟到<<ch-pacemaker,Pacemaker>>集群基础设施。

note: type: Plain text
en: OCFS2 is available in SUSE Linux Enterprise Server (where it is the primarily supported shared cluster file system), CentOS, Debian GNU/Linux, and Ubuntu Server Edition. Oracle also provides packages for Red Hat Enterprise Linux (RHEL). This chapter assumes running OCFS2 on a SUSE Linux Enterprise Server system.
zh: OCFS2在SUSE Linux企业服务器（它是主要受支持的共享集群文件系统）、CentOS、Debian GNU/Linux和Ubuntu服务器版本中可用。Oracle还为Red Hat Enterprise Linux（RHEL）提供了软件包。本章假设在SUSE Linux企业服务器系统上运行OCFS2。

note: type: Title ===
en: Creating a DRBD resource suitable for OCFS2
zh: 创建适合OCFS2的DRBD资源

note: type: Plain text
en: Since OCFS2 is a shared cluster file system expecting concurrent read/write storage access from all cluster nodes, any DRBD resource to be used for storing a OCFS2 filesystem must be configured in <<s-dual-primary-mode,dual-primary mode>>. Also, it is recommended to use some of DRBD's <<s-automatic-split-brain-recovery-configuration,features for automatic recovery from split brain>>. To do all this, include the following lines in the resource configuration: indexterm:[drbd.conf]
zh: 由于OCFS2是一个共享的群集文件系统，需要从所有群集节点进行并发读/写存储访问，因此用于存储OCFS2文件系统的任何DRBD资源都必须在<<s-dual-primary-mode,dual-primary mode>>中配置。此外，建议使用一些DRBD的<<s-automatic-split-brain-recovery-configuration,features for automatic recovery from split brain>>。为此，在资源配置中包括以下行：indexterm:[drbd.conf]

note: type: delimited block =
en: By setting auto-recovery policies, you are effectively configuring automatic data-loss! Be sure you understand the implications.
zh: 通过设置自动恢复策略，您可以有效地配置自动数据丢失！一定要明白其中的含义。

note: type: Plain text
en: It is not recommended to set the `allow-two-primaries` option to `yes` upon initial configuration. You should do so after the initial resource synchronization has completed.
zh: 不建议在初始配置时将 `allow-two-primaries` 选项设置为 `yes` 。您应该在初始资源同步完成后执行此操作。

note: type: Plain text
en: Once you have added these options to <<ch-configure,your freshly-configured resource>>, you may <<s-first-time-up,initialize your resource as you normally would>>. After you set the indexterm:[drbd.conf]`allow-two-primaries` option to `yes` for this resource, you will be able to <<s-switch-resource-roles,promote the resource>>to the primary role on both nodes.
zh: 一旦您将这些选项添加到<<ch-configure,your freshly-configured resource>>中，您就可以<<s-first-time-up,initialize your resource as you normally would>>. 当您设置了indexterm:[drbd.conf]  `allow-two-primaries` 选项为 `yes` , 你就可以<<s-switch-resource-roles,promote the resource>>将两节点角色都提升为主要角色。

note: type: Plain text
en: With DRBD 9.1 it will be possible to have more than two nodes in the _Primary_ role; with DRBD 9.0 you can only use two primaries, but more nodes can be in _Secondary_ role to provide more redundancy.
zh: 在DRBD 9.1中，可能有两个以上的节点处于主要角色；在DRBD 9.0中，只能使用两个主要角色，但可以有更多的节点处于次要角色以提供更多冗余。

note: type: Title ===
en: Creating an OCFS2 filesystem
zh: 创建OCFS2文件系统

note: type: Plain text
en: This will create an OCFS2 file system with two node slots on `/dev/drbd0`, and set the filesystem label to `ocfs2_drbd0`. You may specify other options on `mkfs` invocation; please see the `mkfs.ocfs2` system manual page for details.
zh: 这将在 `/dev/drbd0` 上创建一个具有两个节点插槽的OCFS2文件系统，并将文件系统标签设置为 `ocfs2_drbd0`。您可以在 `mkfs` 调用中指定其他选项；有关详细信息，请参阅 `mkfs.ocfs2` 系统手册页。

note: type: Title ===
en: Pacemaker OCFS2 management
zh: Pacemaker OCFS2管理

note: type: Title ====
en: Adding a Dual-Primary DRBD resource to Pacemaker
zh: 向Pacemaker添加Dual-Primary DRBD资源

note: type: Plain text
en: An existing <<s-ocfs2-create-resource,Dual-Primary DRBD resource>>may be added to Pacemaker resource management with the following `crm` configuration:
zh: 现有的<<s-ocfs2-create-resource,Dual-Primary DRBD resource>>可通过以下 `crm` 配置添加到Pacemaker资源管理：

note: type: Plain text
en: Note the `master-max=2` meta variable; it enables dual-Master mode for a Pacemaker master/slave set. This requires that `allow-two-primaries` is also set to `yes` in the DRBD configuration. Otherwise, Pacemaker will flag a configuration error during resource validation.
zh: 注意 `master max=2` 元变量；它为Pacemaker 主/从设备启用双主模式。这要求在DRBD配置中将 `allow-two-primaries` 也设置为 `yes`。否则，Pacemaker将在资源验证期间标记配置错误。

note: type: Title ====
en: Adding OCFS2 management capability to Pacemaker
zh: 为Pacemaker添加OCFS2管理功能

note: type: Plain text
en: In order to manage OCFS2 and the kernel Distributed Lock Manager (DLM), Pacemaker uses a total of three different resource agents:
zh: 为了管理OCFS2和内核分布式锁管理器（DLM），Pacemaker总共使用三种不同的资源代理：

note: type: Plain text
en: `ocf:pacemaker:controld` -- Pacemaker's interface to the DLM;
zh: `ocf:pacemaker:controld` -- Pacemaker与DLM的接口;

note: type: Plain text
en: `ocf:ocfs2:o2cb` -- Pacemaker's interface to OCFS2 cluster management;
zh: `ocf:ocfs2:o2cb`--Pacemaker与ocfs2集群管理的接口;

note: type: Plain text
en: `ocf:heartbeat:Filesystem` -- the generic filesystem management resource agent which supports cluster file systems when configured as a Pacemaker clone.
zh: `ocf:heartbeat:Filesystem`--通用文件系统管理资源代理，配置为Pacemaker克隆时支持群集文件系统。

note: type: Plain text
en: You may enable all nodes in a Pacemaker cluster for OCFS2 management by creating a _cloned group_ of resources, with the following `crm` configuration:
zh: 您可以通过创建具有以下“crm”配置的克隆资源组，为OCFS2管理启用Pacemaker群集中的所有节点：

note: type: Plain text
en: Once this configuration is committed, Pacemaker will start instances of the `controld` and `o2cb` resource types on all nodes in the cluster.
zh: 提交此配置后，Pacemaker将在群集中的所有节点上启动“controld”和“o2cb”资源类型的实例。

note: type: Title ====
en: Adding an OCFS2 filesystem to Pacemaker
zh: 向Pacemaker添加OCFS2文件系统

note: type: Plain text
en: Pacemaker manages OCFS2 filesystems using the conventional `ocf:heartbeat:Filesystem` resource agent, albeit in clone mode. To put an OCFS2 filesystem under Pacemaker management, use the following `crm` configuration:
zh: Pacemaker使用传统的“ocf:heartbeat:Filesystem”资源代理管理OCFS2文件系统，尽管处于克隆模式。要将OCFS2文件系统置于Pacemaker管理下，请使用以下“crm”配置：

note: type: Plain text
en: This example assumes a single-volume resource.
zh: 本例假设一个卷资源。

note: type: Title ====
en: Adding required Pacemaker constraints to manage OCFS2 filesystems
zh: 添加所需的Pacemaker约束以管理OCFS2文件系统

note: type: Plain text
en: In order to tie all OCFS2-related resources and clones together, add the following contraints to your Pacemaker configuration:
zh: 为了将所有与OCFS2相关的资源和克隆绑定在一起，请在Pacemaker配置中添加以下限制：

note: type: Title ===
en: Legacy OCFS2 management (without Pacemaker)
zh: 传统OCFS2管理（不带Pacemaker）

note: type: Plain text
en: The information presented in this section applies to legacy systems where OCFS2 DLM support is not available in Pacemaker. It is preserved here for reference purposes only. New installations should always use the <<s-ocfs2-pacemaker,Pacemaker>> approach.
zh: 本节介绍的信息适用于Pacemaker中不支持OCFS2 DLM的传统系统。此处仅作参考之用。新装置应始终使用<<s-ocfs2-pacemaker,Pacemaker>>方法。

note: type: Title ====
en: Configuring your cluster to support OCFS2
zh: 配置群集以支持OCFS2

note: type: Title =====
en: Creating the configuration file
zh: 创建配置文件

note: type: Plain text
en: OCFS2 uses a central configuration file, `/etc/ocfs2/cluster.conf`.
zh: OCFS2使用一个中央配置文件 `/etc/OCFS2/cluster.conf`。

note: type: Plain text
en: When creating your OCFS2 cluster, be sure to add both your hosts to the cluster configuration. The default port (7777) is usually an acceptable choice for cluster interconnect communications. If you choose any other port number, be sure to choose one that does not clash with an existing port used by DRBD (or any other configured TCP/IP).
zh: 创建OCFS2集群时，请确保将两个主机都添加到集群配置中。默认端口（7777）通常是群集互连通信的可接受选择。如果您选择任何其他端口号，请确保选择的端口号与DRBD使用的现有端口（或任何其他配置的TCP/IP）不冲突。

note: type: Plain text
en: If you feel less than comfortable editing the `cluster.conf` file directly, you may also use the `ocfs2console` graphical configuration utility which is usually more convenient. Regardless of the approach you selected, your `/etc/ocfs2/cluster.conf` file contents should look roughly like this:
zh: 如果您觉得直接编辑cluster.conf文件不太舒服，还可以使用通常更方便的 `ocfs2console` 图形配置实用程序。不管您选择什么方法，您的 `/etc/ocfs2/cluster.conf` 文件内容应该大致如下：

note: type: Plain text
en: When you have configured you cluster configuration, use `scp` to distribute the configuration to both nodes in the cluster.
zh: 配置完群集配置后，请使用 `scp` 将配置分发到群集中的两个节点。

note: type: Title =====
en: Configuring the O2CB driver
zh: 配置O2CB驱动程序

note: type: Plain text
en: On SLES, you may utilize the `configure` option of the `o2cb` init script:
zh: 在SLES上，可以使用 `o2cb` init脚本的 `configure` 选项：

note: type: Plain text
en: ====== .Debian GNU/Linux systems On Debian, the `configure` option to `/etc/init.d/o2cb` is not available. Instead, reconfigure the `ocfs2-tools` package to enable the driver:
zh: ====== .Debian上的Debian GNU/Linux系统， `/etc/init.d/o2cb` 的 `configure` 选项不可用。请重新配置 `ocfs2-tools` 包以启用驱动程序：

note: type: Title ====
en: Using your OCFS2 filesystem
zh: 使用OCFS2文件系统

note: type: Plain text
en: When you have completed cluster configuration and created your file system, you may mount it as any other file system:
zh: 完成集群配置并创建文件系统后，可以将其装载为任何其他文件系统：

note: type: Plain text
en: Your kernel log (accessible by issuing the command `dmesg`) should then contain a line similar to this one:
zh: 然后，内核日志（通过发出命令 `dmesg` 可以访问）应该包含一行类似的内容：

note: type: Plain text
en: From that point forward, you should be able to simultaneously mount your OCFS2 filesystem on both your nodes, in read/write mode.
zh: 从此时起，您应该能够以读/写模式同时在两个节点上挂载OCFS2文件系统。
