风影子
作者风影子·2012-05-09 21:21
数据库管理员·深圳

解决AIX下识别HDS磁盘阵列多路径问题

字数 31773阅读 120612评论 7赞 15

        公司有台日立HDS AMS2003磁盘阵列,基本还没怎么使用,于是尝试分配了4个500G的LUN给一台测试服务器,都做了冗余,每块盘都有4条路径,分配好后在AIX识别出来了,但每块盘都重复了4次。因为是以前使用的都是IBM的阵列,没发现过有这样的问题,于是发贴求助

      新划的磁盘阵列,lspv显示重复了4次http://www.aixchina.net/club/thread-78460-1-1.html

      通过查询资料确定了是多路径的问题,需要用到HDLML软件,印象中听日立原厂的工程师提到过,于是QQ联系日立原厂工程师拿到了安装介质及license,并在指导下解决了问题,以下是我根据记录的日志整理的步骤。

 1       问题

       磁盘阵列使用的是日立HDS AMS2003RAID之前就做好了,现在我分配了4500GLUN给一台AIX服务器使用,但在AIX识别时居然重复了4

 [test2:root:/] lspv

hdisk0          00c48a56795bc09d                    rootvg          active

hdisk1          00c48a566bbc5382                    rootvg          active

hdisk2          00c48a562bbcd401                    None            

hdisk3          00c48a562bbe131f                    None            

hdisk4          00c48a562bbe139b                    None            

hdisk5          00c48a562bbe1422                    None            

hdisk6          00c48a562bbcd401                    None            

hdisk7          00c48a562bbe131f                    None            

hdisk8          00c48a562bbe139b                    None            

hdisk9          00c48a562bbe1422                    None            

hdisk10         00c48a562bbcd401                    None            

hdisk11         00c48a562bbe131f                    None            

hdisk12         00c48a562bbe139b                    None            

hdisk13         00c48a562bbe1422                    None            

hdisk14         00c48a562bbcd401                    None            

hdisk15         00c48a562bbe131f                    None            

hdisk16         00c48a562bbe139b                    None            

hdisk17         00c48a562bbe1422                    None            

[test2:root:/] lspath

Enabled   hdisk0 sas0

Enabled   hdisk1 sas0

Available ses0   sas0

Available ses1   sas0         

 

[test2:root:/] lsdev -Cc disk

hdisk0  Available 03-08-00 SAS Disk Drive

hdisk1  Available 03-08-00 SAS Disk Drive

hdisk2  Available 02-01-02 Other FC SCSI Disk Drive

hdisk3  Available 02-01-02 Other FC SCSI Disk Drive

hdisk4  Available 02-01-02 Other FC SCSI Disk Drive

hdisk5  Available 02-01-02 Other FC SCSI Disk Drive

hdisk6  Available 02-01-02 Other FC SCSI Disk Drive

hdisk7  Available 02-01-02 Other FC SCSI Disk Drive

hdisk8  Available 02-01-02 Other FC SCSI Disk Drive

hdisk9  Available 02-01-02 Other FC SCSI Disk Drive

hdisk10 Available 06-01-02 Other FC SCSI Disk Drive

hdisk11 Available 06-01-02 Other FC SCSI Disk Drive

hdisk12 Available 06-01-02 Other FC SCSI Disk Drive

hdisk13 Available 06-01-02 Other FC SCSI Disk Drive

hdisk14 Available 06-01-02 Other FC SCSI Disk Drive

hdisk15 Available 06-01-02 Other FC SCSI Disk Drive

hdisk16 Available 06-01-02 Other FC SCSI Disk Drive

hdisk17 Available 06-01-02 Other FC SCSI Disk Drive

 

2       解决过程  

2.1     license

         上传license文件HDS HDLM AIX.plk/var/tmp,并改名为hdlm_license

[test2:root:/] cd /var/tmp

[test2:root:/var/tmp] ls

.oracle                              dpid2.log                            oradiag_oracle                       snmpdv3.log

HDS HDLM AIX.plk                     hostmibd.log                         slp_srvreg.lock                      snmpmibd.log

aixmibd.log                          installpbx-2228732-031811161323.log  snmpd.log

[test2:root:/var/tmp] mv "HDS HDLM AIX.plk" hdlm_license

[test2:root:/var/tmp] ls

.oracle                              hdlm_license                         oradiag_oracle                       snmpdv3.log

aixmibd.log                          hostmibd.log                         slp_srvreg.lock                      snmpmibd.log

dpid2.log                            installpbx-2228732-031811161323.log  snmpd.log

2.2     上传HDLM软件镜像文件并加载镜

HDLM软件为一个ISO镜像文件,包含各个平台的HDLM软件,还从来没在AIX系统中加载过ISO文件,于是马上上网查询,终于找到了一个最简单的办法

mount ISO镜像:

#loopmount -i dlmglm_072001.iso -o "-V cdrfs -o ro" -m /mnt

unmount ISO镜像:

#fuser -cuk /mnt

#unmount /mnt

2.3     安装ODM

[test2:root:/var/tmp] cd /mnt

[test2:root:/mnt] ls

Autorun.inf        HDLM_AIX           HDLM_Solaris       HDLM_Windows       PSP                index.html         rr_moved

Contents_list.txt  HDLM_Linux         HDLM_VMware        HGLM               hcmdslicense2      installux.sh

[test2:root:/mnt] cd HDLM_AIX

[test2:root:/mnt/HDLM_AIX] ls

.toc                AIX_ODM             DLManager.mpio.bff  hdlmtool            netmdm_sample

[test2:root:/mnt/HDLM_AIX] cd AIX_ODM

[test2:root:/mnt/HDLM_AIX/AIX_ODM] ls

HTC_ODM     XP_ODM      readme.txt

[test2:root:/mnt/HDLM_AIX/AIX_ODM] cd HTC*

[test2:root:/mnt/HDLM_AIX/AIX_ODM/HTC_ODM] ls

HTCODM3.tar     HTC_readme.txt

[test2:root:/mnt/HDLM_AIX/AIX_ODM/HTC_ODM] mkdir /tmp/hdlm

[test2:root:/mnt/HDLM_AIX/AIX_ODM/HTC_ODM] cp *.tar /tmp/hdlm

[test2:root:/mnt/HDLM_AIX/AIX_ODM/HTC_ODM] cd /tmp/hdlm

[test2:root:/tmp/hdlm] ls

HTCODM3.tar

[test2:root:/tmp/hdlm] tar xBpf *

[test2:root:/tmp/hdlm] ls

HTCODM3.tar        HTC_FC_ODM_5001I   HTC_FC_ODM_5005U   HTC_FC_ODM_50521U  HTC_FC_ODM_50522U  HTC_FC_ODM_50523U

[test2:root:/tmp/hdlm] smitty installp

通过以上步骤即完成了ODM的安装

[test2:root:/tmp/hdlm] lslpp -l |grep -i dlm

[test2:root:/tmp/hdlm] lslpp -l |grep -i hitachi

  Hitachi.aix.support.rte   5.0.52.3  COMMITTED  AIX Support for Hitachi Disk

2.4     安装HDLM

[test2:root:/tmp/hdlm] cd /mnt

[test2:root:/mnt] ls

Autorun.inf        HDLM_AIX           HDLM_Solaris       HDLM_Windows       PSP                index.html         rr_moved

Contents_list.txt  HDLM_Linux         HDLM_VMware        HGLM               hcmdslicense2      installux.sh

[test2:root:/mnt] cd HDLM_AIX

[test2:root:/mnt/HDLM_AIX] smitty installp

通过以上步骤即完成HDLM的安装

[test2:root:/mnt/HDLM_AIX] lslpp -l |grep -i dlm

  DLManager.mpio.rte         7.2.0.0  COMMITTED  Dynamic Link Manager

  DLManager.mpio.rte         7.2.0.0  COMMITTED  Dynamic Link Manager

2.5     重新识别磁盘

[test2:root:/mnt/HDLM_AIX] cfgmgr

[test2:root:/mnt/HDLM_AIX] lsdev -Cc disk

hdisk0  Available 03-08-00 SAS Disk Drive

hdisk1  Available 03-08-00 SAS Disk Drive

hdisk2  Available 02-01-02 Other FC SCSI Disk Drive

hdisk3  Available 02-01-02 Other FC SCSI Disk Drive

hdisk4  Available 02-01-02 Other FC SCSI Disk Drive

hdisk5  Available 02-01-02 Other FC SCSI Disk Drive

hdisk6  Available 02-01-02 Other FC SCSI Disk Drive

hdisk7  Available 02-01-02 Other FC SCSI Disk Drive

hdisk8  Available 02-01-02 Other FC SCSI Disk Drive

hdisk9  Available 02-01-02 Other FC SCSI Disk Drive

hdisk10 Available 06-01-02 Other FC SCSI Disk Drive

hdisk11 Available 06-01-02 Other FC SCSI Disk Drive

hdisk12 Available 06-01-02 Other FC SCSI Disk Drive

hdisk13 Available 06-01-02 Other FC SCSI Disk Drive

hdisk14 Available 06-01-02 Other FC SCSI Disk Drive

hdisk15 Available 06-01-02 Other FC SCSI Disk Drive

hdisk16 Available 06-01-02 Other FC SCSI Disk Drive

hdisk17 Available 06-01-02 Other FC SCSI Disk Drive

hdisk18 Available 02-01-02 Hitachi Disk Array (Fibre)

hdisk19 Available 02-01-02 Hitachi Disk Array (Fibre)

hdisk20 Available 02-01-02 Hitachi Disk Array (Fibre)

hdisk21 Available 02-01-02 Hitachi Disk Array (Fibre)

 

         可以看到hdisk18hdisk21已经识别为Hitachi的盘了

 

2.6     检查HDLM相关信息

[test2:root:/mnt/HDLM_AIX] cd /usr/D*/bin

[test2:root:/usr/DynamicLinkManager/bin] ./dlnkmgr view -lu

Product       : AMS

SerialNumber  : 85013612       

LUs           : 4

 

iLU  HDevName OSPathID PathID Status    

0011 hdisk21  00000    000000 Online    

              00001    000001 Online    

              00002    000002 Online    

0012 hdisk18  00000    000007 Online    

              00001    000008 Online    

              00002    000009 Online    

              00003    000010 Online    

0013 hdisk19  00000    000011 Online    

              00001    000012 Online    

              00002    000013 Online    

              00003    000014 Online    

0014 hdisk20  00000    000003 Online    

              00001    000004 Online    

              00002    000005 Online    

              00003    000006 Online    

KAPL01001-I The HDLM command completed normally. Operation name = view, completion time = 2012/05/09 15:16:22

 

2.7     修改磁盘队列深度

[test2:root:/usr/DynamicLinkManager/bin] chdev -l hdisk18 -a queue_depth=8

hdisk18 changed

[test2:root:/usr/DynamicLinkManager/bin] chdev -l hdisk19 -a queue_depth=8

hdisk19 changed

[test2:root:/usr/DynamicLinkManager/bin] r 19=20

chdev -l hdisk20 -a queue_depth=8

hdisk20 changed

[test2:root:/usr/DynamicLinkManager/bin] r 20=21

chdev -l hdisk21 -a queue_depth=8

hdisk21 changed

 

[test2:root:/usr/DynamicLinkManager/bin] lsdev -Cc disk

hdisk0  Available 03-08-00 SAS Disk Drive

hdisk1  Available 03-08-00 SAS Disk Drive

hdisk2  Available 02-01-02 Other FC SCSI Disk Drive

hdisk3  Available 02-01-02 Other FC SCSI Disk Drive

hdisk4  Available 02-01-02 Other FC SCSI Disk Drive

hdisk5  Available 02-01-02 Other FC SCSI Disk Drive

hdisk6  Available 02-01-02 Other FC SCSI Disk Drive

hdisk7  Available 02-01-02 Other FC SCSI Disk Drive

hdisk8  Available 02-01-02 Other FC SCSI Disk Drive

hdisk9  Available 02-01-02 Other FC SCSI Disk Drive

hdisk10 Available 06-01-02 Other FC SCSI Disk Drive

hdisk11 Available 06-01-02 Other FC SCSI Disk Drive

hdisk12 Available 06-01-02 Other FC SCSI Disk Drive

hdisk13 Available 06-01-02 Other FC SCSI Disk Drive

hdisk14 Available 06-01-02 Other FC SCSI Disk Drive

hdisk15 Available 06-01-02 Other FC SCSI Disk Drive

hdisk16 Available 06-01-02 Other FC SCSI Disk Drive

hdisk17 Available 06-01-02 Other FC SCSI Disk Drive

hdisk18 Available 02-01-02 Hitachi Disk Array (Fibre)

hdisk19 Available 02-01-02 Hitachi Disk Array (Fibre)

hdisk20 Available 02-01-02 Hitachi Disk Array (Fibre)

hdisk21 Available 02-01-02 Hitachi Disk Array (Fibre)

[test2:root:/usr/DynamicLinkManager/bin] lspath

Enabled   hdisk0  sas0

Enabled   hdisk1  sas0

Enabled   hdisk18 fscsi1

Enabled   hdisk18 fscsi1

Enabled   hdisk18 fscsi3

Enabled   hdisk18 fscsi3

Enabled   hdisk19 fscsi1

Enabled   hdisk19 fscsi1

Enabled   hdisk19 fscsi3

Enabled   hdisk19 fscsi3

Enabled   hdisk20 fscsi1

Enabled   hdisk20 fscsi1

Enabled   hdisk20 fscsi3

Enabled   hdisk20 fscsi3

Enabled   hdisk21 fscsi1

Enabled   hdisk21 fscsi3

Enabled   hdisk21 fscsi3

Available ses0    sas0

Available ses1    sas0

[test2:root:/usr/DynamicLinkManager/bin] lsattr -El fcs1

bus_intr_lvl             Bus interrupt level                                False

bus_io_addr   0xffc00    Bus I/O address                                    False

bus_mem_addr  0xffe7f000 Bus memory address                                 False

bus_mem_addr2 0xffe7d000 Bus memory address                                 False

init_link     al         INIT Link flags                                    True

intr_msi_1    534        Bus interrupt level                                False

intr_priority 3          Interrupt priority                                 False

lg_term_dma   0x800000   Long term DMA                                      True

max_xfer_size 0x100000   Maximum Transfer Size                              True

num_cmd_elems 200        Maximum number of COMMANDS to queue to the adapter True

pref_alpa     0x1        Preferred AL_PA                                    True

sw_fc_class   2          FC Class for Fabric                                True

tme           no         Target Mode Enabled                                True

[test2:root:/usr/DynamicLinkManager/bin] lsatt -El fscsi1

ksh: lsatt:  not found.

[test2:root:/usr/DynamicLinkManager/bin] lsattr -El fscsi1

attach       switch       How this adapter is CONNECTED         False

dyntrk       no           Dynamic Tracking of FC Devices        True

fc_err_recov delayed_fail FC Fabric Event Error RECOVERY Policy True

scsi_id      0x10500      Adapter SCSI ID                       False

sw_fc_class  3            FC Class for Fabric                   True

[test2:root:/usr/DynamicLinkManager/bin] lsattr -El fscsi3

attach       switch       How this adapter is CONNECTED         False

dyntrk       no           Dynamic Tracking of FC Devices        True

fc_err_recov delayed_fail FC Fabric Event Error RECOVERY Policy True

scsi_id      0x10300      Adapter SCSI ID                       False

sw_fc_class  3            FC Class for Fabric                   True

 

[test2:root:/usr/DynamicLinkManager/bin] rmdev -dl hdisk18

hdisk18 deleted

[test2:root:/usr/DynamicLinkManager/bin] r 18=19

rmdev -dl hdisk19

hdisk19 deleted

[test2:root:/usr/DynamicLinkManager/bin] r 19=20

rmdev -dl hdisk20

hdisk20 deleted

[test2:root:/usr/DynamicLinkManager/bin] r 20=21

rmdev -dl hdisk21

hdisk21 deleted

[test2:root:/usr/DynamicLinkManager/bin]

[test2:root:/usr/DynamicLinkManager/bin]

[test2:root:/usr/DynamicLinkManager/bin]

2.8     修改HBA卡参数,以满足HDLM需要

[test2:root:/usr/DynamicLinkManager/bin] rmdev -l fcs1 -R

fcnet1 Defined

sfwcomm1 Defined

hdisk2 Defined

hdisk3 Defined

hdisk4 Defined

hdisk5 Defined

hdisk6 Defined

hdisk7 Defined

hdisk8 Defined

hdisk9 Defined

fscsi1 Defined

fcs1 Defined

[test2:root:/usr/DynamicLinkManager/bin] rmdev -l fcs3 -R

fcnet3 Defined

sfwcomm3 Defined

hdisk10 Defined

hdisk11 Defined

hdisk12 Defined

hdisk13 Defined

hdisk14 Defined

hdisk15 Defined

hdisk16 Defined

hdisk17 Defined

fscsi3 Defined

fcs3 Defined

[test2:root:/usr/DynamicLinkManager/bin] chdev -l fscsi1 -a fc_err_recov=fast_fail

fscsi1 changed

[test2:root:/usr/DynamicLinkManager/bin] r 1=3

chdev -l fscsi3 -a fc_err_recov=fast_fail

fscsi3 changed

[test2:root:/usr/DynamicLinkManager/bin]

[test2:root:/usr/DynamicLinkManager/bin]

[test2:root:/usr/DynamicLinkManager/bin]

[test2:root:/usr/DynamicLinkManager/bin] cfgmgr

