多路徑軟體安裝使用方法

lusklusklusk發表於2017-04-18
伺服器可以識別到儲存的情況下,多路徑軟體安裝好後,不需要重啟伺服器,啟動多路徑軟體後,就可以看到儲存的多路徑別名/dev/mapper/wwid或/dev/mapper/別名

yum -y intall device-mapper-multipath

chkconfig --level 35 multipathd on
cp /usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf /etc/multipath.conf
service multipathd start
multipath -v3
安裝好multipath後,預設的multipath.conf路徑是
/usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf

需要把該檔案複製至/etc目錄
cp /usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf /etc/multipath.conf



如果多路徑軟體安裝好後,不啟動,fdisk看不到/dev/mapper目錄下面的資訊,
並且執行
multipath -v3顯示如下
[root@srmdb Packages]# multipath -v3
May 17 14:43:24 | DM multipath kernel driver not loaded
May 17 14:43:24 | DM multipath kernel driver not loaded

啟動後,fdisk可以馬上看到/dev/mapper目錄下面的資訊,multipath -v3也顯示正常資訊
[root@srmdb etc]# service multipathd status
multipathd is stopped
[root@srmdb etc]# service multipathd start
Starting multipathd daemon:                                [  OK  ]
[root@srmdb etc]# multipath -v3
May 17 14:45:21 | ram0: device node name blacklisted
May 17 14:45:21 | ram1: device node name blacklisted
May 17 14:45:21 | ram2: device node name blacklisted
May 17 14:45:21 | ram3: device node name blacklisted
May 17 14:45:21 | ram4: device node name blacklisted
May 17 14:45:21 | ram5: device node name blacklisted
May 17 14:45:21 | ram6: device node name blacklisted





lun在應用伺服器上顯示為/dev/mapper/wwid
lun在應用伺服器上顯示為/dev/mapper/別名如/dev/mapper/sdbidb(預設的multipath.conf
就是顯示別名,如果需要顯示wwid,需要修改multipath.conf裡面的配置)

配置好/etc/multipath.conf檔案後,一般fdisk -l|grep /dev/mapper/就可以直接看到wwid了
[root@mesdg ~]# fdisk -l |grep /dev/mapper
Disk /dev/mapper/3600a098038303867635d4a48624e5465: 1099.5 GB, 1099529453568 bytes


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/30126024/viewspace-2137512/,如需轉載,請註明出處,否則將追究法律責任。

相關文章