欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Multipath多路径安装配置

程序员文章站 2024-01-30 16:26:52
...

1、先检查检查是否已经安装了多路径软件

lsmod |grep dm_multipath

multipath –ll

2、没有安装多路径软件的使用yum来安装多路径软件

yum install device-mapper-multipath

执行 multipath –ll 能成功就OK,不行的话看看是不是multipathd服务没有起来

service multipathd start

3、配置多路径配置文件,这个根据存储的不同,配置文件的内容稍有差异,这个让存储厂商提供给你

vim /etc/multipath.conf

[[email protected] ~]# cat /etc/multipath.conf
defaults {
    polling_interval 10
    max_fds 8192
    user_friendly_names yes
}
devices {
    device {
        vendor "3PARdata"
        product "VV"
        path_grouping_policy "group_by_prio"
        path_selector "round-robin 0"
        path_checker tur
        features "0"
        hardware_handler "1 alua"
        prio "alua"
        failback immediate
        rr_weight "uniform"
        no_path_retry 18
        rr_min_io_rq 1
        detect_prio yes
        fast_io_fail_tmo 10
        dev_loss_tmo "infinity"
    }
}

blacklist {
}

4、启用配置文件

mpathconf --enable

5、检查多路径情况

multipath –ll

mpathe (360002ac000000000000000110001dfd0) dm-4 3PARdata,VV
size=10G features='1 queue_if_no_path' hwhandler='1 alua' wp=rw
|-+- policy='round-robin 0' prio=50 status=active
| |- 1:0:1:3 sdn  8:208  active ready running
| |- 2:0:0:3 sdao 66:128 active ready running
| |- 1:0:2:3 sdw  65:96  active ready running
| `- 2:0:2:3 sdbg 67:160 active ready running
`-+- policy='round-robin 0' prio=1 status=enabled
  |- 1:0:0:3 sde  8:64   active ghost running
  |- 2:0:1:3 sdax 67:16  active ghost running
  |- 1:0:3:3 sdaf 65:240 active ghost running
  `- 2:0:3:3 sdbp 68:48  active ghost running
mpathd (360002ac000000000000000100001dfd0) dm-3 3PARdata,VV
size=10G features='1 queue_if_no_path' hwhandler='1 alua' wp=rw
|-+- policy='round-robin 0' prio=50 status=active
| |- 1:0:1:2 sdm  8:192  active ready running
| |- 2:0:0:2 sdan 66:112 active ready running
| |- 1:0:2:2 sdv  65:80  active ready running
| `- 2:0:2:2 sdbf 67:144 active ready running
`-+- policy='round-robin 0' prio=1 status=enabled
  |- 1:0:0:2 sdd  8:48   active ghost running
  |- 2:0:1:2 sdaw 67:0   active ghost running
  |- 1:0:3:2 sdae 65:224 active ghost running
  `- 2:0:3:2 sdbo 68:32  active ghost running
mpathc (360002ac0000000000000000f0001dfd0) dm-2 3PARdata,VV
size=10G features='1 queue_if_no_path' hwhandler='1 alua' wp=rw
|-+- policy='round-robin 0' prio=50 status=active
| |- 1:0:1:1 sdl  8:176  active ready running
| |- 2:0:0:1 sdam 66:96  active ready running
| |- 1:0:2:1 sdu  65:64  active ready running
| `- 2:0:2:1 sdbe 67:128 active ready running
`-+- policy='round-robin 0' prio=1 status=enabled
  |- 1:0:0:1 sdc  8:32   active ghost running
  |- 2:0:1:1 sdav 66:240 active ghost running
  |- 1:0:3:1 sdad 65:208 active ghost running
  `- 2:0:3:1 sdbn 68:16  active ghost running
mpathb (360002ac000000000000000170001dfd0) dm-1 3PARdata,VV
size=1000G features='1 queue_if_no_path' hwhandler='1 alua' wp=rw
|-+- policy='round-robin 0' prio=50 status=active
| |- 1:0:1:0 sdk  8:160  active ready running
| |- 2:0:0:0 sdal 66:80  active ready running
| |- 1:0:2:0 sdt  65:48  active ready running
| `- 2:0:2:0 sdbd 67:112 active ready running
`-+- policy='round-robin 0' prio=1 status=enabled
  |- 1:0:0:0 sdb  8:16   active ghost running
  |- 2:0:1:0 sdau 66:224 active ghost running
  |- 1:0:3:0 sdac 65:192 active ghost running
  `- 2:0:3:0 sdbm 68:0   active ghost running
