DMP动态多路径

 
 
查看文章
   
动态多路径(DMP)
2010-04-21 18:11
1. 介绍动态多路径(DMP)
在某些操作系统上,Volume Manager支持多路径访问到磁盘阵列。它自动重新组织到磁盘阵列内具体某个磁盘设备的多个I/O 路径。Volume Manager的动态多路径功能通过提供路径故障切换机制,提供更大的可靠性。一旦到磁盘的某个连接丢失,系统将通过到该磁盘的其它可靠的连接继续存取重 要的数据。DMP 还通过将I/O 负载平均分布在多条到磁盘设备的I/O 路径上,提供更大的I/O吞吐量。
Volume Manager DMP管理多路径目标(如磁盘阵列),多路径目标定义使用多条路径的策略。某些磁盘阵列允许多条路径同时保持活动状态(活动/活动)。某些磁盘阵列只允许 一条路径保持活动状态,将替换路径用作备件以防现有路径发生故障(主动/被动),某些磁盘阵列具有设计更精细的策略(如对LUN的互为备援)。
一般情况下,Volume Manager 被设计成将VM 磁盘映射到一个Volume Manager DMP 元节点。为简化VxVM 逻辑操作,每个VM 磁盘都映射到唯一一个Volume Manager DMP元节点,不管在多路径配置中是否连接了物理磁盘设备,此映射都将发生。
ü # vxdmpadm getsubpaths ctlr=c3
NAME STATE PATH-TYPE DMPNODENAME ENCLR-TYPE ENCLR-NAME
======================================================================
c3t1d0s2 ENABLED - c3t1d0s2 Disk Disk
c3t1d1s2 ENABLED - c3t1d1s2 Disk Disk
c3t1d2s2 ENABLED - c3t1d2s2 Disk Disk
c3t1d3s2 ENABLED - c3t1d3s2 Disk Disk
c3t1d4s2 ENABLED - c3t1d4s2 Disk Disk
c3t1d5s2 ENABLED - c3t1d5s2 Disk Disk
c3t1d6s2 ENABLED - c3t1d6s2 Disk Disk
c3t1d7s2 ENABLED - c3t1d7s2 Disk Disk
c3t1d8s2 ENABLED - c3t1d8s2 Disk Disk
c3t1d9s2 ENABLED - c3t1d9s2 Disk Disk
ü # vxdmpadm getsubpaths ctlr=c4
NAME STATE PATH-TYPE DMPNODENAME ENCLR-TYPE ENCLR-NAME
======================================================================
c4t1d0s2 ENABLED - c3t1d0s2 Disk Disk
c4t1d1s2 ENABLED - c3t1d1s2 Disk Disk
c4t1d2s2 ENABLED - c3t1d2s2 Disk Disk
c4t1d3s2 ENABLED - c3t1d3s2 Disk Disk
c4t1d4s2 ENABLED - c3t1d4s2 Disk Disk
c4t1d5s2 ENABLED - c3t1d5s2 Disk Disk
c4t1d6s2 ENABLED - c3t1d6s2 Disk Disk
c4t1d7s2 ENABLED - c3t1d7s2 Disk Disk
c4t1d8s2 ENABLED - c3t1d8s2 Disk Disk
c4t1d9s2 ENABLED - c3t1d9s2 Disk Disk

2. 路径故障切换机制
DMP 与多端口磁盘阵列一起使用时可增强系统可靠性,一旦到磁盘阵列的某个连接丢失,DMP 将自动为I/O 请求动态选择下一个I/O 路径,而无需系统管理员的任何操作。DMP的自动修复功能只要是 vxconfigd 进程能正常启动,就能自动启动。
ü # vxdmpadm stat restored
The number of daemons running : 1
The interval of daemon: 300
The policy of daemon: check_disabled
如果你想修改DMP的policy,可以修改 /etc/init.d/vxvm-sysboot文件,找到restore_daemon_opts="interval=300 policy= check_disabled " 可调整interval的值,但减小该值会影响系统性能。check_disabled 是指DMP的后台进程只定时监控有问题的路径。DMP 允许系统管理员向Volume Manager 中的DMP子系统指出是修复还是恢复连接。这称为DMP 重新配置,重新配置过程还允许检测最新添加的设备(只有当操作系统完全看到它们时),以及完全引导系统后删除的设备。

3. 负载平衡
对于VM 的DMP 功能是自动激活的,例如在阵列只有单控制器的情况下,主机有两块HBA 卡,当往阵列的硬盘写数据时,会发现两个HBA 都有I/O,(通过 vxstat命令查看)。这种情况下读写硬盘数据的I/O瓶颈应在阵列控制器,为了提供阵列路径间的负载平衡,DMP 遵循活动/活动磁盘阵列的平衡路径机制。负载平衡通过使用所有路径的最大带宽,确保最大限度地提高I/O 吞吐量。不过到磁盘的有序I/O 将沿同一条路径发送以优化I/O 吞吐量,这样做是为了使用磁盘跟踪高速缓冲存储器的效果。
对于主动/ 被动磁盘阵列,I/O 将沿主路径(指阵列控制器)发送,直到主路径失败。一旦主路径失败,I/O 将切换到其它可用的主路径或辅助路径,为了避免LUN 的拥有权不断地从一个控制器转让给另一个控制器(这将导致I/O 严重减慢速度)对于主动/ 被动磁盘阵列将不执行路径间的负载平衡。

4. 从DMP 设备启用
当根磁盘受Volume Manager的控制时,如果它是单个磁盘,则将作为DMP 设备自动存取,如果磁盘是多端口磁盘阵列的一部分,则有多条路径。通过对根磁盘进行封装,将增强系统防备到磁盘的一条或多条现有物理路径丢失的可靠性。

