What is an rport and how do I gather more information about it?

博客围绕Red Hat Enterprise Linux系统展开,介绍了rport相关内容。rport即remote port,阐述了其在主机上的含义,还给出了查看远程端口信息和状态的方法,如特定位置信息查看、使用sysfsutils包的命令等,同时提到判断是否为存储端口的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

https://access.redhat.com/solutions/23171

 SOLUTION 已验证 - 已更新 2017年六月15日04:26 - 

English 

环境

  • Red Hat Enterprise Linux (RHEL) 7
  • Red Hat Enterprise Linux (RHEL) 6
  • Red Hat Enterprise Linux (RHEL) 5

问题

  • What is an rport and how do I gather more information about it?

决议

  • "rport" is the short form for remote port. On your host the remote port(s) would ideally be the ports that the fiber connection is connected to on the other end. For example, if a system is connected to a storage array with two controllers (i.e., nothing but the ports), then the remote port information and state can be checked. There are a few ways for checking this:

1. The information related to rhost ports is at the location:

Raw

/sys/class/fc_remote_ports/rport-*

where information like the node_name, port_name, port_status, scsi_target_id, etc. can be checked with the cat command. For example, the following command will check the state of the port and if it is online or not:

Raw

$ cat /sys/class/fc_remote_ports/rport-1:0-0/port_state

which will show "Online", if the port is online and working normally. A simple grep command can be used to see all port states at once:

Raw

$ grep -Hv "zz" /sys/class/fc_remote_ports/rport*/port_state

2. Another very good utility is the systool command from the sysfsutils package (see: man systool). With this command the information from the remote ports can be gathered in one pass by running the command with following options:

Raw

$ systool -c fc_remote_ports -v

where -c indicates class, and -v is for verbose.

  • Not all "rports" are storage ports. Examine the "roles" parameter under rport to determine if the remote port is a storage target.

Raw

$ grep -Hv "zz"  /sys/class/fc_remote_ports/rport-*/roles
/sys/class/fc_remote_ports/rport-6:0-0/roles:FCP Target              << storage target
/sys/class/fc_remote_ports/rport-6:0-3/roles:FCP Target              << storage target
/sys/class/fc_remote_ports/rport-6:0-4/roles:FCP Initiator           << HBA
/sys/class/fc_remote_ports/rport-8:0-8/roles:Fabric Port             << fabric port
/sys/class/fc_remote_ports/rport-8:0-9/roles:Directory Server        << fabric directory server

Remote ports associated with storage ports with also have a positive (not -1) value assigned to its scsi_target_id value.

Raw

$ grep -Hv "zz"  /sys/class/fc_remote_ports/rport-*/scsi_target_id
/sys/class/fc_remote_ports/rport-6:0-0/scsi_target_id:0
/sys/class/fc_remote_ports/rport-6:0-3/scsi_target_id:1
/sys/class/fc_remote_ports/rport-6:0-4/scsi_target_id:-1
/sys/class/fc_remote_ports/rport-8:0-8/scsi_target_id:-1
/sys/class/fc_remote_ports/rport-8:0-9/scsi_target_id:-1

诊断步骤

See "How do I find the FC ID (WWN) of a scsi device/LUN on Red Hat Enterprise Linux?" for additional information on gathering and following device -> hba -> san -> port -> lun via information available within sysfs.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值