Multipath 安装和 Openstack Nova + Cinder 配置
2017-01-09 12:47
411 查看
该文基于 Centos 7 操作系统。
https://www.sourceware.org/lvm2/wiki/MultipathUsageGuide
如果不存在,安装该 RPM 包:
如果服务为 failed,请先排查错误,确认状态正常之后再做后面的配置:
Ps: 很多小伙伴都没有这个习惯,导致很多事情做完之后才发现前面的有问题,然后导致连锁问题。
编辑 nova.conf,libvirt 下配置 iscsi_use_multipath=true
编辑 cinder.conf,在使用的 backend 中配置 use_multipath_for_image_xfer=true
Multipath 安装
安装 device-mapper-multipath RPM 包
手动生成 etcmultipathconf 文件命令如下
编辑 multipathconf 文件非必选
重启 multipath 服务
Openstack Nova Cinder 配置
修改 nova 以及 cinder 配置文件
1 修改 novaconf
2 修改 cinderconf
重启 nova 和 cinder 相关服务
1 重启 nova-compute 服务attach multipath
2 重启 cinder-volume 服务cinder multipath
[root@controller ~]# cat /etc/system-release CentOS Linux release 7.1.1503 (Core)
Multipath 安装
不知道,不了解 multipath 的可以看下这个文档(看到 Overview 就差不多了),介绍的很不错:https://www.sourceware.org/lvm2/wiki/MultipathUsageGuide
1. 安装 device-mapper-multipath RPM 包
检查安装包是否存在(不同 Linux 环境显示的结果不一样):[root@controller ~]# rpm -qa | grep device-mapper-multipath device-mapper-multipath-libs-0.4.9-77.el7.x86_64 device-mapper-multipath-0.4.9-77.el7.x86_64
如果不存在,安装该 RPM 包:
[root@controller ~]# yum install device-mapper-multipath
2. 手动生成 /etc/multipath.conf 文件,命令如下:
[root@controller ~]# mpathconf --enable
3. 编辑 multipath.conf 文件(非必选)
根据自己的配置需求编辑这个配置文件,最简单的是不改文件。vim /etc/multipath.conf defaults { user_friendly_names yes path_grouping_policy multibus find_multipaths yes no_path_retry fail failback immediate }
4. 重启 multipath 服务
请务必确认服务的状态![root@controller ~]# systemctl restart multipathd.service [root@controller ~]# systemctl status multipathd.service
如果服务为 failed,请先排查错误,确认状态正常之后再做后面的配置:
Ps: 很多小伙伴都没有这个习惯,导致很多事情做完之后才发现前面的有问题,然后导致连锁问题。
[root@controller ~]# systemctl status multipathd.service multipathd.service - Device-Mapper Multipath Device Controller Loaded: loaded (/usr/lib/systemd/system/multipathd.service; enabled) Active: active (running) since Fri 2016-12-30 13:35:18 CST; 1 weeks 2 days ago Process: 551 ExecStart=/sbin/multipathd (code=exited, status=0/SUCCESS) Process: 534 ExecStartPre=/sbin/multipath -A (code=exited, status=0/SUCCESS) Process: 498 ExecStartPre=/sbin/modprobe dm-multipath (code=exited, status=0/SUCCESS) Main PID: 558 (multipathd) CGroup: /system.slice/multipathd.service └─558 /sbin/multipathd Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
Openstack Nova + Cinder 配置
1. 修改 nova 以及 cinder 配置文件
(1) 修改 nova.conf
Use multipath connection of the iSCSI or FC volume (boolean value)编辑 nova.conf,libvirt 下配置 iscsi_use_multipath=true
[root@controller ~]# grep multipath /etc/nova/nova.conf # Use multipath connection of the iSCSI volume (boolean value) #iscsi_use_multipath=false iscsi_use_multipath=true # Use multipath connection of the iSER volume (boolean value) #iser_use_multipath=false
(2) 修改 cinder.conf
Do we attach/detach volumes in cinder using multipath for volume to image and image to volume transfers? (boolean value)编辑 cinder.conf,在使用的 backend 中配置 use_multipath_for_image_xfer=true
# Do we attach/detach volumes in cinder using multipath for volume to image and # image to volume transfers? (boolean value) #use_multipath_for_image_xfer = false # If this is set to True, attachment of volumes for image transfer will be # aborted when multipathd is not running. Otherwise, it will fallback to single # path. (boolean value) #enforce_multipath_for_image_xfer = false
2. 重启 nova 和 cinder 相关服务
(1) 重启 nova-compute 服务(attach multipath)
systemctl restart openstack-nova-compute.service
(2) 重启 cinder-volume 服务(cinder multipath)
systemctl restart openstack-cinder-volume.service
Multipath 安装
安装 device-mapper-multipath RPM 包
手动生成 etcmultipathconf 文件命令如下
编辑 multipathconf 文件非必选
重启 multipath 服务
Openstack Nova Cinder 配置
修改 nova 以及 cinder 配置文件
1 修改 novaconf
2 修改 cinderconf
重启 nova 和 cinder 相关服务
1 重启 nova-compute 服务attach multipath
2 重启 cinder-volume 服务cinder multipath
相关文章推荐
- OpenStack 最小化安装配置(七):Nova服务配置
- 在Ubuntu上安装和配置OpenStack Nova(3)
- Openstack组件部署 — Nova_安装和配置Controller Node
- Openstack 实战讲解之-----05-控制节点Nova服务安装配置
- Openstack 实战讲解之-----05-控制节点Nova服务安装配置 推荐
- CentOS6.2下一步一步源代码安装OpenStack(五)nova配置、运行、测试
- [网摘学习]在Ubuntu上安装和配置OpenStack Nova之二
- 在Ubuntu上安装和配置OpenStack Nova(1)
- 在ubuntu上安装配置OpenStack nova
- 在 Ubuntu 上安装和配置 OpenStack Nova
- 在 Ubuntu 上安装和配置 OpenStack Nova
- [网摘学习]在Ubuntu上安装和配置OpenStack Nova之一
- OpenStack入门修炼之Cinder服务-->安装并配置一个本地存储节点(18)
- 在 Ubuntu 上安装和配置 OpenStack Nova
- 在Ubuntu上安装和配置OpenStack Nova(1)
- 在 Ubuntu 上安装和配置 OpenStack Nova
- CentOS6.2下一步一步源代码安装OpenStack(五)nova配置、运行、测试
- CentOS6.2下一步一步源代码安装OpenStack(五)nova配置、运行、测试