5. 启用和禁用控制器
DMP 允许系统管理员关闭到主机I/O 控制器的I/O ,以便执行管理操作。它可用于维护挂接在主机上的控制器或由Volume Manager 支持的磁盘阵列。完成维护任务后,可以启用到主机I/O 控制器的I/O 操作。可以使用由Volume Manager提供的vxdmpadm 命令完成此操作。例如,如果系统有StorEdge A5000(TM) 阵列,当用户需要更改与此磁盘阵列相连的A5000接口板时,应使用vxdmpadm 命令获得连接在此A5000接口板上的主机I/O 控制器列表并应禁用这些控制器。这些控制器一旦被禁用,通过这些控制器对磁盘的进一步I/O 存取将停止。然后,用户就可在不中断对该磁盘阵列中的现有磁盘进行I/O 存取的情况下来更换接口板。这样要求是因为在正常情况下,对于活动/活动类型的磁盘阵列(与本例中的一样),Volume Manager都使用平衡路径机制来调度具有多条路径的磁盘的I/O ,从而使I/O 可以在任意时刻经过任何路径。对于主动/ 被动类型的磁盘阵列,I/O 由Volume Manager调度到主路径,直到主路径发生故障。因此,若要更改磁盘阵列上的接口卡或更改与磁盘阵列相连的主机(可能发生)上的卡,则应禁止到主机 I/O 控制器的I/O 操作。这允许在更改硬件前,使所有的I/O 都转移到另一个I/O控制器上的主动辅助路径或主动主路径。此操作结束后,可使用vxdmpadm 命令的启用选项,使这些控制器的路径重新发挥作用。Volume Manager不允许禁用到根磁盘的最后一条活动路径。

6. 显示DMP 数据库信息
vxdmpadm 命令可用于列出DMP 数据库信息并执行其它管理任务,此命令使您得以列出系统上的所有控制器(与磁盘相连)和其它存储在DMP 数据库中的相关信息。该信息可用于定位系统硬件并决定要启用/ 禁用的控制器。注意:通过命令启用/禁用的功能只是临时的,在系统重启后将恢复到缺省设置。vxdmpadm 还提供其它有用的信息,如磁盘阵列序列号和与磁盘阵列相连的DMP 设备(磁盘)列表,具体某个控制器的路径列表,等等。


ü # vxdmpadm listctlr all
CTLR-NAME ENCLR-TYPE STATE ENCLR-NAME
=====================================================
c1 Disk ENABLED Disk
c3 Disk ENABLED Disk
c4 Disk ENABLED Disk

ü # vxdmpadm listenclosure all
ENCLR_NAME ENCLR_TYPE ENCLR_SNO STATUS
============================================================
Disk Disk DISKS CONNECTED
Disks OTHER_DISKS OTHER_DISKS DISCONNECTED
FAKE_ARRAY0 FAKE_ARRAY FAKE_ENCLR_SNO DISCONNECTED

ü # vxdmpadm getdmpnode nodename=c3t1d9s2
NAME STATE ENCLR-TYPE PATHS ENBL DSBL ENCLR-NAME
=========================================================================
c3t1d9s2 ENABLED Disk 2 2 0 Disk

ü # vxdmpadm getdmpnode enclosure=Disk
NAME STATE ENCLR-TYPE PATHS ENBL DSBL ENCLR-NAME
=========================================================================
c1t1d0s2 ENABLED Disk 1 1 0 Disk
c1t0d0s2 ENABLED Disk 1 1 0 Disk
c3t1d0s2 ENABLED Disk 2 2 0 Disk
c3t1d1s2 ENABLED Disk 2 2 0 Disk
c3t1d2s2 ENABLED Disk 2 2 0 Disk
c3t1d3s2 ENABLED Disk 2 2 0 Disk
c3t1d4s2 ENABLED Disk 2 2 0 Disk
c3t1d5s2 ENABLED Disk 2 2 0 Disk
c3t1d6s2 ENABLED Disk 2 2 0 Disk
c3t1d7s2 ENABLED Disk 2 2 0 Disk
c3t1d8s2 ENABLED Disk 2 2 0 Disk
c3t1d9s2 ENABLED Disk 2 2 0 Disk


7. vxddladm 命令的使用
使用vxddladm命令可以动态添加不支持的阵列到支持库。使DMP能正确使用。
#vxddladm help
listversion Listing of all ASL with their correxponding versions
listsupport Listing Of all Supported Arrays
listexclude Listing Of all excluded Array Libraries
excludearray Exclude an array library/a set of libraries
includearray Include an array library/a set of libraries
addjbod Specify an array to be JBOD :see help addjbod
rmjbod Remove an array from JBOD List :see help rmjbod
listjbod List all JBODs :see help listjbod
listforeign List all Foreign disks :see help listforeign
addforeign Add a Foreign disk :see help addforeign
rmforeign Remove a Foreign disks :see help rmforeign











8. 配置动态多路径DMP(以下内容都是以两块HBA卡为例)

1. 主机至少有两块HBA 卡 ,最好是相同类型。
2. 如果是临时License ,DMP功能是激活的。通过命令查看:
# vxdctl license
All features are available:
Mirroring
Root Mirroring
Concatenation
Disk-spanning
Striping
RAID-5
VxSmartSync
Clustering-full
VVR
DMP (multipath enabled)

3. 查看 /dev/vx/dmp 和 /dev/vx/rdmp 下是否有设备文件。如果想重新产生DMP设备文件,将两个目录下的文件删除。执行 #vxdctl initdmp

4. 通过命令vxdmpadm,必需能看到两块HBA,ENCLR-TYPE不能是OTHER_DISKS,STATE= ENABLED
# vxdmpadm listctlr all
CTLR-NAME ENCLR-TYPE STATE ENCLR-NAME
=====================================================
c1 Disk ENABLED Disk
c3 Disk ENABLED Disk
c4 Disk ENABLED Disk

错误输出:(只认到单控制卡)
#vxdmpadm listctlr all
CTLR-NAME ENCLR-TYPE STATE ENCLR-NAME
=====================================================
c1 Disk ENABLED Disk
c4 OTHER_DISKS ENABLED OTHER_DISKS

5. 通过#format能看到两倍的物理盘。

