5.9. 为备份配置 NFS 后端
您可以使用 NFS 作为存储后端配置块存储服务(cinder)备份服务。
先决条件
- 您计划了存储网络,以确保存储后端、控制平面和数据平面上的计算节点连接。如需更多信息,请参阅 规划部署以及在 OpenShift 上部署 Red Hat OpenStack Services 中的为 Red Hat OpenStack Services 准备网络。https://docs.redhat.com/en/documentation/red_hat_openstack_services_on_openshift/18.0/html/planning_your_deployment/index#assembly_assembly_planning-storage-networks_planning
流程
创建
secretCR 文件,如cinder-backup-nfs-secrets.yaml,并为 NFS 共享添加以下配置:apiVersion: v1 kind: Secret metadata: labels: service: cinder component: cinder-backup name: cinder-backup-nfs-secrets type: Opaque stringData: nfs-secrets.conf: | [DEFAULT] backup_share = <192.168.1.2:/Backups> backup_mount_options = <optional>-
将
<192.168.1.2:/Backups> 替换为 NFS 共享的 IP 地址。 -
将
<optional> 替换为您的 NFS 共享的挂载选项。
-
将
打开
OpenStackControlPlaneCR 文件openstack_control_plane.yaml,并将以下参数添加到cinder模板,以便为 NFS 共享添加secret,并将 NFS 配置为备份的后端:apiVersion: core.openstack.org/v1beta1 kind: OpenStackControlPlane spec: cinder: template: cinderBackup customServiceConfig: | [DEFAULT] backup_driver = cinder.backup.drivers.nfs.NFSBackupDriver customServiceConfigSecrets: - cinder-backup-nfs-secrets networkAttachments: - storage replicas: 1更新 control plane:
$ oc apply -f openstack_control_plane.yaml -n openstack等待 RHOCP 创建与
OpenStackControlPlaneCR 相关的资源。运行以下命令来检查状态:$ oc get openstackcontrolplane -n openstack当状态为 "Setup complete" 时,会创建
OpenStackControlPlane资源。提示将
-w选项附加到get命令的末尾,以跟踪部署进度。