linux多路徑multipath配置
OS:oracle linux6.8
儲存:HP EVA8100(儲存過老,不支援軟體安裝)
1、檢視多路徑軟體包是否安裝
[root@node1 ~]# rpm -qa|grep device
device-mapper-event-libs-1.02.117-7.el6.x86_64
device-mapper-libs-1.02.117-7.el6.x86_64
device-mapper-event-1.02.117-7.el6.x86_64
device-mapper-persistent-data-0.6.2-0.1.rc7.el6.x86_64
device-mapper-multipath-libs-0.4.9-93.0.1.el6.x86_64
libimobiledevice-0.9.7-4.el6.x86_64
device-mapper-1.02.117-7.el6.x86_64
PackageKit-device-rebind-0.5.8-26.0.1.el6.x86_64
device-mapper-multipath-0.4.9-93.0.1.el6.x86_64 ? ---如果未安裝則找到系統包進行安裝
設定開機自啟動,檢查安裝包是否正常
chkconfig –level 2345 multipathd on
lsmod |grep dm_multipath
2.配置multipathd 使其正常工作,編輯/etc/multipath.conf,開放如下內容:
defaults {
udev_dir /dev
polling_interval 5
path_grouping_policy failover
getuid_callout "/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/%n"
prio const
path_checker directio
rr_min_io 1000
rr_weight uniform
failback manual
no_path_retry fail
user_friendly_names yes
}
blacklist {
devnode "^hd[a-z]"
devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
}
multipaths {
multipath {
wwid 3600508b4000c3bcf0000e00005630000
alias asm-diskb
# path_grouping_policy multibus
# path_checker readsector0
# path_selector "round-robin 0"
# failback manual
# rr_weight priorities
# no_path_retry 5
# }
multipath {
wwid 3600508b4000c3bcf0000e00005660000
alias asm-diskc
devices {
device {
vendor "iSCSI-Enterprise"
product "Virtual disk"
path_grouping_policy multibus
getuid_callout "/sbin/scsi_id -g -u -s /block/%n"
path_checker readsector0
path_selector "round-robin 0"
}
}
如果沒有multipath檔案,可以執行下列命令試試
[root@node1 multipath]# mpathconf --enable --with_multipathd y
[root@node1 multipath]# multipath -v$ |grep uid
[root@node1 multipath]# multipath -v3|grep 3600
3、重啟multipath服務
[root@node1 etc]# service multipathd restart
ok
Stopping multipathd daemon: [ OK ]
Starting multipathd daemon: [ OK ]
4.[root@node1 mapper]# multipath -ll
asm-diskb (3600508b4000c3bcf0000e00005630000) dm-0 HP,HSV210
size=5.0G features='1 queue_if_no_path' hwhandler='0' wp=rw
|-+- policy='round-robin 0' prio=50 status=active
| |- 1:0:0:1 sdb 8:16 active ready running
| |- 2:0:0:1 sdj 8:144 active ready running
| |- 1:0:3:1 sdh 8:112 active ready running
| `- 2:0:3:1 sdp 8:240 active ready running
`-+- policy='round-robin 0' prio=10 status=enabled
|- 1:0:1:1 sdd 8:48 active ready running
|- 2:0:1:1 sdl 8:176 active ready running
|- 1:0:2:1 sdf 8:80 active ready running
`- 2:0:2:1 sdn 8:208 active ready running
asm-diskc (3600508b4000c3bcf0000e00005660000) dm-1 HP,HSV210
size=300G features='1 queue_if_no_path' hwhandler='0' wp=rw
|-+- policy='round-robin 0' prio=50 status=active
| `- 1:0:1:2 sde 8:64 active ready running
|-+- policy='round-robin 0' prio=50 status=enabled
| `- 1:0:2:2 sdg 8:96 active ready running
|-+- policy='round-robin 0' prio=50 status=enabled
| `- 2:0:1:2 sdm 8:192 active ready running
|-+- policy='round-robin 0' prio=50 status=enabled
| `- 2:0:2:2 sdo 8:224 active ready running
|-+- policy='round-robin 0' prio=10 status=enabled
| `- 1:0:0:2 sdc 8:32 active ready running
|-+- policy='round-robin 0' prio=10 status=enabled
| `- 1:0:3:2 sdi 8:128 active ready running
|-+- policy='round-robin 0' prio=10 status=enabled
| `- 2:0:0:2 sdk 8:160 active ready running
`-+- policy='round-robin 0' prio=10 status=enabled
`- 2:0:3:2 sdq 65:0 active ready running
4、檢視ASM磁碟組
[root@node1 mapper]# ls -l /dev/mapper/
total 0
lrwxrwxrwx. 1 root root 7 Dec 29 15:52 asm-diskb -> ../dm-0
lrwxrwxrwx. 1 root root 7 Dec 29 15:52 asm-diskc -> ../dm-1
crw-rw----. 1 root root 10, 236 Dec 29 09:54 control
[root@node1 mapper]# ls
asm-diskb asm-diskc control
5、udev繫結磁碟
[root@node1 ~]# cat /etc/udev/rules.d/99-oracle-asmdevices.rules
ENV{DM_NAME}=="asm-diska", OWNER:="grid", GROUP:="asmadmin", MODE:="660"
ENV{DM_NAME}=="asm-diskb", OWNER:="grid", GROUP:="asmadmin", MODE:="660"
ENV{DM_NAME}=="asm-diskc", OWNER:="grid", GROUP:="asmadmin", MODE:="660"
[root@node1 rules.d]# start_udev
Starting udev: [ OK ]
[root@node1 rules.d]# ls -l /dev/mapper/
total 0
lrwxrwxrwx 1 root root 7 Jul 1 15:18 asm-diska -> ../dm-2
lrwxrwxrwx 1 root root 7 Jul 1 15:18 asm-diskb -> ../dm-3
lrwxrwxrwx 1 root root 7 Jul 1 15:18 asm-diskc -> ../dm-4
crw-rw---- 1 root root 10, 236 Jul 1 15:18 control
lrwxrwxrwx 1 root root 7 Jul 1 15:18 vg_oel-lv_root -> ../dm-0
lrwxrwxrwx 1 root root 7 Jul 1 15:18 vg_oel-lv_swap -> ../dm-1
[root@node1 rules.d]# ls -l /dev/dm-*
brw-rw---- 1 root disk 252, 0 Jul 1 15:18 /dev/dm-0
brw-rw---- 1 root disk 252, 1 Jul 1 15:18 /dev/dm-1
brw-rw---- 1 grid asmadmin 252, 2 Jul 1 15:18 /dev/dm-2
brw-rw---- 1 grid asmadmin 252, 3 Jul 1 15:18 /dev/dm-3
brw-rw---- 1 grid asmadmin 252, 4 Jul 1 15:18 /dev/dm-4
在建立asm磁碟組的時候,路徑選擇/dev/mapper/*,可自動識別到聚合後的磁碟,雖然軟連線的許可權還是root,但實際磁碟已改變,asm可用。
繫結磁碟還有一種方式:
[root@pdmdb1 ~]# cat /etc/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
chown grid:asmadmin /dev/dm-0
chown grid:asmadmin /dev/dm-1
chmod 660 /dev/dm-0
chmod 660 /dev/dm-1
--配置別名已經在multipath.conf裡面配置過了
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29618264/viewspace-2131954/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- multipath多路徑配置
- Linux Multipath多路徑配置與使用案例Linux
- linux之 multipath 多路徑Linux
- Linux配置和管理裝置對映多路徑multipathLinux
- linux iscsi multipath多路徑及名稱持久化配置Linux持久化
- redhat multipath多路徑 DMRedhat
- rhel 6 對映多路徑(DM Multipath)配置及管理
- Oracle Linux 7.8 多路徑(Multipath)+Udev繫結磁碟OracleLinuxdev
- centos上iscsi+multipath多路徑儲存配置手冊CentOS
- LINUX 多路徑對映Multipath與正規表示式Linux
- Linux 下配置多路徑Linux
- Linux平臺的多路徑軟體multipath的使用案例Linux
- linux redhat 6.5 多路徑配置LinuxRedhat
- 【多路徑】EMC儲存多路徑軟體配置
- Redhat5.4 Linux多路徑dm-multipath之multi-path詳解RedhatLinux
- Redhat7 Udev繫結(DM multipath)多路徑裝置Redhatdev
- 儲存-配置多路徑
- RedHat 5.4上iscsi+multipath多路徑儲存配置獲取裝置的wwidRedhat
- LINUX LOG(多路徑)Linux
- 使用OpenFiler來模擬儲存配置RAC中ASM共享盤及多路徑(multipath)的測試ASM
- Linux環境iSCSI儲存及多路徑功能配置Linux
- linux_unix_aix_hp_solaris multi path多路徑配置LinuxAI
- Linux平臺上配置Oracle ASMLib和磁碟多路徑LinuxOracleASM
- linux 儲存多路徑軟體Linux
- linux多路徑下線上新增磁碟Linux
- linux配置multipath 並安裝racLinux
- 多路徑時99-oracle-asmdevices.rules的配置OracleASMdev
- 記錄下物理機bond配置及物理機多路徑配置
- 華為儲存多路徑
- 多路徑軟體介紹
- Linux的multipath for ASMLinuxASM
- multipath配置詳細參考
- UDEV掛載EMC多路徑盤dev
- 多路徑重用歸檔日誌
- IBM儲存多路徑軟體IBM
- RHEL5 multipath多路徑聚合到RAC的RAW裝置繫結中不能用raw raw1 /dev/dm-*來實現dev
- 【備份恢復】 控制檔案多路徑
- 新增控制檔案成員形成多路徑