6. 通过vxdisk list 只能看到一倍的盘(当DMP正确配置时),
# vxdisk list
DEVICE TYPE DISK GROUP STATUS
c1t0d0s2 sliced rootdisk rootdg online
c1t1d0s2 sliced disk01 rootdg online
c3t1d0s2 sliced - - online
c3t1d1s2 sliced - - online
c3t1d2s2 sliced - - online
c3t1d3s2 sliced - - online
c3t1d4s2 sliced - - online
c3t1d5s2 sliced - - online
c3t1d6s2 sliced - - online
c3t1d7s2 sliced aaadg00 aaadg online
c3t1d8s2 sliced aaadg01 aaadg online
c3t1d9s2 sliced abcdg00 abcdg online

#vxdisk_list_lun00
Device:c5t0d0s2
devicetag: c5t0d0
type: sliced
hostid: p9adv.nielsenmedia.com
disk: name=lun00 id=1046287031.1750.p8adv.nielsenmedia.com
group: name=occdg id=1046291758.1896.p8adv.nielsenmedia.com
flags: online ready private autoconfig autoimport imported
pubpaths: block=/dev/vx/dmp/c5t0d0s4 char=/dev/vx/rdmp/c5t0d0s4
privpaths: block=/dev/vx/dmp/c5t0d0s3 char=/dev/vx/rdmp/c5t0d0s3
version: 2.2
iosize: min=512 (bytes) max=256 (blocks)
public: slice=4 offset=0 len=25155072
private: slice=3 offset=1 len=8447
update: time=1048104676 seqno=0.37
headers: 0 248
configs: count=1 len=6210
logs: count=1 len=941
Defined regions:
config priv 000017-000247[000231]: copy=01 offset=000000 enabled
config priv 000249-006227[005979]: copy=01 offset=000231 enabled
log priv 006228-007168[000941]: copy=01 offset=000000 enabled
Multipathing information:
numpaths: 4
c5t0d0s2 state=enabled type=secondary
c5t4d0s2 state=enabled type=<primary>
c6t2d0s2 state=enabled type=secondary
c6t6d0s2 state=enabled type=<primary>

#vxdmpadm_getdmpnode_nodename=c5t4d0s2
NAME STATE ENCLR-TYPE PATHS ENBL DSBL ENCLR-NAME
=========================================================================
c5t0d0s2 ENABLED EMC_CLARiiON 4 4 0 EMC_CLARiiON0

#vxdmpadm_get_dmpnode enclosure=EMC_CLARiiON0
NAME STATE ENCLR-TYPE PATHS ENBL DSBL ENCLR-NAME
=========================================================================
c5t0d0s2 ENABLED EMC_CLARiiON 4 4 0 EMC_CLARiiON0
c5t0d1s2 ENABLED EMC_CLARiiON 4 4 0 EMC_CLARiiON0
c5t0d2s2 ENABLED EMC_CLARiiON 4 4 0 EMC_CLARiiON0

#vxdmpadm_getsubpaths_ctlr=c5
NAME STATE PATH-TYPE DMPNODENAME ENCLR-TYPE ENCLR-NAME
======================================================================
c5t0d0s2 ENABLED SECONDARY c5t0d0s2 EMC_CLARiiON EMC_CLARiiON0
c5t0d1s2 ENABLED SECONDARY c5t0d1s2 EMC_CLARiiON EMC_CLARiiON0
c5t0d2s2 ENABLED <PRIMARY> c5t0d2s2 EMC_CLARiiON EMC_CLARiiON0
c5t0d3s2 ENABLED <PRIMARY> c5t0d3s2 EMC_CLARiiON EMC_CLARiiON0
c5t0d4s2 ENABLED <PRIMARY> c5t0d4s2 EMC_CLARiiON EMC_CLARiiON0

#vxdmpadm.getsubpaths.ctlr=c6
NAME STATE PATH-TYPE DMPNODENAME ENCLR-TYPE ENCLR-NAME
======================================================================
c6t2d0s2 ENABLED SECONDARY c5t0d0s2 EMC_CLARiiON EMC_CLARiiON0
c6t2d1s2 ENABLED SECONDARY c5t0d1s2 EMC_CLARiiON EMC_CLARiiON0
c6t2d2s2 ENABLED <PRIMARY> c5t0d2s2 EMC_CLARiiON EMC_CLARiiON0
c6t2d3s2 ENABLED <PRIMARY> c5t0d3s2 EMC_CLARiiON EMC_CLARiiON0
c6t2d4s2 ENABLED <PRIMARY> c5t0d4s2 EMC_CLARiiON EMC_CLARiiON0
#vxdmpadm_listctlr_all
CTLR-NAME ENCLR-TYPE STATE ENCLR-NAME
=====================================================
c1 SENA ENABLED sena0
c4 SENA ENABLED sena0
c5 EMC_CLARiiON ENABLED EMC_CLARiiON0
c6 EMC_CLARiiON ENABLED EMC_CLARiiON0


7. 通过vxdisk list 列某一块盘时,能看到信息
Multipathing information:
numpaths: 2
c3t1d9s2 state=enabled
c4t1d9s2 state=enabled

# vxdisk list c3t1d9s2
Device: c3t1d9s2
devicetag: c3t1d9
type: sliced
hostid: sun2801
disk: name=abcdg00 id=1052368240.2809.sun2801
group: name=abcdg id=1052368257.2812.sun2801
flags: online ready private autoconfig autoimport imported
pubpaths: block=/dev/vx/dmp/c3t1d9s4 char=/dev/vx/rdmp/c3t1d9s4
privpaths: block=/dev/vx/dmp/c3t1d9s3 char=/dev/vx/rdmp/c3t1d9s3
version: 2.2
iosize: min=512 (bytes) max=256 (blocks)
public: slice=4 offset=0 len=6287360
private: slice=3 offset=1 len=2559
update: time=1052812106 seqno=0.54
headers: 0 248
configs: count=1 len=1865
logs: count=1 len=282
Defined regions:
config priv 000017-000247[000231]: copy=01 offset=000000 enabled
config priv 000249-001882[001634]: copy=01 offset=000231 enabled
log priv 001883-002164[000282]: copy=01 offset=000000 enabled
Multipathing information:
numpaths: 2
c3t1d9s2 state=enabled(阵列单控制器的情况下,没有看到type=primary
c4t1d9s2 state=enabled 或type=secondary?在阵列为A/P时看到)  


