标签:性能 des add bubuko 基础 优点 数据 UNC -name
OpenStack块存储服务(cinder)为虚拟机添加持久的存储,块存储提供一个基础设施为了管理卷,以及和OpenStack计算服务交互,为实例提供卷。此服务也会激活管理卷的快照和卷类型的功能。
块存储服务通常包含下列组件:
使用模式三种:
后端存储:NFS、ISCSI、Glusterfs、ceph都支持
一)创建数据库
1、数据库创建并创建实体服务
mysql -u root -p CREATE DATABASE cinder; GRANT ALL PRIVILEGES ON cinder.* TO ‘cinder‘@‘localhost‘ IDENTIFIED BY ‘cinder‘; GRANT ALL PRIVILEGES ON cinder.* TO ‘cinder‘@‘%‘ IDENTIFIED BY ‘cinder‘;
2、创建cinder用户
source /root/admin-openstack.sh openstack user create --domain default --password-prompt cinder
添加 admin 角色到 cinder 用户上
openstack role add --project service --user cinder admin
3、创建 cinder 和 cinderv2 服务实体
openstack service create --name cinder --description "OpenStack Block Storage" volume
openstack service create --name cinderv2 --description "OpenStack Block Storage" volumev2
4、创建块设备存储服务的 API 入口点
openstack endpoint create --region RegionOne volume public http://controller:8776/v1/%\(tenant_id\)s
openstack endpoint create --region RegionOne volume internal http://controller:8776/v1/%\(tenant_id\)s
openstack endpoint create --region RegionOne \
volume admin http:
//192
.168.137.11:8776
/v1/
%\(tenant_id\)s
openstack endpoint create --region RegionOne volumev2 public http://controller:8776/v2/%\(tenant_id\)s
openstack endpoint create --region RegionOne volumev2 internal http://conteoller:8776/v2/%\(tenant_id\)s
openstack endpoint create --region RegionOne volumev2 admin http://controller:8776/v2/%\(tenant_id\)s
二)安装配置cinder
2.1 安装软件包
# yum install openstack-cinder -y
2.2 编辑配置文件 /etc/cinder/cinder.conf
[database] connection = mysql+pymysql://cinder:redhat@controller/cinder
[[DEFAULT]] transport_url = rabbit://openstack:redhat@controller #消息队列配置 auth_strategy = keystone my_ip = 10.0.0.101
[keystone_authtoken] #keystone配置 auth_uri = http://controller:5000 auth_url = http://controller:35357 memcached_servers = controller:11211 auth_type = password project_domain_name = Default user_domain_name = Default project_name = service username = cinder password = redhat
[oslo_concurrency] #配置锁路径 lock_path = /var/lib/cinder/tmp
2.3 同步数据库
su -s /bin/sh -c "cinder-manage db sync" cinder
2.4 配置nova计算服务使用块设备存储
编辑文件 /etc/nova/nova.conf 并添加如下到其中:
[cinder] os_region_name = RegionOne
2.5 重启nova计算API 服务
# systemctl restart openstack-nova-api.service
2.6 启动cinder块设备存储服务,并将其配置为开机自启
systemctl
enable
openstack-cinder-api.service openstack-cinder-scheduler.service
systemctl restart openstack-cinder-api.service openstack-cinder-scheduler.service
OpenStack 存储服务 Cinder介绍和控制节点部署
标签:性能 des add bubuko 基础 优点 数据 UNC -name
原文地址:https://www.cnblogs.com/jimmy-xuli/p/8858169.html