-
安装服务相关的软件包(计算节点)
yum -y install openstack-cinder targetcli python-keystone openstack-utils python-openstackclient python2-PyMySQL python-memcached #cinder-volume服务运行在3个计算节点,使用ceph的话进行安装 yum install -y ceph-common
-
修改配置文件((计算节点)
配置cinder 配置文件
#备份配置文件/etc/cinder/cinder.conf cp -a /etc/cinder/cinder.conf{,.bak} grep -Ev '#|^$' /etc/cinder/cinder.conf.bak>/etc/cinder/cinder.conf vi /etc/cinder/cinder.conf [DEFAULT] my_ip = 管理网卡ip default_volume_type = ceph transport_url = rabbit://openstack:RABBIT_CXK_PASS@openstack-controller01:5672,openstack:RABBIT_CXK_PASS@openstack-controller02:5672,openstack:RABBIT_CXK_PASS@openstack-controller03:5672 auth_strategy = keystone enabled_backends = ceph #enabled_backends = ceph,lvm,ssd,sata,nfs glance_api_version = 2 log_dir = /var/log/cinder debug=true #备份服务 backup_driver = cinder.backup.drivers.ceph backup_ceph_conf = /etc/ceph/ceph.conf backup_ceph_user = cinder-backup backup_ceph_chunk_size = 4194304 backup_ceph_pool = backups backup_ceph_stripe_unit = 0 backup_ceph_stripe_count = 0 restore_discard_excess_bytes = true [database] connection = mysql+pymysql://cinder:CINDER_CXK_DBPASS@192.168.188.29/cinder [keystone_authtoken] www_authenticate_uri = http://vip:5000 auth_url = http://vip:5000 cache = true token_cache_time = 3600 memcached_servers = openstackcontroller1ip:11211,openstackcontroller2ip:11211,openstackcontroller3ip:11211 auth_type = password project_domain_name = default user_domain_name = default project_name = service username = cinder password = CINDER_CXK_PASS [oslo_concurrency] lock_path = /var/lib/cinder/tmp [ceph] volume_driver = cinder.volume.drivers.rbd.RBDDriver default_volume_type = ceph #标识 volume_backend_name = ceph rbd_pool = volumes rbd_ceph_conf = /etc/ceph/ceph.conf rbd_flatten_volume_from_snapshot = false rbd_max_clone_depth = 5 rbd_store_chunk_size = 4 rados_connect_timeout = -1 rbd_user = cinder #注意替换cinder用户访问ceph集群使用的Secret UUID #查看virsh secret-list rbd_secret_uuid = 77b54383-2456-4cb7-ac90-2c3754fc814f #[ssd] #volume_driver = #cinder.volume.drivers.lvm.LVMVolumeDriver #卷组 #volume_group = cinder-ssd #target_protocol = iscsi #target_helper = lioadm #标识 #volume_backend_name = ssd #[sata] #volume_driver = #cinder.volume.drivers.lvm.LVMVolumeDriver #卷组 #volume_group = cinder-sata #target_protocol = iscsi #target_helper = lioadm #标识 #volume_backend_name = sata #[nfs] #volume_driver = cinder.volume.drivers.nfs.NfsDriver #nfs_shares_config = /etc/cinder/nfs_shares #标识 #volume_backend_name = nfs
-
启动并验证((计算节点)
systemctl start openstack-cinder-volume.service target.service openstack-cinder-backup.service systemctl status openstack-cinder-volume.service target.service openstack-cinder-backup.service systemctl enable nopenstack-cinder-volume.service target.service openstack-cinder-backup.service
-
验证(在控制节点上操作)
source /sh/admin-openstack.sh #列出服务组件以验证每个进程是否成功启动: openstack volume service list
喜欢的亲可以关注点赞评论哦!以后每天都会更新的哦!本文为小编原创文章; 文章中用到的文件、安装包等可以加小编联系方式获得;
欢迎来交流小编联系方式VX:CXKLittleBrother 进入运维交流群