CentOS/RedHat fc与iscsi多路径安装配置
1、安装(CentOS6.7默认已经安装)
find ./ -name “-mapper-”
rpm -ivh device-mapper-libs-1.02.95-2.el6.x86_64.rpm device-mapper-event-1.02.95-2.el6.x86_64.rpm device-mapper-multipath-libs-0.4.9-87.el6.x86_64.rpm device-mapper-event-libs-1.02.95-2.el6.x86_64.rpm device-mapper-1.02.95-2.el6.x86_64.rpm device-mapper-multipath-0.4.9-87.el6.x86_64.rpm device-mapper-persistent-data-0.3.2-1.el6.x86_64.rpm
rpm -qa | grep device-mapper
2、内核加载
lsmod | grep -i multi
显示如下
dm_multipath 17916 2 dm_round_robin
dm_mod 99200 8 dm_multipath,dm_mirror,dm_log
如果不显示可以尝试手动加载
modprobe dm-multipath
modprobe dm-round-robin
3、启动
service multipathd restart
chkconfig –level 2345 multipathd on
4、生成multipath.conf
默认在路径为/etc/multipath.conf
mpathconf --enable --find_multipaths y --with_module y --with_chkconfig y
mpathconf默认路径在/sbin下
5、查看
一般情况下(我在CentOS6.7平台测试)至此已经可以使用,使用一下命令观察
1) more /etc/multipath/wwids
# Multipath wwids, Version : 1.0
# NOTE: This file is automatically maintained by multipath and multipathd.
# You should not need to edit this file in normal circumstances.
#
# Valid WWIDs:
/360002ac0000000000000004f000044b8/
2)multipath -ll
多路径信息mpathb为多路径的实际操作逻辑路径
mpathb (360002ac0000000000000004f000044b8) dm-0 3PARdata,VV
size=1.0T features=’0’ hwhandler=’0’ wp=rw
-+- policy=’round-robin 0’ prio=1 status=active
|- 6:0:0:0 sdb 8:16 active ready running
|- 5:0:0:0 sdd 8:48 active ready running
|- 6:0:1:0 sdc 8:32 active ready running
- 5:0:1:0 sde 8:64 active ready running
3)补充—查看scsi相关的wwid
示例:scsi_id -g /dev/sdb
6、附加内容:multipath.conf配置,在测试过程中发现
CentOS6.7桌面版安装后配置文件信息示例如下,同时可
自动将多条路径归并,只显示一条归并后的逻辑路径
/dev/mapper/mpathb。
# multipath.conf written by anaconda
defaults {
user_friendly_names yes
}
blacklist {
devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
devnode "^hd[a-z]"
devnode "^dcssblk[0-9]*"
device {
vendor "DGC"
product "LUNZ"
}
device {
vendor "IBM"
product "S/390.*"
}
# don't count normal SATA devices as multipaths
device {
vendor "ATA"
}
# don't count 3ware devices as multipaths
device {
vendor "3ware"
}
device {
vendor "AMCC"
}
# nor highpoint devices
device {
vendor "HPT"
}
wwid "3600508b1001caa4676df795bb828e968"
device {
vendor KVM
product vmDisk-CD
}
device {
vendor HP
product Virtual_DVD-ROM
}
wwid "*"
}
blacklist_exceptions {
wwid "360002ac0000000000000004f000044b8"
}
multipaths {
multipath {
uid 0
gid 0
wwid "360002ac0000000000000004f000044b8"
mode 0600
}
}
更多推荐
所有评论(0)