centOS8 Openstack Cinder 存储服务搭建(2)

二 配置存储节点

安装软件包

yum install lvm2 device-mapper-persistent-data

#启动
systemctl enable lvm2-lvmetad.service
systemctl start lvm2-lvmetad.service

创建LVM物理卷

#创建 LVM 物理卷/dev/sdb
pvcreate /dev/sdb

报错ERROR:No device found for /dev/sdb.
解决:
#对/dev/vdb进行使用
fdisk -l
p
#一路默认

#格式化
mkfs.ext3 /dev/vdb1

pvcreate /dev/vdb1

创建 LVM 卷组cinder-volumes

vgcreate cinder-volumes /dev/vdb1

添加过滤

#/etc/lvm/lvm.conf 
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

#/etc/cinder/cinder.conf
[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

修改配置

#/etc/cinder/cinder.conf

[DEFAULT]
# ...
backup_driver = cinder.backup.drivers.swift.SwiftBackupDriver
backup_swift_url = SWIFT_URL

#获取SWIFT_URL
openstack catalog show object-store

完成安装

systemctl enable openstack-cinder-backup.service
systemctl start openstack-cinder-backup.service
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

不会长胖的斜杠

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值