1、查看是否有多路径软件
rpm -qa|grep device-mapper
2、如果没有,安装
device-mapper-multipath
device-mapper
在安装盘的Packages中
#rpm -ivh device-mapper-multipath-libs.*
#rpm -ivh device-mapper-****.rpm
#rpm -ivh device-mapper-multipath-**8.rpm
3、设置开机启动
查看是否开机自启动
chkconfig --list|grep multipathd
设置成开机自启动
chkconfig --level 2345 multipathd on
检查安装是否正常,内核中是否存在
#modprobe -l|grep multipath
kernel/drivers/md/dm-multipath.ko
重启加载内核或手工加载
#modprobe dm-multipath
#modprobe dm-round-robin
#service multipathd start
4、生产multipath配置文件
#/sbin/mapathcnf --enable
#ls /etc/multipath.conf
5、multipath配置文件
默认情况下multipath生成dm设备之后,会同时在/dev/mapper/下生成以磁盘wwid为名的符号链接指向对应的dm设备。如果想生成mpath设备,则需要打开
user_friendly_names选项
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.*"
}
device {
vendor "ATA"
}
device {
vendor "3ware"
}
device {
vendor "AMCC"
}
device {
vendor "HPT"
}
wwid "3600605b00a9885501d93232c3391b1f1"
wwid "E0AE835EDFA407A"
device {
vendor Raritan
product Virtual_Disc_1
}
wwid "*"
}
blacklist_exceptions {
wwid "36006016066003e000e3d0cd3fc60e511"
wwid "36006016066003e00db37a2c8fc60e511"
wwid "36006016066003e00fdee54ddfc60e511"
}
multipaths {
multipath {
uid 0
gid 0
wwid "36006016066003e000e3d0cd3fc60e511"
mode 0600
alias mpathb
}
multipath {
uid 0
gid 0
wwid "36006016066003e00db37a2c8fc60e511"
mode 0600
alias mpathc
}
multipath {
uid 0
gid 0
wwid "36006016066003e00fdee54ddfc60e511"
mode 0600
alias mapthd
}
获取wwid的方法
1、multipath -v3|grep 3600
2、/var/lib/multipth/bindings 但是我没有找到这个文件,可能跟操作系统版本有关。
multipath -ll查看多路径
service multipathd restart
multipath -F重新定义别名后删除不用的路径
multipath -v2 重新扫描
阅读(1731) | 评论(0) | 转发(0) |
如果觉得《oracle liunx 6.5安装目录 linux redhat 6.5 多路径配置》对你有帮助,请点赞、收藏,并留下你的观点哦!