简体中文版经机器翻译而成,仅供参考。如与英语版出现任何冲突,应以英语版为准。

Linux Unified Host Utilities 7.1

提供者 netapp-ranuk

前提条件

您需要什么? #8217 ;将需要什么
  • 为了确保操作可靠,您必须验证您的整个 iSCSI , FC 或 FCoE 配置是否受支持。

    您可以使用 "NetApp 互操作性表工具" 以验证您的配置。

  • 您必须在供应商的网站上安装供应商提供的 HBA 管理软件包。

    通过管理软件, SAN 工具包命令可以收集有关 FC HBA 的信息,例如其 WWPN 。要使 sanlun fcp show 适配器正常工作,请确保安装了以下软件包:

    • QLogic HBA — QConvergeConsole CLI

    • Emulex HBA — OneCommand Manager 核心应用程序 CLI

    • Brocade HBA — Brocade Command Utility CLI

应在主机操作系统上安装可用于每个 Linux 分发版的 RPM 软件包 "libhbaapi" 和 "libhbalinux-" 。

SAN 工具包

Linux Unified Host Utilities 是一款 NetApp 主机软件,可在 Linux 主机上提供命令行工具包。

安装 NetApp Host Utilities 软件包时,工具包会自动安装。此套件提供 sanlun 实用程序,可帮助您管理 LUN 和 HBA 。sanlun 命令可返回有关映射到主机的 LUN 的信息,多路径以及创建启动程序组所需的信息。

在以下示例中, sanlun lun show 命令 返回 LUN 信息。

# sanlun lun show all
controller(7mode/E-Series)/            device     host               lun
vserver(cDOT/FlashRay)   lun-pathname  filename   adapter  protocol  size    Product
-------------------------------------------------------------------------
data_vserver          /vol/vol1/lun1   /dev/sdb   host16   FCP       120.0g  cDOT
data_vserver          /vol/vol1/lun1   /dev/sdc   host15   FCP       120.0g  cDOT
data_vserver          /vol/vol2/lun2   /dev/sdd   host16   FCP       120.0g  cDOT
data_vserver          /vol/vol2/lun2   /dev/sde   host15   FCP       120.0g  cDOT
注 此工具包在 Host Utilities 的所有配置和协议中通用。因此,其中某些内容适用于一种配置,而不适用于另一种配置。未使用的组件不会影响系统性能。
注 Citrix XenServer , Oracle VM 和 Red Hat Enterprise Virtualization Hypervisor 不支持 SAN 工具包。

安装 Linux Unified Host Utilities

上提供了 NetApp Linux Unified Host Utilities 软件包 "NetApp 支持站点" 在 32 位或 64 位 .rpm 文件中。

强烈建议安装 Linux Unified Host Utilities ,但这并不是必需的。这些实用程序不会更改 Linux 主机上的任何设置。这些实用程序可改进管理并帮助 NetApp 客户支持收集有关您的配置的信息。

  1. 如果当前已安装 Linux Unified Host Utilities 版本,请使用以下命令将其删除:

    rpm -e NetApp_Linux_unified_host_utilities_7-1

    对于旧版本的 Linux Host Utilities ,请转到安装了主机实用程序软件的目录,然后输入 uninstall 命令。

  2. 从下载 32 位或 64 位 Linux Unified Host Utilities 软件包 "NetApp 支持站点" 主机。

  3. 转到软件包下载到的目录,然后使用以下命令进行安装:

    rpm -ivh netapp_linux_unified_host_utilities_7-1.x86_64 x xx.rpm

    Verifying...                          ################################# [100%]
    Preparing...                          ################################# [100%]
    Updating / installing...
       1:netapp_linux_unified_host_utiliti################################# [100%]
  4. 验证安装。

    sanlun 版本

    sanlun version 7.1.386.1644

命令参考示例

列出映射到主机的所有主机启动程序

# sanlun fcp show adapter -v

