本文共 1622 字,大约阅读时间需要 5 分钟。
作者:范军 (Frank Fan) 新浪微博:@frankfan7 微信:frankfan7
Multipathing 在存储设计中是必须的,因为有多条路径可以访问LUN,它不仅保证了高可用性,同时也有负载均衡的作用。
PSA (PluggableStorage Architecture)
上图是了解Multipathing底层机制的概念。详情参考
存储类型
Active-Passive:
在某一时刻仅有一个Storage Processor(SP)拥有对某个LUN访问的专有权。从其他SP对该LUN发起的访问会被拒绝。只有当该主SP失败时,其他的SP对该LUN的访问才会被接受
Active-Active:
没有主SP的概念,某个LUN可以接受任何SP的访问。
MultiPathing策略
基于存储类型,可以参考选择相应的Multipathing策略
Policy/Controller | Active/Active | Active/Passive |
Most Recently Used | Administrator action is required to fail back after path failure. | Administrator action is required to fail back after path failure. |
Fixed | VMkernel resumes using the preferred path when connectivity is restored. | VMkernel attempts to resume using the preferred path. This can cause path thrashing or failure when another SP now owns the LUN. |
Round Robin | No fail back. | Next path in round robin scheduling is selected. |
Fixed with Array Preference | For ALUA arrays, VMkernel picks the path set to be the preferred path. For both A/A and A/P and ALUA arrays, VMkernel resumes using the preferred path, but only if the path-thrashing avoidance algorithm allows the fail-back. |
注意:以上策略及说明适用VMwareNative Multipathing (NMP) Path Selection Plug-ins (PSP) 的情况。如果使用第三方的方案,请参考该提供商的资料。
实例
下面是一书给出的排错的例子。
问题描述:
当前的架构设计
具体分析:
因为以上设计的缺陷,有两种情况下会出现path thrashing的情况。
情况一:下图所示的两条路径失败。
Screen clipping taken:18/05/2013 4:15 PM
情况二:采用不恰当的Multipathing策略。在Active-passive的存储设备使用了Fixed
这两种情况都可以导致的后果是:
SPA1和SPB1不断的争夺对LUN1的读写控制,从而导致LUN的主控制器频繁在SPA1和SPB1之间切换。我们称这种情况为PathTrashing
下图的改良后的设计,同一个光线交换机连到了阵列的不同控制器上,这样就不会出现我们上面提到的情况了。