8. 如果通过vxdisk list 能看到两倍的盘,说明VM的DMP没有正确配置。
先通过命令查看同一块盘的信息是否一样,如果不同,先调阵列。
# cd /etc/vx/diag.d
# ./vxdmpinq /dev/rdsk/c3t1d9s2

Inquiry for /dev/rdsk/c3t1d9s2, evpd 0x0, page code 0x0
Vendor id : DGC
Product id : RAID 5
Revision : 0524
Serial Number : 093E580000CL
# ./vxdmpinq /dev/rdsk/c4t1d9s2

Inquiry for /dev/rdsk/c4t1d9s2, evpd 0x0, page code 0x0
Vendor id : DGC
Product id : RAID 5
Revision : 0524
Serial Number : 093E580000CL

9. 如果阵列VM缺省不支持,请先安装ASL包。
#vxddladm listjbod
VID PID Opcode Page Code Page Offset SNO length
==========================================================================
SEAGATE ALL PIDs 18 -1 36 12
SUN SESS01 18 -1 36 12

10. 然后添加到DMP支持列表库
#vxddladm addjbod vid=DGC
#vxddladm listjbod
VID PID Opcode Page Code Page Offset SNO length
==========================================================================
SEAGATE ALL PIDs 18 -1 36 12
SUN SESS01 18 -1 36 12
DGC ALL PIDs 18 -1 36 12

11. 执行#vxdctl enable
12. #vxdisk list应只能看到一倍的盘。
13. The following three parameters must be set on the master controller unit:
&Oslash; Multi-path support software:
§ DMP: sys mp_support rw
§ STMS: sys mp_support mpxio
&Oslash; sys cache auto
&Oslash; sys mirror auto
14. 有一种工作方式:有些阵列控制器的工作方式可以是对具体的LUN互为备援。既partner pair configuration ,所以当用命令#vxdisk list查看,会发现只列出第一块HBA卡所读到的信息。

The T3 array in partner pair configuration provides 2 paths to each logical unit (LUN). One path is considered the primary and the other path is considered the secondary for any given LUN. In normal operation, all I/O for a particular LUN goes down the primary path. If the primary path for a LUN fails, I/O for that LUN is sent down the secondary path. In order to balance the I/O load, half of the LUNs use one path as the primary and half use the other. This means that both paths are considered primary for some LUNs and secondary for some LUNs. Because there is a primary and secondary path for each LUN, the T3 is an Active/Passive type array.

When Dynamic Multipathing (DMP) scans the device list looking for devices that are accessed through more than one controller, it assigns the name of the disk media record based on whichever controller is probed first. Because of this all the LUNs in the array will have DM records that start with the same controller. The DM record name does not indicate which controller is in use as the primary path for a particular LUN.

EXAMPLE:
The array is attached to the host through 2 controllers, C1 and C4. One LUN uses the C1 path as the primary and C4 as the secondary. The other LUN uses C4 as the primary and C1 as the secondary. Both LUNs have DM records that begin with C1.

# vxdisk list
DEVICE TYPE DISK GROUP STATUS

c1t2d0s2 sliced disk01 rootdg online
c1t2d1s2 sliced disk02 rootdg online

DMP does know which path is primary and which is secondary for each LUN. That information can be displayed with the vxdisk list <diskname> command.

vxdisk list c1t2d0s2
Device: c1t2d0s2
devicetag: c1t2d0
type: sliced
hostid: tpsw-154
disk: name=disk01 id=966899066.1066.tpsw-154
group: name=rootdg id=966899051.1025.tpsw-154
flags: online ready autoconfig autoimport imported
pubpaths: block=/dev/vx/dmp/c1t2d0s4 char=/dev/vx/rdmp/c1t2d0s4
privpaths: block=/dev/vx/dmp/c1t2d0s3 char=/dev/vx/rdmp/c1t2d0s3
version: 2.1
iosize: min=512 (bytes) max=2048 (blocks)
public: slice=4 offset=0 len=279707648
private: slice=3 offset=1 len=8191
update: time=966899613 seqno=0.9
headers: 0 248
configs: count=1 len=6027
logs: count=1 len=913
Defined regions:
config priv 000017-000247[000231]: copy=01 offset=000000 enabled
config priv 000249-006044[005796]: copy=01 offset=000231 enabled
log priv 006045-006957[000913]: copy=01 offset=000000 enabled
Multipathing information:
numpaths: 2
c1t2d0s2 state=enabled type=secondary
c4t1d0s2 state=enabled <type=primary>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

vxdisk list c1t2d1s2
Device: c1t2d1s2
devicetag: c1t2d1
type: sliced
hostid: tpsw-154
disk: name=disk02 id=966899118.1145.tpsw-154
group: name=rootdg id=966899051.1025.tpsw-154
flags: online ready autoconfig autoimport imported
pubpaths: block=/dev/vx/dmp/c1t2d1s4 char=/dev/vx/rdmp/c1t2d1s4
privpaths: block=/dev/vx/dmp/c1t2d1s3 char=/dev/vx/rdmp/c1t2d1s3
version: 2.1
iosize: min=512 (bytes) max=2048 (blocks)
public: slice=4 offset=0 len=279707648
private: slice=3 offset=1 len=8191
update: time=966899613 seqno=0.7
headers: 0 248
configs: count=1 len=6027
logs: count=1 len=913
Defined regions:
config priv 000017-000247[000231]: copy=01 offset=000000 enabled
config priv 000249-006044[005796]: copy=01 offset=000231 enabled
log priv 006045-006957[000913]: copy=01 offset=000000 enabled
Multipathing information:
numpaths: 2
c1t2d1s2 state=enabled <type=primary>
c4t1d1s2 state=enabled type=secondary
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The multipathing information shows that C1 is primary for disk02 and secondary for disk01, while C4 is primary for disk01 and secondary for disk02. If the primary path fails, DMP will switch to the secondary path and the type will show as disabled for the failed path.

