openstack controller ha测试环境搭建记录(十四)——配置cinder(存储节点)
先简述cinder存储节点的配置:
1、IP地址是10.0.0.41;
2、主机名被设置为block1;
3、所有节点的hosts文件已添加相应条目;
4、已经配置了ntp时间同步;
5、已安装lvm2,并设置为开机自动启动;
6、已经挂载了新的存储设备/dev/sdb。
在存储节点执行下列命令:
pvcreate /dev/sdb1
vgcreate cinder-volumes /dev/sdb1
在存储节点和计算节点执行df命令:
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/centos-root 4.0G 2.3G 1.8G 56% /
devtmpfs 1.9G 0 1.9G 0% /dev
tmpfs 1.9G 39M 1.9G 3% /dev/shm
tmpfs 1.9G 17M 1.9G 1% /run
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
/dev/sda1 497M 145M 353M 30% /boot
发现操作系统也是安装在LVM分区上。
编辑存储节点lvm.conf文件:
vi /etc/lvm/lvm.conf
devices {
...
filter = [ "a/sda/", "a/sdb/", "r/.*/"]
编辑计算节点lvm.conf文件:
filter = [ "a/sda/", "r/.*/"]
在存储节点上安装相关软件:
yum install openstack-cinder targetcli python-oslo-db MySQL-python
在存储节点上配置文件:
openstack-config --set /etc/cinder/cinder.conf database connection mysql://cinder:123456@myvip/cinder
openstack-config --set /etc/cinder/cinder.conf DEFAULT rabbit_password 123456
openstack-config --set /etc/cinder/cinder.conf DEFAULT rabbit_hosts controller1:5672,controller2:5672,controller3:5672
openstack-config --set /etc/cinder/cinder.conf DEFAULT rabbit_retry_interval 1
openstack-config --set /etc/cinder/cinder.conf DEFAULT rabbit_retry_backoff 2
openstack-config --set /etc/cinder/cinder.conf DEFAULT rabbit_max_retries 0
openstack-config --set /etc/cinder/cinder.conf DEFAULT rabbit_durable_queues true
openstack-config --set /etc/cinder/cinder.conf DEFAULT rabbit_ha_queues true
openstack-config --set /etc/cinder/cinder.conf DEFAULT auth_strategy keystone
openstack-config --set /etc/cinder/cinder.conf keystone_authtoken auth_uri http://myvip:5000/v2.0
openstack-config --set /etc/cinder/cinder.conf keystone_authtoken identity_uri http://myvip:35357
openstack-config --set /etc/cinder/cinder.conf keystone_authtoken admin_user cinder
openstack-config --set /etc/cinder/cinder.conf keystone_authtoken admin_tenant_name service
openstack-config --set /etc/cinder/cinder.conf keystone_authtoken admin_password 123456
openstack-config --set /etc/cinder/cinder.conf DEFAULT my_ip 10.0.0.41
openstack-config --set /etc/cinder/cinder.conf DEFAULT glance_host myvip
openstack-config --set /etc/cinder/cinder.conf DEFAULT iscsi_helper lioadm
openstack-config --set /etc/cinder/cinder.conf DEFAULT verbose True
在存储节点上设置服务开机启动并立即启动服务:
systemctl enable openstack-cinder-volume.service target.service
systemctl start openstack-cinder-volume.service target.service
验证:
source admin-openrc.sh
cinder service-list
+------------------+-------------+------+---------+-------+----------------------------+-----------------+
| Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
+------------------+-------------+------+---------+-------+----------------------------+-----------------+
| cinder-scheduler | controller1 | nova | enabled | up | 2015-12-17T17:16:39.000000 | None |
| cinder-volume | block1 | nova | enabled | up | 2015-12-17T17:16:37.000000 | None |
+------------------+-------------+------+---------+-------+----------------------------+-----------------+
source demo-openrc.sh
cinder create --display-name demo-volume1 1
+---------------------+--------------------------------------+
| Property | Value |
+---------------------+--------------------------------------+
| attachments | [] |
| availability_zone | nova |
| bootable | false |
| created_at | 2015-12-18T11:46:13.394550 |
| display_description | None |
| display_name | demo-volume1 |
| encrypted | False |
| id | d3621c40-ee86-4969-9fad-d32a9c507527 |
| metadata | {} |
| size | 1 |
| snapshot_id | None |
| source_volid | None |
| status | creating |
| volume_type | None |
+---------------------+--------------------------------------+
cinder list
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
| d3621c40-ee86-4969-9fad-d32a9c507527 | available | demo-volume1 | 1 | None | false | |
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
openstack controller ha测试环境搭建记录(十四)——配置cinder(存储节点)的更多相关文章
- openstack controller ha测试环境搭建记录(四)——配置mysql数据库集群
内容正式开始前,我已经在集群中添加了新的节点controller1(IP地址为10.0.0.14). 在所有节点上安装软件:# yum install -y mariadb-galera-server ...
- openstack controller ha测试环境搭建记录(一)——操作系统准备
为了初步了解openstack controller ha的工作原理,搭建测试环境进行学习. 在学习该方面知识时,当前采用的操作系统版本是centos 7.1 x64.首先在ESXi中建立2台用于测试 ...
- openstack controller ha测试环境搭建记录(七)——配置glance
在所有集群安装glance软件:yum install -y openstack-glance python-glanceclient 在任一节点创建glance用户:mysql -u root -p ...
- openstack controller ha测试环境搭建记录(二)——配置corosync和pacemaker
corosync.conf请备份再编辑:# vi /etc/corosync/corosync.conf totem { version: 2 token: 10000 t ...
- openstack controller ha测试环境搭建记录(十五)——创建实例
# source demo-openrc.sh # ssh-keygenGenerating public/private rsa key pair.Enter file in which to sa ...
- openstack controller ha测试环境搭建记录(十)——配置neutron(控制节点)
创建neutron用户:mysql -u root -p CREATE DATABASE neutron;GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@ ...
- openstack controller ha测试环境搭建记录(十二)——配置neutron(计算节点)
在计算节点配置内核参数:vi /etc/sysctl.confnet.ipv4.conf.all.rp_filter=0net.ipv4.conf.default.rp_filter=0 在计算节点使 ...
- openstack controller ha测试环境搭建记录(十三)——配置cinder(控制节点)
在任一控制节点创建用户:mysql -u root -pCREATE DATABASE cinder;GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'loc ...
- openstack controller ha测试环境搭建记录(六)——配置keystone
在所有节点的hosts文件添加:10.0.0.10 myvip 在所有节点安装# yum install -y openstack-keystone python-keystoneclient# yu ...
随机推荐
- 【kmp】 字符串最大周期
大侠住店 TimeLimit: 1 Second MemoryLimit: 32 Megabyte Totalsubmit: 116 Accepted: 64 Description 有一天晚上,一位 ...
- Hibernate 系列教程3-单表操作
工程截图 hibernate.cfg.xml <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Conf ...
- struts2中的<s:select>默认选项
//... public class SelectAction extends ActionSupport{ private List<String> searchEngine; priv ...
- mysql中的substr()函数
mysql中的substr()函数和hibernate的substr()参数都一样,就是含义有所不同. 用法: substr(string string,num start,num length); ...
- json-c代码示例
#include <stdio.h> #include <string.h> #include <json.h> int main(int argc,char ** ...
- 转载 Deep learning:四(logistic regression练习)
前言: 本节来练习下logistic regression相关内容,参考的资料为网页:http://openclassroom.stanford.edu/MainFolder/DocumentPage ...
- AI 人工智能 探索 (十)
呼叫事件图形结构如下 蓝色代表 警察局 红色代表警察 黄色代表 死亡人 蓝色球代表呼救人 黑色代表 敌人 警察目标是 攻击 黑色人,但 路中 会碰到 黄色人,如果警察有 救人功能 则会先救人去医院再看 ...
- CodeForces 567B Berland National Library
Description Berland National Library has recently been built in the capital of Berland. In addition, ...
- CodeForces 190D Non-Secret Cypher
双指针. #include<cstdio> #include<cstring> #include<cmath> #include<algorithm> ...
- itext操作PDF文件添加水印
功能描述:添加图片和文字水印 /** * * [功能描述:添加图片和文字水印] [功能详细描述:功能详细描述] * @param srcFile 待加水印文件 * @param destFile 加水 ...