zoukankan      html  css  js  c++  java
  • S1_搭建分布式OpenStack集群_10 cinder 存储节点配置

    一、安装配置lvm2
    安装LVM包:
    # yum install -y lvm2

    启动LVM元数据服务,并将其配置为在系统启动时启动:
    # systemctl enable lvm2-lvmetad.service
    # systemctl start  lvm2-lvmetad.service

    cinder添加一块磁盘:

    查看:



    使用第二块磁盘/dev/vdb 创建一个pv:
    # pvcreate /dev/vdb

    创建LVM卷组cinder-volmes:
    注:块存储服务在此卷组中创建逻辑卷
    # vgcreate cinder-volumes /dev/vdb

    编辑lvm配置文件:
    # vim /etc/lvm/lvm.conf
    devices {
    filter = [ "a/vdb/", "r/.*/"]   #lvm可以扫描发现vdb,其他的分区都reject

    二、安装配置cinder volume
    安装openstack-cinder和targetcli:
    # yum install openstack-cinder targetcli python-keystone -y

    编辑/etc/cinder/cinder.conf:
    # vim /etc/cinder/cinder.conf
    [database]
    connection = mysql+pymysql://cinder:cinder123@10.10.11.11/cinder

    [DEFAULT]
    transport_url = rabbit://openstack:openstack123@10.10.11.11
    auth_strategy = keystone
    my_ip = 10.10.11.14
    enabled_backends = lvm
    glance_api_servers = http://10.10.11.11:9292

    [keystone_authtoken]
    auth_uri = http://10.10.11.11:5000
    auth_url = http://10.10.11.11:35357
    memcached_servers = 10.10.11.11:11211
    auth_type = password
    project_domain_name = default
    user_domain_name = default
    project_name = service
    username = cinder
    password = cinder

    [lvm]
    volume_driver = cinder.volume.drivers.lvm.LVMVolumeDriver
    volume_group = cinder-volumes
    iscsi_protocol = iscsi
    iscsi_helper = lioadm

    [oslo_concurrency]
    lock_path = /var/lib/cinder/tmp

    开启服务
    启动块存储卷服务,包括它的依赖项,并配置它们在系统启动时启动:
    # systemctl enable  openstack-cinder-volume.service target.service
    # systemctl start   openstack-cinder-volume.service target.service
    # systemctl status  openstack-cinder-volume.service target.service

    三、校验操作(控制节点)
    # source admin-openrc

    列出服务组件以验证每个流程的成功启动:
    # cinder service-list

    创建一个1G的卷,并查看其状态:
    # cinder create --display-name myVolume 1
    # cinder list

    cinder节点查看:

    当你的才华配不上你的野心的时候,就静下来学习吧。

  • 相关阅读:
    Java 中日常使用的 IO 流总结
    NIO 实现非阻塞 Socket 通讯
    Java NIO 的简单介绍和使用
    常用设计模式 -- 一分钟就能学会的门面模式(外观模式)
    Java日志框架介绍和 Slf4j 使用
    Linux学习一
    JavaScript-数组
    javascript
    idea 快捷键汇总
    正则表达式
  • 原文地址:https://www.cnblogs.com/luwei0915/p/11349458.html
Copyright © 2011-2022 走看看