15. 通过T3查看
On the T3 -

labt3-1:/:<1>port listmap
port targetid addr_type lun volume owner access
u1p1 1 hard 0 v0 u1 primary
u1p1 1 hard 1 v1 u1 primary
u1p1 1 hard 2 u2v0 u2 failover
u1p1 1 hard 3 u2v1 u2 failover
u2p1 2 hard 0 v0 u1 failover
u2p1 2 hard 1 v1 u1 failover
u2p1 2 hard 2 u2v0 u2 primary
u2p1 2 hard 3 u2v1 u2 primary

This shows us our LUN ownership and host port target ID's. This
is an example of an ES pair in a normal state.  

labt3-1:/:<2>port list
port targetid addr_type status host wwn
u1p1 1 hard online sun 50020f2300005838
u2p1 2 hard online sun 50020f2300005511



9.关于负载平衡
如果阵列没有两个控制器,且非Active/Active工作方式,(注意:并不是所有厂家的所有阵列都支持这种工作方式)。那么阵列的负载平衡就无法实现。
Depending on the array configuration and running version of Volume Manager, <DMP> can operate in the following modes:

Active/Active (A/A)
In Active/Active, all sub paths to a disk/lun can be accessed simultaneously. Active/Active allows for load balancing and failover in the event of a path failure.
A Sun A5x00 array is an example of an A/A configuration.

Active/Passive - Auto tresspass (A/P)
In Active/Passive, only one of the paths to a disk/LUN can be used at any one time. In the event of an i/o failure on the primary path, i/os will be sent to one of the secondary paths. With an array configured in trespass mode, the failover is invoked by sending the i/os to the second path. Failover is confined to an individual LUN instance level. Active/Passive arrays do not allow load balancing as only one path can be used under normal operating conditions. Auto trespass is also known as implicit failover.
A Sun T3 array in a single host environment (mp_support=rw) is an example of an A/P - auto-trespass configuration

Active/Passive - Explicit failover (A/PF)
In Active/Passive - explicit failover, only one of the paths (primary) to the disk/LUN can be used at any one time. In the event of an i/o failure, a special command is sent to the array to invoke a failover such that a secondary path can be used. Explicit failover is also known as nonauto-trespass mode.
A Sun T3 array in a multi-host environment (mp_support=std) is an example of an A/PF configuration.

Active/Passive - LUN group failover (A/PG)
In Active/Passive - LUN group failover, a group of one or more LUNs are assigned to a controller on the array, which becomes the primary path to the disks. In the event of an i/o failure to a single LUN, the entire group of LUNs is switched to another controller in the array. This controller becomes the secondary active path.
10.VM的DMP与阵列DMP的结合使用

如果VM的DMP要与阵列的DMP同时使用,请查支持列表,例如HP/CPQ Secure Path 4.0  
或EMC PowerPath 3.0.x or ATF,以PKG包的形式存在。
阵列的DMP软件功能是将多路径合并成一条路径,且能实现控制器间的负载均衡。而VM去管理的设备是阵列的DMP软件产生的设备,

通过命令#vxidisk list
emcpower33c simple - - online
emcpower38c simple - - online
emcpower40c simple - - online
emcpower41c simple - - online
emcpower42c simple - - online
emcpower43c simple - - online
emcpower44c simple - - online
emcpower45c simple - - online
emcpower46c simple - - online
emcpower47c simple - - online
emcpower48c simple - - online
emcpower49c simple - - online
emcpower50c simple - - online
emcpower51c simple - - online
emcpower52c simple - - online



11.一个配置PowerPath的例子

Reconfiguring Solaris Hosts running EMC PowerPath and Veritas VxVM...

For configuration purposes, PowerPath stores a primary and alternate device path in the /kernel/drv/emcpower.conf configuration file, and the Symmetrix device number in stored in the /etc/emcpower_to_volnum file.  

Due to hardware reconfiguration, the PowerPath configuration may become invalid for the following reasons:

a) primary and/or alternate hardware address for the underlying device has changed  

b) a different volume may be placed behind a hardware address..

The objective of this procedure is to completely reconfigure PowerPath and reimport VxVM disk groups:

Assumptions:

1. emcpower/safe devices are not part of an encapsulated root disk

2. when the hardware configuration is implemented, all the physical disks belonging to the disk groups will still be visible to the host

3. VxVM disk groups are defined on emcpower devices

NOTE: This procedure is to be used only when it is sure that the emcpower devices will be renumbered due to hardware changes.

Do not use this procedure unless you fully understand the situations when it is to be used. Please contact the EMC Customer Support Center should you have any questions.  

Obtain a copy of inq version 6.02 or higher as previous versions of inq were not built to see "emcpower" devices.

SAVE THE CONFIGURATION
1. inq > inq.before - save a copy of the hardware config
2. vxprint -ht > vxprint.ht.out - save a copy of all disk group configurations
3. vxdisk list > vxdisk.list.out - save a copy of each disk and it's associated device
4. for each disk group: vxprint -hvmps -mg <dgname> > vxprint.dgname.out
- save a mapfile for each disk group  
5. Save the above configuration files on a non-PowerPath filesystem

SHUTDOWN AND RECONFIGURE  
6. vxdg deport <dgname> - deport the disk group
7. add new targets/luns to the sd.conf file  
8. init 0  
9. implement the hardware changes
10. boot -rs - reconfigure reboot to reconfigure devices
11. inq - verify that the hardware reconfiguration was successful and that all paths are visible to the host
12. rm /dev/dsk/emcpower* - delete the old emcpower nodes
13. rm /dev/rdsk/emcpower* - delete the old emcpower nodes
14. mv /kernel/drv/emcpower.conf /kernel/drv/emcpower.conf.old
15. mv /etc/emcpower_to_volnum /etc/emcpower_to_volnum.old
16. powercf -q - quietly reconfigure PowerPath. Creates a new emcpower.conf and emcpower_to_volnum.  
17. reboot -- -r - reboot reconfigure

