运维联盟俱乐部

 找回密码
 立即注册
查看: 2291|回复: 0

rhel7.6配置multipath

[复制链接]
  • TA的每日心情
    开心
    2023-8-9 11:05
  • 发表于 2020-7-9 21:37:25 | 显示全部楼层 |阅读模式
    [root@localhost ~]# cat /etc/redhat-release
    Red Hat Enterprise Linux Server release 7.6 (Maipo)

    [root@localhost ~]# yum install -y device-mapper device-mapper-multipath


    [root@localhost ~]# rpm -qa | grep mapper
    device-mapper-multipath-libs-0.4.9-123.el7.x86_64
    device-mapper-event-libs-1.02.149-8.el7.x86_64
    device-mapper-persistent-data-0.7.3-3.el7.x86_64
    device-mapper-libs-1.02.149-8.el7.x86_64
    device-mapper-event-1.02.149-8.el7.x86_64
    device-mapper-multipath-0.4.9-123.el7.x86_64
    device-mapper-1.02.149-8.el7.x86_64

    [root@localhost ~]# mpathconf --enbale
    1. [root@localhost ~]# cat /etc/multipath.conf
    2. blacklist {

    3. devnode "^sda"

    4. }

    5. defaults {

    6. user_friendly_names yes

    7. path_grouping_policy multibus

    8. failback immediate

    9. no_path_retry fail

    10. }
    复制代码

    [root@localhost ~]# service multipathd status
    1. Redirecting to /bin/systemctl status multipathd.service
    2. ● multipathd.service - Device-Mapper Multipath Device Controller
    3.    Loaded: loaded (/usr/lib/systemd/system/multipathd.service; enabled; vendor preset: enabled)
    4.    Active: active (running) since 四 2020-07-09 20:46:17 CST; 47min ago
    5.   Process: 107103 ExecStart=/sbin/multipathd (code=exited, status=0/SUCCESS)
    6.   Process: 107100 ExecStartPre=/sbin/multipath -A (code=exited, status=0/SUCCESS)
    7.   Process: 107096 ExecStartPre=/sbin/modprobe dm-multipath (code=exited, status=0/SUCCESS)
    8. Main PID: 107106 (multipathd)
    9.    CGroup: /system.slice/multipathd.service
    10.            └─107106 /sbin/multipathd

    11. 7月 09 20:46:17 localhost.localdomain multipathd[107106]: mpathk: event checker started
    12. 7月 09 20:46:17 localhost.localdomain multipathd[107106]: mpathl: event checker started
    13. 7月 09 20:46:17 localhost.localdomain multipathd[107106]: mpathm: event checker started
    14. 7月 09 20:46:17 localhost.localdomain multipathd[107106]: mpathn: event checker started
    15. 7月 09 20:46:17 localhost.localdomain multipathd[107106]: mpatho: event checker started
    16. 7月 09 20:46:17 localhost.localdomain multipathd[107106]: mpathp: event checker started
    17. 7月 09 20:46:17 localhost.localdomain multipathd[107106]: mpathq: event checker started
    18. 7月 09 20:46:17 localhost.localdomain multipathd[107106]: mpathr: event checker started
    19. 7月 09 20:46:17 localhost.localdomain multipathd[107106]: mpaths: event checker started
    20. 7月 09 20:46:17 localhost.localdomain multipathd[107106]: path checkers start up
    复制代码

    [root@localhost ~]# echo "- - -" > /sys/class/scsi_host/host0/scan


    [root@localhost ~]# multipath -ll

    1. mpathr (364467471006c366f06c588cd00000029) dm-21 HUAWEI  ,XSG1            
    2. size=500G features='0' hwhandler='0' wp=rw
    3. |-+- policy='service-time 0' prio=50 status=active
    4. | |- 0:0:3:8   sddy 128:0   active ready running
    5. | |- 17:0:3:8  sdeb 128:48  active ready running
    6. | `- 18:0:2:8  sdbn 68:16   active ready running
    7. `-+- policy='service-time 0' prio=10 status=enabled
    8.   |- 0:0:0:8   sdcp 69:208  active ready running
    9.   |- 16:0:0:8  sdj  8:144   active ready running
    10.   `- 17:0:0:8  sdcm 69:160  active ready running
    11. mpathe (364467471006c366f06c5ddaa0000002e) dm-8 HUAWEI  ,XSG1            
    12. size=1.0T features='0' hwhandler='0' wp=rw
    13. |-+- policy='service-time 0' prio=50 status=active
    14. | |- 0:0:0:13  sdcy 70:96   active ready running
    15. | |- 16:0:0:13 sdo  8:224   active ready running
    16. | `- 17:0:0:13 sdcx 70:80   active ready running
    17. `-+- policy='service-time 0' prio=10 status=enabled
    18.   |- 0:0:3:13  sdei 128:160 active ready running
    19.   |- 17:0:3:13 sdel 128:208 active ready running
    20.   `- 18:0:2:13 sdbs 68:96   active ready running
    21. mpathq (364467471006c366f06c588a400000028) dm-20 HUAWEI  ,XSG1            
    22. size=500G features='0' hwhandler='0' wp=rw
    23. |-+- policy='service-time 0' prio=50 status=active
    24. | |- 0:0:0:7   sdcn 69:176  active ready running
    25. | |- 16:0:0:7  sdi  8:128   active ready running
    26. | `- 17:0:0:7  sdck 69:128  active ready running
    27. `-+- policy='service-time 0' prio=10 status=enabled
    28.   |- 0:0:3:7   sddx 71:240  active ready running
    29.   |- 17:0:3:7  sddz 128:16  active ready running
    30.   `- 18:0:2:7  sdbm 68:0    active ready running
    31. mpathd (364467471006c366f06c589820000002d) dm-7 HUAWEI  ,XSG1            
    32. size=500G features='0' hwhandler='0' wp=rw
    33. |-+- policy='service-time 0' prio=50 status=active
    34. | |- 0:0:3:12  sdeg 128:128 active ready running
    35. | |- 17:0:3:12 sdej 128:176 active ready running
    36. | `- 18:0:2:12 sdbr 68:80   active ready running
    37. `-+- policy='service-time 0' prio=10 status=enabled
    38.   |- 0:0:0:12  sdcw 70:64   active ready running
    39.   |- 16:0:0:12 sdn  8:208   active ready running
    40.   `- 17:0:0:12 sdcv 70:48   active ready running
    41. mpathp (364467471006c366f06c5887b00000027) dm-19 HUAWEI  ,XSG1            
    42. size=500G features='0' hwhandler='0' wp=rw
    43. |-+- policy='service-time 0' prio=50 status=active
    44. | |- 0:0:3:6   sddv 71:208  active ready running
    45. | |- 16:0:2:6  sdz  65:144  active ready running
    46. | |- 17:0:3:6  sddw 71:224  active ready running
    47. | `- 18:0:2:6  sdbl 67:240  active ready running
    48. `-+- policy='service-time 0' prio=10 status=enabled
    49.   |- 0:0:0:6   sdcl 69:144  active ready running
    50.   |- 16:0:0:6  sdh  8:112   active ready running
    51.   `- 17:0:0:6  sdci 69:96   active ready running
    52. mpathc (364467471006c366f06c589570000002c) dm-6 HUAWEI  ,XSG1            
    53. size=500G features='0' hwhandler='0' wp=rw
    54. |-+- policy='service-time 0' prio=50 status=active
    55. | |- 0:0:0:11  sdcu 70:32   active ready running
    56. | |- 16:0:0:11 sdm  8:192   active ready running
    57. | `- 17:0:0:11 sdct 70:16   active ready running
    58. `-+- policy='service-time 0' prio=10 status=enabled
    59.   |- 0:0:3:11  sdee 128:96  active ready running
    60.   |- 17:0:3:11 sdeh 128:144 active ready running
    61.   `- 18:0:2:11 sdbq 68:64   active ready running
    62. mpatho (364467471006c366f06c5883c00000026) dm-18 HUAWEI  ,XSG1            
    63. size=500G features='0' hwhandler='0' wp=rw
    64. |-+- policy='service-time 0' prio=50 status=active
    65. | |- 0:0:0:5   sdcj 69:112  active ready running
    66. | |- 16:0:0:5  sdg  8:96    active ready running
    67. | `- 17:0:0:5  sdch 69:80   active ready running
    68. `-+- policy='service-time 0' prio=10 status=enabled
    69.   |- 0:0:3:5   sddt 71:176  active ready running
    70.   |- 16:0:2:5  sdy  65:128  active ready running
    71.   |- 17:0:3:5  sddu 71:192  active ready running
    72.   `- 18:0:2:5  sdbk 67:224  active ready running
    73. mpathb (364467471006c366f06c589290000002b) dm-5 HUAWEI  ,XSG1            
    74. size=500G features='0' hwhandler='0' wp=rw
    75. |-+- policy='service-time 0' prio=50 status=active
    76. | |- 0:0:3:10  sdec 128:64  active ready running
    77. | |- 17:0:3:10 sdef 128:112 active ready running
    78. | `- 18:0:2:10 sdbp 68:48   active ready running
    79. `-+- policy='service-time 0' prio=10 status=enabled
    80.   |- 0:0:0:10  sdcs 70:0    active ready running
    81.   |- 16:0:0:10 sdl  8:176   active ready running
    82.   `- 17:0:0:10 sdcr 69:240  active ready running
    83. mpathn (364467471006c366f06c4ff0b00000025) dm-17 HUAWEI  ,XSG1            
    84. size=50G features='0' hwhandler='0' wp=rw
    85. |-+- policy='service-time 0' prio=50 status=active
    86. | |- 0:0:3:4   sddr 71:144  active ready running
    87. | |- 16:0:2:4  sdx  65:112  active ready running
    88. | |- 17:0:3:4  sdds 71:160  active ready running
    89. | `- 18:0:2:4  sdbj 67:208  active ready running
    90. `-+- policy='service-time 0' prio=10 status=enabled
    91.   |- 0:0:0:4   sdcg 69:64   active ready running
    92.   |- 16:0:0:4  sdf  8:80    active ready running
    93.   `- 17:0:0:4  sdcf 69:48   active ready running
    94. mpatha (364467471006c366f06c4a99400000022) dm-4 HUAWEI  ,XSG1            
    95. size=10G features='0' hwhandler='0' wp=rw
    96. |-+- policy='service-time 0' prio=50 status=active
    97. | |- 0:0:0:1   sdca 68:224  active ready running
    98. | |- 16:0:0:1  sdc  8:32    active ready running
    99. | `- 17:0:0:1  sdbz 68:208  active ready running
    100. `-+- policy='service-time 0' prio=10 status=enabled
    101.   |- 0:0:3:1   sddl 71:48   active ready running
    102.   |- 16:0:2:1  sdu  65:64   active ready running
    103.   |- 17:0:3:1  sddm 71:64   active ready running
    104.   `- 18:0:2:1  sdbg 67:160  active ready running
    105. mpathm (364467471006c366f06c4e1f700000024) dm-16 HUAWEI  ,XSG1            
    106. size=10G features='0' hwhandler='0' wp=rw
    107. |-+- policy='service-time 0' prio=50 status=active
    108. | |- 0:0:0:3   sdce 69:32   active ready running
    109. | |- 16:0:0:3  sde  8:64    active ready running
    110. | `- 17:0:0:3  sdcd 69:16   active ready running
    111. `-+- policy='service-time 0' prio=10 status=enabled
    112.   |- 0:0:3:3   sddp 71:112  active ready running
    113.   |- 16:0:2:3  sdw  65:96   active ready running
    114.   |- 17:0:3:3  sddq 71:128  active ready running
    115.   `- 18:0:2:3  sdbi 67:192  active ready running
    116. mpathl (364467471006c366f06c4c93100000023) dm-15 HUAWEI  ,XSG1            
    117. size=10G features='0' hwhandler='0' wp=rw
    118. |-+- policy='service-time 0' prio=50 status=active
    119. | |- 0:0:3:2   sddn 71:80   active ready running
    120. | |- 16:0:2:2  sdv  65:80   active ready running
    121. | |- 17:0:3:2  sddo 71:96   active ready running
    122. | `- 18:0:2:2  sdbh 67:176  active ready running
    123. `-+- policy='service-time 0' prio=10 status=enabled
    124.   |- 0:0:0:2   sdcc 69:0    active ready running
    125.   |- 16:0:0:2  sdd  8:48    active ready running
    126.   `- 17:0:0:2  sdcb 68:240  active ready running
    127. mpathk (364467471006c366f06c609a700000034) dm-14 HUAWEI  ,XSG1            
    128. size=1.0T features='0' hwhandler='0' wp=rw
    129. |-+- policy='service-time 0' prio=50 status=active
    130. | |- 0:0:0:19  sddj 71:16   active ready running
    131. | |- 16:0:0:19 sdt  65:48   active ready running
    132. | |- 17:0:0:19 sddk 71:32   active ready running
    133. | `- 18:0:0:19 sdbf 67:144  active ready running
    134. `-+- policy='service-time 0' prio=10 status=enabled
    135.   |- 0:0:3:19  sdev 129:112 active ready running
    136.   |- 17:0:3:19 sdew 129:128 active ready running
    137.   `- 18:0:2:19 sdby 68:192  active ready running
    138. mpathj (364467471006c366f06c6097800000033) dm-13 HUAWEI  ,XSG1            
    139. size=1.0T features='0' hwhandler='0' wp=rw
    140. |-+- policy='service-time 0' prio=50 status=active
    141. | |- 0:0:3:18  sdes 129:64  active ready running
    142. | |- 17:0:3:18 sdeu 129:96  active ready running
    143. | `- 18:0:2:18 sdbx 68:176  active ready running
    144. `-+- policy='service-time 0' prio=10 status=enabled
    145.   |- 0:0:0:18  sddh 70:240  active ready running
    146.   |- 16:0:0:18 sds  65:32   active ready running
    147.   |- 17:0:0:18 sddi 71:0    active ready running
    148.   `- 18:0:0:18 sdbe 67:128  active ready running
    149. mpathi (364467471006c366f06c6093400000032) dm-12 HUAWEI  ,XSG1            
    150. size=1.0T features='0' hwhandler='0' wp=rw
    151. |-+- policy='service-time 0' prio=50 status=active
    152. | |- 0:0:0:17  sddg 70:224  active ready running
    153. | |- 16:0:0:17 sdb  8:16    active ready running
    154. | |- 17:0:0:17 sddf 70:208  active ready running
    155. | `- 18:0:0:17 sdbd 67:112  active ready running
    156. `-+- policy='service-time 0' prio=10 status=enabled
    157.   |- 0:0:3:17  sder 129:48  active ready running
    158.   |- 17:0:3:17 sdet 129:80  active ready running
    159.   `- 18:0:2:17 sdbw 68:160  active ready running
    160. mpathh (364467471006c366f06c608ff00000031) dm-11 HUAWEI  ,XSG1            
    161. size=1.0T features='0' hwhandler='0' wp=rw
    162. |-+- policy='service-time 0' prio=50 status=active
    163. | |- 0:0:3:16  sdeo 129:0   active ready running
    164. | |- 17:0:3:16 sdeq 129:32  active ready running
    165. | `- 18:0:2:16 sdbv 68:144  active ready running
    166. `-+- policy='service-time 0' prio=10 status=enabled
    167.   |- 0:0:0:16  sdde 70:192  active ready running
    168.   |- 16:0:0:16 sdr  65:16   active ready running
    169.   |- 17:0:0:16 sddd 70:176  active ready running
    170.   `- 18:0:0:16 sdbc 67:96   active ready running
    171. mpathg (364467471006c366f06c5dede00000030) dm-10 HUAWEI  ,XSG1            
    172. size=1.0T features='0' hwhandler='0' wp=rw
    173. |-+- policy='service-time 0' prio=50 status=active
    174. | |- 0:0:0:15  sddc 70:160  active ready running
    175. | |- 16:0:0:15 sdq  65:0    active ready running
    176. | |- 17:0:0:15 sddb 70:144  active ready running
    177. | `- 18:0:0:15 sdbb 67:80   active ready running
    178. `-+- policy='service-time 0' prio=10 status=enabled
    179.   |- 0:0:3:15  sdem 128:224 active ready running
    180.   |- 17:0:3:15 sdep 129:16  active ready running
    181.   `- 18:0:2:15 sdbu 68:128  active ready running
    182. mpaths (364467471006c366f06c588fe0000002a) dm-22 HUAWEI  ,XSG1            
    183. size=500G features='0' hwhandler='0' wp=rw
    184. |-+- policy='service-time 0' prio=50 status=active
    185. | |- 0:0:0:9   sdcq 69:224  active ready running
    186. | |- 16:0:0:9  sdk  8:160   active ready running
    187. | `- 17:0:0:9  sdco 69:192  active ready running
    188. `-+- policy='service-time 0' prio=10 status=enabled
    189.   |- 0:0:3:9   sdea 128:32  active ready running
    190.   |- 17:0:3:9  sded 128:80  active ready running
    191.   `- 18:0:2:9  sdbo 68:32   active ready running
    192. mpathf (364467471006c366f06c5de4a0000002f) dm-9 HUAWEI  ,XSG1            
    193. size=1.0T features='0' hwhandler='0' wp=rw
    194. |-+- policy='service-time 0' prio=50 status=active
    195. | |- 0:0:3:14  sdek 128:192 active ready running
    196. | |- 17:0:3:14 sden 128:240 active ready running
    197. | `- 18:0:2:14 sdbt 68:112  active ready running
    198. `-+- policy='service-time 0' prio=10 status=enabled
    199.   |- 0:0:0:14  sdda 70:128  active ready running
    200.   |- 16:0:0:14 sdp  8:240   active ready running
    201.   |- 17:0:0:14 sdcz 70:112  active ready running
    202.   `- 18:0:0:14 sdba 67:64   active ready running
    复制代码







    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    运维联盟俱乐部 ( 冀ICP备19036648号 )

    GMT+8, 2024-5-12 20:11 , Processed in 0.052768 second(s), 21 queries , Gzip On.

    Powered by Discuz! X3.4

    © 2001-2023 Discuz! Team.

    快速回复 返回顶部 返回列表