Geo 群集指南 #
本文档介绍 Geo 群集及其组件的设置选项和参数,例如投票间票据管理器、特定 Csync2 设置和所需群集资源的配置(以及如何在发生更改时将其传输到其他站点)。了解如何从命令行或使用 Hawk2 Web 界面监控和管理 Geo 群集。
版权所有 © 2006–2025 SUSE LLC 和贡献者。保留所有权利。
根据 GNU 自由文档许可证 (GNU Free Documentation License) 版本 1.2 或(根据您的选择)版本 1.3 中的条款,在此授予您复制、分发和/或修改本文档的许可权限;本版权声明和许可证附带不可变部分。许可版本 1.2 的副本包含在题为“GNU Free Documentation License”的部分。
有关 SUSE 商标,请参见 https://www.suse.com/company/legal/。所有第三方商标均是其各自所有者的财产。商标符号(®、™ 等)代表 SUSE 及其关联公司的商标。星号 (*) 代表第三方商标。
本指南力求涵盖所有细节,但这不能确保本指南准确无误。SUSE LLC 及其关联公司、作者和译者对于可能出现的错误或由此造成的后果皆不承担责任。
前言 #
1 可用文档 #
- 联机文档
可在 https://documentation.suse.com 上查看我们的联机文档。您可浏览或下载各种格式的文档。
注意:最新更新最新的更新通常会在本文档的英文版中提供。
- SUSE 知识库
如果您遇到问题,请参考 https://www.suse.com/support/kb/ 上提供的联机技术信息文档 (TID)。在 SUSE 知识库中搜索根据客户需求提供的已知解决方案。
- 发行说明
有关发行说明,请参见 https://www.suse.com/releasenotes/。
- 在您的系统中
如需脱机使用,您也可在系统的
/usr/share/doc/release-notes
下找到该发行说明。各软件包的相应文档可在/usr/share/doc/packages
中找到。许多命令的手册页中也对相应命令进行了说明。要查看手册页,请运行
man
后跟特定的命令名。如果系统上未安装man
命令,请使用sudo zypper install man
加以安装。
2 改进文档 #
欢迎您提供针对本文档的反馈及改进建议。您可以通过以下渠道提供反馈:
- 服务请求和支持
有关产品可用的服务和支持选项,请参见 https://www.suse.com/support/。
要创建服务请求,需在 SUSE Customer Center 中注册订阅的 SUSE 产品。请转到 https://scc.suse.com/support/requests 并登录,然后单击 。
- Bug 报告
在 https://bugzilla.suse.com/ 中报告文档问题。
要简化此过程,请单击本文档 HTML 版本中的标题旁边的
图标。这样会在 Bugzilla 中预先选择正确的产品和类别,并添加当前章节的链接。然后,您便可以立即开始键入 Bug 报告。需要一个 Bugzilla 帐户。
- 贡献
要帮助改进本文档,请单击本文档 HTML 版本中的标题旁边的
(编辑源文档)图标。然后您会转到 GitHub 上的源代码,可以在其中提出拉取请求。需要一个 GitHub 帐户。
注意:(编辑源文档)仅适用于英语版本有关用于本文档的文档环境的详细信息,请参见储存库的 README。
- 邮件
您也可以将有关本文档的错误以及反馈发送至 <doc-team@suse.com>。请在其中包含文档标题、产品版本和文档发布日期。此外,请包含相关的章节号和标题(或者提供 URL),并提供问题的简要说明。
3 文档约定 #
本文档中使用了以下通知和排版约定:
/etc/passwd
:目录名称和文件名PLACEHOLDER:将 PLACEHOLDER 替换为实际值
PATH
:环境变量ls
、--help
:命令、选项和参数user
:用户或组的名称package_name:软件包的名称
Alt、Alt–F1:按键或组合键。按键以大写字母显示,与键盘上的一样。
AMD/Intel 本段内容仅与 AMD64/Intel 64 体系结构相关。箭头标记文本块的开始位置和结束位置。
IBM Z, POWER 本段内容仅与
IBM Z
和POWER
体系结构相关。箭头标记文本块的开始位置和结束位置。Chapter 1, “Example chapter”:对本指南中其他章节的交叉引用。
必须使用
root
特权运行的命令。您还可以在这些命令前加上sudo
命令,以非特权用户身份来运行它们:#
command
>
sudo
command
非特权用户也可以运行的命令:
>
command
可以通过一行末尾处的反斜线字符 (
\
) 拆分成两行或多行的命令。反斜线告知外壳命令调用将会在该行末尾后面继续:>
echo
a b \ c d显示命令(前面有一个提示符)和外壳返回的相应输出的代码块:
>
command
output在交互式 crm 外壳中执行的命令。
crm(live)#
注意事项
警告:警报通知在继续操作之前,您必须了解的不可或缺的信息。向您指出有关安全问题、潜在数据丢失、硬件损害或物理危害的警告。
重要:重要通知在继续操作之前,您必须了解的重要信息。
注意:注意通知额外信息,例如有关软件版本差异的信息。
提示:提示通知有用信息,例如指导方针或实用性建议。
精简通知
额外信息,例如有关软件版本差异的信息。
有用信息,例如指导方针或实用性建议。
如需大致了解群集节点和名称、资源与约束的命名约定,请参见Book “管理指南”, Appendix “命名约定”。
4 支持 #
下面提供了 SUSE Linux Enterprise High Availability 的支持声明和有关技术预览的一般信息。有关产品生命周期的细节,请参见 https://www.suse.com/lifecycle。
如果您有权获享支持,可在 https://documentation.suse.com/sles-15/html/SLES-all/cha-adm-support.html 中查找有关如何收集支持票据所需信息的细节。
4.1 SUSE Linux Enterprise High Availability 的支持声明 #
要获得支持,您需要订阅适当的 SUSE 产品。要查看为您提供的具体支持服务,请转到 https://www.suse.com/support/ 并选择您的产品。
支持级别的定义如下:
- L1
问题判定,该技术支持级别旨在提供兼容性信息、使用支持、持续维护、信息收集,以及使用可用文档进行基本查错。
- L2
问题隔离,该技术支持级别旨在分析数据、重现客户问题、隔离问题区域,并针对级别 1 不能解决的问题提供解决方法,或完成准备工作以提交级别 3 处理。
- L3
问题解决,该技术支持级别旨在借助工程方法解决级别 2 支持所确定的产品缺陷。
对于签约的客户与合作伙伴,将针对 SUSE Linux Enterprise High Availability 的所有软件包提供 L3 支持,但以下项目除外:
技术预览。
声音、图形、字体和作品。
需要额外客户合同的软件包。
模块 Workstation Extension 随附的某些软件包仅享受 L2 支持。
名称以 -devel 结尾的软件包(包含头文件和类似的开发人员资源)只能与其主软件包一起获得支持。
SUSE 仅支持使用原始软件包,即,未发生更改且未重新编译的包。
4.2 技术预览 #
技术预览是 SUSE 提供的旨在让用户大致体验未来创新的各种软件包、堆栈或功能。随附这些技术预览只是为了提供方便,让您有机会在自己的环境中测试新的技术。非常希望您能提供反馈。如果您测试了技术预览,请联系 SUSE 代表,将您的体验和用例告知他们。您的反馈对于我们的未来开发非常有帮助。
技术预览存在以下限制:
技术预览仍处于开发阶段。因此,它们可能在功能上不完整、不稳定,或者不适合生产用途。
技术预览不受支持。
技术预览可能仅适用于特定的硬件体系结构。
技术预览的细节和功能可能随时会发生变化。因此,可能无法升级到技术预览的后续版本,而只能进行全新安装。
SUSE 可能会发现某个预览不符合客户或市场需求,或者未遵循企业标准。技术预览可能会随时从产品中删除。SUSE 不承诺未来将提供此类技术的受支持版本。
有关产品随附的技术预览的概述,请参见 https://www.suse.com/releasenotes 上的发行说明。
1 Geo 群集面临的挑战 #
通常,地域环境的距离太远,难以支持站点之间的同步通讯。这带来了以下挑战:
如何确保群集站点的正常启动和运行?
如何确保资源仅启动一次?
如何确保不同站点间可以达到仲裁人数、不会出现节点分裂情境?
如何在所有节点和站点上保持 CIB 的最新状态?
如何管理站点间的故障转移?
如何处理需要停止资源时的长时间等待?
以下章节介绍如何使用 SUSE Linux Enterprise High Availability 应对这些挑战。
2 概念概述 #
基于 SUSE® Linux Enterprise High Availability 的 Geo 群集可视为“覆盖”群集,其中每个群集站点相当于传统群集中的一个群集节点。覆盖群集由投票间群集票据管理器(以下简称“投票间”)管理。
Geo 群集中的各方都会运行一个服务,即 boothd
。它连接到其他站点上运行的 booth 守护程序,并交换连接性细节。投票间依靠称为“票据”的群集对象来确保群集资源在各站点之间的高度可用性。票据授予在特定群集站点上运行某些资源的权限。投票间可保证每个票据一次只会授予给一个站点。
如果两个投票间实例之间的通讯断开,则可能是因为群集站点之间的网络发生故障或其中一个群集站点中断。在此情况下,您需要使用一个额外的实例(第三个群集站点或 arbitrator
)来就各决策(例如在站点间进行资源的故障转移)达成一致意见。仲裁方是一台以特殊模式运行投票间实例的计算机(不属于群集)。每个 Geo 群集都可以有一个或多个仲裁方。
最常见的情境是,一个 Geo 群集包含两个站点和一个在第三个站点上运行的仲裁方。这就需要三个投票间实例。
也可以运行无仲裁方的双站点 Geo 群集。在此情况下,Geo 群集管理员需要手动管理票据。如果同时将一个票据授予多个站点,投票间会显示一条警告。
下面的列表更详细地介绍了 Geo 群集的组件和机制。
- 仲裁方
每个站点都会运行一个投票间实例来管理与其他站点的通讯。如果您的设置包含偶数个站点,拥有一个额外的实例会有助于就各项决策(例如在站点间进行资源的故障转移)达成一致意见。在这种情况下,请添加一台或多台在其他站点运行的仲裁方。仲裁方是一台以特殊模式运行投票间实例的计算机。因为所有投票间实例都相互通讯,仲裁方有助于提高票据授予或撤消决定的可靠性。仲裁方无法保留任何票据。
仲裁方对双站点情境尤其重要:例如,如果站点
A
不再能够与站点B
通讯,则可能有两种原因:A
与B
之间发生网络故障。站点
B
发生故障。
但是,如果站点
C
(仲裁方)仍然能与站点B
通讯,则站点B
一定还在正常运行。- 投票间群集票据管理器
Booth 是管理票据分发以及地域群集的站点间故障转移进程的实例。每个参与群集和仲裁方都会运行一个服务,即
boothd
。它连接到其他站点上运行的 booth 守护程序,并交换连接性细节。将票据授予站点后,投票间机制可以自动管理票据:如果持有票据的站点暂停服务,则投票间守护程序会选举下一个将获得该票据的站点。为了防止短暂连接故障,失去选票(因与选举主体断开连接而显式或隐式失去选票)的站点需要在超时时间后放弃票据。因此,可以确保在前一个站点放弃票据后才重新分发票据。另请参见 消亡者依赖关系 (loss-policy="fence"
).对于包含两个站点和仲裁方的 Geo 群集,您需要 3 个投票间实例:每个站点一个实例,再加上在仲裁方上运行的实例。
注意:投票间实例的数量有限目前的上限为 16 个投票间实例。
- 消亡者依赖关系 (
loss-policy="fence"
) 撤消票据后,在停止依赖于该票据的所有资源之前可能需要很长时间,尤其是级联资源。要缩短该过程,群集管理员可以针对票据从站点撤消的情况配置一个
loss-policy
(以及票据依赖项)。如果将 loss-policy 设置为fence
,托管依赖资源的节点将被屏蔽。警告:潜在的数据丢失一方面,
loss-policy="fence"
可以大大加快群集恢复过程,并确保更迅速地迁移资源。但另一方面,它可能会导致丢失所有未写入的数据,例如:
共享存储空间中保存的数据。
复制数据库(例如 MariaDB 或 PostgreSQL)或复制设备 (DRBD) 中的数据,由于网络链接缓慢,这些数据尚未到达其他站点。
- 票据
票据授予在特定群集站点上运行某些资源的权限。一张票据某个时间内只能由一个站点所拥有。最初,每个站点都没有票据 - 每张票据都必须由群集管理员授予一次。之后,票据通过投票间来管理,用于资源的自动故障转移。但是,管理员还可以进行干预以及手动授予或撤消票据。
出于管理目的撤消某个票据后,该票据不再由投票间管理。要使投票间再次开始管理该票据,必须再次将该票据授予站点。
资源可按依赖性绑定到特定票据。仅当站点有定义好的票据时,才会启动相应资源。反之亦然,如果删除了票据,将会自动停止依赖于该票据的资源。
站点有无票据的状态作为一种群集状态存储在 CIB 中。一个站点对于特定票据只有两种状态:
true
(站点拥有该票据)或false
(站点没有该票据)。将无特定票据状态(在 Geo 群集的初始状态期间)与票据被撤消后的状态视为相同的。它们都是用值false
来表示。覆盖群集中的票据类似于传统群集中的资源。但和传统群集不同的是,在覆盖群集中票据是唯一一种资源类型。票据这种原始资源既不需要配置也不需要克隆。
- 票据故障转移
您最初向某个站点授予自动票据之后,投票间将会自动管理此票据。如果持有票据的站点需要暂停服务,票据将在到达失效时间后自动撤消。如果其余站点具有仲裁,将会向另一个站点授予票据(故障转移)。依赖于该票据的资源将故障转移到持有该票据的新站点。
loss-policy
(在约束中定义)用于指定之前运行过资源的节点会发生什么情况。如果发生节点分裂情况时不需要自动故障转移,管理员也可以向健康状况良好的站点授予手动票据。第 8.1 节中介绍了如何通过命令行管理票据。
3 要求 #
将加入群集的所有计算机(群集节点和仲裁方)上都至少需安装以下模块和扩展:
Basesystem Module 15 SP6
Server Applications Module 15 SP6
SUSE Linux Enterprise High Availability 15 SP6
安装计算机时,请选择
HA GEO Node
作为system role
。如此将安装最小系统,这种情况下,默认会安装软件集Geo Clustering for High Availability (ha_geo)
中的软件包。
要用于每个群集站点的虚拟 IP 在 Geo 群集中必须可访问。
必须可以通过每个投票间实例上的一个 UDP 和 TCP 端口访问站点。这意味着,必须相应地配置通讯双方之间的所有防火墙和 IPsec 隧道。
其他设置决定可能需要打开更多端口(例如,为 DRBD 或进行数据库复制)。
所有站点上的所有群集节点应同步到群集外部的 NTP 服务器。有关详细信息,请参见 Administration Guide for SUSE Linux Enterprise Server 15 SP6。
如果节点未同步,将难以分析日志文件和群集报告。
在 Geo 群集中使用奇数数量的站点。这样可确保在网络连接断开时仍存有大部分站点(从而避免出现节点分裂情况)。如果群集站点的数量为偶数,请使用一个仲裁方来处理票据的自动故障转移。如果您不使用仲裁方,则需要手动处理票据故障转移。
每个站点上的群集都有一个有意义的名称,例如
amsterdam
和berlin
。每个站点的群集名称在相应的
/etc/corosync/corosync.conf
文件中定义:totem { [...] cluster_name: amsterdam }
使用下面的 crmsh 命令来更改名称:
#
crm cluster rename NEW_NAME
停止群集服务然后再将其启动,以使更改生效:
#
crm cluster restart
不支持在一个群集中采用混合体系结构。但是,对于 Geo 群集而言,Geo 群集的每个成员(群集站点或仲裁方)可以采用不同的体系结构。例如,您可以运行一个包含三个成员(两个群集站点和一个仲裁方)的地域群集,其中的一个群集站点在 IBM Z 上运行,另一个群集站点在 x86 上运行,仲裁方在 POWER 上运行。
4 设置投票间服务 #
本章介绍投票间的设置和配置选项、如何将投票间配置同步到所有站点和仲裁方、如何启用和启动投票间服务,以及如何在投票间的服务运行时重新配置投票间。
4.1 投票间配置和设置选项 #
默认的投票间配置是 /etc/booth/booth.conf
。此文件必须在 Geo 群集的所有站点(包括仲裁方)上相同。要使 booth 配置在所有站点和仲裁方上同步,请根据第 4.5 节 “将投票间配置同步到所有站点和仲裁方”中所述使用 Csync2。
/etc/booth
和文件的所有权
目录 /etc/booth
及其包含的所有文件需属于用户 hacluster
和组 haclient
。每当从此目录复制新文件时,请使用 cp
命令的 -p
选项来保留所有权。或者,在创建新文件时,请随后使用 chown hacluster:haclient FILE
设置用户和组。
对于包含多个 Geo 群集的设置,可以“共享”同一个仲裁方(从 SUSE Linux Enterprise High Availability 12 开始)。通过提供多个投票间配置文件,可以在同一个仲裁方上启动多个投票间实例,其中每个投票间实例在不同的端口上运行。这样,便可以使用一台计算机充当不同 Geo 群集的仲裁方。有关如何为多个 Geo 群集配置投票间的细节,请参见第 4.4 节 “使用多租户投票间设置”。
为了防止恶意方中断投票间服务,可以基于共享密钥配置身份验证来与投票间通讯。有关细节,请参见例 4.1 “投票间配置文件”中的5。与投票间服务器通讯的所有主机都需要此密钥。因此,请确保在 Csync2 配置中包含密钥文件,或者在所有参与方中手动同步此文件。
4.2 自动票据与手动票据 #
票据授予在特定群集站点上运行某些资源的权限。系统支持以下两种类型的票据:
自动票据由
boothd
守护程序控制。手动票据仅可由群集管理员管理。
自动票据和手动票据具有以下属性:
自动票据和手动票据可以定义在一起:您可以在同一个 Geo 群集中定义并使用自动票据和手动票据。
手动票据管理仍然是手动进行的:对于手动控制的票据,无法进行自动票据管理。手动票据不需要进行仲裁选择,无法自动故障转移,也没有失效时间。
手动票据不会自动转移。:手动授予某个站点的票据会一直保留在该站点上,直到它们被手动撤消。即使该站点变为脱机状态,该票据也不会转移到其他站点。此行为可确保依赖于某个票据的服务始终保留在特定的站点上,不会转移到其他站点。
用于管理这两种类型的票据的命令是相同的:手动票据与自动票据使用相同的命令来管理(例如
grant
或revoke
)。如果只使用手动票据,则不需要仲裁方: 如果在 Geo 群集中只配置手动票据,则不需要仲裁方,因为手动票据管理不需要仲裁决策。
要配置票据,请使用 /etc/booth/booth.conf
文件(请参见第 4.3 节 “使用默认投票间设置”了解更多信息)。
4.3 使用默认投票间设置 #
如果您已按《Geo Clustering Quick Start》(Geo 群集快速入门)中所述使用引导脚本设置基本 Geo 群集,那么这些脚本已使用最小参数集在所有站点上创建默认的投票间配置。要扩展或微调最小投票间配置,请参考例 4.1或第 4.4 节 “使用多租户投票间设置”中的示例。
要添加或更改投票间所需的参数,请手动编辑投票间配置文件,或使用 YaST 的 yast2 geo-cluster
将它启动(或者启动 YaST,然后选择 › )。
transport = UDP 1 port = 9929 2 arbitrator = 192.168.203.100 3 site = 192.168.201.100 4 site = 192.168.202.100 4 authfile = /etc/booth/authkey 5 ticket = "ticket-nfs" 6 mode = MANUAL 7 ticket = "ticketA" 6 expire = 600 8 timeout = 10 9 retries = 5 10 renewal-freq = 30 11 before-acquire-handler12 = /etc/booth/ticket-A13 db-1 14 acquire-after = 60 15 ticket = "ticketB" 6 expire = 600 8 timeout = 10 9 retries = 5 10 renewal-freq = 30 11 before-acquire-handler12 = /etc/booth/ticket-B13 db-8 14 acquire-after = 60 15
用于站点间通讯的传输协议。仅支持 UDP,但将来可支持其他传输层。因此,目前可以省略此参数。 | |
用于在每个站点上投票间实例之间通讯的端口。如果不使用默认端口 ( | |
用作仲裁方的计算机的 IP 地址。请为 Geo 群集设置中要使用的每个仲裁方添加一个项。 | |
用于站点上
如果您已使用引导脚本设置投票间,那么您在设置期间指定的虚拟 IP 已写入到投票间配置中(并且也已添加到群集配置中)。要手动设置群集资源,请参见第 6.2 节 “配置 | |
可选的参数。基于共享密钥为客户端和服务器启用 booth 身份验证。此参数指定密钥文件的路径。 密钥要求 #
| |
将由投票间或群集管理员管理的票据。为每个票据添加一个 | |
可选的参数。定义票据模式。默认情况下,所有票据均由投票间管理。要定义由管理员管理的票据(手动票据),请将 mode 参数设置为 手动票据没有 expire、renewal-freq 和 retries 参数。 | |
可选的参数。定义票据的失效时间,以秒为单位。已获得票据的站点会定期续订票据。如果投票间在截至所定义的失效时间内没有收到票据续订信息,则票据会被撤消并授予其他站点。如果未指定失效时间,票据默认在 | |
可选的参数。定义超时期限,以秒为单位。如果投票间未在此期限内收到回复,则在该段时间过后,投票间会重发送包。定义的超时应足够长,以便包能够进入其他 booth 成员(所有仲裁方和站点)。 | |
可选的参数。定义投票间在放弃等待其他站点的确认之前需要重试发送包多少次。小于 | |
可选的参数。设置票据续订频率周期。默认情况下,票据续订每隔失效时间的一半发生一次。如果在持续较长的一段时间内网络可靠性往往降低,则建议以更高的频率续订票据。在每次续订之前, | |
可选的参数。支持一个或多个脚本。如果使用多个脚本,则每个脚本可以负责不同的检查,例如群集状态、数据中心连接、环境健康状况传感器和其他检查。将所有脚本存储在目录
此目录中的脚本按字母顺序执行。在 | |
假设 | |
| |
可选的参数。票据丢失后,投票间会额外等待这段时间,然后再获取票据。这样,丢失票据的站点便可以通过停止资源或者屏蔽资源来放弃资源。典型的延迟为
如果您不确定停止资源、降级资源或屏蔽节点的时间有多长(该时间取决于 |
4.3.1 手动编辑投票间配置文件 #
以
root
或同等身份登录到群集节点。如果
/etc/booth/booth.conf
尚不存在,请将示例投票间配置文件/etc/booth/booth.conf.example
复制到/etc/booth/booth.conf
:#
cp -p /etc/booth/booth.conf.example /etc/booth/booth.conf
根据 例 4.1 “投票间配置文件” 编辑
/etc/booth/booth.conf
。确认更改并保存文件。
在所有群集节点和仲裁方上,打开在防火墙中为 booth 配置的端口。参见例 4.1 “投票间配置文件”中的位置 2。
4.3.2 使用 YaST 设置投票间 #
以
root
或同等身份登录到群集节点。启动 YaST
模块。选择
现有投票间配置文件,或者单击 创建新的投票间配置文件。在出现的屏幕中配置以下参数:
配置文件: 投票间配置文件的名称。YaST 建议按默认使用
booth
。这会导致投票间配置写入到/etc/booth/booth.conf
。仅当您需要根据第 4.4 节 “使用多租户投票间设置”中所述为不同的 Geo 群集设置多个投票间实例时,才更改此值。传输: 用于站点间通讯的传输协议。仅支持 UDP,但将来可支持其他传输层。另请参见例 4.1 “投票间配置文件”中的位置 1。
端口: 用于在每个站点上投票间实例之间通讯的端口。另请参见例 4.1 “投票间配置文件”中的位置 2。
仲裁方: 用作仲裁方的计算机的 IP 地址。另请参见例 4.1 “投票间配置文件”中的位置 3。
要指定
,请单击 。在打开的对话框中,输入仲裁方的 IP 地址,然后单击 。站点: 用于站点上
boothd
的 IP 地址。另请参见例 4.1 “投票间配置文件”中的位置 4。要指定 Geo 群集的
,请单击 。在打开的对话框中,输入一个站点的 IP 地址,然后单击 。票据: 将由投票间或群集管理员管理的票据。另请参见例 4.1 “投票间配置文件”中的位置 6。
要指定“票据模板”来为所有票据指定默认参数和值,从而减少配置工作量。为此,请使用
,请单击 。在打开的对话框中,输入唯一的 名称。若要使用相同的参数和值定义多个票据,请创建一个__default__
作为 名称。身份验证: 要为 booth 启用身份验证,请单击 ,然后在打开的对话框中,激活 。如果已有一个密钥,请在 中指定路径和文件名。要为新的 Geo 群集生成密钥文件,请单击 。随后会创建密钥并将其写入 中指定的位置。
此外,可以指定票据的可选参数。有关概述,请参见例 4.1 “投票间配置文件”中的位置 7 到 15。
单击
确认更改。
图 4.1︰ 示例票据依赖项 #单击
关闭当前投票间配置屏幕。YaST 将显示定义的投票间配置文件的名称。
在关闭 YaST 模块之前,请切换到
类别。要打开您为投票间配置的端口,请启用
。重要:防火墙设置仅适用于本地计算机防火墙设置仅适用于当前计算机。将为
/etc/booth/booth.conf
中指定的所有端口或者其他任何投票间配置文件打开 UDP/TCP 端口(请参见第 4.4 节 “使用多租户投票间设置”)。请确保同时在地域群集的其他所有节点和仲裁方上打开相应的端口。可以手动或者通过将以下文件与 Csync2 同步来执行此操作:
/usr/lib/firewalld
/usr/lib/firewalld/services/booth.xml
单击步骤 3.a 中指定的 的 NAME,配置将写入到
确认所有设置并关闭 YaST 模块。根据/etc/booth/NAME.conf
。
4.4 使用多租户投票间设置 #
对于包含多个 Geo 群集的设置,可以“共享”同一个仲裁方(从 SUSE Linux Enterprise High Availability 12 开始)。通过提供多个投票间配置文件,可以在同一个仲裁方上启动多个投票间实例,其中每个投票间实例在不同的端口上运行。这样,便可以使用一台计算机充当不同 Geo 群集的仲裁方。
假设您有两个地域群集,一个位于 EMEA(欧洲、中东和非洲),另一个位于 APAC(亚太区)。
要对两个 Geo 群集使用同一个仲裁方,请在 /etc/booth
目录中创建两个配置文件:/etc/booth/emea.conf
和 /etc/booth/apac.conf
。最起码,这两个配置文件的以下参数必须不同:
用于投票间实例通讯的端口。
属于使用仲裁方的不同 Geo 群集的站点。
/etc/booth/apac.conf
#transport = UDP 1 port = 9133 2 arbitrator = 192.168.203.100 3 site = 192.168.2.254 4 site = 192.168.1.112 4 authfile = /etc/booth/authkey-apac 5 ticket ="tkt-db-apac-intern" 6 timeout = 10 retries = 5 renewal-freq = 60 before-acquire-handler12 = /usr/share/booth/service-runnable13 db-apac-intern 14 ticket = "tkt-db-apac-cust" 6 timeout = 10 retries = 5 renewal-freq = 60 before-acquire-handler = /usr/share/booth/service-runnable db-apac-cust
/etc/booth/emea.conf
#transport = UDP 1 port = 9150 2 arbitrator = 192.168.203.100 3 site = 192.168.201.100 4 site = 192.168.202.100 4 authfile = /etc/booth/authkey-emea 5 ticket = "tkt-sap-crm" 6 expire = 900 renewal-freq = 60 before-acquire-handler12 = /usr/share/booth/service-runnable13 sap-crm 14 ticket = "tkt-sap-prod" 6 expire = 600 renewal-freq = 60 before-acquire-handler = /usr/share/booth/service-runnable sap-prod
用于站点间通讯的传输协议。仅支持 UDP,但将来可支持其他传输层。因此,目前可以省略此参数。 | |
用于在每个站点上投票间实例之间通讯的端口。配置文件使用不同的端口来允许在同一仲裁方上启动多个投票间实例。 | |
用作仲裁方的计算机的 IP 地址。在上述示例中,我们为不同的 Geo 群集使用了同一个仲裁方。 | |
用于站点上 | |
可选的参数。基于共享密钥为客户端和服务器启用 booth 身份验证。此参数指定密钥文件的路径。为不同的租户使用不同的密钥文件。 密钥要求 #
| |
将由投票间或群集管理员管理的票据。理论上讲,可以在不同的投票间配置文件中定义相同的票据名称 — 票据不会造成干扰,因为它们属于不同投票间实例管理的不同 Geo 群集。但是,(为了便于讲述),我们建议按上述示例中所示,为每个 Geo 群集使用不同的票据名称。 | |
可选的参数。如果设置了该参数,则在 | |
此处提到的 | |
|
如例 4.2 “
/etc/booth/apac.conf
”和例 4.3 “/etc/booth/emea.conf
”中所述,在/etc/booth
中创建不同的投票间配置文件。可以手动执行此操作,或者按第 4.3.2 节 “使用 YaST 设置投票间”中所述使用 YaST 来创建。在仲裁方上,打开
/etc/booth
中任一投票间配置文件内定义的端口。在属于使用仲裁方的单个 Geo 群集的节点上,打开相应投票间实例所用的端口。
在使用相同 booth 配置的所有群集节点和仲裁方上,同步相应的 booth 配置文件。有关详细信息,请参见第 4.5 节 “将投票间配置同步到所有站点和仲裁方”。
在仲裁方上,按在仲裁方上启动投票间服务中所述为多租户设置启动各个投票间实例。
在各个 Geo 群集上,按在群集站点上启动投票间服务中所述启动投票间服务。
4.5 将投票间配置同步到所有站点和仲裁方 #
要使 booth 正常工作,一个地域群集中的所有群集节点和仲裁方必须使用相同的 booth 配置。
可以使用 Csync2 来同步投票间配置。有关细节,请参见第 5.1 节 “Geo 群集的 Csync2 设置”和第 5.2 节 “使用 Csync2 同步更改”。
如果任何 booth 配置发生更改,请务必在所有参与方上相应地更新配置文件,并按第 4.7 节 “运行时重配置投票间”中所述重启动 booth 服务。
4.6 启用和启动投票间服务 #
- 在群集站点上启动投票间服务
每个群集站点的投票间服务都通过投票间资源组(如果您是使用引导脚本设置 Geo 群集的,则其已自动配置,否则请按第 6.2 节 “配置
boothd
的资源组”中所述手动配置)来管理。要为每个站点启动一个投票间服务实例,请在每个群集站点上启动相应的投票间资源组。- 在仲裁方上启动投票间服务
从 SUSE Linux Enterprise 12 开始,投票间仲裁方由 systemd 管理。单元文件名为
booth@.service
。@
表示可以使用一个参数(在本例中为配置文件的名称)运行该服务。要在仲裁方上启用投票间服务,请使用以下命令:
#
systemctl enable booth@booth
从命令行启用服务后,只要该服务未被禁用,就可以使用 YaST 服务管理器对它进行管理。如果该服务已禁用,则下一次重启动 systemd 时,它将从 YaST 的服务列表中消失。
用于启动投票间服务的命令取决于投票间设置:
如果按第 4.3 节中所述使用默认设置,则只会配置
/etc/booth/booth.conf
。在这种情况下,请登录到每个仲裁方并使用以下命令:#
systemctl start booth@booth
如果按第 4.4 节中所述以多租户模式运行投票间,则已在
/etc/booth
中配置了多个投票间配置文件。要为各个投票间实例启动服务,请使用systemctl start booth@NAME
,其中 NAME 表示相应配置文件/etc/booth/NAME.conf
的名称。例如,如果您创建了投票间配置文件
/etc/booth/emea.conf
和/etc/booth/apac.conf
,请登录到仲裁方并执行以下命令:#
systemctl start booth@emea
#
systemctl start booth@apac
这将以仲裁方模式启动投票间服务。它可以与所有其他投票间守护程序通讯,但和群集站点上运行的投票间守护程序不同,它不能被授予票据。投票间仲裁方只参与选择。否则,它们处于休眠状态。
4.7 运行时重配置投票间 #
如果在已运行投票间服务的情况下需要更改投票间配置,请执行以下操作:
根据需要调整投票间配置文件。
将更新的 booth 配置文件同步到属于地域群集的所有群集节点和仲裁方。有关详细信息,请参见第 5 章 “跨所有站点和仲裁方同步配置文件”。
按第 4.6 节 “启用和启动投票间服务”中所述,在仲裁方和站点上重启动 booth 服务。这不会给已授予站点的票据造成任何影响。
5 跨所有站点和仲裁方同步配置文件 #
要跨群集中的所有节点和跨地域群集复制重要配置文件,可以使用 Csync2。Csync2 可处理排入同步组的任意数量的主机。每个同步组都有自己的成员主机列表及其包含/排除模式,包含/排除模式定义了在同步组中应同步哪些文件。同步组、属于每个组的主机名以及每个组的包含/排除规则均在 Csync2 配置文件 /etc/csync2/csync2.cfg
中指定。
对于身份验证,Csync2 使用 IP 地址和同步组中的预共享密钥。需要为每个同步组生成一个密钥文件,并将其复制到所有组成员。
Csync2 会通过 TCP 端口(默认为 30865
)访问其他服务器,并启动远程 Csync2 实例。有关 Csync2 的详细信息,请参见 https://oss.linbit.com/csync2/paper.pdf。
5.1 Geo 群集的 Csync2 设置 #
Book “管理指南”, Chapter 4 “使用 YaST 群集模块”, Section 4.7 “将配置传输到所有节点”中介绍了如何使用 YaST 为单个群集设置 Csync2。但是,如同无法处理 Geo 群集所需的设置一样,YaST 无法处理较复杂的 Csync2 设置。对于图 5.1 “Geo 群集的示例 Csync2 设置”中所示的以下设置,可以通过编辑配置文件来手动配置 Csync2。
要调整 Csync2,以便不仅能够在本地群集内部同步文件,而且还能跨地理分散的站点同步文件,您需要在 Csync2 配置中定义两个同步组:
全局组
ha_global
(适用于需要跨 Geo 群集中的所有站点和仲裁方全局同步的文件)。用于本地群集站点的组
ha_local
(适用于需要在本地群集内部同步的文件)。
有关这两个同步组的多个 Csync2 配置文件的概述,请参见图 5.1 “Geo 群集的示例 Csync2 设置”。
身份验证密钥文件及其参照以红色显示。Csync2 配置文件的名称以蓝色显示,其参照以绿色显示。有关细节,请参见示例 Csync2 设置:配置文件。
/etc/csync2/csync2.cfg
主要 Csync2 配置文件。我们特意精简了此文件,其中只包含以下信息:
同步组
ha_local
的定义。该组由两个节点(this-site-host-1
和this-site-host-2
)组成,它使用/etc/csync2/ha_local.key
进行身份验证。要为此组同步的文件列表只在另一个 Csync2 配置文件/etc/csync2/ha_local.cfg
中做了定义。config
语句包含了此定义。config
语句中包含了对另一个 Csync2 配置文件/etc/csync2.cfg/ha_global.cfg
的参照。
/etc/csync2/ha_local.cfg
此文件仅与本地群集相关。它指定只在
ha_local
同步组内部同步的文件列表,因为这些文件特定于每个群集。最重要的文件如下:/etc/csync2/csync2.cfg
,此文件包含本地集群节点的列表。/etc/csync2/ha_local.key
,用于在本地群集内部进行 Csync2 同步的身份验证密钥。/etc/corosync/corosync.conf
,此文件定义本地群集节点之间的通讯通道。/etc/corosync/authkey
,Corosync 身份验证密钥。
文件列表中的其余文件取决于特定的群集设置。图 5.1 “Geo 群集的示例 Csync2 设置”中所列的文件只是示例。如果您还要同步任何站点特定应用程序的文件,请同时将这些文件包含在
ha_local.cfg
中。尽管ha_local.cfg
面向属于 Geo 群集站点之一的节点,但其内容在所有站点上可以相同。如果需要不同的主机集或不同的密钥,可能需要添加额外的组。/etc/csync2.cfg/ha_global.cfg
此文件定义 Csync2 同步组
ha_global
。该组跨越多个站点中的所有群集节点(包括仲裁方)。由于我们建议针对每个 Csync2 同步组使用不同的密钥,此组使用/etc/csync2/ha_global.key
进行身份验证。include
语句定义要在ha_global
同步组内部同步的文件列表。最重要的文件如下:/etc/csync2/ha_global.cfg
和/etc/csync2/ha_global.key
(ha_global
同步组的配置文件,以及用于在该组内部进行同步的身份验证密钥)。/etc/booth/
,用于保存投票间配置的默认目录。如果您为多个租户使用投票间设置,该设置将包含多个投票间配置文件。如果为投票间使用身份验证,则最好是也在此目录中放置密钥文件。/etc/drbd.conf
和/etc/drbd.d
(如果您在群集设置中使用 DRBD)。DRBD 配置可全局同步,因为它从资源配置文件中包含的主机名派生配置。/etc/zypp/repos.de
。软件包储存库有可能在所有群集节点上相同。
显示的其他文件 (
/etc/root/*
) 是出于方便可以包含的示例(使群集管理员的工作变得更简单)。
文件 csync2.cfg
和 ha_local.key
特定于站点,这意味着,您需要为每个群集站点创建不同的文件。这些文件在属于同一群集的节点上相同,但在其他群集上则不同。每个 csync2.cfg
文件需要包含属于站点的主机(群集节点)列表,加上站点特定的身份验证密钥。
仲裁方也需要一个 csync2.cfg
文件。不过,它只需要参照 ha_global.cfg
。
5.2 使用 Csync2 同步更改 #
要成功地使用 Csync2 同步文件,必须满足以下先决条件:
在属于同一个同步组的所有计算机上提供相同的 Csync2 配置。
必须在该组的所有成员上提供每个同步组的 Csync2 身份验证密钥。
Csync2 必须在所有节点和仲裁方上运行。
因此,在首次运行 Csync2 之前,需要做好以下准备:
根据每个同步组登录到一台计算机,然后为相应的组生成身份验证密钥:
#
csync2 -k NAME_OF_KEYFILE
但是,不要在同一个组的其他任何成员上重复生成密钥文件。
对于 图 5.1 “Geo 群集的示例 Csync2 设置”,此命令会生成以下密钥文件:
/etc/csync2/ha_global.key
,以及在每个站点上生成的一个本地密钥 (/etc/csync2/ha_local.key
)。将每个密钥文件复制到相应同步组的所有成员。对于图 5.1 “Geo 群集的示例 Csync2 设置”:
将
/etc/csync2/ha_global.key
复制到所有各方(Geo 群集所有站点上的仲裁方和所有群集节点)。需要在ha_global.cfg
中定义的ha_global
组内所列的所有主机上提供密钥文件。将每个站点的本地密钥文件 (
/etc/csync2/ha_local.key
) 复制到属于 Geo 群集相应站点的所有群集节点上。
将站点特定的
/etc/csync2/csync2.cfg
配置文件复制到属于 Geo 群集相应站点的所有群集节点,并复制到仲裁方。在所有节点和仲裁方上执行以下命令,使 csync2 服务在引导时自动启动:
#
systemctl enable csync2.socket
在所有节点和仲裁方上执行以下命令,以便立即启动服务:
#
systemctl start csync2.socket
要对所有文件执行一次初始同步,请在要从中复制配置的计算机上执行以下命令:
#
csync2 -xv
这会将所有文件推送到同步组的其他成员,从而同步所有文件一次。如果成功同步了所有文件,Csync2 完成时不会显示任何错误。
如果在其他计算机(不只是当前计算机)上对要同步的一个或多个文件进行了修改,Csync2 会显示类似以下消息的输出来报告存在冲突:
While syncing file /etc/corosync/corosync.conf: ERROR from peer site-2-host-1: File is also marked dirty here! Finished with 1 errors.
如果确信当前计算机上的文件版本是“最佳”版本,可以通过强制使用此文件并重新同步来解决冲突:
#
csync2 -f /etc/corosync/corosync.conf
#
csync2 -x
如需有关 Csync2 选项的更多信息,请运行 csync2 -help
。
Csync2 仅推送更改。它不会在计算机之间连续同步文件。
每当更新需要同步的文件时,您都需要将更改推送到同一同步组的其他计算机。在做了更改的计算机上运行 csync2 -xv
。如果在文件未更改的任何其他计算机上运行此命令,系统不会执行任何操作。
6 配置群集资源和约束 #
除了定义特定群集设置所需的资源和约束外,地域群集还需要下文所述的其他资源和约束。可按以下示例中所示使用 crm 外壳 (crmsh) 或者使用 Hawk2 来配置这些资源和约束。
本章重点介绍特定于 Geo 群集的任务。有关您的首选群集管理工具的简介以及如何使用该工具配置资源和约束的一般说明,请参见以下其中一章:
Book “管理指南”, Chapter 5 “配置和管理基础知识”, Section 5.4 “Hawk2 简介”
Book “管理指南”, Chapter 5 “配置和管理基础知识”, Section 5.5 “crmsh 简介”
如果您是使用引导脚本设置 Geo 群集的,那么投票间所需的群集资源(包括 boothd 的资源组)均已配置好。在此情况下,您可以跳过第 6.2 节,只需执行以下剩余步骤即可完成群集资源配置。
如果您要手动设置 Geo 群集,需要执行以下所有步骤:
CIB 不会跨 Geo 群集的群集站点自动同步。需要为每个站点相应地配置必须在 Geo 群集中保持高度可用的所有资源,或者需要将这些资源传输到其他一个或多个站点。
为简化传输过程,可以在配置任何包含站点特定参数的资源时为参数指定取决于运行资源的群集站点名称的值(另请参见第 3 章 “要求”中的“其他要求和建议”)。
在一个站点上配置资源后,可以标记所有群集站点上所需的资源,从当前 CIB 导出这些资源,然后将其导入另一站点的 CIB。有关详细信息,请参见第 6.4 节 “将资源配置传输到其他群集站点”。
6.1 配置资源的票据依赖项 #
对于 Geo 群集,可以指定哪些资源依赖于特定的票据。您可以与此特定类型的约束一起设置 loss-policy
,用于定义撤消票据时应对相应资源采取哪些操作。loss-policy
属性可以使用以下值:
fence
:屏蔽运行相关资源的节点。stop
:停止相关资源。freeze
:不对相关资源执行任何操作。demote
:将在主动模式下运行的相关资源降级为被动模式。
在群集 amsterdam 的其中一个节点上,启动外壳并以
root
或同等身份登录。输入
crm configure
切换到交互式 crm 外壳。配置约束,用于定义哪些资源依赖于特定的票据。例如,要使原始资源
rsc1
依赖于ticketA
,请运行以下命令:crm(live)configure#
rsc_ticket rsc1-req-ticketA ticketA: \ rsc1 loss-policy="fence"
如果已撤消
ticketA
,应屏蔽运行资源的节点。如果您希望其他资源依赖于其他票据,请使用
rsc_ticket
根据需要创建更多的约束。使用
show
查看所做的更改。如果所有设置均正确无误,请使用
commit
提交更改,然后使用quit
退出 crm 实时配置。配置将保存到 CIB。
6.2 配置 boothd
的资源组 #
如果您是使用引导脚本设置 Geo 群集的,则可以跳过下面的过程,因为在此情况下,boothd 的资源和资源组已配置好。
每个站点都需要运行 boothd
的一个实例以与其他投票间守护程序通讯。该守护程序可以在任何节点上启动,因此应将其配置为原始资源。要使 boothd
资源保持在同一节点上,则在可行的情况下将资源粘性添加到配置中。每个守护程序都需要一个永久 IP 地址,因此请用虚拟 IP 地址配置另一个原始资源。将两个原始资源分组:
在群集
amsterdam
的某个节点上,启动外壳并以root
或同等身份登录。输入
crm configure
切换到交互式 crm 外壳。输入以下命令创建两个原始资源,并将它们添加到一个组
g-booth
:crm(live)configure#
primitive ip-booth ocf:heartbeat:IPaddr2 \ params iflabel="ha" nic="eth1" cidr_netmask="24" \ params rule #cluster-name eq amsterdam ip="192.168.201.100" \ params rule #cluster-name eq berlin ip="192.168.202.100"
crm(live)configure#
primitive booth-site ocf:pacemaker:booth-site \ meta resource-stickiness="INFINITY" \ params config="nfs" op monitor interval="10s"
crm(live)configure#
group g-booth ip-booth booth-site
如此配置后,便可通过每个投票间守护程序的 IP 地址来使用该守护程序,而无需考虑运行守护程序的是哪个节点。
使用
show
查看所做的更改。如果所有设置均正确无误,请使用
commit
提交更改,然后使用quit
退出 crm 实时配置。配置将保存到 CIB。
6.3 添加顺序约束 #
如果票据已授予某个站点,但因任何原因导致该站点的所有节点无法托管 boothd
资源组,则可能导致分布于不同地理位置的站点之间出现“节点分裂”现象。在这种情况下,系统无法通过任何 boothd
实例针对其他站点安全地管理票据故障转移。要避免该票据出现潜在的并发性违规(票据同时授予给多个站点),请添加一个顺序约束:
在群集 amsterdam 的其中一个节点上,启动外壳并以
root
或同等身份登录。输入
crm configure
切换到交互式 crm 外壳。创建顺序约束,例如:
crm(live)configure#
order o-booth-before-rsc1 Mandatory: g-booth rsc1
该约束定义
rsc1
(依赖于ticketA
)只能在g-booth
资源组之后启动。对于依赖于某个特定票据的任何其他资源,定义更多顺序约束。
使用
show
查看所做的更改。如果所有设置均正确无误,请使用
commit
提交更改,然后使用quit
退出 crm 实时配置。配置将保存到 CIB。
6.4 将资源配置传输到其他群集站点 #
完成或更改一个群集站点的资源配置后,请将该配置传输到 Geo 群集的其他站点。
为了简化传输,可以标记所有群集站点上所需的任何资源,从当前 CIB 导出这些资源,然后将其导入另一站点的 CIB。标记不会在资源之间创建任何共置或顺序关系。
过程 6.2 “标记并导出资源配置”和过程 6.3 “导入标记的资源配置”中提供了操作方法的示例。它们基于以下先决条件:
有一个包含两个站点的 Geo 群集:群集
amsterdam
和群集berlin
。每个站点的群集名称在相应的
/etc/corosync/corosync.conf
文件中定义:totem { [...] cluster_name: amsterdam }
可以手动(通过编辑
/etc/corosync/corosync.conf
)或者使用 YaST 群集模块(通过切换到 类别,然后定义 )完成此操作。然后停止群集服务,再将其启动,以使更改生效:#
crm cluster restart
已在站点
amsterdam
上的 CIB 中配置应在 Geo 群集中高度可用的投票间和所有服务的必要资源。这些资源将导入到站点berlin
上的 CIB 中。
登录到群集
amsterdam
的某个节点。使用以下命令启动群集:
#
crm cluster start
输入
crm configure
切换到交互式 crm 外壳。查看当前 CIB 配置:
crm(live)configure#
show
使用标记
geo_resources
来标记 Geo 群集中需要的资源和约束:crm(live)configure#
tag geo_resources: \ LIST_OF_RESOURCES_and_CONSTRAINTS_FOR_REQUIRED_SERVICES \
1rsc1-req-ticketA ip-booth booth-site g-booth o-booth-before-rsc1
2Geo 群集中所有站点上都需要的特定设置的任何资源和约束(例如,SUSE 最佳实践文档中所述 DRBD 的资源)。
使用
show
查看所做的更改。如果配置符合您的要求,请使用
submit
提交更改,然后使用quit
退出 crm 在线外壳。将标记的资源和约束导出到名为
exported.cib
的文件:#
crm configure show tag:geo_resources geo_resources > exported.cib
命令
crm configure show tag:
TAGNAME 显示属于标记 TAGNAME 的所有资源。
要将保存的配置文件导入到第二个群集站点的 CIB 中,请执行以下操作:
登录到群集
berlin
的某个节点。使用以下命令启动群集:
#
crm cluster start
将群集
amsterdam
中的文件exported.cib
复制到此节点。将文件
exported.cib
中标记的资源和约束导入群集berlin
的 CIB:#
crm configure load update PATH_TO_FILE/exported.cib
为
crm configure load
命令使用update
参数时,crmsh 会尝试将文件内容集成到当前的 CIB 配置(而不是将当前 CIB 替换为文件内容)。使用以下命令查看更新的 CIB 配置:
#
crm configure show
导入的资源和约束将显示在 CIB 中。
7 通过 DNS 更新设置 IP 转移 #
如果 Geo 群集的一个站点关闭并且发生了票据故障转移,您通常需要相应地调整网络路由(或者需要事先为每个票据配置网络故障转移)。根据绑定到票据的服务类型,可以使用一种备选的解决方案来重配置路由:使用动态 DNS 更新并更改服务的 IP 地址。
此方案必须满足以下先决条件:
需要故障转移的服务已绑定到某个主机名。
DNS 服务器必须针对动态 DNS 更新进行了配置。有关如何使用 BIND/named 执行此操作的信息,请参见
named
文档或访问 https://www.semicomplete.com/articles/dynamic-dns-with-dhcp/。有关如何设置 DNS 的详细信息,包括区域数据的动态更新,请参见《SUSE Linux Enterprise Server 15 SP6 管理指南》。以下示例假设 DNS 更新受到要更新的区域的共享密钥(TSIG 密钥)保护。可以使用
dnssec-keygen
创建该密钥:#
dnssec-keygen -a hmac-md5 -b 128 -n USER geo-update
有关详细信息,请参见
dnssec-keygen
手册页或《SUSE Linux Enterprise Server 15 SP6 管理指南》。
例 7.1 “动态 DNS 更新的资源配置”演示了如何使用 ocf:heartbeat:dnsupdate
资源代理来管理 nsupdate
命令。
该资源代理支持 IPv4 和 IPv6。
crm(live)configure#
primitive dns-update-ip ocf:heartbeat:dnsupdate params \
hostname="www.domain.com" \
1
ip="192.168.3.4" \
2
keyfile="/etc/whereever/Kgeo-update*.key" \
3
server="192.168.1.1" \
4
serverport="53"
5
与需要连同票据一起故障转移的服务绑定的主机名。需要通过动态 DNS 更新此主机名的 IP 地址。 | |
托管要迁移的服务的服务器的 IP 地址。 此处指定的 IP 地址也可以受群集控制。这不会处理本地故障转移,但可以确保在票据故障转移后,外部各方将会定向到正确的站点。 | |
使用 | |
要将更新发送到的 DNS 服务器的 IP 地址。如果未提供服务器,则默认为正确区域的主服务器。 | |
与 DNS 服务器通讯时使用的端口。仅当指定了 DNS 服务器时,此选项才生效。 |
在使用上述资源配置的情况下,资源代理将负责从 DNS 记录中去除发生故障的地域群集站点,并通过动态 DNS 更新来更改服务的 IP。
8 管理 Geo 群集 #
在投票间能够管理 Geo 群集中的某个票据之前,您需要先通过投票间命令行客户端或 Hawk2 手动将其授予给某个站点。
8.1 通过命令行管理票据 #
按第 8.1.1 节 “booth
命令概览”中所述使用 booth
命令行工具授予、列出或撤消票据。
crm_ticket
和crm site ticket
如果由于某些原因投票间服务未运行,您也可以使用 crm_ticket
或 crm site ticket
完全以手动方式管理票据。这两个命令仅在群集节点上可用。使用这些命令要非常小心,因为它们无法校验同一票据是否已授予给其他站点。有关详细信息,请阅读手册页。
当投票间已启动并正在运行时,请仅使用 booth
命令进行手动干预。
8.1.1 booth
命令概览 #
您可以在群集中的任何计算机上运行 booth
命令,而不仅仅是正在运行 boothd
的计算机上。booth
命令尝试通过查看投票间配置文件和本地定义的 IP 地址来查找“本地”群集。如果您未指定 booth
应连接到的站点(使用 -s
选项),则它始终会连接到本地站点。
- 列出所有票据
#
booth list
ticket: ticketA, leader: none ticket: ticketB, leader: 10.2.12.101, expires: 2014-08-13 10:28:57如果未使用
-s
指定特定的站点,将从本地投票间实例请求有关票据的信息。- 向站点授予票据
#
booth grant -s 192.168.201.100 ticketA
booth[27891]: 2014/08/13_10:21:23 info: grant request sent, waiting for the result ... booth[27891]: 2014/08/13_10:21:23 info: grant succeeded!在本例中,会向站点
192.168.201.100
授予ticketA
。如果未使用-s
选项,投票间将自动连接到当前站点(您运行投票间客户端的站点)并请求grant
操作。在授予某个票据之前,该命令会检查是否已向另一个站点授予该票据。如果是,则系统会向您发出警告,并提示您先撤消当前站点的票据。
- 从站点撤消票据
#
booth revoke ticketA
booth[27900]: 2014/08/13_10:21:23 info: revoke succeeded!投票间将检查当前向哪个站点授予了票据,并针对
ticketA
请求revoke
操作。revoke 操作会立即执行。grant
操作和(在某些情况下)revoke
操作可能需要一段时间才会返回确切的操作结果。客户端将一直等待结果,直到达到票据的timeout
值才会放弃等待。如果使用了-w
选项,则客户端将无限期等待。可以在日志文件中或使用crm_ticket -L
命令查找确切的状态。- 强制执行授予操作
#
booth grant -F ticketA
此命令的结果取决于您使用的是自动票据还是手动票据。
自动票据:只要投票间可确保仅将票据授予给一个站点,您就无法将同一票据授予给其他站点,即使使用
-F
选项也不例外。但如果出现节点分裂情况,投票间可能无法检查是否在其他站点授予了自动票据。在此情况下,Geo 群集管理员可以覆盖自动过程,并手动将票据授予给仍在正常运行的站点。在此情况下,-F
选项会告知投票间不要等待来自其他不可访问的站点的响应(如果为此票据定义了参数 expire 和 acquire-after,这样将会忽略这两个参数)。投票间会立即将票据授予指定的站点。手动票据:使用手动票据时,
booth grant -F
可让投票间立即将票据授予指定的站点。
警告:潜在的数据丢失使用
booth grant -F
之前,请确保没有其他联机站点拥有同一票据。如果同一票据授予给多个站点,则依赖于该票据的资源可能会在多个站点上同时启动。这会导致并发性违规并可能造成数据损坏。作为 Geo 群集管理员,您需要在另一个站点恢复可访问状态时解决票据之间的冲突。
下面几节提供了在不同情形下管理票据的示例。
8.1.2 手动转移自动票据 #
假设您要将 ticketA
从站点 amsterdam
(虚拟 IP 为 192.168.201.100
)手动转移到站点 berlin
(虚拟 IP 为 192.168.202.100
),请执行以下操作:
登录到
amsterdam
。将
ticketA
设置为待机:#
crm_ticket -t ticketA -s
等待依赖于
ticketA
的任何资源完全停止或降级。撤消站点
amsterdam
中的ticketA
:#
booth revoke -s 192.168.201.100 ticketA
从原始站点撤消票据后,将
ticketA
授予站点berlin
:#
booth grant -s 192.168.202.100 ticketA
这样,依赖于此票据的资源便可以在站点
berlin
上启动。去除站点
amsterdam
上ticketA
的待机模式:#
crm_ticket -t ticketA -a
如果
berlin
失败,依赖于ticketA
的资源会自动故障转移到站点amsterdam
。
8.1.3 转移手动票据 #
假设您要将手动票据 ticket-nfs
从站点 amsterdam
(虚拟 IP 为 192.168.201.100
)转移到站点 berlin
(虚拟 IP 为 192.168.202.100
),请执行以下操作:
登录到
amsterdam
。将
ticket-nfs
设置为待机:#
crm_ticket -t ticket-nfs -s
等待依赖于
ticket-nfs
的任何资源完全停止或降级。撤消站点
amsterdam
中的ticket-nfs
:#
booth revoke -s 192.168.201.100 ticket-nfs
从原始站点撤消票据后,将
ticket-nfs
授予站点berlin
:#
booth grant -s 192.168.202.100 ticket-nfs
这样,依赖于此票据的资源便可以在站点
berlin
上启动。要随时将资源移回站点
amsterdam
,请去除站点amsterdam
上ticket-nfs
的待机模式:#
crm_ticket -t ticket-nfs -a
8.1.4 故障转移手动票据 #
我们假设手动管理的票据 ticket-nfs
已授予站点 amsterdam
(虚拟 IP 为 192.168.201.100
)。目前无法访问此站点。站点 berlin
(虚拟 IP 为 192.168.202.100
)仍然可用。
尝试联系站点
amsterdam
的本地管理员,并检查该站点是否发生故障。如果是,请执行步骤 2。
如果因连接问题而无法访问
amsterdam
,但该节点仍在运行,可请本地群集管理员在站点amsterdam
上将ticket-nfs
设为待机模式:#
crm_ticket -t ticket-nfs -s
这样会放弃依赖于
ticket-nfs
的资源。现在便可放心将票据授予给其他站点。
登录到
berlin
。使用
-F
选项向站点berlin
授予ticket-nfs
:#
booth grant -F ticket-nfs
系统会显示同一票据可能已授予给其他站点的警告,但会执行该命令。
使用以下命令检查结果:
#
booth list
命令输出中应该会指出
berlin
现在是ticket-nfs
的票据拥有者。依赖于此票据的所有资源都会在berlin
上启动。在尝试重新将
amsterdam
添加回到 Geo 群集中之前,请务必撤消amsterdam
上的ticket-nfs
:#
booth revoke -s 192.168.201.100 ticket-nfs
8.2 使用 Hawk2 管理票据 #
在
和 视图中均可查看票据。Hawk2 显示以下票据状态:尽管您可以使用 Hawk2 查看所有站点的票据,但 Hawk2 触发的任何授予或撤消操作只适用于当前站点(当前使用 Hawk2 连接到的站点)。要将票据授予 Geo 群集的另一个站点,请在属于相应站点的其中一个群集节点上启动 Hawk2。
只能授予尚未指派给任何站点的票据。
启动 Web 浏览器并登录到 Hawk2。
在左侧导航栏中,选择
› 。除了群集节点和资源的相关信息之外,Hawk2 还显示
类别。其中会列出票据状态、票据名称以及上次授予票据的时间。您可以在 列中对票据进行管理。要显示有关票据的更多信息,以及有关群集站点和仲裁方的信息,请单击票据旁的
图标。图 8.1︰ Hawk2 - 票据细节 #要从当前站点中撤消已授予的票据或者要向当前站点授予某个票据,请单击该票据旁边
列中的开关。单击后,将显示可用的操作。当 Hawk2 提示确认时,请确认选择。如果出于任何原因无法授予或撤消票据,Hawk2 将显示错误消息。如果已成功授予或撤消票据,Hawk2 将更新票据
。
利用 Hawk2 的
,您可以在故障发生之前探测到该情况。要了解依赖于特定票据的资源是否按预期方式工作,您还可以测试授予或撤消票据产生的影响。启动 Web 浏览器并登录到 Hawk2。
从顶层行中选择
。在批模式栏中,单击
打开 窗口。要模拟票据的状态更改,请执行以下操作:
单击
› 。依次选择要操作的
和要模拟的 。确认更改。您的事件便会添加到
对话框中所列的事件队列中。此处列出的所有事件都会立即被模拟并反映到 屏幕上。关闭
对话框并查看模拟的更改。
要退出批模式,请
或 模拟的更改。
有关 Hawk2 的Book “管理指南”, Chapter 5 “配置和管理基础知识”, Section 5.4.7 “使用批模式”。
(以及可使用该批模式探测的其他情形)的详细信息,请参见9 查错 #
投票间使用的日志记录机制与 CRM 相同。因此,更改日志级别也会影响投票间日志记录。投票间日志消息还包含所有票据的信息。
投票间日志消息和投票间配置文件均包含在 crm report
中。
如果出现意外的投票间行为或任何问题,请使用 sudo journalctl -n
检查日志数据,或使用 crm report
创建详细的群集报告。
如果可以通过 SSH 从单个主机访问所有站点上的群集节点(包括仲裁方),则您可以在同一个 crm report
中收集所有节点的日志文件。使用 -n
选项调用 crm
report
时,可以从使用 -n
指定的所有主机中获取日志文件。(如果不使用 -n
,该命令将尝试从相应的群集获取节点列表)。例如,要创建单个 crm report
,其中包含来自两个双节点群集(192.168.201.111
|192.168.201.112
和 192.168.202.111
|192.168.202.112
)以及仲裁方 (147.2.207.14
) 的日志文件,请使用以下命令:
#
crm report -n "147.2.207.14 192.168.201.111 192.168.201.112 \
192.168.202.111 192.168.202.112" -f 10:00 -t 11:00 db-incident
如果问题只与 booth 相关,并且您知道 booth 在(站点内的)哪些群集节点上运行,请仅指定这两个节点和仲裁方。
如果无法从一台主机访问所有站点,请在仲裁方以及各站点的群集节点上分别运行 crm
report
,请记得指定相同的时间段。要收集仲裁方上的日志文件,必须为单个节点操作使用 ‑S
选项:
amsterdam #crm report -f 10:00 -t 11:00 db-incident-amsterdam
berlin #crm report -f 10:00 -t 11:00 db-incident-berlin
arbitrator #crm report -S -f 10:00 -t 11:00 db-incident-arbitrator
但是,对于想要从中收集日志文件的所有计算机,最好是生成单个 crm
report
。
10 升级到产品的最新版本 #
有关如何升级群集节点的说明,请参见Book “管理指南”, Chapter 29 “升级群集和更新软件包”。本章还介绍了在开始升级前需要做好哪些准备工作,此外还概述了支持的升级路径并指出了可在何处找到每个步骤的细节。
如果您在群集站点之外使用了仲裁方,请按过程 10.1中所述升级仲裁方。
按Book “管理指南”, Chapter 29 “升级群集和更新软件包”中所述升级到 SUSE Linux Enterprise Server 和 SUSE Linux Enterprise High Availability 的所需目标版本。
检查是否已启用Article “Geo 群集快速入门”, Section 3 “要求”中提到的模块和扩展。
检查是否已安装 booth 软件包:
#
zypper pa | grep booth
如果未安装,请使用以下命令安装:
#
zypper install booth
11 更多信息 #
https://documentation.suse.com/sle-ha-15/ 上提供了更多有关此产品的文档。例如,《Geo 群集快速入门》将指导您使用 crm 外壳提供的 Geo 引导脚本完成 Geo 群集的基本设置。
以下 SUSE 最佳实践文档中提供了有关通过 DRBD 在 Geo 群集中数据复制的信息:https://documentation.suse.com/sbp/all/html/SBP-DRBD/index.html。
A GNU licenses #
This appendix contains the GNU Free Documentation License version 1.2.
GNU Free Documentation License #
Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
0. PREAMBLE #
The purpose of this License is to make a manual, textbook, or other functional and useful document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or non-commercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others.
This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software.
We have designed this License to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference.
1. APPLICABILITY AND DEFINITIONS #
This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The "Document", below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as "you". You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law.
A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language.
A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them.
The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none.
The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words.
A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not "Transparent" is called "Opaque".
Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only.
The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text.
A section "Entitled XYZ" means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as "Acknowledgements", "Dedications", "Endorsements", or "History".) To "Preserve the Title" of such a section when you modify the Document means that it remains a section "Entitled XYZ" according to this definition.
The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License.
2. VERBATIM COPYING #
You may copy and distribute the Document in any medium, either commercially or non-commercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3.
You may also lend copies, under the same conditions stated above, and you may publicly display copies.
3. COPYING IN QUANTITY #
If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects.
If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages.
If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public.
It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document.
4. MODIFICATIONS #
You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version:
Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission.
List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement.
State on the Title page the name of the publisher of the Modified Version, as the publisher.
Preserve all the copyright notices of the Document.
Add an appropriate copyright notice for your modifications adjacent to the other copyright notices.
Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below.
Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice.
Include an unaltered copy of this License.
Preserve the section Entitled "History", Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled "History" in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence.
Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the "History" section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission.
For any section Entitled "Acknowledgements" or "Dedications", Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein.
Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles.
Delete any section Entitled "Endorsements". Such a section may not be included in the Modified Version.
Do not retitle any existing section to be Entitled "Endorsements" or to conflict in title with any Invariant Section.
Preserve any Warranty Disclaimers.
If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles.
You may add a section Entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard.
You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one.
The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version.
5. COMBINING DOCUMENTS #
You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers.
The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work.
In the combination, you must combine any sections Entitled "History" in the various original documents, forming one section Entitled "History"; likewise combine any sections Entitled "Acknowledgements", and any sections Entitled "Dedications". You must delete all sections Entitled "Endorsements".
6. COLLECTIONS OF DOCUMENTS #
You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects.
You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document.
7. AGGREGATION WITH INDEPENDENT WORKS #
A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an "aggregate" if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document.
If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document's Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate.
8. TRANSLATION #
Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail.
If a section in the Document is Entitled "Acknowledgements", "Dedications", or "History", the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title.
9. TERMINATION #
You may not copy, modify, sublicense, or distribute the Document except as expressly provided for under this License. Any other attempt to copy, modify, sublicense or distribute the Document is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
10. FUTURE REVISIONS OF THIS LICENSE #
The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See https://www.gnu.org/copyleft/.
Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation.
ADDENDUM: How to use this License for your documents #
Copyright (c) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled “GNU Free Documentation License”.
If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the “with...Texts.” line with this:
with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation.
If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software.