附录 A. 可选部署方法(带有 cns-deploy)


以下小节提供了使用 cns-deploy 部署 Red Hat Openshift Container Storage 的可选方法。

注意

CNS-deploy 已被弃用,并将在以后的 Openshift Container Storage 版本中支持用于新部署。

A.1. 设置融合模式

聚合模式环境解决了应用程序需要共享存储和灵活性的使用案例,以及调度计算和存储实例的灵活性,并从同一组硬件中运行。

A.1.1. 配置端口访问

  • 在要托管 Red Hat Gluster Storage 容器的每个 OpenShift 节点上,将以下内容添加到 /etc/sysconfig/iptables 中,以打开所需端口:

    -A OS_FIREWALL_ALLOW -p tcp -m state --state NEW -m tcp --dport 24007 -j ACCEPT
    -A OS_FIREWALL_ALLOW -p tcp -m state --state NEW -m tcp --dport 2222 -j ACCEPT
    -A OS_FIREWALL_ALLOW -p tcp -m state --state NEW -m multiport --dports 49152:49664 -j ACCEPT
    -A OS_FIREWALL_ALLOW -p tcp -m state --state NEW -m tcp --dport 24010 -j ACCEPT
    -A OS_FIREWALL_ALLOW -p tcp -m state --state NEW -m tcp --dport 3260 -j ACCEPT
    -A OS_FIREWALL_ALLOW -p tcp -m state --state NEW -m tcp --dport 111 -j ACCEPT
    注意
    • 端口 24010 和 3260 分别用于 gluster-blockd 和 iSCSI 目标。
    • 从 49664 开始,端口范围定义 GlusterFS 可用于与其卷 brick 通信的端口范围。在上面的示例中,允许的 brick 的总数为 512。根据可能在每个节点上托管的 brick 数量,配置端口范围。

    有关 Red Hat Gluster Storage Server 端口的更多信息,请参阅 https://access.redhat.com/documentation/en-us/red_hat_gluster_storage/3.5/html/administration_guide/chap-getting_started

    • 执行以下命令重新载入 iptables:

      # systemctl reload iptables
    • 在每个节点上执行以下命令来验证是否更新了 iptables:
# iptables -L

A.1.2. 启用内核模块

在运行 cns-deploy 工具前,您必须确保 dm_thin_pooldm_multipathtarget_core_user 模块加载到 OpenShift Container Platform 节点。仅在 Gluster 节点上执行以下命令来验证模块是否已加载:

# lsmod | grep dm_thin_pool
# lsmod | grep dm_multipath
# lsmod | grep target_core_user

如果没有载入模块,则执行以下命令来载入模块:

# modprobe dm_thin_pool
# modprobe dm_multipath
# modprobe target_core_user
注意

要确保这些操作在重启后保留,请创建以下文件并更新每个操作的内容:

# cat /etc/modules-load.d/dm_thin_pool.conf
dm_thin_pool
# cat /etc/modules-load.d/dm_multipath.conf
dm_multipath
# cat /etc/modules-load.d/target_core_user.conf
target_core_user

A.1.3. 启动和启用服务

在托管 gluster pod 的所有节点上执行以下命令,以启用并运行 rpcbind:

# systemctl add-wants multi-user rpcbind.service
# systemctl enable rpcbind.service
# systemctl start rpcbind.service

执行以下命令检查 rpcbind 的状态

# systemctl status rpcbind

rpcbind.service - RPC bind service
   Loaded: loaded (/usr/lib/systemd/system/rpcbind.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2017-08-30 21:24:21 IST; 1 day 13h ago
 Main PID: 9945 (rpcbind)
   CGroup: /system.slice/rpcbind.service
└─9945 /sbin/rpcbind -w

下一步:继续 第 A.3 节 “设置环境”,在 OpenShift 中为 Red Hat Gluster Storage Container Converged 准备环境。

注意

要删除使用 cns-deploy 进行的 Red Hat Openshift Container Storage 安装,请运行 cns-deploy --abort 命令。如果 Gluster 容器化,请使用 -g 选项。

当 pod 被删除时,并非所有 Gluster 状态都会从节点中移除。因此,您还必须在运行 Gluster pod 的每个节点上运行 rm -rf /var/lib/heketi /etc/glusterfs /var/lib/glusterd /var/log/glusterfs 命令,同时还为 Heketi 消耗的每个存储设备运行 removefs -a <device>。这会从每个节点清除所有剩余的 Gluster 状态。您必须是运行该设备的管理员

Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部