en to zh translation catalogue (53 entries)

note: type: Title ==
en: Troubleshooting and error recovery
zh: 故障排除和错误恢复

note: type: Plain text
en: This chapter describes tasks to be performed in the event of hardware or system failures.
zh: 本章描述硬件或系统故障时要执行的任务。

note: type: Title ===
en: Dealing with hard drive failure
zh: 处理硬盘故障

note: type: Plain text
en: indexterm:[drive failure]indexterm:[disk failure]How to deal with hard drive failure depends on the way DRBD is configured to handle disk I/O errors (see <<s-handling-disk-errors>>), and on the type of meta data configured (see <<s-metadata>>).
zh: indexterm:[drive failure]indexterm:[disk failure]如何处理硬盘故障取决于DRBD处理磁盘I/O错误的配置方式（请参见<<s-handling-disk-errors>>），以及配置的元数据类型（请参见<<s-metadata>>）。

note: type: delimited block =
en: For the most part, the steps described here apply only if you run DRBD directly on top of physical hard drives. They generally do not apply in case you are running DRBD layered on top of
zh: 在大多数情况下，这里描述的步骤仅适用于直接在物理硬盘上运行DRBD的情况。它们通常不适用于在

note: type: delimited block =
en: an MD software RAID set (in this case, use `mdadm` to manage drive replacement),
zh: MD软件RAID集（在本例中，使用 `mdadm` 管理驱动器更换），

note: type: delimited block =
en: device-mapper RAID (use `dmraid`),
zh: 设备映射器RAID（使用 `dmraid` ），

note: type: delimited block =
en: a hardware RAID appliance (follow the vendor's instructions on how to deal with failed drives),
zh: 一个硬件RAID设备（遵循供应商关于如何处理故障驱动器的说明），

note: type: delimited block =
en: some non-standard device-mapper virtual block devices (see the device mapper documentation).
zh: 一些非标准设备映射器虚拟块设备（请参阅设备映射器文档）。

note: type: Title ====
en: Manually detaching DRBD from your hard drive
zh: 从硬盘手动分离DRBD

note: type: Plain text
en: indexterm:[drbdadm, detach]If DRBD is <<fp-io-error-pass-on,configured to pass on I/O errors>> (not recommended), you must first detach the DRBD resource, that is, disassociate it from its backing storage:
zh: indexterm:[drbdadm，detach]如果DRBD是<<fp-io-error-pass-on,configured to pass on I/O errors>>（不推荐），则必须首先分离DRBD资源，即，将其与其备份存储解除关联：

note: type: Plain text
en: By running the `drbdadm status` or the `drbdadm dstate` command, you will now be able to verify that the resource is now in indexterm:[diskless mode]indexterm:[diskless (disk state)]indexterm:[disk state, Diskless]_diskless mode_:
zh: 通过运行 `drbdadm status` 或 `drbdadm dstate` 命令，您现在可以验证资源是否现在处于indexterm:[diskless mode]indexterm:[diskless(disk state)]indexterm:[disk state，diskless] _diskless mode_:

note: type: Plain text
en: If the disk failure has occured on your primary node, you may combine this step with a switch-over operation.
zh: 如果主节点上发生磁盘故障，则可以将此步骤与切换操作相结合。

note: type: Title ====
en: Automatic detach on I/O error
zh: I/O错误时自动分离

note: type: Plain text
en: If DRBD is <<fp-io-error-detach,configured to automatically detach upon I/O error>> (the recommended option), DRBD should have automatically detached the resource from its backing storage already, without manual intervention. You may still use the `drbdadm status` command to verify that the resource is in fact running in diskless mode.
zh: 如果DRBD是<<fp-io-error-detach,configured to automatically detach upon I/O error>>时自动分离（推荐选项），DRBD应该已经自动将资源从其备份存储中分离，而无需手动干预。您仍然可以使用 `drbdadm status` 命令来验证资源实际上是在无盘模式下运行的。

note: type: Title ====
en: Replacing a failed disk when using internal meta data
zh: 使用内部元数据时替换故障磁盘

note: type: Plain text
en: If using <<s-internal-meta-data,internal meta data>>, it is sufficient to bind the DRBD device to the new hard disk. If the new hard disk has to be addressed by another Linux device name than the defective disk, the DRBD configuration file has to be modified accordingly.
zh: 如果使用<<s-internal-meta-data,internal meta data>>，则足以将DRBD设备绑定到新硬盘。如果新硬盘必须用另一个Linux设备名而不是缺陷磁盘寻址，则必须相应地修改DRBD配置文件。

note: type: Plain text
en: This process involves creating a new meta data set, then re-attaching the resource: indexterm:[drbdadm, create-md]
zh: 此过程包括创建新的元数据集，然后重新附加资源：indexterm:[drbdadm，create-md]

note: type: Plain text
en: Full synchronization of the new hard disk starts instantaneously and automatically. You will be able to monitor the synchronization's progress via `drbdadm status --verbose`, as with any background synchronization.
zh: 新硬盘的完全同步将立即自动启动。您将能够通过 `drbdadm status --verbose` 监视同步的进度，就像任何后台同步一样。

note: type: Title ====
en: Replacing a failed disk when using external meta data
zh: 使用外部元数据时替换故障磁盘

note: type: Plain text
en: When using <<s-external-meta-data,external meta data>>, the procedure is basically the same. However, DRBD is not able to recognize independently that the hard drive was swapped, thus an additional step is required.
zh: 使用<<s-external-meta-data,external meta data>>时，程序基本相同。然而，DRBD无法独立地识别硬盘驱动器已被交换，因此需要额外的步骤。

note: type: Plain text
en: Make sure to run `drbdadm invalidate` on the node __*without*__ good data; this command will cause the local contents to be overwritten with data from the peers, so running this command on the wrong node might lose data!
zh: 请确保在 __*没有*__ 完好数据的节点上运行 `drbdadm invalidate` 此命令将导致本地内容被对等方的数据覆盖，因此在错误的节点上运行此命令可能会丢失数据！

note: type: Plain text
en: Here, the `drbdadm invalidate` command triggers synchronization. Again, sync progress may be observed via `drbdadm status --verbose`.
zh: 这里，`drbdadm invalidate` 命令触发同步。同样，可以通过 `drbdadm status --verbose` 来观察同步进度。

note: type: Title ===
en: Dealing with node failure
zh: 处理节点故障

note: type: Plain text
en: indexterm:[node failure]When DRBD detects that its peer node is down (either by true hardware failure or manual intervention), DRBD changes its connection state from _Connected_ to _Connecting_ and waits for the peer node to re-appear. The DRBD resource is then said to operate in _disconnected mode_. In disconnected mode, the resource and its associated block device are fully usable, and may be promoted and demoted as necessary, but no block modifications are being replicated to the peer node. Instead, DRBD stores which blocks are being modified while disconnected, on a per-peer basis.
zh: indexterm:[node failure]当DRBD检测到其对等节点关闭时（通过真正的硬件故障或手动干预），DRBD将其连接状态从 _Connected_ 更改为 _Connecting_ ，并等待对等节点重新出现。然后，DRBD资源被称为在 _disconnected mode_ 模式下工作。在断开连接模式下，资源及其关联的块设备完全可用，并且可以根据需要升级和降级，但不会将块修改复制到对等节点。相反，DRBD以每个对等点为基础存储断开连接时正在修改的块。

note: type: Title ====
en: Dealing with temporary secondary node failure
zh: 处理临时辅助节点故障

note: type: Plain text
en: indexterm:[node failure]If a node that currently has a resource in the secondary role fails temporarily (due to, for example, a memory problem that is subsequently rectified by replacing RAM), no further intervention is necessary — besides the obvious necessity to repair the failed node and bring it back online. When that happens, the two nodes will simply re-establish connectivity upon system start-up. After this, DRBD synchronizes all modifications made on the primary node in the meantime to the secondary node.
zh: indexterm:[node failure]如果当前具有次要角色中的资源的节点暂时出现故障（例如，由于随后通过替换RAM纠正的内存问题），则无需进一步干预-除了修复故障节点并使其重新联机的明显必要性之外。当这种情况发生时，两个节点只需在系统启动时重新建立连接。在此之后，DRBD将同时在主节点上所做的所有修改同步到辅助节点。

note: type: Plain text
en: At this point, due to the nature of DRBD's re-synchronization algorithm, the resource is briefly inconsistent on the secondary node. During that short time window, the secondary node can not switch to the Primary role if the peer is unavailable. Thus, the period in which your cluster is not redundant consists of the actual secondary node down time, plus the subsequent re-synchronization.
zh: 此时，由于DRBD的重新同步算法的性质，资源在次要节点上短暂地不一致。在短时间内，如果对等节点不可用，则辅助节点无法切换到主角色。因此，集群不冗余的时间段由实际的辅助节点停机时间加上随后的重新同步组成。

note: type: Plain text
en: Please note that with DRBD 9 more than two nodes can be connected for each resource, so for e.g. 4 nodes a single failing secondary still leaves two other secondaries available for failover.
zh: 请注意，使用DRBD 9，每个资源可以连接两个以上的节点，因此对于例如4个节点，一个失败的辅助节点仍然保留两个其他的辅助节点用于故障转移。

note: type: Title ====
en: Dealing with temporary primary node failure
zh: 处理临时主节点故障

note: type: Plain text
en: indexterm:[node failure]From DRBD's standpoint, failure of the primary node is almost identical to a failure of the secondary node. The surviving node detects the peer node's failure, and switches to disconnected mode. DRBD does _not_ promote the surviving node to the primary role; it is the cluster management application's responsibility to do so.
zh: indexterm:[node failure]从DRBD的角度来看，主节点的故障几乎等同于次节点的故障。幸存节点检测到对等节点的故障，并切换到断开模式。DRBD不会将幸存节点提升为主要角色；集群管理应用程序有责任这样做。

note: type: Plain text
en: When the failed node is repaired and returns to the cluster, it does so in the secondary role, thus, as outlined in the previous section, no further manual intervention is necessary. Again, DRBD does not change the resource role back, it is up to the cluster manager to do so (if so configured).
zh: 当故障节点被修复并返回集群时，它将以次要角色执行此操作，因此，如前一节所述，不需要进一步的手动干预。同样，DRBD不会重新更改资源角色，这取决于集群管理器是否这样做（如果这样配置的话）。

note: type: Plain text
en: DRBD ensures block device consistency in case of a primary node failure by way of a special mechanism. For a detailed discussion, refer to <<s-activity-log>>.
zh: DRBD通过一种特殊的机制，在主节点发生故障的情况下保证块设备的一致性。有关详细讨论，请参阅<<s-activity-log>>。

note: type: Title ====
en: Dealing with permanent node failure
zh: 处理永久性节点故障

note: type: Plain text
en: indexterm:[node failure]If a node suffers an unrecoverable problem or permanent destruction, you must follow the following steps:
zh: indexterm:[node failure]如果节点遇到不可恢复的问题或永久性破坏，则必须执行以下步骤：

note: type: Plain text
en: Replace the failed hardware with one with similar performance and disk capacity.
zh: 将出现故障的硬件替换为具有类似性能和磁盘容量的硬件。

note: type: Plain text
en: Replacing a failed node with one with worse performance characteristics is possible, but not recommended. Replacing a failed node with one with less disk capacity is not supported, and will cause DRBD to refuse to connect to the replaced nodefootnote:[It couldn't replicate the data, anyway!].
zh: 可以用性能较差的节点替换出现故障的节点，但不建议这样做。不支持将出现故障的节点替换为磁盘容量较小的节点，这将导致DRBD拒绝连接到被替换的节点footnote:[无论如何，它无法复制数据！].

note: type: Plain text
en: Install the base system and applications.
zh: 安装基本系统和应用程序。

note: type: Plain text
en: Install DRBD and copy `/etc/drbd.conf` and all of `/etc/drbd.d/` from one of the surviving nodes.
zh: 安装DRBD并从一个幸存的节点复制 `/etc/drbd.conf` 和所有 `/etc/drbd.d/` 文件。

note: type: Plain text
en: Follow the steps outlined in <<ch-configure>>, but stop short
zh: 按照<<ch-configure>>中概述的步骤操作，但不要忘记参考

note: type: Plain text
en: of <<s-initial-full-sync>>.
zh:  <<s-initial-full-sync>>.

note: type: Plain text
en: Manually starting a full device synchronization is not necessary at this point, it will commence automatically upon connection to the surviving primary and/or secondary node(s).
zh: 此时不需要手动启动完全设备同步，它将在连接到幸存的主节点和/或辅助节点时自动启动。

note: type: Title ===
en: Manual split brain recovery
zh: 手动恢复裂脑

note: type: Plain text
en: indexterm:[split brain]DRBD detects split brain at the time connectivity becomes available again and the peer nodes exchange the initial DRBD protocol handshake. If DRBD detects that both nodes are (or were at some point, while disconnected) in the primary role, it immediately tears down the replication connection. The tell-tale sign of this is a message like the following appearing in the system log:
zh: indexterm:[split brain]DRBD在连接再次可用且对等节点交换初始DRBD协议握手时检测到split brain。如果DRBD检测到这两个节点（或者在某个点上，在断开连接的情况下）都处于主角色中，它会立即断开复制连接。这是一条类似以下信息的信号，显示在系统日志中：

note: type: Plain text
en: After split brain has been detected, one node will always have the resource in a indexterm:[StandAlone (connection state)]indexterm:[connection state]_StandAlone_ connection state. The other might either also be in the _StandAlone_ state (if both nodes detected the split brain simultaneously), or in indexterm:[Connecting (connection state)] indexterm:[connection state]_Connecting_ (if the peer tore down the connection before the other node had a chance to detect split brain).
zh: 检测到裂脑后，一个节点的资源将始终处于indexterm:[StandAlone (connection state)]indexterm:[connection state] _StandAlone_ 连接状态。另一个节点也可能处于 _StandAlone_ 状态（如果两个节点同时检测到裂脑），或者处于indexterm:[Connecting (connection state)]indexterm:[connection state] _Connecting_（如果对等节点在另一个节点有机会检测到裂脑之前断开了连接）。

note: type: Plain text
en: At this point, unless you configured DRBD to automatically recover from split brain, you must manually intervene by selecting one node whose modifications will be discarded (this node is referred to as the indexterm:[split brain]_split brain victim_). This intervention is made with the following commands:
zh: 此时，除非您将DRBD配置为自动从裂脑恢复，否则必须通过选择一个将放弃其修改的节点（该节点称为indexterm:[split brain]_split brain victim_）进行手动干预。使用以下命令进行干预：

note: type: delimited block =
en: This is still _work in progress_.
zh: 这项工作仍在进行中。

note: type: delimited block =
en: Expect rough edges and changes.
zh: 期待能大致有所改观。

note: type: Plain text
en: On the other node (the indexterm:[split brain]_split brain survivor_), if its connection state is also _StandAlone_, you would enter:
zh: 在另一个节点（indexterm:[split brain]_split brain survivor_）上，如果其连接状态也是 _StandAlone_ 的，则输入：

note: type: Plain text
en: You may omit this step if the node is already in the _Connecting_ state; it will then reconnect automatically.
zh: 如果节点已处于 _Connecting_ 状态，则可以省略此步骤；然后将自动重新连接。

note: type: Plain text
en: Upon connection, your split brain victim immediately changes its connection state to _SyncTarget_, and gets its modifications overwritten by the other node(s).
zh: 连接后，裂脑受害者立即将其连接状态更改为 _SyncTarget_，并由其他节点覆盖其修改。

note: type: Plain text
en: The split brain victim is not subjected to a full device synchronization. Instead, it has its local modifications rolled back, and any modifications made on the split brain survivor(s) propagate to the victim.
zh: 裂脑受害者不受全设备同步的影响。取而代之的是，它的局部修改被回滚，对裂脑幸存者所做的任何修改都会传播给受害者。

note: type: Plain text
en: After re-synchronization has completed, the split brain is considered resolved and the nodes form a fully consistent, redundant replicated storage system again.
zh: 在重新同步完成后，裂脑被视为已解决，节点再次形成完全一致的冗余复制存储系统。
