Skip to main content
SAN hosts and cloud clients
简体中文版经机器翻译而成,仅供参考。如与英语版出现任何冲突,应以英语版为准。

( PowerVM vSCSI )发现和配置 LUN

贡献者

使用 PowerVM vSCSI 和 VIO 服务器时,必须使用 padmin 登录名以及相应的命令来配置和发现 LUN 。

步骤
  1. 以 padmin 身份登录到主机。

  2. 在 AIX 主机上,输入以下命令以发现新创建的 LUN :

    cfgdev

    cfgdev 命令会导致:

    • 用于登录到网络结构的启动程序。

    • 要检查新设备的系统。

    • 系统,用于创建新设备条目,其中新 LUN 会使用默认 PCM 映射为 MPIO 设备。

  3. 要验证是否已创建 hdisk MPIO 设备,请输入以下命令:

    lsdev -type disk

    LUN 在主机上显示为磁盘。这些磁盘的使用方式与在主机上使用本地磁盘的方式相同。

    记下 hdisk 实例编号。您可以在执行路径配置时使用它们。

    lsdev -type disk 命令可生成以下类型的输出。此示例中的输出已被截断。

    vioserver$ lsdev -type disk NetApp
    name     status      description
    hdisk0   Available   16 Bit LVD SCSI Disk Drive
    hdisk1   Available   16 Bit LVD SCSI Disk Drive
    hdisk2   Available   MPIO NetApp FCP Default PCM Disk
    hdisk3   Available   MPIO NetApp FCP Default PCM Disk
    hdisk4   Available   MPIO NetApp FCP Default PCM Disk
    hdisk5   Available   MPIO NetApp FCP Default PCM Disk
    hdisk6   Available   MPIO NetApp FCP Default PCM Disk
  4. 要获取有关设置的信息,请输入以下命令:

    lsdev -dev hdisk_name -attr

    lsdev -dev hdisk_name -attr 命令可生成以下输出:

    vioserver$ lsdev -dev hdisk2 -attr
    attribute value                   description                user-settable
    PCM   PCM/friend/NetApp   PCM Path Control Module          False
    PR_key_value    none                             Persistent Reserve Key Value            True
    algorithm       round_robin                      Algorithm                               True
    clr_q           no                               Device CLEARS its Queue on error        True
    dist_err_pcnt   0                                Distributed Error Sample Time           True
    dist_tw_width   50                               Distributed Error Sample Time           True
    hcheck_cmd      inquiry                          Health Check Command                    True
    hcheck_interval 30                               Health Check Interval                   True
    hcheck_mode     nonactive                        Health Check Mode                       True
    location                                         Location Label                          True
    lun_id          0x2000000000000                  Logical Unit Number ID                  False
    lun_reset_spt   yes                              LUN Level Reset                         True
    max_transfer    0x100000                         Maximum TRANSFER Size                   True
    node_name       0x500a0980894ae0e0               FC Node Name                            False
    pvid            00067fbad453a1da0000000000000000 Physical volume identifier              False
    q_err           yes                              Use QERR bit                            True
    q_type          simple                           Queuing TYPE                            True
    qfull_dly       2                                Delay in seconds for SCSI TASK SET FULL True
    queue_depth     64                               Queue DEPTH                             True
    reassign_to     120                              REASSIGN time out value                 True
    reserve_policy  no_reserve                       Reserve Policy                          True
    rw_timeout      30                               READ/WRITE time out value               True
    scsi_id         0xd10001                         SCSI ID                                 False
    start_timeout   60                               START unit time out value               True
    ww_name         0x500a0984994ae0e0               FC World Wide Name                      False
  5. 如果您的配置不支持 ALUA ,则必须执行 dotpaths 实用程序来设置路径优先级。dotpaths 实用程序会在您安装 Host Utilities 时安装。如果已启用 ALUA ,请勿使用 dotpaths 实用程序。输入以下命令,切换到 OEM_setup_env 模式以执行 dotpaths :

    OEM_setup_env

    当您进入 OEM_setup_env 模式时,命令行提示符将从美元符号变为井号,您将保持在 OEM_setup_env 模式,直到输入 exit 等命令将其暂停为止。

    示例

    ` # vioserver$ OEM_setup_env

  6. 如果您的配置支持 ALUA ,则可以使用它来设置路径优先级。验证是否已启用 ALUA :

    lun igroup show -instance igroup_name

    1. 如果未启用 ALUA ,请启用它:

      igroup set igroup_name ALUA yes

  7. 如果您的配置不支持 ALUA ,则必须执行 dotpaths 实用程序来设置路径优先级。dotpaths 实用程序会在您安装 Host Utilities 时安装。如果已启用 ALUA ,请勿使用 dotpaths 实用程序。

    1. 要设置所有 Data ONTAP LUN 的优先级,请输入:

      dotpaths

    2. 要设置一组特定磁盘的优先级,请输入:

      dotpaths [-hv] [hdiskN …​]

      使用 ` -v` 选项启用详细模式并显示所有优先级。使用 ` -q` 选项查询所有或单个磁盘优先级。

      以下是使用 dotpaths 实用程序的示例:

    vioserver# dotpaths -v
    hdisk2 (path 0): Optimized path - Setting priority to 255
    hdisk2 (path 1): Optimized path - Setting priority to 255
    hdisk2 (path 2): Unoptimized path - Current priority of 1 is correct
    hdisk2 (path 3): Unoptimized path - Current priority of 1 is correct
    ...
    Path priority set and/or verified for 22 disks, 86 total paths.
    vioserver#
  8. 要验证主机是否已发现 LUN ,请输入以下命令:

    ` # sanlun lun show -p`

    示例

    此示例显示了直连配置的 sanlun lun show -p 命令的典型输出。它还包括 sanlun lun show -d hdisk9 -v 命令,用于显示有关 hdisk9 的信息。此命令的输出已被截断。

    sanlun lun show -p
    
                        ONTAP Path: fas3170-aix03:/vol/ibmbc_aix01b14_fcp_vol8/ibmbc-aix01b14_fcp_lun0
                               LUN: 8
                          LUN Size: 3g
               Controller CF State: Cluster Enabled
                Controller Partner: fas3170-aix04
                       Host Device: hdisk9
                              Mode: 7
                Multipath Provider: AIX Native
            Multipathing Algorithm: round_robin
    --------- ----------- ------ ------- ------------- ----------
    host      controller  AIX            controller    AIX MPIO
    path      path        MPIO   host    target        path
    state     type        path   adapter port          priority
    --------- ----------- ------ ------- ------------- ----------
    up        secondary   path0  fcs0    3b              1
    up        primary     path1  fcs0    3a              1
    up        secondary   path2  fcs0    3a              1
    up        primary     path3  fcs0    3b              1
    up        secondary   path4  fcs0    4b              1
    up        secondary   path5  fcs0    4a              1
    up        primary     path6  fcs0    4b              1
    up        primary     path7  fcs0    4a              1
    up        secondary   path8  fcs1    3b              1
    up        primary     path9  fcs1    3a              1
    up        secondary   path10 fcs1    3a              1
    up        primary     path11 fcs1    3b              1
    up        secondary   path12 fcs1    4b              1
    up        secondary   path13 fcs1    4a              1
    up        primary     path14 fcs1    4b              1
    up        primary     path15 fcs1    4a              1
    sanlun lun show -vd hdisk10
                                                                          device          host                  lun
    vserver              lun-pathname                                     filename        adapter    protocol   size    mode
    ------------------------------------------------------------------------------------------------------------------------
    GPFS_p520_FC         /vol/GPFS_p520_FC_FlexVol_2/GPFS_p520_FC_LUN_2_4 hdisk10         fcs3       FCP        100g    C
                 LUN Serial number: 1k/yM$-ia5HC
             Controller Model Name: N5600
              Vserver FCP nodename: 200200a0980c892f
              Vserver FCP portname: 200a00a0980c892f
                  Vserver LIF name: GPFS_p520_FC_2
                Vserver IP address: 10.225.121.100
               Vserver volume name: GPFS_p520_FC_FlexVol_2  MSID::0x00000000000000000000000080000420
             Vserver snapshot name: