1. 显示磁盘的多路径信息
- 显示磁盘与路径对应关系
root@node1 # vxdisk path
SUBPATH DANAME DMNAME GROUP STATE
c2t0d0s2 ams_23000_8 - - ENABLED
c3t0d0s2 ams_23000_8 - - ENABLED
c2t0d1s2 ams_23000_9 - - ENABLED
c3t0d1s2 ams_23000_9 - - ENABLED
c2t0d2s2 ams_23000_10 - - ENABLED
c3t0d2s2 ams_23000_10 - - ENABLED
c2t0d3s2 ams_23000_11 ams_23000_11 oradatadg ENABLED
c3t0d3s2 ams_23000_11 ams_23000_11 oradatadg ENABLED
c2t0d4s2 ams_23000_12 ams_23000_12 oradatadg ENABLED
c3t0d4s2 ams_23000_12 ams_23000_12 oradatadg ENABLED
c2t0d5s2 ams_23000_13 ams_23000_13 oracrsdg ENABLED
c3t0d5s2 ams_23000_13 ams_23000_13 oracrsdg ENABLED
c1t0d0s2 disk_0 - - ENABLED
- 显示某个metadevice多路径信息
root@node1 # vxdisk list ams_23000_12
Device: ams_23000_12
devicetag: ams_23000_12
type: auto
clusterid: ofs_cluster
disk: name=ams_23000_12 id=1332406729.45.node2
group: name=oradatadg id=1332409137.20.node1
info: format=cdsdisk,privoffset=256,pubslice=2,privslice=2
flags: online ready private autoconfig shared autoimport imported
pubpaths: block=/dev/vx/dmp/ams_23000_12s2 char=/dev/vx/rdmp/ams_23000_12s2
guid: {3d97424e-73fd-11e1-b669-00144fa08962}
udid: HITACHI%5FDF600F%5F85011079%5F000C
site: -
version: 3.1
iosize: min=512 (bytes) max=2048 (blocks)
public: slice=2 offset=65792 len=41790208 disk_offset=0
private: slice=2 offset=256 len=65536 disk_offset=0
update: time=1333596418 seqno=0.57
ssb: actual_seqno=0.0
headers: 0 240
configs: count=1 len=48144
logs: count=1 len=7296
Defined regions:
config priv 000048-000239[000192]: copy=01 offset=000000 enabled
config priv 000256-048207[047952]: copy=01 offset=000192 enabled
log priv 048208-055503[007296]: copy=01 offset=000000 enabled
lockrgn priv 055504-055647[000144]: part=00 offset=000000
Multipathing information:
numpaths: 2
c2t0d4s2 state=enabled
c3t0d4s2 state=enabled
root@node1 # vxdmpadm getsubpaths dmpnodename=ams_23000_12
NAME STATE[A] PATH-TYPE[M] CTLR-NAME ENCLR-TYPE ENCLR-NAME ATTRS
================================================================================
c2t0d4s2 ENABLED(A) - c2 AMS_2300 ams_23000 -
c3t0d4s2 ENABLED(A) - c3 AMS_2300 ams_23000 -
2. 修改DMP node名称
缺省情况下,DMP node名称是根据VxVM的命名规则产生的。用户可以根据需要通过命令来修改DMP node名称。
- 修改某个DMP node的名称
显示当前DMP node名称
root@vxsvr:/ #>vxdisk list
DEVICE TYPE DISK GROUP STATUS
disk_0 auto:cdsdisk mdisk_1 dg1 online
disk_1 auto:cdsdisk - - online
disk_2 auto:cdsdisk mdisk_2 dg1 online
disk_3 auto:none - - online invalid
disk_4 auto:none - - online invalid修改disk_0的DMP node名称
root@vxsvr:/ #>vxdmpadm setattr dmpnode disk_0 name=custom_d0
root@vxsvr:/ #>vxdisk list
DEVICE TYPE DISK GROUP STATUS
custom_d0 auto:cdsdisk mdisk_1 dg1 online
disk_1 auto:cdsdisk - - online
disk_2 auto:cdsdisk mdisk_2 dg1 online
disk_3 auto:none - - online invalid
disk_4 auto:none - - online invalid
- 通过文件批量修改DMP nodes名称
修改前输出
root@vxsvr:/ #>vxdisk list
DEVICE TYPE DISK GROUP STATUS
disk_0 auto:cdsdisk mdisk_1 dg1 online
disk_1 auto:cdsdisk - - online
disk_2 auto:cdsdisk mdisk_2 dg1 online
disk_3 auto:none - - online invalid
disk_4 auto:none - - online invalid使用vxgetdmpnames命令得到示例文件
root@vxsvr:/ #>vxgetdmpnames | tee newdmpnames.cfg
enclosure vendor=VMware, product=S serial=DISKS name=disk
dmpnode serial=6000C290D68E1959F1537AC91D3C8A1C name=disk_0
dmpnode serial=6000C29419574AF75AE8B300214AC41E name=disk_1
dmpnode serial=6000C29529CE798805684FB395512220 name=disk_2
dmpnode serial=6000C295B4EF9DCFCA993F7F9A6AC0C6 name=disk_3
dmpnode serial=6000C297E5DF20B0DB26779F9A59D7FF name=disk_4修改示例文件后,内容如下:
root@vxsvr:/ #>more "newdmpnames.cfg"
enclosure vendor=VMware, product=S serial=DISKS name=disk
dmpnode serial=6000C290D68E1959F1537AC91D3C8A1C name=custom_d0
dmpnode serial=6000C29419574AF75AE8B300214AC41E name=custom_d1
dmpnode serial=6000C29529CE798805684FB395512220 name=custom_d2
dmpnode serial=6000C295B4EF9DCFCA993F7F9A6AC0C6 name=custom_d3
dmpnode serial=6000C297E5DF20B0DB26779F9A59D7FF name=custom_d4给DMP nodes分配新名称
root@vxsvr:/ #>vxddladm assign names file=newdmpnames.cfg
修改后输出
root@vxsvr:/ #>vxdisk list
DEVICE TYPE DISK GROUP STATUS
custom_d0 auto:cdsdisk mdisk_1 dg1 online
custom_d1 auto:cdsdisk - - online
custom_d2 auto:cdsdisk mdisk_2 dg1 online
custom_d3 auto:none - - online invalid
custom_d4 auto:none - - online invalid
- 清除用户设置名称,恢复使用OSN(OS Based Name)或EBN(Enclosure Based Name)名称
root@vxsvr:/ #>vxddladm -c assign names
root@vxsvr:/ #>vxdisk list
DEVICE TYPE DISK GROUP STATUS
disk_0 auto:cdsdisk mdisk_1 dg1 online
disk_1 auto:cdsdisk - - online
disk_2 auto:cdsdisk mdisk_2 dg1 online
disk_3 auto:none - - online invalid
disk_4 auto:none - - online invalid
如果DMP nodes名称是EBN的,还可以通过修改Enclosure Name的方式间接修改DMP Nodes Name.
命令是:vxdmpadm setattr enclosure enclosure-name name=new-name