非普通硬碟如存儲陣列,挂到伺服器上以後,會看到很多容量一模一樣的硬碟,比如/dev/sdb sdc sdd sde,這種的要想正常使用,需要裝上multipath服務。
一、裝包。
yum install -y device-mapper-persistent-data device-mapper-multipath device-mapper-libs device-mapper-event-libs device-mapper-multipath-libs device-mapper device-mapper-event
二、設定服務開機啟動。
chkconfig multipathd on
三、加載子產品。
modprobe dm_multipath
modprobe dm_round_robin
四、自動生成配置檔案。
mpathconf --enable --find_multipaths y --with_module y --with_chkconfig y
五、啟動服務。
(/etc/init.d/multipathd status看看服務狀态,剛裝的肯定沒啟)
/etc/init.d/multipathd start
六、啟動服務後可檢視存儲配置設定給本伺服器的邏輯盤lun的wwid資訊
more /etc/multipath/wwids
fdisk -l後可以看到這樣的/dev/mapper/mpathb裝置,就可以把他當成普通磁盤來操作了。
本文轉自 朱科強 51CTO部落格,原文連結:http://blog.51cto.com/zhukeqiang/1724900,如需轉載請自行聯系原作者