DM-Multipathing ‘e o failover e balanceamento de carga no Linux para dispositivos de bloco. Com a utilização de dispositivo mapper, multipathd fornece a lógica do lado do host para utilizar múltiplos caminhos de uma rede redundante para fornecer conectividade contínua disponibilidade e maior largura de banda entre o servidor host e o dispositivo de nível de bloco, faz também o balanceamento de carga no I/O para caminhos alternativos caso venha a falhar, caminhos estes que normalmente são Fibre Channel (FC) para redes SAN.
Ao reiniciar o serviço do multipatchd vai se criar um arquivo chamado “/etc/multipath_bindings” caso este arquivo não exista ele deve ser localizado em “/var/lib/multipath/bindings”, ressaltando que este arquivo deve estar igual nos dois servidores, caso não esteja este arquivo deve ser copiado para o servidor redundante.
apos isso reinicie o serviço e coloque o serviço na inicialização do linux.
Links uteis
http://www.linuxcertif.com/man/5/multipath.conf/
http://docs.redhat.com/docs/pt-BR/Red_Hat_Enterprise_Linux/6/html/DM_Multipath/mpio_setup.html
segue um exemplo do arquivo para storage HP
### Donot edit the first two lines of this file or remove this file
### HP Device Mapper Multipath Enablement Kit v4.4.1
### The Device Mapper Multipath Template configuration file for RHEL5U4
### or later releases to be used with HP Storageworks Arrays.
### Use this configuration file as your /etc/multipath.conf file.
### If you already have a valid working configuration file, refer here
### for the recommended configuration for HP arrays.
### For a list of configuration options with descriptions, please refer
### to /usr/share/doc/<multipath-tools-version>/multipath.conf.annotated
# The defaults section
defaults {
udev_dir /dev
polling_interval 10
selector “round-robin 0”
path_grouping_policy failover
getuid_callout “/sbin/scsi_id -g -u -n -s /block/%n”
prio_callout “/bin/true”
path_checker tur
rr_min_io 100
rr_weight uniform
failback immediate
no_path_retry 12
user_friendly_names yes
bindings_file “/etc/multipath_bindings”
}
# 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 {
# uncomment the multipath block to modify the settings of a multipath device
# based on its wwid
#multipath {
# wwid 2039485769900000000
# alias red
# path_grouping_policy group_by_prio
# path_selector “round-robin 0”
# failback immediate
# rr_weight uniform
# no_path_retry 10
# rr_min_io 100
#}
#}
# The devices section – used to define per storage array model settings
devices {
# If you are already using a valid configuration file and do not have a
# device subsection for HP arrays, please add the appropriate device subsection
# for the respective arrays from the entries below.
# If you already have a device subsection for HP arrays which has different
# parameters from the entries below, modify it appropriately.
# For EVA A/A arrays
device {
vendor “HP|COMPAQ”
product “HSV1[01]1 (C)COMPAQ|HSV2[01]0|HSV300|HSV4[05]0”
path_grouping_policy group_by_prio
getuid_callout “/sbin/scsi_id -g -u -s /block/%n”
path_checker tur
path_selector “round-robin 0”
prio_callout “/sbin/mpath_prio_alua /dev/%n”
rr_weight uniform
failback immediate
hardware_handler “0”
no_path_retry 18
rr_min_io 100
}
# For HP P2000 family
device {
vendor “HP”
product “P2000 G3 FC|P2000G3 FC/iSCSI”
path_grouping_policy group_by_prio
getuid_callout “/sbin/scsi_id -g -u -s /block/%n”
path_checker tur
path_selector “round-robin 0”
prio_callout “/sbin/mpath_prio_alua /dev/%n”
rr_weight uniform
failback immediate
hardware_handler “0”
no_path_retry 18
rr_min_io 100
}
# For XP arrays
device {
vendor “HP”
product “OPEN-.*”
path_grouping_policy multibus
getuid_callout “/sbin/scsi_id -g -u -s /block/%n”
path_selector “round-robin 0”
rr_weight uniform
path_checker tur
hardware_handler “0”
failback immediate
no_path_retry 18
rr_min_io 1000
}
# For MSA A/A arrays
device {
vendor “HP”
product “MSA VOLUME*”
path_grouping_policy group_by_prio
getuid_callout “/sbin/scsi_id -g -u -s /block/%n”
path_checker tur
path_selector “round-robin 0”
prio_callout “/sbin/mpath_prio_alua /dev/%n”
rr_weight uniform
failback immediate
hardware_handler “0”
no_path_retry 18
rr_min_io 100
}
# For MSA2xxxsa arrays
device {
vendor “HP”
product “MSA2012sa|MSA2312sa|MSA2324sa”
path_grouping_policy group_by_prio
getuid_callout “/sbin/scsi_id -g -u -n -s /block/%n”
path_checker tur
path_selector “round-robin 0”
prio_callout “/sbin/mpath_prio_alua %d”
rr_weight uniform
failback immediate
hardware_handler “0”
no_path_retry 18
rr_min_io 100
}
# For MSA23xxfc and MSA23xxi arrays
device {
vendor “HP”
product “MSA2312fc|MSA2324fc|MSA2312i|MSA2324i”
path_grouping_policy group_by_prio
getuid_callout “/sbin/scsi_id -g -u -s /block/%n”
path_checker tur
path_selector “round-robin 0”
prio_callout “/sbin/mpath_prio_alua /dev/%n”
rr_weight uniform
failback immediate
hardware_handler “0”
no_path_retry 18
rr_min_io 100
}
# For MSA20xxfc, MSA22xxfc and MSA20xxi arrays
device {
vendor “HP”
product “MSA2[02]12fc|MSA2012i”
path_grouping_policy multibus
getuid_callout “/sbin/scsi_id -g -u -s /block/%n”
path_selector “round-robin 0”
rr_weight uniform
path_checker tur
hardware_handler “0”
failback immediate
no_path_retry 18
rr_min_io 100
}
# To blacklist a device by vendor and product say, to blacklist a XP device
# uncomment the below block
#device {
# vendor “HP”
# product_blacklist “OPEN-.*”
#}
}