最佳做法是为 OpenStack 的块存储 (Cinder) 组件配置备份服务,以防数据丢失。您可以将 Cinder 配置为将卷备份到网络文件系统 (NFS) 或对象存储 (Swift) 服务(这是另一项 OpenStack 服务)。
开始之前
确认您的 VMware Integrated OpenStack 3.0 或 3.1 部署已安装且正在运行。
对于 Swift 服务备份配置:
确认 Swift 组件已作为 VMware Integrated OpenStack 3.0 或 3.1 部署的一部分安装。请参见VMware Integrated OpenStack 安装和配置指南。
确认 Swift 组件已注册到身份服务组件 (Keystone)(这是另一项 OpenStack 服务)。此注册是默认 Keystone 配置的一部分。Keystone 作为 VMware Integrated OpenStack 3.0 或 3.1 部署的一部分安装。
对于 NFS 共享备份配置:
关于此任务
您可通过安装包含在 VMware Integrated OpenStack 3.0 或 3.1 部署中的 OpenStack Debian 软件包来配置备份服务。
对于此过程,两个控制器分别称为 controller01 和 controller02。
过程
- 使用 SSH 登录到 VMware Integrated OpenStack Manager。
- 执行 custom.yml 文件。
sudo mkdir -p /opt/vmware/vio/custom
sudo cp /var/lib/vio/ansible/custom/custom.yml.sample /opt/vmware/vio/custom/custom.yml
- 要将 Swift 用作备份服务,请编辑 /opt/vmware/vio/custom/custom.yml 文件。
- 取消对 cinder_backup_driver 参数的注释。
- 将 cinder_backup_driver 参数设置为 cinder.backup.drivers.swift。
# Driver to use for backups. (string value)
cinder_backup_driver: cinder.backup.drivers.swift
- 要将 NFS 用作备份服务,请编辑 /opt/vmware/vio/custom/custom.yml 文件。
- 取消对 cinder_backup_driver 参数的注释。
- 将 cinder_backup_driver 参数设置为 cinder.backup.drivers.nfs。
# Driver to use for backups. (string value)
cinder_backup_driver: cinder.backup.drivers.nfs
- 取消对 cinder_backup_share 参数的注释。
- 将 cinder_backup_share 参数设置为 <NFS host IP address>:<file backup path>。
# NFS share in fqdn:path, ipv4addr:path, or "[ipv6addr]:path"
# format. (string value)
cinder_backup_share: <NFS host IP address>:<file backup path>
- 如果您的 NFS 共享版本不是 4.1,则必须取消对 cinder_backup_mount_options 参数的注释并将其设置为您的 NFS 版本。例如,vers=3。
# Mount options passed to the NFS client. See NFS man page for
# details. (string value) 'vers=4' to support version NFS 4
cinder_backup_mount_options: vers=4
- 保存 custom.yml 文件。
- 将新配置推送到您的 VMware Integrated OpenStack 部署。
viocli deployment -v configure --limit controller
重要:
此命令将更新整个部署,可能会短暂地中断操作。
下一步做什么
确认 Cinder 备份配置正常运行。请参见确认 Cinder 备份服务正在运行且可操作