zoukankan      html  css  js  c++  java
  • 配置cinder-backup服务使用ceph作为后端存储

    在ceph监视器上执行

    CINDER_PASSWD='cinder1234!'
    controllerHost='controller'
    RABBIT_PASSWD='0penstackRMQ'

    1.创建pool池

    为cinder-backup服务创建pool池(因为我只有一个OSD节点,所以要将副本数设置为1)
    ceph osd pool create cinder-backup 32
    ceph osd pool set cinder-backup size 1
    ceph osd pool application enable  cinder-backup rbd

    2.查看pool池的使用情况

    ceph df

    3.创建账号

    ceph auth get-or-create client.cinder-backup mon 'allow r' osd 'allow class-read object_prefix rbd_children, allow rwx pool=cinder-volumes, allow rwx pool=cinder-backup' -o /etc/ceph/ceph.client.cinder-backup.keyring
    #查看
    ceph auth ls | grep -EA3 'client.(cinder-backup)'

    4.修改ceph.conf配置文件并同步到所有的监视器节点(这步一定要操作)

    su - cephd
    cd ~/ceph-cluster/
    cat <<EOF>> ceph.conf
    [client.cinder-backup]
    keyring = /etc/ceph/ceph.client.cinder-backup.keyring
    EOF
    ceph-deploy --overwrite-conf admin ceph-mon01
    exit

    5.安装cinder-backup组件和ceph客户端(如果ceph监视器是在控制节点上不需要执行这一步)

    yum -y install openstack-cinder python-keystone ceph-common

    6.配置cinder-backup服务与cinder-api服务进行交互

    openstack-config --set  /etc/cinder/cinder.conf DEFAULT transport_url rabbit://openstack:${RABBIT_PASSWD}@${controllerHost}:5672
    openstack-config --set /etc/cinder/cinder.conf cache backend  oslo_cache.memcache_pool
    openstack-config --set /etc/cinder/cinder.conf cache enabled  true
    openstack-config --set /etc/cinder/cinder.conf cache memcache_servers  ${controllerHost}:11211
    openstack-config --set  /etc/cinder/cinder.conf DEFAULT auth_strategy  keystone
    openstack-config --set  /etc/cinder/cinder.conf keystone_authtoken  auth_uri  http://${controllerHost}:5000
    openstack-config --set  /etc/cinder/cinder.conf keystone_authtoken  auth_url  http://${controllerHost}:5000
    openstack-config --set  /etc/cinder/cinder.conf keystone_authtoken  auth_type password
    openstack-config --set  /etc/cinder/cinder.conf keystone_authtoken  project_domain_id  default
    openstack-config --set  /etc/cinder/cinder.conf keystone_authtoken  user_domain_id  default
    openstack-config --set  /etc/cinder/cinder.conf keystone_authtoken  project_name  service
    openstack-config --set  /etc/cinder/cinder.conf keystone_authtoken  username  cinder
    openstack-config --set  /etc/cinder/cinder.conf keystone_authtoken  password  ${CINDER_PASSWD}
    openstack-config --set  /etc/cinder/cinder.conf oslo_concurrency lock_path  /var/lib/cinder/tmp

    7.配置cinder-backup服务使用的后端存储为ceph

    openstack-config --set /etc/cinder/cinder.conf  DEFAULT  enabled_backends  ceph

    8.配置cinder-backup服务驱动ceph

    openstack-config --set /etc/cinder/cinder.conf  DEFAULT backup_driver cinder.backup.drivers.ceph
    openstack-config --set /etc/cinder/cinder.conf  DEFAULT backup_ceph_chunk_size  134217728    #128Mb
    openstack-config --set /etc/cinder/cinder.conf  DEFAULT backup_ceph_conf  /etc/ceph/ceph.conf
    openstack-config --set /etc/cinder/cinder.conf  DEFAULT backup_ceph_pool  cinder-backup
    openstack-config --set /etc/cinder/cinder.conf  DEFAULT backup_ceph_user  cinder-backup
    openstack-config --set /etc/cinder/cinder.conf  DEFAULT backup_ceph_stripe_count  0
    openstack-config --set /etc/cinder/cinder.conf  DEFAULT backup_ceph_stripe_unit  0
    openstack-config --set /etc/cinder/cinder.conf  DEFAULT restore_discard_excess_bytes  True

    9.启动cinder.backup服务

    systemctl enable openstack-cinder-backup
    systemctl start openstack-cinder-backup
    systemctl status openstack-cinder-backup

  • 相关阅读:
    北京清北 综合强化班 Day1
    Noip2015 提高组 Day1
    Noip2016 提高组 Day2 T1 组合数问题
    2017.9.23 NOIP2017 金秋杯系列模拟赛 day1 T1
    [51NOD1103] N的倍数(鸽笼原理)
    [51NOD1420] 数袋鼠好有趣(贪心)
    [CF808A] Lucky Year(规律)
    [CF808B] Average Sleep Time([强行]树状数组,数学)
    [CF808C] Tea Party(贪心)
    [CF808D] Array Division(暴力,枚举)
  • 原文地址:https://www.cnblogs.com/jipinglong/p/11222449.html
Copyright © 2011-2022 走看看