加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

cinder存储部署

发布时间:2020-12-16 01:44:01 所属栏目:安全 来源:网络整理
导读:环境前部署添加一块新的硬盘 第一步:下载逻辑卷服务 [[email?protected] ~]# yum install lvm2 -y 第二步:启动lvm服务 [[email?protected] ~]# systemctl start lvm2-lvmetad.service [[email?protected] ~]# systemctl enable lvm2-lvmetad.service 第三

环境前部署添加一块新的硬盘

第一步:下载逻辑卷服务
[[email?protected] ~]# yum install lvm2 -y

第二步:启动lvm服务
[[email?protected] ~]# systemctl start lvm2-lvmetad.service
[[email?protected] ~]# systemctl enable lvm2-lvmetad.service

第三步:创建pv物理卷
[[email?protected] ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 20G 0 disk
├─sda1 8:1 0 1G 0 part /boot
└─sda2 8:2 0 19G 0 part
├─cl-root 253:0 0 17G 0 lvm /
└─cl-swap 253:1 0 2G 0 lvm [SWAP]
sdb 8:16 0 10G 0 disk
sr0 11:0 1 4.1G 0 rom /mnt
您在 /var/spool/mail/root 中有新邮件
[[email?protected] ~]# pvcreate /dev/sdb
Physical volume "/dev/sdb" successfully created.


第四步:创建卷宗组
[[email?protected] ~]# vgcreate vg_cinder /dev/sdb
Volume group "vg_cinder" successfully created

第五步:修改lvm的配置文件
devices {
filter = [ "a/sdb/","r/.*/" ]


第六步:下载cinder存储
[[email?protected] cinder]# yum install openstack-cinder targetcli python-keystone -y


第七步:配置cinder文件
[[email?protected] cinder]# egrep -v ‘(#|^$)‘ cinder.conf
[DEFAULT]
transport_url = rabbit://openstack:[email?protected]
auth_strategy = keystone
my_ip = 192.168.126.6
enabled_backends = lvm
glance_api_servers = http://zxw6:9292
[backend]
[barbican]
[brcd_fabric_example]
[cisco_fabric_example]
[coordination]
[cors]
[cors.subdomain]
[database]
connection = mysql+pymysql://cinder:[email?protected]/cinder
[fc-zone-manager]
[healthcheck]
[key_manager]
[keystone_authtoken]
auth_uri = http://zxw6:5000
auth_url = http://zxw6:35357
memcached_servers = zxw6:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = cinder
password = zxw6
[matchmaker_redis]
[oslo_concurrency]
[oslo_messaging_amqp]
[oslo_messaging_kafka]
[oslo_messaging_notifications]
[oslo_messaging_rabbit]
[oslo_messaging_zmq]
[oslo_middleware]
[oslo_policy]
[oslo_reports]
[oslo_versionedobjects]
[profiler]
[ssl]
[lvm]
volume_driver = cinder.volume.drivers.lvm.LVMVolumeDriver
volume_group = vg_cinder
iscsi_protocol = iscsi
iscsi_helper = lioadm
volumes_dir = $state_path/volumes
iscsi_ip_address = 192.168.126.8

第八步:启动服务。并开机自启
[[email?protected] ~]# systemctl start openstack-cinder-volume.service target.service
[[email?protected] ~]# systemctl enable openstack-cinder-volume.service target.service


访问
查看服务是否启动
[[email?protected] ~]# cinder service-list
+------------------+----------+------+---------+-------+----------------------------+-----------------+
| Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
+------------------+----------+------+---------+-------+----------------------------+-----------------+
| cinder-scheduler | zxw6 | nova | enabled | up | 2019-08-03T01:25:14.000000 | - |
| cinder-volume | [email?protected] | nova | enabled | up | 2019-08-03T01:25:11.000000 | - |
+------------------+----------+------+---------+-------+----------------------------+-----------------+
查看卷
[[email?protected] ~]# cinder list
+----+--------+------+------+-------------+----------+-------------+
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+----+--------+------+------+-------------+----------+-------------+

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读