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]#
6、重啟伺服器後,我們可以看到多路徑資訊了:
[root@RKDB01 ~]# ll /dev/mapper/ 總計 0 crw------- 1 root root 10, 60 11-05 22:35 control brw-rw---- 1 root disk 253, 0 11-05 22:35 mpath1 brw-rw---- 1 root disk 253, 1 11-05 22:35 mpath2 [root@RKDB01 ~]# multipath -ll mpath2 (3600d02310000011b76128b9c63138cf4) dm-1 TOYOU,NetStor_iSUM510 [size=3.2T][features=0][hwhandler=0][rw] \_ round-robin 0 [prio=2][active] \_ 1:0:0:1 sdc 8:32 [active][ready] \_ 1:0:1:1 sde 8:64 [active][ready] mpath1 (3600d02310000011b16a5d57c6a1bd99a) dm-0 TOYOU,NetStor_iSUM510 [size=20G][features=0][hwhandler=0][rw] \_ round-robin 0 [prio=2][active] \_ 1:0:0:0 sdb 8:16 [active][ready] \_ 1:0:1:0 sdd 8:48 [active][ready]
7、透過fdisk 看可以生成了DM-0/DM-1兩個盤,正是上面sdc/sde,sdb/sdd多路徑後出來的:
[root@RKDB01 ~]# fdisk -l Disk /dev/sda: 299.4 GB, 299439751168 bytes 255 heads, 63 sectors/track, 36404 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 38 305203+ 83 Linux /dev/sda2 39 13092 104856255 83 Linux /dev/sda3 13093 19619 52428127+ 83 Linux /dev/sda4 19620 36404 134825512+ 5 Extended /dev/sda5 19620 26146 52428096 83 Linux /dev/sda6 26147 28757 20972826 83 Linux /dev/sda7 28758 30324 12586896 82 Linux swap / Solaris /dev/sda8 30325 36404 48837568+ 83 Linux Disk /dev/sdb: 21.4 GB, 21474836480 bytes 255 heads, 63 sectors/track, 2610 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk /dev/sdb doesn't contain a valid partition table Disk /dev/sdc: 3568.4 GB, 3568429957120 bytes 255 heads, 63 sectors/track, 433836 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk /dev/sdc doesn't contain a valid partition table Disk /dev/sdd: 21.4 GB, 21474836480 bytes 255 heads, 63 sectors/track, 2610 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk /dev/sdd doesn't contain a valid partition table Disk /dev/sde: 3568.4 GB, 3568429957120 bytes 255 heads, 63 sectors/track, 433836 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk /dev/sde doesn't contain a valid partition table Disk /dev/dm-0: 21.4 GB, 21474836480 bytes 255 heads, 63 sectors/track, 2610 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk /dev/dm-0 doesn't contain a valid partition table Disk /dev/dm-1: 3568.4 GB, 3568429957120 bytes 255 heads, 63 sectors/track, 433836 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk /dev/dm-1 doesn't contain a valid partition table Disk /dev/sdf: 4009 MB, 4009754624 bytes 255 heads, 63 sectors/track, 487 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdf4 * 1 488 3915744+ b W95 FAT32 Partition 4 has different physical/logical endings: phys=(486, 254, 63) logical=(487, 125, 22) [root@RKDB01 ~]#
8、我們同時也可以在/dev/mapper目錄中檢視到多路徑對映的資訊:
[root@RKDB01 ~]# ll /dev/mapper/ 總計 0 crw------- 1 root root 10, 60 11-06 00:49 control brw-rw---- 1 root disk 253, 2 11-06 00:49 data-data001 brw-rw---- 1 root disk 253, 0 11-06 00:49 mpath1 brw-rw---- 1 root disk 253, 1 11-06 00:49 mpath2
9、參考:
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/20674423/viewspace-775748/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- linux多路徑multipath配置Linux
- linux redhat 6.5 多路徑配置LinuxRedhat
- multipath多路徑配置
- 【多路徑】EMC儲存多路徑軟體配置
- linux多路徑下線上新增磁碟Linux
- Linux Multipath多路徑配置與使用案例Linux
- 儲存-配置多路徑
- LINUX LOG(多路徑)Linux
- 記錄下物理機bond配置及物理機多路徑配置
- linux之 multipath 多路徑Linux
- Linux配置和管理裝置對映多路徑multipathLinux
- Linux環境iSCSI儲存及多路徑功能配置Linux
- linux iscsi multipath多路徑及名稱持久化配置Linux持久化
- linux_unix_aix_hp_solaris multi path多路徑配置LinuxAI
- Linux平臺上配置Oracle ASMLib和磁碟多路徑LinuxOracleASM
- linux 儲存多路徑軟體Linux
- 多路徑時99-oracle-asmdevices.rules的配置OracleASMdev
- rhel 6 對映多路徑(DM Multipath)配置及管理
- Oracle Linux 7.8 多路徑(Multipath)+Udev繫結磁碟OracleLinuxdev
- 華為儲存多路徑
- redhat multipath多路徑 DMRedhat
- centos上iscsi+multipath多路徑儲存配置手冊CentOS
- LINUX 多路徑對映Multipath與正規表示式Linux
- 多路徑軟體介紹
- Linux平臺的多路徑軟體multipath的使用案例Linux
- UDEV掛載EMC多路徑盤dev
- 多路徑重用歸檔日誌
- IBM儲存多路徑軟體IBM
- Redhat5.4 Linux多路徑dm-multipath之multi-path詳解RedhatLinux
- 【備份恢復】 控制檔案多路徑
- 新增控制檔案成員形成多路徑
- 多路徑軟體安裝使用方法
- RedHat 5.4上iscsi+multipath多路徑儲存配置獲取裝置的wwidRedhat
- hds 多路徑軟體failover,failback測試AI
- 使用OpenFiler來模擬儲存配置RAC中ASM共享盤及多路徑(multipath)的測試ASM
- 批量修改vsphere共享儲存多路徑選擇策略
- Redhat7 Udev繫結(DM multipath)多路徑裝置Redhatdev
- 獲取在oracleasmlib上hds儲存的多路徑OracleASM