linux 7 multipath多路徑軟件部署
操作系統(tǒng)版本信息:
CentOS Linux release 7.8.2003 (Core)
01,多路徑軟件安裝
#軟件安裝 yum install device-mapper-multipath -y #開機(jī)自動啟動 systemctl enable multipathd.service #加載模塊 lsmod |grep multipath modprobe dm-multipath modprobe dm-round-robin lsmod |grep multipath 正常模塊加載信息: [root@hecs-66a2 ~]# lsmod |grep multipath dm_multipath 27792 4 dm_round_robin,dm_service_time dm_mod 124501 3 dm_multipath
03,軟件配置
#生成默認(rèn)配置文件 /sbin/mpathconf --enable 修改默認(rèn)參數(shù) sed -i 's/find_multipaths/#find_multipaths/' /etc/multipath.conf #參數(shù)說明 #find_multipaths如置為yes,則將為3種場景創(chuàng)建多路徑設(shè)備(不在黑名單的兩個路徑的wwid相同;用戶手動強(qiáng)制創(chuàng)建;一個路徑的wwid與之前已經(jīng)創(chuàng)建的多路徑設(shè)備相同) #user_friendly_names:如為yes,則用/etc/multipath/bindings中的設(shè)置命名;
04,啟動多路徑軟件
#加載路徑配置文件 multipath -r #查看聚合路徑信息 multipath -ll #啟動多路徑軟件 systemctl enable multipathd.service systemctl restart multipathd.service
05,查看聚合磁盤信息
[root@hecs-66a2 multipath]# multipath -ll mpathb (36001405a8111ea8e7e54c8fb25613092) dm-1 LIO-ORG ,disk02 size=20G features='0' hwhandler='0' wp=rw `-+- policy='service-time 0' prio=1 status=active `- 2:0:0:1 sdb 8:16 active ready running mpatha (360014054170ebd76f8b4cd69600e1ba9) dm-0 LIO-ORG ,disk01 size=10G features='0' hwhandler='0' wp=rw `-+- policy='service-time 0' prio=1 status=active `- 2:0:0:0 sda 8:0 active ready running [root@hecs-66a2 multipath]# pwd /etc/multipath [root@hecs-66a2 multipath]# cat bindings # Multipath bindings, Version : 1.0 # NOTE: this file is automatically maintained by the multipath program. # You should not need to edit this file in normal circumstances. # # Format: # alias wwid # mpatha 360014054170ebd76f8b4cd69600e1ba9 mpathb 36001405a8111ea8e7e54c8fb25613092 [root@hecs-66a2 multipath]# cat bindings wwids [root@hecs-66a2 multipath]# cat wwids # Multipath wwids, Version : 1.0 # NOTE: This file is automatically maintained by multipath and multipathd. # You should not need to edit this file in normal circumstances. # # Valid WWIDs: /360014054170ebd76f8b4cd69600e1ba9/ /36001405a8111ea8e7e54c8fb25613092/ [root@hecs-66a2 multipath]#
06,常用命令參考
#常用命令參考: /usr/lib/udev/scsi_id -g -u /dev/sda(手動檢查wwid) multipath -r (修改multipath.conf配置文件之后重新加載) multipath -ll (查看多路徑狀態(tài)) multipath -v2 (格式化路徑,檢測路徑,合并路徑) multipath -v3 (查看多路徑詳情blacklist、whitelist和設(shè)備wwid) multipath -F (刪除現(xiàn)有鏈路)
Linux
版權(quán)聲明:本文內(nèi)容由網(wǎng)絡(luò)用戶投稿,版權(quán)歸原作者所有,本站不擁有其著作權(quán),亦不承擔(dān)相應(yīng)法律責(zé)任。如果您發(fā)現(xiàn)本站中有涉嫌抄襲或描述失實的內(nèi)容,請聯(lián)系我們jiasou666@gmail.com 處理,核實后本網(wǎng)站將在24小時內(nèi)刪除侵權(quán)內(nèi)容。
版權(quán)聲明:本文內(nèi)容由網(wǎng)絡(luò)用戶投稿,版權(quán)歸原作者所有,本站不擁有其著作權(quán),亦不承擔(dān)相應(yīng)法律責(zé)任。如果您發(fā)現(xiàn)本站中有涉嫌抄襲或描述失實的內(nèi)容,請聯(lián)系我們jiasou666@gmail.com 處理,核實后本網(wǎng)站將在24小時內(nèi)刪除侵權(quán)內(nèi)容。