linux redhat 6.5 多路徑配置

綠蘿綠蘿123發表於2015-09-24
|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 重新掃描
 



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

相關文章