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 ...
随机推荐
- error: invalid 'asm': invalid operand for code 'w'
google 出结果 http://stackoverflow.com/questions/15623609/including-curl-into-the-android-aosp ........ ...
- jersey inject
http://stackoverflow.com/questions/27665744/how-to-inject-an-object-into-jersey-request-context
- Checking the Calendar
Checking the Calendar time limit per test 1 second memory limit per test 256 megabytes input standar ...
- translucent 属性
<pre name="code" class="objc">//适配ios7 if( ([[[UIDevice currentDevice] sys ...
- 在win7 64bit系统安装QC软件
当本机系统不再QC软件支持的系统上,可以在setup右键选择兼容性选择能支持安装的系统, 在JBOSS页面,选择该服务器,用户名输入本机的用户名和密码,如果没有配置域输入计算机名. 如果没有装IIS, ...
- hdu_5711_Ingress(TSP+贪心)
题目连接:hdu5711 这题是 HDU 女生赛最后一题,TSP+贪心,确实不好想,看了wkc巨巨的题解,然后再做的 题解传送门:Ingress #include<cstdio> #inc ...
- mongodb综述
摘要:mongodb相对于mysql的优势在于性能和分布式扩展方面
- CF div2 D BFS
http://codeforces.com/contest/676/problem/D 题目大意: 勇者去迷宫杀恶龙.迷宫是有n*m的方格子组成的.迷宫上有各种记号,这些记号表达着能走的方向.当且仅当 ...
- 利用线程把文本文件填充到richTextBox;防止导入大文本文件窗口假死现象
private void btnDr_Click(object sender, EventArgs e) { richTextBox1.Text = ""; //richTextB ...
- AVR之BOOTLOADER技术详解(转)
源:http://blog.csdn.net/zhenhua10/article/details/6442412 ATmega128具备引导加载支持的用户程序自编程功能(In-System Progr ...