openstack安装(38)

2021-05-07 18:00:27 浏览数 (1)

存储节点

[root@block1 ~]# yum install lvm2 -y

[root@block1 ~]# systemctl enable lvm2-lvmetad.service

[root@block1 ~]# systemctl start lvm2-lvmetad.service

[root@block1 ~]#pvcreate /dev/sdb #创建LVM 物理卷 /dev/sdb

Physical volume "/dev/sdb" successfully created

[root@block1 ~]#vgcreate cinder-volumes /dev/sdb #创建 LVM 卷组 cinder-volumes,块存储服务会在这个卷组中创建逻辑卷

Volume group "cinder-volumes" successfully created

[root@block1 ~]# vim /etc/lvm/lvm.conf #编辑etc/lvm/lvm.conf文件,在devices部分,添加一个过滤器,只接受/dev/sdb设备,拒绝其他所有设备

devices {

filter = [ "a/sda/", "a/sdb/", "r/.*/"] #如果存储节点在操作系统磁盘上也使用了 LVM,也需要添加相关的设备到过滤器中

[root@block1 ~]# yum install openstack-cinder targetcli python-oslo-policy -y

[root@block1 ~]# systemctl enable openstack-cinder-volume.service target.service

[root@block1 ~]# systemctl restart openstack-cinder-volume.service target.service

[root@block1 ~]# egrep -v "^$|^#" /etc/cinder/cinder.conf

[DEFAULT]

rpc_backend = rabbit #配置 RabbitMQ 消息队列访问

auth_strategy = keystone #配置认证服务访问

my_ip = 192.168.1.103 #存储节点上的管理网络接口的IP 地址

enabled_backends = lvm #启用 LVM 后端

glance_host = controller #配置镜像服务的位置

[BRCD_FABRIC_EXAMPLE]

[CISCO_FABRIC_EXAMPLE]

[cors]

[cors.subdomain]

[database]

connection = mysql://cinder:123456@controller/cinder #配置数据库访问

[fc-zone-manager]

[keymgr]

[keystone_authtoken] #配置认证服务访问,在 [keystone_authtoken] 中注释或者删除其他选项。

auth_uri = http://controller:5000

auth_url = http://controller:35357

auth_plugin = password

project_domain_id = default

user_domain_id = default

project_name = service

username = cinde

password = 123456

[matchmaker_redis]

[matchmaker_ring]

[oslo_concurrency]

lock_path = /var/lib/cinder/tmp #配置锁路径

[oslo_messaging_amqp]

[oslo_messaging_qpid]

[oslo_messaging_rabbit] #配置 RabbitMQ 消息队列访问

rabbit_host = controlle

rabbit_userid = openstack

rabbit_password = 123456

[oslo_middleware]

[oslo_policy]

[oslo_reports]

[profiler]

[lvm] #配置LVM后端以LVM驱动结束,卷组cinder-volumes,iSCSI 协议和正确的 iSCSI服务

volume_driver = cinder.volume.drivers.lvm.LVMVolumeDrive

volume_group = cinder-volumes

iscsi_protocol = iscsi

iscsi_helper = lioadm

[root@block1 ~]# systemctl enable openstack-cinder-volume.service target.service

[root@block1 ~]# systemctl start openstack-cinder-volume.service target.service

0 人点赞