multipath多路径就该这么配置

这篇东西确实是不太想发,因为确实没有什么内容,而且还过时了。不过今天忙到这时候才将合同修改完毕发送出去。也提不起兴趣写东西。本文纯属凑数,如果雷同,纯属巧合。

# rpm -ivh device-mapper-1.02.39-1.el5.rpm #

安装映射包

# rpm -ivh device-mapper-multipath-0.4.7-34.el5.rpm #

安装多路径

# chkconfig –

level 2345 multipathd on

#

设置成开机自启动

multipathd

# lsmod |grep dm_multipath

#

来检查安装是否正常

cat /proc/partitions

major minor #blocks name

8 32 10485760 sdc

8 33 10482381 sdc1

8 48 10485760 sdd

8 49 10482381 sdd1

8 64 10485760 sde

8 65 10482381 sde1

8 80 524288000 sdf

8 81 524281243 sdf1

8 96 524288000 sdg

8 97 524281243 sdg1

8 112 524288000 sdh

8 113 524281243 sdh1

8 128 524288000 sdi

8 129 524281243 sdi1

8 144 1073741824 sdj

8 145 1073736373 sdj1

8 160 1073741824 sdk

8 161 1073736373 sdk1

8 176 1073741824 sdl

8 177 1073736373 sdl1

8 192 1073741824 sdm

8 193 1073736373 sdm1

8 208 1073741824 sdn

8 209 1073736373 sdn1

8 224 1073741824 sdo

8 225 1073736373 sdo1

8 240 1073741824 sdp

8 241 1073736373 sdp1

linux 5:# for i in `cat /proc/partitions | awk ‘{print $4}’ |grep sd | grep [a-z]$`; do echo “### $i: `scsi_id -g -u -s /block/$i`”; done

linux 6:# for i in `cat /proc/partitions | awk ‘{print $4}’ |grep sd | grep [a-z]$`; do echo “### $i: `scsi_id –whitelisted –replace-whitespace –device=/dev/$i`”;done

### sdc: 360050768028107bd3000000000000007

### sdd: 360050768028107bd3000000000000008

### sde: 360050768028107bd3000000000000009

### sdf: 360050768028107bd300000000000000a

### sdg: 360050768028107bd300000000000000b

### sdh: 360050768028107bd300000000000000c

### sdi: 360050768028107bd300000000000000d

### sdj: 360050768028107bd300000000000000e

### sdk: 360050768028107bd300000000000000f

### sdl: 360050768028107bd3000000000000010

### sdm: 360050768028107bd3000000000000011

### sdn: 360050768028107bd3000000000000012

### sdo: 360050768028107bd3000000000000013

### sdp: 360050768028107bd3000000000000014

### sdq: 360050768028107bd3000000000000015

multipath多路径就该这么配置

cat /etc/multipath.conf

defaults {

user_friendly_names yes

}

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

}

devnode_blacklist {

devnode “^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*”

devnode “^hd[a-z]”

devnode “^cciss!c[0-9]d[0-9]*”

devnode “^sd[a-b]”

}

multipaths {

multipath {

wwid 360050768028107bd3000000000000007

alias mpath6

path_grouping_policy failover

}

multipath {

wwid 360050768028107bd3000000000000008

alias mpath7

path_grouping_policy failover

}

multipath {

wwid 360050768028107bd3000000000000009

alias mpath8

path_grouping_policy failover

}

multipath {

wwid 360050768028107bd300000000000000a

alias FRA1

path_grouping_policy failover

}

multipath {

wwid 360050768028107bd300000000000000b

alias FRA2

path_grouping_policy failover

}

multipath {

wwid 360050768028107bd300000000000000c

alias FRA3

path_grouping_policy failover

}

multipath {

wwid 360050768028107bd300000000000000d

alias FRA4

path_grouping_policy failover

}

multipath {

wwid 360050768028107bd300000000000000e

alias DATA1

path_grouping_policy failover

}

multipath {

wwid 360050768028107bd300000000000000f

alias DATA2

path_grouping_policy failover

}

multipath {

wwid 360050768028107bd3000000000000010

alias DATA3

path_grouping_policy failover

}

multipath {

wwid 360050768028107bd3000000000000011

alias DATA4

path_grouping_policy failover

}

multipath {

wwid 360050768028107bd3000000000000012

alias DATA5

path_grouping_policy failover

}

multipath {

wwid 360050768028107bd3000000000000013

alias DATA6

path_grouping_policy failover

}

multipath {

wwid 360050768028107bd3000000000000014

alias DATA7

path_grouping_policy failover

}

multipath {

wwid 360050768028107bd3000000000000015

alias DATA8

path_grouping_policy failover

}

}

multipath -F

multipath -v2

multipath -v3

multipath -ll

原创文章,作者:shengbao,如若转载,请注明出处:https://baogebiji.com/242.html

发表评论

电子邮件地址不会被公开。