7.2. 为丢失的连接收集信息会导致 VMware ESXi 上的存储失败

收集系统和磁盘信息有助于确定哪些 iSCSI 目标丢失连接,并可能导致存储失败。如果需要,还可以向红帽全球支持服务提供收集这些信息,以帮助您对任何 Ceph iSCSI 网关问题进行故障排除。

先决条件

  • 一个正在运行的 Red Hat Ceph Storage 集群。
  • 正在运行的 Ceph iSCSI 网关,即 iSCSI 目标。
  • 正在运行的 VMware ESXi 环境,即 iSCSI 启动器。
  • 对 VMware ESXi 节点的根级别访问权限.

流程

  1. 在 VWware ESXi 节点上打开内核日志:

    [root@esx:~]# more /var/log/vmkernel.log
  2. 从 VMware ESXi 内核日志中的以下错误消息收集信息:

    示例

    2022-05-30T11:07:07.570Z cpu32:66506)iscsi_vmk:
    iscsivmk_ConnRxNotifyFailure: Sess [ISID: 00023d000005 TARGET:
    iqn.2017-12.com.redhat.iscsi-gw:ceph-igw TPGT: 3 TSIH: 0]

    在此消息中,记录 ISID 号、TARGET 名称和 Target Portal Group Tag(TPGT)号。在本例中,有以下内容:

    ISID: 00023d000005
    TARGET: iqn.2017-12.com.redhat.iscsi-gw:ceph-igw
    TPGT: 3

    示例

    2022-05-30T11:07:07.570Z cpu32:66506)iscsi_vmk:
    iscsivmk_ConnRxNotifyFailure: vmhba64:CH:4 T:0 CN:0: Connection rx
    notifying failure: Failed to Receive. State=Bound

    在此信息中记录适配器频道(CH)号。在本例中,有以下内容:

    vmhba64:CH:4 T:0
  3. 查找 Ceph iSCSI 网关节点的远程地址:

    [root@esx:~]# esxcli iscsi session connection list

    示例

    ...
    vmhba64,iqn.2017-12.com.redhat.iscsi-gw:ceph-igw,00023d000003,0
       Adapter: vmhba64
       Target: iqn.2017-12.com.redhat.iscsi-gw:ceph-igw 1
       ISID: 00023d000003 2
       CID: 0
       DataDigest: NONE
       HeaderDigest: NONE
       IFMarker: false
       IFMarkerInterval: 0
       MaxRecvDataSegmentLength: 131072
       MaxTransmitDataSegmentLength: 262144
       OFMarker: false
       OFMarkerInterval: 0
       ConnectionAddress: 10.2.132.2
       RemoteAddress: 10.2.132.2 3
       LocalAddress: 10.2.128.77
       SessionCreateTime: 03/28/18 21:45:19
       ConnectionCreateTime: 03/28/18 21:45:19
       ConnectionStartTime: 03/28/18 21:45:19
       State: xpt_wait
    ...

    从命令输出中,匹配 ISID 值和前面收集的 TARGET 名称值,然后记下 RemoteAddress 值。在这个示例中,有以下内容:

    Target: iqn.2017-12.com.redhat.iscsi-gw:ceph-igw
    ISID: 00023d000003
    RemoteAddress: 10.2.132.2

    现在,您可以从 Ceph iSCSI 网关节点收集更多信息,以进一步排除此问题。

    1. RemoteAddress 值提及的 Ceph iSCSI 网关节点上,运行 sosreport 来收集系统信息:

      [root@igw ~]# sosreport
  4. 查找进入死状态的磁盘:

    [root@esx:~]# esxcli storage nmp device list

    示例

    ...
    iqn.1998-01.com.vmware:d04-nmgjd-pa-zyc-sv039-rh2288h-xnh-732d78fd-00023d000004,iqn.2017-12.com.redhat.iscsi-gw:ceph-igw,t,3-naa.60014054a5d46697f85498e9a257567c
       Runtime Name: vmhba64:C4:T0:L4 1
       Device: naa.60014054a5d46697f85498e9a257567c 2
       Device Display Name: LIO-ORG iSCSI Disk
    (naa.60014054a5d46697f85498e9a257567c)
       Group State: dead 3
       Array Priority: 0
       Storage Array Type Path Config:
    {TPG_id=3,TPG_state=ANO,RTP_id=3,RTP_health=DOWN} 4
       Path Selection Policy Path Config: {non-current path; rank: 0}
    ...

    从命令输出中,与 CH 号和前面收集的 TPGT 编号匹配,然后记下 Device 值。在本例中,有以下内容:

    vmhba64:C4:T0
    Device: naa.60014054a5d46697f85498e9a257567c
    TPG_id=3

    使用设备名称时,您可以收集处于 状态的每个 iSCSI 磁盘的一些附加信息。

    1. 收集 iSCSI 磁盘的更多信息:

      语法

      esxcli storage nmp path list -d ISCSI_DISK_DEVICE > /tmp/esxcli_storage_nmp_path_list.txt
      esxcli storage core device list -d ISCSI_DISK_DEVICE > /tmp/esxcli_storage_core_device_list.txt

      示例

      [root@esx:~]# esxcli storage nmp path list -d naa.60014054a5d46697f85498e9a257567c > /tmp/esxcli_storage_nmp_path_list.txt
      [root@esx:~]# esxcli storage core device list -d naa.60014054a5d46697f85498e9a257567c > /tmp/esxcli_storage_core_device_list.txt

  5. 收集 VMware ESXi 环境的其他信息:

    [root@esx:~]# esxcli storage vmfs extent list > /tmp/esxcli_storage_vmfs_extent_list.txt
    [root@esx:~]# esxcli storage filesystem list > /tmp/esxcli_storage_filesystem_list.txt
    [root@esx:~]# esxcli iscsi session list > /tmp/esxcli_iscsi_session_list.txt
    [root@esx:~]# esxcli iscsi session connection list > /tmp/esxcli_iscsi_session_connection_list.txt
  6. 检查潜在的 iSCSI 登录问题:

其它资源