[test2:root:/usr/DynamicLinkManager/bin] lsdev -Cc disk

hdisk0  Available 03-08-00 SAS Disk Drive

hdisk1  Available 03-08-00 SAS Disk Drive

hdisk2  Available 02-01-02 Hitachi Disk Array (Fibre)

hdisk3  Available 02-01-02 Hitachi Disk Array (Fibre)

hdisk4  Available 02-01-02 Hitachi Disk Array (Fibre)

hdisk5  Available 02-01-02 Hitachi Disk Array (Fibre)

hdisk6  Defined   02-01-02 Other FC SCSI Disk Drive

hdisk7  Defined   02-01-02 Other FC SCSI Disk Drive

hdisk8  Defined   02-01-02 Other FC SCSI Disk Drive

hdisk9  Defined   02-01-02 Other FC SCSI Disk Drive

hdisk10 Defined   06-01-02 Other FC SCSI Disk Drive

hdisk11 Defined   06-01-02 Other FC SCSI Disk Drive

hdisk12 Defined   06-01-02 Other FC SCSI Disk Drive

hdisk13 Defined   06-01-02 Other FC SCSI Disk Drive

hdisk14 Defined   06-01-02 Other FC SCSI Disk Drive

hdisk15 Defined   06-01-02 Other FC SCSI Disk Drive

hdisk16 Defined   06-01-02 Other FC SCSI Disk Drive

hdisk17 Defined   06-01-02 Other FC SCSI Disk Drive

[test2:root:/usr/DynamicLinkManager/bin] cd /usr/D*/bin

[test2:root:/usr/DynamicLinkManager/bin] ls

.DLMgetras_light    UtilAudLog          dlmglcl             dlmmgr              dlmpreuninst        hcmdslicense2

DLMGLCL             dlmchpdattr         dlmguiinst.sh       dlmodmset           dlmrmdev            rastool

DLMLocal.jar        dlmecho             dlmguiuninst.sh     dlmpostrestore      dlmwebgui_setup.sh

DLMgetras           dlmgetras           dlminstcomp         dlmpr               dlnkmgr

[test2:root:/usr/DynamicLinkManager/bin] ./dlnkmgr view -lu

Product       : AMS

SerialNumber  : 85013612       

LUs           : 4

 

iLU  HDevName OSPathID PathID Status    

0011 hdisk2   00000    000004 Online    

              00001    000005 Online    

              00002    000006 Online    

              00003    000007 Online    

0012 hdisk3   00000    000000 Online    

              00001    000001 Online    

              00002    000002 Online    

              00003    000003 Online    

0013 hdisk4   00000    000012 Online    

              00001    000013 Online    

              00002    000014 Online    

              00003    000015 Online    

0014 hdisk5   00000    000008 Online    

              00001    000009 Online    

              00002    000010 Online    

              00003    000011 Online    

KAPL01001-I The HDLM command completed normally. Operation name = view, completion time = 2012/05/09 15:23:19

[test2:root:/usr/DynamicLinkManager/bin] lspv

hdisk0          00c48a56795bc09d                    rootvg          active

hdisk1          00c48a566bbc5382                    rootvg          active

hdisk2          00c48a562bbcd401                    None           

hdisk3          00c48a562bbe131f                    None           

hdisk4          00c48a562bbe139b                    None           

hdisk5          00c48a562bbe1422                    None   

 

如果觉得我的文章对您有用,请点赞。您的支持将鼓励我继续创作!

15

添加新评论7 条评论

skilljiangskilljiang存储架构师COSCON
2014-12-22 20:16
没有HDLM,直接装个MPIO就行了
daoguo525daoguo525系统工程师世纪五岳(北京)科技有限公司
2014-02-20 21:43
tonnytigertonnytiger销售代表杭州荣志
2012-07-19 11:52
比较的深奥
冰封的火焰冰封的火焰系统运维工程师日海通讯
2012-07-18 16:58
也碰到HDS鬼盘问题,HATICH的多路径管理软件还需要花银子买LICENSE的
larry001larry001系统运维工程师思达奇
2012-06-28 00:09
好文啊 !!!!!!!!!!
jinruiweijinruiwei系统架构师敦阳(宁波)科技有限公司
2012-06-18 13:29
zhenzongjianzhenzongjian软件开发工程师na
2012-06-01 09:18
每个厂商的硬件驱动不太兼容的
Ctrl+Enter 发表

作者其他文章

相关问题

相关资料

X社区推广