Linux多路徑指的是除了主機和硬盤一條路徑的連接,還包括了主機和網絡服務器的連接形成的主機一對多的路徑連接關系。通過多路徑的連接,實現了磁盤的虛擬化。那麼Linux系統怎麼配置多路徑?配置多路徑步驟有哪些?本文就來為大家介紹一下。
1、安裝多路徑軟件包:
device-mapper-1.02.67-2.el5
device-mapper-event-1.02.67.2.el5
device-mapper-multipath-0.4.7-48.el5
[root@RKDB01 Server]# rpm -ivh device-mapper-1.02.67-2.el5.x86_64.rpm
warning: device-mapper-1.02.67-2.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing.。。 ########################################### [100%]
package device-mapper-1.02.67-2.el5.x86_64 is already installed
[root@RKDB01 Server]# rpm -ivh device-mapper-event-1.02.67-2.el5.x86_64.rpm
warning: device-mapper-event-1.02.67-2.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing.。。 ########################################### [100%]
package device-mapper-event-1.02.67-2.el5.x86_64 is already installed
[root@RKDB01 Server]# rpm -ivh device-mapper-multipath-0.4.7-48.el5.x86_64.rpm
warning: device-mapper-multipath-0.4.7-48.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing.。。 ########################################### [100%]
package device-mapper-multipath-0.4.7-48.el5.x86_64 is already installed
2、設置開機啟動,並檢查安裝包是否正常:
chkconfig --level 345 multipathd on
lsmod |grep dm_multipath
[root@RKDB01 Server]# chkconfig --level 345 multipathd on
[root@RKDB01 Server]# lsmod |grep dm_multipath
dm_multipath 58969 0
scsi_dh 42561 1 dm_multipath
dm_mod 102417 4 dm_mirror,dm_multipath,dm_raid45,dm_log
[root@RKDB01 Server]#
3、配置multipathd 使其正常工作,編輯/etc/multipath.conf,開放如下內容:
defaults {
udev_dir /dev
polling_interval 10
selector “round-robin 0”
path_grouping_policy multibus
getuid_callout “/sbin/scsi_id -g -u -s /block/%n”
prio_callout none
path_checker readsector0
rr_min_io 100
max_fds 8192
rr_weight priorities
failback immediate
no_path_retry fail
user_friendly_names yes
}
blacklist {
wwid 26353900f02796769
devnode “^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*”
devnode “^hd[a-z]”
}
4、並關閉如下內容
#blacklist {
# devnode “*”
#}
#defaults {
27 # user_friendly_names yes
28 #}
5、完成之後執行如下命令發現多路徑:
[root@RKDB01 Server]# modprobe dm-multipath
[root@RKDB01 Server]# multipath -F
[root@RKDB01 Server]# multipath dm-multipath
[root@RKDB01 Server]# multipath dm-round-robin
[root@RKDB01 Server]# service multipathd restart
正在關閉multipathd 端口監控程序: [確定]
正在啟動守護進程multipathd: [確定]
[root@RKDB01 Server]# multipath -v2
[root@RKDB01 Server]# multipath -v2
[root@RKDB01 Server]# multipath -ll
mpath1 (3600d02310000011b16a5d57c6a1bd99a) dm-0 TOYOU,NetStor_iSUM510
[size=3.3T][features=0][hwhandler=0][rw]
\_ round-robin 0 [prio=2][ena bled]
\_ 1:0:0:0 sdb 8:16 [failed][ready]
\_ 1:0:1:0 sdc 8:32 [failed][ready]
[root@RKDB01 Server]#
上一頁12下一頁共2頁