二 配置存储节点
安装软件包
yum install lvm2 device-mapper-persistent-data
systemctl enable lvm2-lvmetad.service
systemctl start lvm2-lvmetad.service
创建LVM物理卷
pvcreate /dev/sdb
报错ERROR:No device found for /dev/sdb.
解决:
fdisk -l
p
mkfs.ext3 /dev/vdb1
pvcreate /dev/vdb1
创建 LVM 卷组cinder-volumes
vgcreate cinder-volumes /dev/vdb1
添加过滤
devices {
...
filter = [ "a/sdb/", "r/.*/"]
安装软件包
yum install openstack-cinder targetcli python-keystone
报错ERROR:Error: Unable to find a match: python-keystone
解决:
yum install openstack-cinder targetcli python3-keystone
配置cinder
[database]
connection = mysql+pymysql://cinder:CINDER_DBPASS@controller/cinder
[DEFAULT]
transport_url = rabbit://openstack:RABBIT_PASS@controller
[DEFAULT]
auth_strategy = keystone
[keystone_authtoken]
www_authenticate_uri = http://controller:5000
auth_url = http://controller:5000
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = cinder
password = CINDER_PASS
[DEFAULT]
my_ip = MANAGEMENT_INTERFACE_IP_ADDRESS
[lvm]
volume_driver = cinder.volume.drivers.lvm.LVMVolumeDriver
volume_group = cinder-volumes
target_protocol = iscsi
target_helper = lioadm
[DEFAULT]
enabled_backends = lvm
[DEFAULT]
glance_api_servers = http://controller:9292
[oslo_concurrency]
lock_path = /var/lib/cinder/tmp
完成安装
systemctl enable openstack-cinder-volume.service target.service
systemctl start openstack-cinder-volume.service target.service
三 配置备份服务
安装软件包
yum install openstack-cinder
修改配置
[DEFAULT]
backup_driver = cinder.backup.drivers.swift.SwiftBackupDriver
backup_swift_url = SWIFT_URL
openstack catalog show object-store
完成安装
systemctl enable openstack-cinder-backup.service
systemctl start openstack-cinder-backup.service