https://access.redhat.com/solutions/23171
SOLUTION 已验证 - 已更新 2017年六月15日04:26 -
环境
- 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:
/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:
$ 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:
$ 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:
$ 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.
$ 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.
$ 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.

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

被折叠的 条评论
为什么被折叠?