MAKE POWERPATH DEVICES VISIBLE TO VERITAS SO THAT AN IMPORT SCAN WILL SUCCEED
18. powervxvm setup - create the /dev/vx/(r)dmp/emcpower nodes
19. vxdctl enable - rescan all the devices on the system
20. powervxvm define - bring the emcpower devices into the VxVM disk list
21. powervxvm online - bring devices with valid private regions online
22. vxdisk list - ensure that all the emcpower devices are "online"
23. vxdg import <dgname> - import the disk group
24. vxvol -g <dgname> startall - start the volumes

DMP命令实用程序 (vxdmpadm)  

2011-02-25 14:10:45|  分类: 容灾技术 |  标签:vxdmpadm  |字号 订阅


vxdmpadm 实用程序管理 Volume Manager 的动态多路径 (DMP) 功能性。有关此命令的选项和属性的详细描述,请参阅 vxdmpadm(1M) 实用程序的手册页。

可以使用 vxdmpadm 实用程序命令 listctlr 列出所有与挂接在主机上的磁盘相连的控制器。例如,若要列出所有与主机上的磁盘相连的控制器,请使用如下命令:
      # vxdmpadm listctlr all
      显示下列实例输出:
      CTLR-NAME    ENCLR-TYPE       STATE         ENCLR-NAME
      =====================================================
      c0                  OTHER               ENABLED     others0
      c1                  SEAGATE           ENABLED     seagate0
      c2                  SEAGATE           ENABLED     seagate0
     上面显示的输出表明:
           第一个控制器 c0 与不在任何所识别的 DMP 种类下的磁盘相连
           第二个和第三个控制器(c1 和 c2) 与 A5x00 (SEAGATE) 磁盘阵列相连
     上面所有的控制器都处于 ENABLED 状态,这表示它们都可用于 IO 操作。状态 DISABLED 用于表示控制器不可用于 IO 操作。此不可用性可能是因为硬件故障或系
统管理员禁止在该控制器上进行 IO 操作。可使用 vxdmpadm 实用程序更改控制器状态。

      若要列出与具体某个控制器相连的所有路径,可以将 getsubpaths 选项与 ctlr 属性一起使用。例如,使用如下命令:
      # vxdmpadm getsubpaths ctlr=c1
      显示下列实例输出:
      NAME STATE PATH-TYPE DMPNODENAME ENCLR-TYPE ENCLR-NAME
      ==================================================================
      c1t0d0s2 ENABLED - c2t0d0s2 SEAGATE seagate0
      c1t1d0s2 ENABLED - c2t1d0s2 SEAGATE seagate0
      c1t2d0s2 ENABLED - c2t2d0s2 SEAGATE seagate0
      c1t3d0s2 ENABLED - c2t3d0s2 SEAGATE seagate0
      c1t4d0s2 ENABLED - c2t4d0s2 SEAGATE seagate0
      c1t5d0s2 ENABLED - c2t5d0s2 SEAGATE seagate0
      c1t6d0s2 ENABLED - c2t6d0s2 SEAGATE seagate0
      c1t16d0s2 ENABLED - c2t16d0s2 SEAGATE seagate0
      c1t17d0s2 ENABLED - c2t17d0s2 SEAGATE seagate0
      c1t18d0s2 ENABLED - c2t18d0s2 SEAGATE seagate0
      c1t19d0s2 ENABLED - c2t19d0s2 SEAGATE seagate0
      c1t20d0s2 ENABLED - c2t20d0s2 SEAGATE seagate0
      c1t21d0s2 ENABLED - c2t21d0s2 SEAGATE seagate0
      c1t22d0s2 ENABLED - c2t22d0s2 SEAGATE seagate0
      输出显示表明了与名为 c1 的控制器相连的路径
      显示的附加信息表明:

            路径 c1t0d0s2 (由 /dev/rdsk 和 /dev/dsk 目录中的节点表示)处于ENABLED 状态。
            路径 c1t0d0s2 由 DMP metanode c1t0d0s2 表示,而 DMP metanode c1t0d0s2 由 /dev/vx/dmp 和 /dev/vx/rdmp 目录中的设备节点表示。
     可以将 getsubpaths 选项与 dmpnodename 属性一起使用,列出与 LUN (由 DMP 设备表示)相连的所有路径。例如,若要列出有关指向 LUN 命名的 c1t0d0s2 的路径信息,请使用如下命令:
     # vxdmpadm getsubpaths dmpnodename=c1t0d0s2
     显示下列实例输出:
     NAME STATE PATH-TYPE CTLR-NAME ENCLR-TYPE ENCLR-NAME
     ==================================================================
     c2t0d0s2 DISABLED - c2 SEAGATE seagate0
     c1t0d0s2 ENABLED - c1 SEAGATE seagate0
     上面的列表显示了有两条路径可到达 DMP 设备 c1t0d0s2,分别是 c1t0d0s2 和c2t0d0s2。附加信息表明其中只有一条路径可用于 I/O 操作。其中一条路径处于
ENABLED 状态,另一条处于 DISABLED 状态。两条路径都在 SEAGATE 磁盘阵列中。
     若要检索控制特定路径的 DMP 设备的名称,可使用下列命令将 getdmpnode 选项与nodename 属性结合起来:

     # vxdmpadm getdmpnode nodename=c1t0d0s2
     显示下列实例输出:
     NAME STATE ENCLR-TYPE PATHS ENBL DSBL ENCLR-NAME
     ===============================================================
     c2t0d0s2 ENABLED SEAGATE 2 2 0 seagate0
     此实例输出显示了路径 c2t0d0s2 由具有两条路径的 DMP 设备 c2t0d0s2 所拥有。