adapter name:      host15
WWPN:              10000090fa022736
WWNN:              20000090fa022736
driver name:       lpfc
model:             LPe16002B-M6
model description: Emulex LPe16002B-M6 PCIe 2-port 16Gb Fibre Channel Adapter
serial number:     FC24637890
hardware version:  0000000b 00000010 00000000
driver version:    12.8.0.5; HBAAPI(I) v2.3.d, 07-12-10
firmware version:  12.8.340.8
Number of ports:   1
port type:         Fabric
port state:        Operational
supported speed:   4 GBit/sec, 8 GBit/sec, 16 GBit/sec
negotiated speed:  16 GBit/sec
OS device name:    /sys/class/scsi_host/host15

adapter name:      host16
WWPN:              10000090fa022737
WWNN:              20000090fa022737
driver name:       lpfc
model:             LPe16002B-M6
model description: Emulex LPe16002B-M6 PCIe 2-port 16Gb Fibre Channel Adapter
serial number:     FC24637890
hardware version:  0000000b 00000010 00000000
driver version:    12.8.0.5; HBAAPI(I) v2.3.d, 07-12-10
firmware version:  12.8.340.8
Number of ports:   1
port type:         Fabric
port state:        Operational
supported speed:   4 GBit/sec, 8 GBit/sec, 16 GBit/sec
negotiated speed:  16 GBit/sec
OS device name:    /sys/class/scsi_host/host16

列出映射到主机的所有 LUN

# sanlun lun show -p -v all

                    ONTAP Path: vs_sanboot:/vol/sanboot_169/lun
                           LUN: 0
                      LUN Size: 150g
                       Product: cDOT
                   Host Device: 3600a0980383143393124515873683561
              Multipath Policy: service-time 0
                DM-MP Features: 3 queue_if_no_path pg_init_retries 50
              Hardware Handler: 1 alua
            Multipath Provider: Native
----------- --------- ---------- ------- ------------ ---------- ----------
            host      vserver            host:
dm-mp       path      path       /dev/   chan:        vserver    major:
state       state     type       node    id:lun       LIF        minor
----------- --------- ---------- ------- ------------ ---------- ----------
active      up        primary    sdq    15:0:5:0     lif_18      65:0
active      up        primary    sds    16:0:5:0     lif_17      65:32
active      up        primary    sdac   16:0:7:0     lif_25      65:192
active      up        primary    sdad   15:0:7:0     lif_26      65:208
active      up        secondary  sdt    15:0:4:0     lif_20      65:48
active      up        secondary  sdr    15:0:6:0     lif_19      65:16
active      up        secondary  sdad   16:0:4:0     lif_27      66:96
active      up        secondary  sdan   16:0:6:0     lif_28      66:112

列出从给定 SVM 映射到主机的所有 LUN

# sanlun lun show -p -v vs_sanboot

                    ONTAP Path: vs_sanboot:/vol/sanboot_169/lun
                           LUN: 0
                      LUN Size: 160g
                       Product: cDOT
                   Host Device: 3600a0980383143393124515873683561
              Multipath Policy: service-time 0
                DM-MP Features: 3 queue_if_no_path pg_init_retries 50
              Hardware Handler: 1 alua
            Multipath Provider: Native
----------- --------- ---------- ------- ------------ --------------- ----------
            host      vserver            host:
dm-mp       path      path       /dev/   chan:        vserver         major:
state       state     type       node    id:lun       LIF             minor
----------- --------- ---------- ------- ------------ --------------- ----------
active      up        primary    sdce    15:0:5:0     lif_16g_5       69:32
active      up        primary    sdfk    16:0:5:0     lif_16g_7       130:96
active      up        primary    sdfm    16:0:7:0     lif_16g_8       130:128
active      up        primary    sdcg    15:0:7:0     lif_16g_6       69:64
active      up        secondary  sdcd    15:0:4:0     lif_16g_1       69:16
active      up        secondary  sdcf    15:0:6:0     lif_16g_2       69:48
active      up        secondary  sdfj    16:0:4:0     lif_16g_3       130:80
active      up        secondary  sdfl    16:0:6:0     lif_16g_4       130:112

列出映射到主机的给定 LUN 的所有属性