mpathj (360002ac0000000000000001b0001dfd0) dm-9 3PARdata,VV
size=1.0T features='1 queue_if_no_path' hwhandler='1 alua' wp=rw
|-+- policy='round-robin 0' prio=50 status=active
| |- 1:0:1:8 sds  65:32  active ready running
| |- 2:0:0:8 sdat 66:208 active ready running
| |- 1:0:2:8 sdab 65:176 active ready running
| `- 2:0:2:8 sdbl 67:240 active ready running
`-+- policy='round-robin 0' prio=1 status=enabled
  |- 1:0:0:8 sdj  8:144  active ghost running
  |- 2:0:1:8 sdbc 67:96  active ghost running
  |- 1:0:3:8 sdak 66:64  active ghost running
  `- 2:0:3:8 sdbu 68:128 active ghost running
mpathi (360002ac0000000000000001a0001dfd0) dm-8 3PARdata,VV
size=1.0T features='1 queue_if_no_path' hwhandler='1 alua' wp=rw
|-+- policy='round-robin 0' prio=50 status=active
| |- 1:0:1:7 sdr  65:16  active ready running
| |- 2:0:0:7 sdas 66:192 active ready running
| |- 1:0:2:7 sdaa 65:160 active ready running
| `- 2:0:2:7 sdbk 67:224 active ready running
`-+- policy='round-robin 0' prio=1 status=enabled
  |- 1:0:0:7 sdi  8:128  active ghost running
  |- 2:0:1:7 sdbb 67:80  active ghost running
  |- 1:0:3:7 sdaj 66:48  active ghost running
  `- 2:0:3:7 sdbt 68:112 active ghost running
mpathh (360002ac000000000000000190001dfd0) dm-7 3PARdata,VV
size=1020G features='1 queue_if_no_path' hwhandler='1 alua' wp=rw
|-+- policy='round-robin 0' prio=50 status=active
| |- 1:0:1:6 sdq  65:0   active ready running
| |- 2:0:0:6 sdar 66:176 active ready running
| |- 1:0:2:6 sdz  65:144 active ready running
| `- 2:0:2:6 sdbj 67:208 active ready running
`-+- policy='round-robin 0' prio=1 status=enabled
  |- 1:0:0:6 sdh  8:112  active ghost running
  |- 2:0:1:6 sdba 67:64  active ghost running
  |- 1:0:3:6 sdai 66:32  active ghost running
  `- 2:0:3:6 sdbs 68:96  active ghost running
mpathg (360002ac000000000000000180001dfd0) dm-6 3PARdata,VV
size=1010G features='1 queue_if_no_path' hwhandler='1 alua' wp=rw
|-+- policy='round-robin 0' prio=50 status=active
| |- 1:0:1:5 sdp  8:240  active ready running
| |- 2:0:0:5 sdaq 66:160 active ready running
| |- 1:0:2:5 sdy  65:128 active ready running
| `- 2:0:2:5 sdbi 67:192 active ready running
`-+- policy='round-robin 0' prio=1 status=enabled
  |- 1:0:0:5 sdg  8:96   active ghost running
  |- 2:0:1:5 sdaz 67:48  active ghost running
  |- 1:0:3:5 sdah 66:16  active ghost running
  `- 2:0:3:5 sdbr 68:80  active ghost running
mpathf (360002ac000000000000000120001dfd0) dm-5 3PARdata,VV
size=500G features='1 queue_if_no_path' hwhandler='1 alua' wp=rw
|-+- policy='round-robin 0' prio=50 status=active
| |- 1:0:1:4 sdo  8:224  active ready running
| |- 2:0:0:4 sdap 66:144 active ready running
| |- 1:0:2:4 sdx  65:112 active ready running
| `- 2:0:2:4 sdbh 67:176 active ready running
`-+- policy='round-robin 0' prio=1 status=enabled
  |- 1:0:0:4 sdf  8:80   active ghost running
  |- 2:0:1:4 sday 67:32  active ghost running
  |- 1:0:3:4 sdag 66:0   active ghost running
  `- 2:0:3:4 sdbq 68:64  active ghost running

如果没有起效,则reboot之后再检查,有时候存储映射过来需要重启os才能识别到

相关标签: Linux 常用知识