1、安装多路径软件
yum install device-mapper-multipath
2、将多路径软件添加至内核模块中
modprobe dm-multipath
modprobe dm-round-robin
3、检查内核添加情况
lsmod |grep multipath
4、启动multipathd服务
systemctl restart multipathd
5、设置开启自启动multipathd服务
systemctl enable multipathd
6、创建multipath配置文件
/etc/multipath.conf
内容如下(根据存储主机和自己机器的wwiid进行修改):
blacklist {
wwid 3600508b1001c044c39717726236c68d5
}
defaults {
user_friendly_names yes
polling_interval 10
queue_without_daemon no
flush_on_last_del yes
checker_timeout 120
}
devices {
device {
vendor "MacroSAN"
product "LU"
path_grouping_policy group_by_prio
no_path_retry 30
prio alua
path_checker tur
path_selector "round-robin 0"
hardware_handler "0"
failback 15
}
}
multipaths {
multipath {
wwid 3600b342c2037975d3e7bd0984d0000d5
alias mpatha
}
# multipath {
# wwid 3600b3426fb82c96d983ddfc59d0000d8
# alias mpathb
# }
}
7、重启multipathd服务
systemctl restart multipathd
8、查看多路径状态
multipath -ll