# sanlun lun show -p -v vs_sanboot:/vol/sanboot_169/lun

                    ONTAP Path: vs_sanboot:/vol/sanboot_169/lun
                           LUN: 0
                      LUN Size: 160g
                       Product: cDOT
                   Host Device: 3600a0980383143393124515873683561
              Multipath Policy: service-time 0
                DM-MP Features: 3 queue_if_no_path pg_init_retries 50
              Hardware Handler: 1 alua
            Multipath Provider: Native
----------- --------- ---------- ------- ------------ ----------------- ----------
            host      vserver            host:
dm-mp       path      path       /dev/   chan:        vserver           major:
state       state     type       node    id:lun       LIF               minor
----------- --------- ---------- ------- ------------ ----------------- ----------
active      up        primary    sdce    15:0:5:0     lif_16g_5         69:32
active      up        primary    sdfk    16:0:5:0     lif_16g_7         130:96
active      up        primary    sdfm    16:0:7:0     lif_16g_8         130:128
active      up        primary    sdcg    15:0:7:0     lif_16g_6         69:64
active      up        secondary  sdcd    15:0:4:0     lif_16g_1         69:16
active      up        secondary  sdcf    15:0:6:0     lif_16g_2         69:48
active      up        secondary  sdfj    16:0:4:0     lif_16g_3         130:80
active      up        secondary  sdfl    16:0:6:0     lif_16g_4         130:112

列出将给定 LUN 映射到主机的 ONTAP SVM 标识

# sanlun lun show -m -v vs_sanboot:/vol/sanboot_169/lun
                                                             device          host                  lun
vserver                       lun-pathname                   filename        adapter    protocol   size    product
---------------------------------------------------------------------------------------------------------------
vs_sanboot                    /vol/sanboot_169/lun           /dev/sdfm       host16     FCP        160g    cDOT
             LUN Serial number: 81C91$QXsh5a
         Controller Model Name: AFF-A400
          Vserver FCP nodename: 2008d039ea1308e5
          Vserver FCP portname: 2010d039ea1308e5
              Vserver LIF name: lif_16g_8
            Vserver IP address: 10.141.12.165
                                10.141.12.161
                                10.141.12.163
           Vserver volume name: sanboot_169     MSID::0x000000000000000000000000809E7CC3
         Vserver snapshot name:

按主机设备文件名列出 ONTAP LUN 属性

# sanlun lun show -d /dev/sdce
controller(7mode/E-Series)/                          device        host                lun
vserver(cDOT/FlashRay)      lun-pathname           filename      adapter    protocol   size    product
----------------------------------------------------------------------------------------------------
vs_sanboot                 /vol/sanboot_169/lun    /dev/sdce     host15     FCP        160g    cDOT
[root@sr630-13-169 ~]#

列出连接到主机的所有 SVM 目标 LIF WWPN

# sanlun lun show -wwpn
controller(7mode/E-Series)/   target                                            device          host       lun
vserver(cDOT/FlashRay)        wwpn               lun-pathname                   filename        adapter    size    product
-----------------------------------------------------------------------------------------------------------------------
vs_169_16gEmu                 202cd039ea1308e5   /vol/VOL_8g_169_2_8/lun        /dev/sdlo       host18     10g     cDOT
vs_169_16gEmu                 202cd039ea1308e5   /vol/VOL_8g_169_2_9/lun        /dev/sdlp       host18     10g     cDOT
vs_169_16gEmu                 202cd039ea1308e5   /vol/VOL_8g_169_2_7/lun        /dev/sdln       host18     10g     cDOT
vs_169_16gEmu                 202cd039ea1308e5   /vol/VOL_8g_169_2_5/lun        /dev/sdll       host18     10g     cDOT

列出给定 SVM 目标 LIF WWPN 在主机上看到的 ONTAP LUN

# sanlun lun show -wwpn 2010d039ea1308e5
controller(7mode/E-Series)/   target                                     device         host       lun
vserver(cDOT/FlashRay)        wwpn               lun-pathname            filename       adapter    size    product
---------------------------------------------------------------------------------------------------------------
vs_sanboot                    2010d039ea1308e5   /vol/sanboot_169/lun    /dev/sdfm      host16     160g    cDOT