zoukankan      html  css  js  c++  java
  • HDLM工具介绍

    HDLM提供了以下一些工具,以方便HDLM多路径管理。

    1. dlmgetras

    hdlm信息收集工具,用来收集hdlm相关的各种日志、trace、配置等文件,以方便进行hdlm故障分析。

    命令格式

    DLMgetras {Collection_information_output_point_directory [-f Collection_information_definition_file_name] | -h} Collection_information_output_point_directory: 输出目录,dlmgetras收集的信息存储在此目录下

    -f Collection_information_definition_file_name:指定需要收集的目录和文件

    -h:显示命令帮助信息

    -f参数的示例文件

    # HDLM manager core file
    /opt/DynamicLinkManager/bin/core
    #
    # Oracle initial parameter
    /var/app/oracle/admin/sandb/pfile/init.ora
    #
    # Oracle Alert Directory
    /var/app/oracle/rdbms/log

    2. dlmcfgmgr

    此工具的作用是让/kernel/drv/dlmfdrv.conf文件的配置不需要重启主机而立即生效。

    命令格式

    dlmcfgmgr {-a|-h}
    
    -a: 将/kernel/drv/dlmfdrv.conf中的配置信息应用到HDLM driver, 即让配置立即生效
    
    -h: 显示帮助信息

    3. dlmsetconf

    从OS上获得设备信息,生成HDLM driver配置定义文件dlmfdrv.conf和HDLM nexus driver配置定义文件dlmndrv.conf。

    命令格式

    dlmsetconf [-d output-directory-name] [-r|-u]
    
    -d: 指定dlmfdrv.conf和dlmndrv.conf文件的生成目录
    
    -r: 此参数使当前已经存在的配置定义文件失效, 并重新生成一个新的配置定义文件. 如果不指定-r参数, 新生成的配置定义文件会继承已存在的配置定义文件信息.  二者的区别在于: 如果使用-r参数, 则所有的LUN都要重配置, 这有可能会改变已配置LUN的instance number/ minor number, 造成SVM设备不可用; 如果不使用-r参数, 则HDLM只重配置改变的LUN, 没改变的LUN不重新配置. 如果系统上有些LUN还在使用, 应尽量避免使用-r参数
    
    -u: 使用此参数只更新配置定义文件中LUN是否由HDLM管理这个属性(unconf 0表示由HDLM管理; 1表示从HDLM管理中移除). 此参数不会更新LUN的其它属性. 文件/opt/DynamicLinkManager/config/dlmfdrv.unconf中定义了希望从HDLM管理中移除的LUN信息.

    示例:

    dlmsetconf -u命令执行前的dlmfdrv.conf中的信息. 配置文件中有2个LUN, 每个LUN有4条路径. unconf属性为0, 表示LUN由HDLM管理.
    
    -bash-3.2# more /kernel/drv/dlmfdrv.conf
    ......
    ################## Admin Device(Do not change this field) ##################
    name="dlmfdrv" parent="pseudo" instance=0 AdminDevice;
    
    #
    ################## T131328 D0(AMS.75040975.0049) ##################
    name="dlmfdrv" parent="dlmndrv" instance=1
    FilterPath="/pci@0/pci@0/pci@8/pci@0/pci@1/QLGC,qlc@0/fp@0,0/ssd@w50060e80102a00f0,0"
    major=0x76 minor=0x2 target=131328 lun=0 first=1
    node-type="ddi_block:fabric" port-wwn="50060e80102a00f0"
    unconf=0 LDEV="AMS.75040975.0049"
    device-id="6964000100060014737364004849544143484920373530343039373530303439"
    device-name="c4t50060E80102A00F0d0"
    ......
    name="dlmfdrv" parent="dlmndrv" instance=3
    FilterPath="/pci@0/pci@0/pci@8/pci@0/pci@1/QLGC,qlc@0/fp@0,0/ssd@w50060e80102a00f3,0"
    major=0x76 minor=0x1a target=131072 lun=0 first=0
    node-type="ddi_block:fabric" port-wwn="50060e80102a00f3"
    unconf=0 LDEV="AMS.75040975.0049"
    device-id="6964000100060014737364004849544143484920373530343039373530303439"
    device-name="c4t50060E80102A00F0d0"
    ......
    name="dlmfdrv" parent="dlmndrv" instance=4
    FilterPath="/pci@0/pci@0/pci@9/QLGC,qlc@0/fp@0,0/ssd@w50060e80102a00f1,0"
    major=0x76 minor=0x12 target=131072 lun=0 first=0
    node-type="ddi_block:fabric" port-wwn="50060e80102a00f1"
    unconf=0 LDEV="AMS.75040975.0049"
    device-id="6964000100060014737364004849544143484920373530343039373530303439"
    device-name="c4t50060E80102A00F0d0"
    ......
    name="dlmfdrv" parent="dlmndrv" instance=2
    FilterPath="/pci@0/pci@0/pci@9/QLGC,qlc@0/fp@0,0/ssd@w50060e80102a00f2,0"
    major=0x76 minor=0xa target=131328 lun=0 first=0
    node-type="ddi_block:fabric" port-wwn="50060e80102a00f2"
    unconf=0 LDEV="AMS.75040975.0049"
    device-id="6964000100060014737364004849544143484920373530343039373530303439"
    device-name="c4t50060E80102A00F0d0"
    ......
    ################## T131328 D1(AMS.75040975.0050) ##################
    name="dlmfdrv" parent="dlmndrv" instance=5
    FilterPath="/pci@0/pci@0/pci@8/pci@0/pci@1/QLGC,qlc@0/fp@0,0/ssd@w50060e80102a00f0,1"
    major=0x76 minor=0x22 target=131328 lun=1 first=1
    node-type="ddi_block:fabric" port-wwn="50060e80102a00f0"
    unconf=0 LDEV="AMS.75040975.0050"
    device-id="6964000100060014737364004849544143484920373530343039373530303530"
    device-name="c5t50060E80102A00F0d1"
    ......
    name="dlmfdrv" parent="dlmndrv" instance=6
    FilterPath="/pci@0/pci@0/pci@8/pci@0/pci@1/QLGC,qlc@0/fp@0,0/ssd@w50060e80102a00f3,1"
    major=0x76 minor=0x2a target=131072 lun=1 first=0
    node-type="ddi_block:fabric" port-wwn="50060e80102a00f3"
    unconf=0 LDEV="AMS.75040975.0050"
    device-id="6964000100060014737364004849544143484920373530343039373530303530"
    device-name="c5t50060E80102A00F0d1"
    ......
    name="dlmfdrv" parent="dlmndrv" instance=7
    FilterPath="/pci@0/pci@0/pci@9/QLGC,qlc@0/fp@0,0/ssd@w50060e80102a00f1,1"
    major=0x76 minor=0x32 target=131072 lun=1 first=0
    node-type="ddi_block:fabric" port-wwn="50060e80102a00f1"
    unconf=0 LDEV="AMS.75040975.0050"
    device-id="6964000100060014737364004849544143484920373530343039373530303530"
    device-name="c5t50060E80102A00F0d1"
    ......
    name="dlmfdrv" parent="dlmndrv" instance=8
    FilterPath="/pci@0/pci@0/pci@9/QLGC,qlc@0/fp@0,0/ssd@w50060e80102a00f2,1"
    major=0x76 minor=0x3a target=131328 lun=1 first=0
    node-type="ddi_block:fabric" port-wwn="50060e80102a00f2"
    unconf=0 LDEV="AMS.75040975.0050"
    device-id="6964000100060014737364004849544143484920373530343039373530303530"
    device-name="c5t50060E80102A00F0d1"
    ......
    ################## End of dlmfdrv.conf                    ##################
    
    修改/opt/DynamicLinkManager/config/dlmfdrv.unconf文件, 将LUN50从HDLM管理中移除
    -bash-3.2# more /opt/DynamicLinkManager/config/dlmfdrv.unconf
    #
    # All Rights Reserved. Copyright (C) 2003, 2012, Hitachi, Ltd.
    #
    # dlmfdrv.unconf by dlmsetconf 7.31.0   2012/05/17
    #
    # Usage: To Unconfigure a LU from HDLM, remove only the character '#'
    #        in front of the "LDEV" property line corresponding to the LU,
    #        and then execute "dlmsetconf -u" and "reboot -- -r" commands.
    # Note1: "LDEV" property represents logical unit (LU) in storage subsystem.
    # Note2: Do not edit other character except for the character '#'
    #        in front of the "LDEV" property lines.
    #
    ##################### HDLM unconfiguration definition file #####################
    
    #
    ################## T131328 D0(AMS.75040975.0049) ##################
    ### Device=ssd0 target=131328 lun=0
    ### Path=/pci@0/pci@0/pci@8/pci@0/pci@1/QLGC,qlc@0/fp@0,0/ssd@w50060e80102a00f0,0
    ### Device=ssd3 target=131072 lun=0
    ### Path=/pci@0/pci@0/pci@8/pci@0/pci@1/QLGC,qlc@0/fp@0,0/ssd@w50060e80102a00f3,0
    ### Device=ssd2 target=131072 lun=0
    ### Path=/pci@0/pci@0/pci@9/QLGC,qlc@0/fp@0,0/ssd@w50060e80102a00f1,0
    ### Device=ssd1 target=131328 lun=0
    ### Path=/pci@0/pci@0/pci@9/QLGC,qlc@0/fp@0,0/ssd@w50060e80102a00f2,0
    #LDEV=AMS.75040975.0049;
    ################## T131328 D1(AMS.75040975.0050) ##################
    ### Device=ssd4 target=131328 lun=1
    ### Path=/pci@0/pci@0/pci@8/pci@0/pci@1/QLGC,qlc@0/fp@0,0/ssd@w50060e80102a00f0,1
    ### Device=ssd5 target=131072 lun=1
    ### Path=/pci@0/pci@0/pci@8/pci@0/pci@1/QLGC,qlc@0/fp@0,0/ssd@w50060e80102a00f3,1
    ### Device=ssd6 target=131072 lun=1
    ### Path=/pci@0/pci@0/pci@9/QLGC,qlc@0/fp@0,0/ssd@w50060e80102a00f1,1
    ### Device=ssd7 target=131328 lun=1
    ### Path=/pci@0/pci@0/pci@9/QLGC,qlc@0/fp@0,0/ssd@w50060e80102a00f2,1
    LDEV=AMS.75040975.0050;
    
    ##################### End of dlmfdrv.unconf                #####################
    
    执行dlmsetconf -u:
    -bash-3.2# dlmsetconf -u
    KAPL10204-I dlmsetconf completed successfully.
    
    dlmfdrv.conf文件中LUN50的unconf值变为1
    -bash-3.2# grep -i unconf /kernel/drv/dlmfdrv.conf
    unconf=0 LDEV="AMS.75040975.0049"
    unconf=0 LDEV="AMS.75040975.0049"
    unconf=0 LDEV="AMS.75040975.0049"
    unconf=0 LDEV="AMS.75040975.0049"
    unconf=1 LDEV="AMS.75040975.0050"
    unconf=1 LDEV="AMS.75040975.0050"
    unconf=1 LDEV="AMS.75040975.0050"
    unconf=1 LDEV="AMS.75040975.0050"
  • 相关阅读:
    IDEA上传项目至git
    MyBatis 三种批量插入方式的对比 !
    华为 Java 编程军规 !
    Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    mysql数据库表的查询操作-总结
    idea返回git上历史版本
    JSONObject json对象-JSONArray json数组
    exception in thread "main" com.alibaba.fastjson.JSONException: exepct '[', but
    第三课
    第二课
  • 原文地址:https://www.cnblogs.com/cqubityj/p/3666063.html
Copyright © 2011-2022 走看看