Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

第 3 章 安​​​​​​​装​​​​​​​ DM-Multipath

本​​​​​​​章​​​​​​​提​​​​​​​供​​​​​​​了​​​​​​​配​​​​​​​置​​​​​​​ DM-Multipath 的​​​​​​​分​​​​​​​步​​​​​​​示​​​​​​​例​​​​​​​,其​​​​​​​中​​​​​​​包​​​​​​​括​​​​​​​以​​​​​​​下​​​​​​​步​​​​​​​骤​​​​​​​:
  • 基​​​​​​​本​​​​​​​ DM-Multipath 安​​​​​​​装​​​​​​​
  • 忽​​​​​​​略​​​​​​​本​​​​​​​地​​​​​​​磁​​​​​​​盘​​​​​​​
  • 在​​​​​​​配​​​​​​​置​​​​​​​文​​​​​​​件​​​​​​​中​​​​​​​添​​​​​​​加​​​​​​​更​​​​​​​多​​​​​​​设​​​​​​​备​​​​​​​

3.1. 安​​​​​​​装​​​​​​​ DM-Multipath

在​​​​​​​您​​​​​​​的​​​​​​​系​​​​​​​统​​​​​​​中​​​​​​​安​​​​​​​装​​​​​​​ DM-Multipath 前​​​​​​​,请​​​​​​​确​​​​​​​定​​​​​​​您​​​​​​​的​​​​​​​系​​​​​​​统​​​​​​​已​​​​​​​经​​​​​​​进​​​​​​​行​​​​​​​了​​​​​​​升​​​​​​​级​​​​​​​,其​​​​​​​中​​​​​​​包​​​​​​​括​​​​​​​对​​​​​​​ device-mapper-multipath 软​​​​​​​件​​​​​​​包​​​​​​​的​​​​​​​升​​​​​​​级​​​​​​​。​​​​​​​
使​​​​​​​用​​​​​​​以​​​​​​​下​​​​​​​步​​​​​​​骤​​​​​​​为​​​​​​​基​​​​​​​本​​​​​​​出​​​​​​​错​​​​​​​冗​​​​​​​余​​​​​​​配​​​​​​​置​​​​​​​安​​​​​​​装​​​​​​​ DM-Multipath。​​​​​​​
  1. 通​​​​​​​过​​​​​​​注​​​​​​​释​​​​​​​出​​​​​​​ /etc/multipath.conf 文​​​​​​​件​​​​​​​的​​​​​​​开​​​​​​​始​​​​​​​几​​​​​​​行​​​​​​​来​​​​​​​编​​​​​​​辑​​​​​​​该​​​​​​​文​​​​​​​件​​​​​​​。​​​​​​​配​​​​​​​置​​​​​​​文​​​​​​​件​​​​​​​的​​​​​​​这​​​​​​​一​​​​​​​部​​​​​​​分​​​​​​​在​​​​​​​开​​​​​​​始​​​​​​​的​​​​​​​时​​​​​​​候​​​​​​​是​​​​​​​将​​​​​​​所​​​​​​​有​​​​​​​设​​​​​​​备​​​​​​​都​​​​​​​列​​​​​​​入​​​​​​​黑​​​​​​​名​​​​​​​单​​​​​​​的​​​​​​​。​​​​​​​您​​​​​​​必​​​​​​​须​​​​​​​将​​​​​​​其​​​​​​​注​​​​​​​释​​​​​​​出​​​​​​​来​​​​​​​以​​​​​​​便​​​​​​​启​​​​​​​用​​​​​​​多​​​​​​​路​​​​​​​径​​​​​​​。​​​​​​​
    blacklist {
            devnode "*"
    }
    
    注​​​​​​​释​​​​​​​出​​​​​​​这​​​​​​​些​​​​​​​行​​​​​​​以​​​​​​​后​​​​​​​,这​​​​​​​部​​​​​​​分​​​​​​​的​​​​​​​形​​​​​​​式​​​​​​​如​​​​​​​下​​​​​​​。​​​​​​​
    # blacklist {
    #        devnode "*"
    # }
    
  2. DM-Multipath 的​​​​​​​默​​​​​​​认​​​​​​​设​​​​​​​置​​​​​​​已​​​​​​​经​​​​​​​被​​​​​​​编​​​​​​​译​​​​​​​到​​​​​​​系​​​​​​​统​​​​​​​中​​​​​​​,且​​​​​​​无​​​​​​​需​​​​​​​在​​​​​​​ /etc/multipath.conf 文​​​​​​​件​​​​​​​中​​​​​​​特​​​​​​​别​​​​​​​指​​​​​​​出​​​​​​​。​​​​​​​
    The default value of path_grouping_policy is set to failover, so in this example you do not need to change the default value. For information on changing the values in the configuration file to something other than the defaults, see 第 4 章 DM-Multipath 配​​​​​​​置​​​​​​​文​​​​​​​件​​​​​​​.
    在​​​​​​​您​​​​​​​系​​​​​​​统​​​​​​​配​​​​​​​置​​​​​​​文​​​​​​​件​​​​​​​的​​​​​​​初​​​​​​​始​​​​​​​默​​​​​​​认​​​​​​​部​​​​​​​分​​​​​​​,多​​​​​​​路​​​​​​​径​​​​​​​设​​​​​​​备​​​​​​​名​​​​​​​称​​​​​​​的​​​​​​​格​​​​​​​式​​​​​​​为​​​​​​​ mpathn;如​​​​​​​果​​​​​​​没​​​​​​​有​​​​​​​这​​​​​​​个​​​​​​​设​​​​​​​置​​​​​​​,多​​​​​​​路​​​​​​​径​​​​​​​设​​​​​​​备​​​​​​​的​​​​​​​名​​​​​​​称​​​​​​​将​​​​​​​会​​​​​​​是​​​​​​​该​​​​​​​设​​​​​​​备​​​​​​​ WWID 别​​​​​​​名​​​​​​​。​​​​​​​
  3. 保​​​​​​​存​​​​​​​配​​​​​​​置​​​​​​​文​​​​​​​件​​​​​​​并​​​​​​​退​​​​​​​出​​​​​​​编​​​​​​​辑​​​​​​​器​​​​​​​。​​​​​​​
  4. 执​​​​​​​行​​​​​​​以​​​​​​​下​​​​​​​命​​​​​​​令​​​​​​​:
    modprobe dm-multipath
    service multipathd start
    multipath -v2
    
    multipath -v2 命​​​​​​​令​​​​​​​输​​​​​​​出​​​​​​​多​​​​​​​路​​​​​​​径​​​​​​​设​​​​​​​备​​​​​​​的​​​​​​​路​​​​​​​径​​​​​​​来​​​​​​​显​​​​​​​示​​​​​​​哪​​​​​​​些​​​​​​​设​​​​​​​备​​​​​​​是​​​​​​​多​​​​​​​路​​​​​​​径​​​​​​​设​​​​​​​备​​​​​​​。​​​​​​​如​​​​​​​果​​​​​​​没​​​​​​​有​​​​​​​输​​​​​​​出​​​​​​​任​​​​​​​何​​​​​​​结​​​​​​​果​​​​​​​,请​​​​​​​确​​​​​​​定​​​​​​​正​​​​​​​确​​​​​​​调​​​​​​​试​​​​​​​了​​​​​​​所​​​​​​​有​​​​​​​ SAN 连​​​​​​​接​​​​​​​并​​​​​​​使​​​​​​​系​​​​​​​统​​​​​​​多​​​​​​​路​​​​​​​径​​​​​​​。​​​​​​​
    For further information on the multipath command output, see 第 5.4 节 “Multipath Command Output”.
  5. 执​​​​​​​行​​​​​​​以​​​​​​​下​​​​​​​命​​​​​​​令​​​​​​​以​​​​​​​确​​​​​​​定​​​​​​​在​​​​​​​引​​​​​​​导​​​​​​​时​​​​​​​启​​​​​​​动​​​​​​​了​​​​​​​多​​​​​​​路​​​​​​​径​​​​​​​守​​​​​​​护​​​​​​​进​​​​​​​程​​​​​​​:
    chkconfig multipathd on
    
Since the value of user_friendly_name is set to yes in the configuration file the multipath devices will be created as /dev/mapper/mpathn. For information on setting the name of the device to an alias of your choosing, see 第 4 章 DM-Multipath 配​​​​​​​置​​​​​​​文​​​​​​​件​​​​​​​.