v7000 linux多路径,关于V7000多路径问题
1、查看主機(jī)上光纖卡的WWN[root@test1 host2]# pwd/sys/class/fc_host/host2[root@test1 host2]# cat port_name0x5001438006342f802、在V7000存儲(chǔ)上進(jìn)行mapping在存儲(chǔ)上查看是否能看到該HBA卡的WWN,mapping后可重新掃描設(shè)備[root@oawas2 host2]# cd /sys/class/scsi_host...顯示全部
1、查看主機(jī)上光纖卡的WWN
[root@test1 host2]# pwd
/sys/class/fc_host/host2
[root@test1 host2]# cat port_name
0x5001438006342f80
2、在V7000存儲(chǔ)上進(jìn)行mapping
在存儲(chǔ)上查看是否能看到該HBA卡的WWN,mapping后可重新掃描設(shè)備
[root@oawas2 host2]# cd /sys/class/scsi_host/host2
[root@oawas2 host2]# echo "- - -" >./scan
可以看到認(rèn)到盤了
fdisk -l
3、V7000使用Linux device-mapper multipathing driver作為多路徑軟件
啟用步驟:
step1. service multipathd stop
step2.修改/etc/multipah.conf
備份該文件cp /etc/multipath.conf /etc/bak.multipath.conf
blacklist {
# 黑名單,就是禁止哪些設(shè)備使用multipathing driver
# 默認(rèn)情況下所以的設(shè)備都在multipath的黑名單中,所以即使啟動(dòng)了multipathd服務(wù)并加在了內(nèi)核模塊,
multipath也不會(huì)對鏈路進(jìn)行聚合,必須進(jìn)行修改
# 可以按照wwid逐一加入,也可以使用devnode的方式按照規(guī)律批量加入
wwid 1HITACHI_D60055750023
wwid 1HITACHI_D60055750028
devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
devnode "^hd[a-z]"
}
defaults {
# 默認(rèn)情況下multipath生成dm設(shè)備之后,會(huì)同時(shí)在/dev/mapper/下生成以磁盤wwid為名的符號(hào)鏈接指向?qū)?yīng)的dm設(shè)備。
# 如果想生成 mpath設(shè)備,則需要打開user_friendly_names選項(xiàng)
polling_interval? ?? ? 30
failback? ?? ?? ?? ?? ?immediate
no_path_retry? ?? ?? ? 5
rr_min_io? ?? ?? ?? ???100
path_checker? ?? ?? ???tur
user_friendly_names? ? yes
}
devices {
# Storwize V7000??-->其實(shí)應(yīng)該是SVC,因?yàn)?145是SVC的ID,V7000的ID是2076
# Note: If you are using RHEL6 or SUSE Linux Enterprise Server 10 Service Pack 2,
# use prio "alua" instead of prio_callout "/sbin/mpath_prio_alua /dev/%n" to disable
# the Using deprecated prio_callout message. This value disables only the error message
# and does not affect operations. If prio_callout "/sbin/mpath_prio_alua /dev/%n" is set
# on SUSE Linux Enterprise Server 10 Service Pack 2, the Using deprecated prio_callout message
# is issued for all devices when the multipath command is used.
# 根據(jù)Linux版本的不同,prio_callout有所不同,具體可參考information center
device {
vendor? ? "IBM"
product? ?"2145"
path_grouping_policy group_by_prio
prio_callout? ?"/sbin/mpath_prio_alua /dev/%n"
}
}
multipaths {
#可以給multipaths取別名,這樣用multipath –ll看到的就是自己取的名字了,可以用此辦法避免mpath混亂,
固定名字,尤其在做雙機(jī)的時(shí)候
multipath {
wwid? ? 360050768028081d5d80000000000000f
alias? ?nectest01
}
multipath {
wwid? ? 360050768028081d5d800000000000010
alias? ?nectest02
}
multipath {
wwid? ? 360050768028081d5d800000000000011
alias? ?nectest03
}
multipath {
wwid? ? 360050768028081d5d800000000000012
alias? ?nectest04
}
}
如何查看磁盤的wwid呢?通過下面兩個(gè)文件夾中的內(nèi)容,以及對應(yīng)存儲(chǔ)上的配置,可以找到。
ls -l /dev/disk/by-id
[root@test1 disk]# ls -l ./by-id
total 0
lrwxrwxrwx 1 root root 9 Apr??6 17:00 scsi-360050768028081d5d80000000000000f -> ../../sda
lrwxrwxrwx 1 root root 9 Apr??6 17:00 scsi-360050768028081d5d800000000000010 -> ../../sdf
lrwxrwxrwx 1 root root 9 Apr??6 17:00 scsi-360050768028081d5d800000000000011 -> ../../sdg
lrwxrwxrwx 1 root root 9 Apr??6 17:00 scsi-360050768028081d5d800000000000012 -> ../../sdd
step3.重啟multipathd服務(wù)(修改multipath.conf文件之后都應(yīng)該重啟multipath服務(wù))
service multipathd restart
step4.chkconfig multipathd on
4、常用的一些multipath工具
清空已有的multipath記錄
multipath -F
掃描磁盤,系統(tǒng)中會(huì)出現(xiàn)鏈路聚合之后的dm設(shè)備,同時(shí)也會(huì)在/dev/mapper/、/dev/mpath/目錄下生成相應(yīng)的設(shè)備。
multipath -v2
查看multipath拓?fù)浣Y(jié)構(gòu)
multipath -ll
可以在/dev/mapper下看到磁盤nectest01-nectest04,用這個(gè)邏輯名字來建pv、vg
另外一個(gè)重要的文件是/var/lib/multipath/bindings,這個(gè)文件中是磁盤的別名和wwid的對應(yīng)關(guān)系,但在我們這里看不到,
因?yàn)槲覀冊趍ultipath.conf中啟用了user_friendly_names,已經(jīng)顯示的指定了別名與wwid的關(guān)系
如果要做集群,則要求/dev/mapper下的磁盤別名一致,只要將multipath.conf中定義的磁盤alias一致即可。收起
總結(jié)
以上是生活随笔為你收集整理的v7000 linux多路径,关于V7000多路径问题的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 端午节主题风格PPT模板
- 下一篇: Linux 的变量类型