1.9.4. 创建 NFS Ganesha 集群
本节中的内容 作为技术预览提供,因此不受红帽完全支持。它只应用于测试,不应部署在生产环境中。如需更多信息,请参阅 技术预览。
如果您将 CephFS through NFS 与共享文件系统服务(manila)搭配使用,您必须在 Red Hat Ceph Storage 集群上创建新的集群的 NFS 服务。此服务替换您在 Red Hat OpenStack Platform (RHOSP) 17.1 中使用的独立、由 Pacemaker 控制的 ceph-nfs 服务。
流程
识别 Red Hat Ceph Storage 节点,以部署新的集群 NFS 服务,如
cephstorage-0、cephstorage-1、cephstorage-2。注意您必须在
StorageNFS隔离的网络中部署此服务,以便您可以通过新的 NFS 导出位置挂载现有的共享。您可以在现有 Ceph 存储节点或 HCI 节点上部署新的集群 NFS 服务,也可以在 Red Hat Ceph Storage 集群中注册的新硬件上部署。如果您使用 director Operator 部署 Red Hat Ceph Storage 节点,请将
StorageNFS网络传播到部署ceph-nfs服务的目标节点。注意如果目标节点不是由 director 管理,则无法使用此流程配置网络。管理员必须手动配置所有必需的网络。
-
识别 RHOSP 环境中使用的节点定义文件
overcloud-baremetal-deploy.yaml。有关识别overcloud-baremetal-deploy.yaml文件的更多信息,请参阅 在 OpenShift 部署上自定义 Red Hat OpenStack Services 中的自定义 overcloud 网络。 编辑与 Red Hat Ceph Storage 节点关联的网络,使其包含
StorageNFS网络:- name: CephStorage count: 3 hostname_format: cephstorage-%index% instances: - hostname: cephstorage-0 name: ceph-0 - hostname: cephstorage-1 name: ceph-1 - hostname: cephstorage-2 name: ceph-2 defaults: profile: ceph-storage network_config: template: /home/stack/network/nic-configs/ceph-storage.j2 network_config_update: true networks: - network: ctlplane vif: true - network: storage - network: storage_mgmt - network: storage_nfs编辑 Red Hat Ceph Storage 节点的
/home/stack/network/nic-configs/ceph-storage.j2,使其包含连接到StorageNFS网络的接口:- type: vlan device: nic2 vlan_id: {{ storage_nfs_vlan_id }} addresses: - ip_netmask: {{ storage_nfs_ip }}/{{ storage_nfs_cidr }} routes: {{ storage_nfs_host_routes }}更新 Red Hat Ceph Storage 节点:
$ openstack overcloud node provision \ --stack overcloud \ --network-config -y \ -o overcloud-baremetal-deployed-storage_nfs.yaml \ --concurrency 2 \ /home/stack/network/baremetal_deployment.yaml更新完成后,确保 Red Hat Ceph Storage 节点中创建了一个新接口,并使用与
StorageNFS关联的 VLAN 标记。
-
识别 RHOSP 环境中使用的节点定义文件
识别
StorageNFS网络的 IP 地址,以用作 Ceph NFS 服务的虚拟 IP 地址(VIP):$ openstack port list -c "Fixed IP Addresses" --network storage_nfs在正在运行的
cephadmshell 中,识别 NFS 服务的主机:$ ceph orch host ls标记您确定的每个主机。对您要标记的每个主机重复这个命令:
$ ceph orch host label add <hostname> nfs-
将
<hostname> 替换为您识别的主机的名称。
-
将
创建 NFS 集群:
$ ceph nfs cluster create cephfs \ "label:nfs" \ --ingress \ --virtual-ip=<VIP> \ --ingress-mode=haproxy-protocol将
<VIP> 替换为 Ceph NFS 服务的 VIP。注意您必须将
ingress-mode参数设置为haproxy-protocol。不支持其他 ingress 模式。此入口模式允许您通过共享文件系统服务强制客户端限制。有关部署集群 Ceph NFS 服务的更多信息,请参阅 Red Hat Ceph Storage 7 Operations Guide 中的使用 Ceph Orchestrator (Limited Availability)管理 NFS-Ganesha 网关。
检查 NFS 集群的状态:
$ ceph nfs cluster ls $ ceph nfs cluster info cephfs