DMP 支持的磁盘阵列
     注意DMP 功能支持的阵列是 Volume Manager 支持的阵列的子集。下列阵列有多条路径可以到达同一磁盘。这里没有列出的阵列只有一条路径可到达物理磁盘。
     Volume Manager 的动态多路径功能支持下列阵列:
          EMC Symmetrix?
          HP SureStore? E Disk Array XP256
          IBM Enterprise Storage Servers? (ESS)
          Hitachi Data Systems? 5700E Disk Array Subsystem?
          Hitachi Data Systems 5800E/7700E Disk Array Subsystem?
          Sun StorEdge A5x00 Array?
          Sun StorEdge T3 Array?
          JBOD (几张磁盘)
          SEAGATE 磁盘,在标准 SCSI 查询数据中返回唯一序列号
          Storage Computer? OmniRaid? 磁盘阵列。若要在使用 Volume Manager 3.1 时使Storage Computer 磁盘阵列有多条与系统相连的路径,必须为每一个连接到机器的磁盘阵列指定一个唯一的系统名 。ftp 站点www.storage.com 处的 RAID-5 用户手册描述了如何为 Storage Computer 磁盘阵列设置系统名。
          ECCS? Synchronix? 阵列

DMP 与驱动程序共存
      Volume Manager 的动态多路径功能还支持与下列阵列共存:
          在系统上安装了 ATF 驱动程序的 DG CLARiiON
          SYMBIOS Sun StorEdge A3000/A3500 阵列,只有当系统上安装了 RDAC 驱动程序时

DMP 和 Sun StorEdge T3 阵列

      VERITAS Volume Manager 的动态多路径功能支持主动/ 被动方式的 Sun StorEdge T3阵列。

      DMP 仅在具有如下配置的 T3 磁盘阵列上有效:
             磁盘阵列上固件的最小级别必须是 1.0 修订版。
             mp_support 参数必须设置为 rw。

DMP 和 JBOD 磁盘阵列支持
      JBOD 驱动器上的动态多路径功能使 DMP 能够使用 VxVM 使 JBOD 磁盘阵列有多条与系统相连的路径。这些 JBOD 磁盘阵列/ 磁盘可以包含来自任何供应商的磁盘。但是, 只有当满足下列条件时, DMP 才能正确检测到这些磁盘/磁盘阵列的多条路径:
            标准 SCSI INQUIRY DATA(字节 36-47)的序列号字段对任何连接到 JBOD 的磁盘应该是“全球唯一的”。用户在尝试配置 DMP 以将这些磁盘添加到 DMP 的 JBOD 种类时,必须知道以上这一事实。
      注意如果任何磁盘都没有提供唯一序列号,则 DMP 无法正确检测到磁盘的多条路径,而且结果不可预测。请与 JBOD 磁盘/磁盘阵列供应商联系,了解有关磁盘序列号唯一性的正确信息。
            要求 DMP 多路径功能性的 JBOD 磁盘阵列应该是活动/活动类型。这意味着 JBOD 磁盘阵列上到所有 LUN 的所有路径都应该可以通过所有路径同时存取,而不会导致任何性能降低。
      一旦知道与 JBOD 磁盘阵列相连的磁盘满足以上条件,必须遵从下面四个步骤获得 DMP的 JBOD 种类下的这些磁盘:
      1. 转到 /kernel/drv 目录
      2. 在该目录下编辑文件 vxdmp.conf
      3. 您将在 vxdmp.conf 中看到下列默认项:
          dmp_jbod="HITACHI"
          例如,假设有一个 JBOD 与包含 DG Clariion 磁盘的机器相连。需要知道这些磁盘返回的精确供应商 ID 字符串以配置 DMP。这将确保在 JBOD 种类下要求所需的磁盘。
          format 命令可用于接收磁盘的供应商 ID 字符串(有关 format 命令的详细信息,请参阅系统上的format(1M) 手册页)。供应商 ID 字符串包含在磁盘返回的标准 SCSI INQUIRY 数据的第 8 - 15 个字节中。format 命令(在磁盘上执行时)的 inquiry 选项返回与输出的 供应商:字段下的磁盘关联的供应商 ID。例如, DG Clariion 磁盘可能返回供应商 ID

                string “DGC”

         该字符串必须以如下形式包含在 vxdmp.conf 文件中:

         dmp_jbod="DGC";
      如果一个 JBOD 磁盘阵列中有来自多个供应商的磁盘,则应在 vxdmp.conf 文件中指定所有供应商的供应商 ID。如果没有这样做,则属于 dmp_jbod[] 阵列中没有提到的供应商的磁盘不由 DMP 提供多条路径,并且属于 OTHER DISKS 种类。(OTHER DISKS 是一个单独的磁盘种类,其下的磁盘均不由 DMP 提供多条路径,并且不属于 DMP 支持的任何种类。)
      下列实例显示如何为 dmp_jbod[] 阵列中的多个供应商添加项。
            dmp_jbod="DGC",
                              "IBM",
                       "FUJITSU";
       在 vxdmp.conf 文件中指定的供应商 ID 的长度不能超过 8 个字符。如果在 vxdmp.conf文件中指定的供应商 ID 字符串超过 8 个字符,控制台上将显示下列信息:
          NOTICE:vxvm:vxdmp: Invalid Vendor ID = specified in vxdmp.conf
          Action:Remove or correct this entry in the vxdmp.conf file.
      4. 在编辑完 vxdmp.conf 文件,添加了所需的项后,应重新启动系统以便 DMP 可以为指定的 JBOD 提供多条路径。

Sun StorEdge A5x00 阵列

      本节内容适合 A5000、A5100 和 A5200 磁盘阵列。这些磁盘阵列由 SEAGATE 种类下的VxVM (DMP) 要求。
      当取下将这些磁盘阵列中的任何一个与主机相连的电缆,并且在主机上执行命令drvconfig、disks 和 vxdctl enable 时,DMP 不以标准的 c#t#d#s# 格式显示路径
