Configure Multipath devices
3.15Â Configure multipath devices
3.15.1Â Generate device list
On each node execute the following command to retrieve the ww id’s for the scsi devices.
for i in `cat /proc/partitions | awk ‘{print $4}’ | grep sd`; do echo “### $i: `scsi_id -g -u -s /block/$i`”; done
n.b. Note the backward quotes in the command ` as these are not quotes ‘
e.g.
# for i in `cat /proc/partitions | awk ‘{print $4}’ | grep sd`; do echo “### $i: `scsi_id -g -u -s /block/$i`”; done
### sda: 360060e801530ca00000130ca00003c16
### sdb: 360060e801530ca00000130ca00003c17
### sdc: 360060e801530ca00000130ca00003c18
### sdd: 360060e801530ca00000130ca00003c19
### sde: 360060e801530ca00000130ca00003c1a
### sdf: 360060e801530ca00000130ca00003c00
### sdg: 360060e801530ca00000130ca00003c01
### sdh: 360060e801530ca00000130ca00003c38
### sdi: 360060e801530ca00000130ca00003c39
### sdj: 360060e801530ca00000130ca00003c04
### sdk: 360060e801530ca00000130ca00003c05
### sdl: 360060e801530ca00000130ca00003c06
### sdm: 360060e801530ca00000130ca00003c07
### sdn: 360060e801530ca00000130ca00003c3e
### sdo: 360060e801530ca00000130ca00003c3f
### sdp: 360060e801530ca00000130ca00003c44
### sdq: 360060e801530ca00000130ca00003d0c
### sdr: 360060e801530ca00000130ca00003d0d
### sds: 360060e801530ca00000130ca00003d0e
### sdt: 360060e801530ca00000130ca00003d0f
### sdu: 360060e801530ca00000130ca00003d10
### sdv: 360060e801530ca00000130ca00003c16
### sdw: 360060e801530ca00000130ca00003c17
### sdx: 360060e801530ca00000130ca00003c18
### sdy: 360060e801530ca00000130ca00003c19
### sdz: 360060e801530ca00000130ca00003c1a
### sdaa: 360060e801530ca00000130ca00003c00
### sdab: 360060e801530ca00000130ca00003c01
### sdac: 360060e801530ca00000130ca00003c38
### sdad: 360060e801530ca00000130ca00003c39
### sdae: 360060e801530ca00000130ca00003c04
### sdaf: 360060e801530ca00000130ca00003c05
### sdag: 360060e801530ca00000130ca00003c06
### sdah: 360060e801530ca00000130ca00003c07
### sdai: 360060e801530ca00000130ca00003c3e
### sdaj: 360060e801530ca00000130ca00003c3f
### sdak: 360060e801530ca00000130ca00003c44
### sdal: 360060e801530ca00000130ca00003d0c
### sdam: 360060e801530ca00000130ca00003d0d
### sdan: 360060e801530ca00000130ca00003d0e
### sdao: 360060e801530ca00000130ca00003d0f
### sdap: 360060e801530ca00000130ca00003d10
From this list we can see that sdv to sdap are the same devices as sda to sdu
Executing the command “cat /proc/partitions†we can determine the size of each device; e.g.
# cat /proc/partitions
major minor   #blocks name
 104      0  71652960 cciss/c0d0
 104      1      104391 cciss/c0d0p1
 104      2  71545477 cciss/c0d0p2
    8      0    5268480 sda
    8    16    5268480 sdb
    8    32    5268480 sdc
    8    48    5268480 sdd
    8    64    5268480 sde
    8    80    5268480 sdf
    8    96    5268480 sdg
    8  112    5268480 sdh
    8  128    5268480 sdi
    8  144    5268480 sdj
    8  160    5268480 sdk
    8  176    5268480 sdl
    8  192    5268480 sdm
    8  208    5268480 sdn
    8  224    5268480 sdo
    8  240    5268480 sdp
  65      0    1053696 sdq
  65    16    1053696 sdr
  65    32    1053696 sds
  65    48    1053696 sdt
  65    64    1053696 sdu
For our purposes we know that the 1Gb volumes are the OCR and Voting disks and the 5Gb volumes are to be used for ASM.
Therefore we can map:
sda to sdp     to asm volumes 1 to 16
sdq and sdr   to ocr1 and ocr2
sds, sdt, sdu to vote1, vote2 and vote3
3.15.2Â Configure multipath.conf
Edit /etc/multipath.conf to map the scsi ids to asm disk alias’s
This is a sample multipath.conf originally from HP and modified for one of our clusters.
The points to note are that we should
• Comment out the blacklist section
• Add the multipath configuration
:
:
# The blacklist section – use this to blacklist a multipath device based on
# it’s wwid ( using wwid ) or device names ( using devnode ) or
# vendor and product id ( using device block).
blacklist {
#      wwid           26353900f02796769
##     devnode        “^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*”
##     devnode        “^hd[a-z][[0-9]*]”
#      devnode        “^cciss!c[0-9]d[0-9]*”
#Â Â Â Â Â Â device {
#Â Â Â Â Â Â Â Â Â Â Â Â Â Â vendor “HP”
#Â Â Â Â Â Â Â Â Â Â Â Â Â Â product “OPEN-*”
#Â Â Â Â Â Â }
}
# The blacklist_exceptions section – to list device names to be treated
# as multipath candidates even if they are on the blacklist.
# Note: blacklist exceptions are only valid in the same class.
#Â Â Â Â Â Â It is not possible to blacklist devices using the devnode keyword
#Â Â Â Â Â Â and to exclude some devices of them using the wwid keyword.
#blacklist_exceptions {
#      wwid           2345234245647657
#      devnode        “sda”
#Â Â Â Â Â Â device {
#              vendor “HP”
#Â Â Â Â Â Â Â Â Â Â Â Â Â Â product “OPEN-*”
#Â Â Â Â Â Â }
#}
# The multipaths section – uncomment this section to define a per multipath
# device settings.
multipaths {
multipath {
       wwid   360060e801530ca00000130ca00003c16
       alias                  ASM1
       path_grouping_policy   multibus
       path_checker           tur
       path_selector          “round-robin 0”
}
multipath {
       wwid   360060e801530ca00000130ca00003c17
       alias                  ASM2
       path_grouping_policy   multibus
       path_checker           tur
       path_selector          “round-robin 0”
}
:
:
multipath {
       wwid   360060e801530ca00000130ca00003d0e
       alias                  OCR1
       path_grouping_policy   multibus
       path_checker           tur
       path_selector          “round-robin 0”
}
:
:
multipath {
       wwid   360060e801530ca00000130ca00003d10
       alias                  VOTE1
       path_grouping_policy   multibus
       path_checker           tur
       path_selector          “round-robin 0”
}
:
:
}
# The devices section – used to define per storage array model settings
:
#
Copy this file to /etc/multipath.conf on each of the cluster nodes.
3.15.3Â Execute multipath
Execute the following commands:
# multipath -v2
# multipath –ll
The devices will now be listed in /dev/mapper
Discussion ¬