使用Linux自带多路径multipath

发布时间:  2015-09-18 浏览次数:  1094 下载次数:  22
问题描述

linux 内核7.1版本,华为多路径不支持,不能正常安装使用

多路径版本:OceanStor UltraPath V100R008C00SPC700_RHEL

告警信息

华为多路径不能识别安装,系统提示:unknow system

处理过程

1、检查安装包(linux系统自带的多路径安装包:multipath

rpm -qa | grep device-mappercp

2、将multipath配置文件方在/home/multipath.conf

cp /usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf

/etc/multipath.conf

3、 编辑multipath.conf文件

vim /etc/multipath.conf 

device {

   vendor                      "HUAWEI"  

   product                     "XSG1"      

   path_grouping_policy         multibus

   path_checker                tur

   path_selector              "round-robin 0"

   failback                     immediate

}

4、 时期配置文件生效并查看状态,配置修改完毕后,依次执行

multipath F

systemctl restart multipath.service

systemctl reload multipathd.service

multipath –v3

multipath –ll

5、 linuxmultipath 生效后执行multipath –ll回显如下:

mpathe (36845b121004b71c40025afa300000006) dm-5 HUAWEI  ,XSG1           

size=1021G features='0' hwhandler='0' wp=rw

`-+- policy='round-robin 0' prio=1 status=active

  `- 9:0:0:6  sdg 8:96  active ready  running

mpathd (36845b121004b71c40025922a00000005) dm-4 HUAWEI  ,XSG1           

size=1.0T features='0' hwhandler='0' wp=rw

`-+- policy='round-robin 0' prio=1 status=active

  `- 9:0:0:5  sdf 8:80  active ready  running

mpathc (36845b121004b71c4002566fa00000004) dm-3 HUAWEI  ,XSG1           

size=4.0T features='0' hwhandler='0' wp=rw

`-+- policy='round-robin 0' prio=1 status=active

  `- 9:0:0:4  sde 8:64  active ready  running

mpathb (36845b121004b71c4000fe09f00000003) dm-2 HUAWEI  ,XSG1           

size=8.0T features='0' hwhandler='0' wp=rw

`-+- policy='round-robin 0' prio=1 status=active

  `- 9:0:0:3  sdd 8:48  active ready  running

mpatha (36845b121004b71c4000fcaa800000002) dm-1 HUAWEI  ,XSG1           

size=8.0T features='0' hwhandler='0' wp=rw

`-+- policy='round-robin 0' prio=1 status=active

  `- 9:0:0:2  sdc 8:32  active ready  running

mpathf (36845b121004b71c40025485600000001) dm-0 HUAWEI  ,XSG1           

size=4.0T features='0' hwhandler='0' wp=rw

`-+- policy='round-robin 0' prio=1 status=active

  `- 9:0:0:1  sdb 8:16  active ready  running

[root@localhost ~]# fdisk -l

其中mpathampathbmpathcmpathdmpathempathf即为存储侧映射的6lun

ls  /dev/mapper/

mpathampathbmpathcmpathdmpathempathf

parted /dev/mapper/mpatha

根因

华为多路径不支持linux7.1版本

解决方案

1、检查安装包(linux系统自带的多路径安装包:multipath

rpm -qa | grep device-mappercp

2、将multipath配置文件方在/home/multipath.conf

cp /usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf

/etc/multipath.conf

3、 编辑multipath.conf文件

vim /etc/multipath.conf 

device {

   vendor                      "HUAWEI"  

   product                     "XSG1"      

   path_grouping_policy         multibus

   path_checker                tur

   path_selector              "round-robin 0"

   failback                     immediate

}

4、 时期配置文件生效并查看状态,配置修改完毕后,依次执行

multipath F

systemctl restart multipath.service

systemctl reload multipathd.service

multipath –v3

multipath –ll

5、 linuxmultipath 生效后执行multipath –ll回显如下:

mpathe (36845b121004b71c40025afa300000006) dm-5 HUAWEI  ,XSG1           

size=1021G features='0' hwhandler='0' wp=rw

`-+- policy='round-robin 0' prio=1 status=active

  `- 9:0:0:6  sdg 8:96  active ready  running

mpathd (36845b121004b71c40025922a00000005) dm-4 HUAWEI  ,XSG1           

size=1.0T features='0' hwhandler='0' wp=rw

`-+- policy='round-robin 0' prio=1 status=active

  `- 9:0:0:5  sdf 8:80  active ready  running

mpathc (36845b121004b71c4002566fa00000004) dm-3 HUAWEI  ,XSG1           

size=4.0T features='0' hwhandler='0' wp=rw

`-+- policy='round-robin 0' prio=1 status=active

  `- 9:0:0:4  sde 8:64  active ready  running

mpathb (36845b121004b71c4000fe09f00000003) dm-2 HUAWEI  ,XSG1           

size=8.0T features='0' hwhandler='0' wp=rw

`-+- policy='round-robin 0' prio=1 status=active

  `- 9:0:0:3  sdd 8:48  active ready  running

mpatha (36845b121004b71c4000fcaa800000002) dm-1 HUAWEI  ,XSG1           

size=8.0T features='0' hwhandler='0' wp=rw

`-+- policy='round-robin 0' prio=1 status=active

  `- 9:0:0:2  sdc 8:32  active ready  running

mpathf (36845b121004b71c40025485600000001) dm-0 HUAWEI  ,XSG1           

size=4.0T features='0' hwhandler='0' wp=rw

`-+- policy='round-robin 0' prio=1 status=active

  `- 9:0:0:1  sdb 8:16  active ready  running

[root@localhost ~]# fdisk -l

其中mpathampathbmpathcmpathdmpathempathf即为存储侧映射的6lun

ls  /dev/mapper/

mpathampathbmpathcmpathdmpathempathf

parted /dev/mapper/mpatha

建议与总结
在华为多路径不支持或是和操作系统版本不兼容的情况下,可以通过修改自带的多路径软甲你的配置文件,达到为我所用的目的。

END