linux 儲存多路徑軟體

gxlineji發表於2016-09-06
redhat linux儲存多路徑,目前我瞭解的有兩種方式:
(1)EMC powerpath
(2) HP securepath (沒用過不做介紹)
(3)device-mapper-multipath

EMC powerpath

 優勢在於能夠實現負載均衡,而其他廠家僅支援基本故障切換。 
 但要註冊,如果不註冊,只有基本的failover功能,沒有負責均衡功能,每次重啟都要 powermt config  來使多路徑生效。
備註: CLARiiON AX 系列陣列自動識別,不需要許可證註冊

以下是一整套 PowerPath 文件集;所有手冊均由 EMC Corporation 提供,
可以自己去百度或EMC官方網找:
◆PowerPath Product Guide
◆PowerPath Quick Reference
◆PowerPath for AIX Installation and Administration Guide
◆PowerPath for HP-UX Installation and Administration Guide
◆《PowerPath for Linux 安裝指南》
◆PowerPath for Solaris Installation and Administration Guide
◆《PowerPath for Windows 安裝和管理指南》
◆EMC PowerPath for AIX Release Notes
◆EMC PowerPath for HP-UX Release Notes
◆EMC PowerPath for Solaris Release Notes
◆EMC PowerPath for Linux Release Notes
◆EMC PowerPath for Windows Release Notes


device-mapper-multipath

  linux 自帶的多路徑軟體
yum install -y device-mapper device-mapper-multipath
cp /usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf /etc/

/etc/multipath.conf 建議配置檔案:

點選(此處)摺疊或開啟

  1. # This is a basic configuration file with some examples, for device mapper
  2. # multipath.
  3. # For a complete list of the default configuration values, see
  4. # /usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf.defaults
  5. # For a list of configuration options with descriptions, see
  6. # /usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf.annotated
  7. #
  8. # REMEMBER: After updating multipath.conf, you must run
  9. #
  10. # service multipathd reload
  11. #
  12. # for the changes to take effect in multipathd
  13. ## By default, devices with vendor = "IBM" and product = "S/390.*" are
  14. ## blacklisted. To enable mulitpathing on these devies, uncomment the
  15. ## following lines.
  16. #blacklist_exceptions {
  17. # device {
  18. # vendor "IBM"
  19. # product "S/390.*"
  20. # }
  21. #}
  22. ## Use user friendly names, instead of using WWIDs as names.
  23. defaults {
  24. user_friendly_names yes
  25. }
  26. ##
  27. ## Here is an example of how to configure some standard options.
  28. ##
  29. #
  30. #defaults {
  31. # udev_dir /dev
  32. # polling_interval 10
  33. # path_selector "round-robin 0"
  34. # path_grouping_policy multibus
  35. # getuid_callout "/lib/udev/scsi_id --whitelisted --device=/dev/%n"
  36. # prio alua
  37. # path_checker readsector0
  38. # rr_min_io 100
  39. # max_fds 8192
  40. # rr_weight priorities
  41. # failback immediate
  42. # no_path_retry fail
  43. # user_friendly_names yes
  44. #}
  45. ##
  46. ## The wwid line in the following blacklist section is shown as an example
  47. ## of how to blacklist devices by wwid. The 2 devnode lines are the
  48. ## compiled in default blacklist. If you want to blacklist entire types
  49. ## of devices, such as all scsi devices, you should use a devnode line.
  50. ## However, if you want to blacklist specific devices, you should use
  51. ## a wwid line. Since there is no guarantee that a specific device will
  52. ## not change names on reboot (from /dev/sda to /dev/sdb for example)
  53. ## devnode lines are not recommended for blacklisting specific devices.
  54. ##
  55. #blacklist {
  56. # wwid 26353900f02796769
  57. # devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
  58. # devnode "^hd[a-z]"
  59. #}
  60. blacklist {
  61. devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
  62. devnode "^hd[a-z]"
  63. devnode "^cciss!c[0-9]d[0-9]*"
  64. }
  65. #multipaths {
  66. # multipath {
  67. # wwid 3600508b4000156d700012000000b0000
  68. # alias yellow
  69. # path_grouping_policy multibus
  70. # path_checker readsector0
  71. # path_selector "round-robin 0"
  72. # failback manual
  73. # rr_weight priorities
  74. # no_path_retry 5
  75. # }
  76. # multipath {
  77. # wwid 1DEC_____321816758474
  78. # alias red
  79. # }
  80. #}
  81. devices {
  82. # device {
  83. # vendor "COMPAQ "
  84. # product "HSV110 (C)COMPAQ"
  85. # path_grouping_policy multibus
  86. # getuid_callout "/lib/udev/scsi_id --whitelisted --device=/dev/%n"
  87. # path_checker readsector0
  88. # path_selector "round-robin 0"
  89. # hardware_handler "0"
  90. # failback 15
  91. # rr_weight priorities
  92. # no_path_retry queue
  93. # }
  94. # device {
  95. # vendor "COMPAQ "
  96. # product "MSA1000 "
  97. # path_grouping_policy multibus
  98. # }
  99. # Device attributed for EMC CLARiiON and VNX series ALUA
  100. device {
  101. vendor "DGC"
  102. product "*"
  103. prio_callout "/sbin/mpath_prio_alua /dev/%n"
  104. path_grouping_policy group_by_prio
  105. features "1 queue_if_no_path"
  106. failback immediate
  107. hardware_handler "1 alua"
  108. }
  109. }


service multipathd start
chkconfig multipathd on

備註:
檢視HBA卡:
cat /sys/class/fc_host/host*/node_name 

重新掃描
echo "1" > /sys/class/fc_host/host1/issue_lip
echo "- - -" > /sys/class/scsi_host/host1/scan

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

相關文章