名。相反,将显示 NONAME 字符串以表示已删除路径的名称。
     例如,假设主机与其中一个 A5x00 磁盘阵列相连。该磁盘阵列通过两条光缆与主机相连。
     该磁盘阵列上有一个磁盘。有两条路径可以到达这个磁盘,分别是/dev/[r]dsk/c1t33d0s2 和 /dev/[r]dsk/c2t33d0s2。当此磁盘用于 VxVM 时,在此磁盘上执行的vxdisk list 命令将显示如下内容:
        # vxdisk list c1t33d0s2
Device: c1t33d0s2
devicetag: c1t33d0
type: sliced
hostid: gluon.veritas.com
disk: name=rootdisk id=933470913.1042.gluon.veritas.com
group: name=rootdg id=933470911.1025.gluon.veritas.com
flags: online ready autoconfig autoimport imported
pubpaths: block=/dev/vx/dmp/c1t33d0s6 char=/dev/vx/rdmp/c1t33d0s6
privpaths: block=/dev/vx/dmp/c1t33d0s7 char=/dev/vx/rdmp/c1t33d0s7

version: 2.1
iosize: min=512 (bytes) max=2048 (blocks)
public: slice=6 offset=1 len=35363560
private: slice=7 offset=1 len=4711
update: time=933471058 seqno=0.9
headers: 0 248
configs: count=1 len=3448
logs: count=1 len=522
Defined regions:
config priv 000017-000247[000231]: copy=01 offset=000000 enabled
config priv 000249-003465[003217]: copy=01 offset=000231 enabled
log priv 003466-003987[000522]: copy=01 offset=000000 enabled
Multipathing information:
numpaths: 2
c1t33d0s2 state=enabled
c2t33d0s2 state=enabled
      在取下与控制器 c2 相连的电缆并且在系统上执行 vxdctl enable 命令后,显示的内容变成:
      # vxdisk list c1t33d0s2
Device: c1t33d0s2
devicetag: c1t33d0
type: sliced
hostid: gluon.veritas.com
disk: name=rootdisk id=933470913.1042.gluon.veritas.com
group: name=rootdg id=933470911.1025.gluon.veritas.com
flags: online ready autoconfig autoimport imported
pubpaths: block=/dev/vx/dmp/c1t33d0s6 char=/dev/vx/rdmp/c1t33d0s6
privpaths: block=/dev/vx/dmp/c1t33d0s7 char=/dev/vx/rdmp/c1t33d0s7
version: 2.1
iosize: min=512 (bytes) max=2048 (blocks)
public: slice=6 offset=1 len=35363560
private: slice=7 offset=1 len=4711
update: time=933471058 seqno=0.9
headers: 0 248
configs: count=1 len=3448
logs: count=1 len=522
Defined regions:
config priv 000017-000247[000231]: copy=01 offset=000000 enabled
config priv 000249-003465[003217]: copy=01 offset=000231 enabled
log priv 003466-003987[000522]: copy=01 offset=000000 enabled
Multipathing information:
numpaths: 2
c1t33d0s2 state=enabled
NONAME state=disabled
      同样, vxdmpadm 命令的输出对已经删除的路径名显示的也是 NONAME 字符串。例如,如果从主机中删除控制器 c1 ,则 vxdmpadm 命令将显示以下内容:

      # vxdmpadm getsubpaths ctlr=/c1
NAME STATE TYPE DMPNODENAME DA-TYPE DA-SNO
=================================================================
NONAME DISABLED - c1t36d0s2 SEAGATE SEAGATE_DISKS
NONAME DISABLED - c1t49d0s2 SEAGATE SEAGATE_DISKS
NONAME DISABLED - c1t38d0s2 SEAGATE SEAGATE_DISKS
NONAME DISABLED - c1t37d0s2 SEAGATE SEAGATE_DISKS
NONAME DISABLED - c1t53d0s2 SEAGATE SEAGATE_DISKS
NONAME DISABLED - c1t34d0s2 SEAGATE SEAGATE_DISKS
NONAME DISABLED - c1t51d0s2 SEAGATE SEAGATE_DISKS
NONAME DISABLED - c1t54d0s2 SEAGATE SEAGATE_DISKS
NONAME DISABLED - c1t52d0s2 SEAGATE SEAGATE_DISKS
NONAME DISABLED - c1t33d0s2 SEAGATE SEAGATE_DISKS
NONAME DISABLED - c1t50d0s2 SEAGATE SEAGATE_DISKS
NONAME DISABLED - c1t32d0s2 SEAGATE SEAGATE_DISKS
NONAME DISABLED - c1t48d0s2 SEAGATE SEAGATE_DISKS
NONAME DISABLED - c1t35d0s2 SEAGATE SEAGATE_DISKS
      还应注意,当用于命名 DMP 元设备(代表 LUN)的路径被删除时,DMP 使用备选路径的名称来命名 DMP 元设备。
      例如,假定有两条路径可到达 LUN,分别是 c1t33d0s2 和 c2t33d0s2。代表 LUN 的DMP 元设备名为 c1t33d0s2,且处于 ONLINE 状态。如果取下与控制器 c1 相连的电缆,然后执行 vxdctl enable 命令,则 DMP 元设备将被重命名为 c2t33d0s2。结果,有两个元设备与用户可以看见的同一个 LUN 相对应。这两个元设备中可能有一个处于错误状态,而另一个处于联机状态。注意这不是问题。但是,当在曾用于命名 DMP 设备的原始daname 上执行 vxdisk list 命令时,上述这种情况将导致某些出错讯息。向用户显示的不是多路径 信息,而是如下出错讯息:
                        vxvm:vxdisk: 错误: 不是有效的 DMP 节点磁盘存取名。
      可使用 rm 命令删除无法再存取的磁盘路径。


类别:网络知识  |    |   添加到搜藏  |   分享到i贴吧  | 浏览( ) |   评论 ( 0)
 
上一篇: Linux Top命令参详解    下一篇: CISCO 技术大集合一
 
最近读者:
 
网友评论:
发表评论:
内 容:
      

     

©2011 Baidu
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值