multipath多路徑配置

raysuen發表於2016-08-24
[root@localhost ~]# rpm -qa | grep device-mapper
device-mapper-1.02.95-3.el6_7.3.x86_64
device-mapper-multipath-0.4.9-87.el6.x86_64


[root@localhost ~]# vi /etc/multipath.conf
defaults {
user_friendly_names yes
udev_dir /dev
path_grouping_policy multibus
failback immediate
no_path_retry fail
}



[root@localhost ~]# service multipathd restart
ux_socket_connect: No such file or directory
Stopping multipathd daemon:                                [FAILED]
Starting multipathd daemon:                                [  OK  ]


[root@localhost ~]# ll /dev/mapper/
control  mpathb  mpathc  mpathd  VolGroup-lv_root  VolGroup-lv_swap
[root@localhost ~]# ll /dev/dm-*
/dev/dm-0  /dev/dm-1  /dev/dm-2  /dev/dm-3  /dev/dm-4

[root@localhost ~]# multipath -ll
mpathd (14f504e46494c4552666e546771342d4279354c2d4e306857) dm-4 OPNFILER,VIRTUAL-DISK
size=31G features='0' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
  |- 2:0:0:2 sdd 8:48 active ready running
  `- 3:0:0:2 sdg 8:96 active ready running
mpathc (14f504e46494c45526e6d357631562d443350302d6c4e3365) dm-3 OPNFILER,VIRTUAL-DISK
size=1.0G features='0' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
  |- 2:0:0:1 sdc 8:32 active ready running
  `- 3:0:0:1 sdf 8:80 active ready running
mpathb (14f504e46494c4552394a446839452d31514d792d64524e44) dm-2 OPNFILER,VIRTUAL-DISK
size=1.0G features='0' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
  |- 2:0:0:0 sdb 8:16 active ready running
  `- 3:0:0:0 sde 8:64 active ready running
  
 [root@localhost ~]# chkconfig --level 345 multipathd on
[root@localhost ~]# chkconfig --list | grep multipathd








他人的/etc/multipath.conf
defaults {
        udev_dir /dev
        polling_interval  10
        selector "round-robin 0"
        path_grouping_policy failover
        getuid_callout "/sbin/scsi_id -g -u -s /block/%n"
        prio_callout /bin/true
        path_checker readsector0
        rr_min_io 100
        rr_weight priorities
        failback immediate
        #no_path_retry fail
        #user_friendly_name yes
}
multipaths {
        multipath {
                wwid    3600601602d313800901aba9d7d0de411
                alias   crs
                path_grouping_policy failover
        }
        multipath {
                wwid    3600601602d313800000140cb7d0de411
                alias   data1
                path_grouping_policy failover
        }
        multipath {
                wwid    3600601602d3138005e17b6ef7d0de411
                alias   data2
                path_grouping_policy failover
        }
        multipath {
                wwid    3600601602d313800f449b27b7d0de411
                alias   data3
                path_grouping_policy failover
        }
}




centos6.5
dmsetup ls

vi /etc/udev/rules.d/12-dm-permissions.rules
ENV{DM_NAME}=="mpathb", OWNER:="grid", GROUP:="asmadmin", MODE:="660", SYMLINK+="oraasm-$env{DM_NAME}"
ENV{DM_NAME}=="mpathc", OWNER:="grid", GROUP:="asmadmin", MODE:="660", SYMLINK+="oraasm-$env{DM_NAME}"
ENV{DM_NAME}=="mpathd", OWNER:="grid", GROUP:="asmadmin", MODE:="660", SYMLINK+="oraasm-$env{DM_NAME}"

service multipathd restart

#ls -l /dev/dm*
ll /dev/oraasm*

vi /etc/rc.local 
chown -R grid:asmadmin /dev/oraasm-*
chmod 666 /dev/oraasm-*

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

相關文章