2

How can I set the Hostname/Description of a Mellanox/Infiniband unmanaged switch?

I would like a way to abstractly distinguish quickly which switches are which when doing 'ibswitches' or 'ibnetdiscover'.

For HCAs that are in Servers, the hostnames are set, which is great. Just need a solution for switches.

Example: (All of the switches come up as the following "SwitchX - Mellanox Technologies")

[26]    "S-e41d2de300756550"[25]                # "SwitchX -  Mellanox Technologies" lid 6 4xFDR
[27]    "S-e41d2de30074bc40"[21]                # "SwitchX -  Mellanox Technologies" lid 5 4xFDR

This would be beneificial when looking for ibnetdiscover and being able to quickly find which HCA card goes into which switch....

vendid=0x2c9
devid=0x1011
sysimgguid=0xf45214d300514560
caguid=0xf452140300514560
Ca      1 "H-f45214d300514560"          # "mgmt2 HCA-2"
[1](f45214d300514560)   "S-e41d2dd3007551f0"[15]                # lid 11 lmc 0 "SwitchX -  Mellanox Technologies" lid 10 4xFDR

4 Answers 4

1

You can specify "--node-name-map FILE" for ibnetdiscover and configure the mapping between GUIDs and your desired names, so this name would be shown when running ibswitches/ibnetdiscover.

--node-name-map <node-name-map>
    Specify a node name map. The node name map file maps GUIDs to more
    user friendly names. See file format below. 
0

I ran into a similar need when troubleshooting one of our IB fabrics, as it required a lot of searching to determine which switch was which when I needed people in the data center to reboot them, etc. I emailed Mellanox Support about adding descriptive names to unmanaged switches, they sent me a Python script named "Unmanaged_Switches_Set_NodeDescription_3.4.py" which can be used to set the description that shows up in ibswitches or ibnetdiscover output. This description will remain until the switch gets rebooted, after which it reverts to the default description. I created a text file the script can use to map GUIDs to descriptive names, and now I can relabel every switch in the fabric with a single command.

0

Although @alnet's answer is correct, we can go further and set the GUID-to-switch-name mappings in a file, so that the switch names are always looked up without having to specify a command line flag. On EL (CentOS/RHEL) systems using distribution provided utilities, the default mapping file is /etc/rdma/ib-node-name-map. The syntax would look like this (as taken from the man page):

# Spines
0x0008f10400400e2d "IB1 (Rack 11 spine 1   ) ISR9288 Voltaire sFB-12D"
# GUID   Node Name
0x0008f10400411a08 "SW1  (Rack  3) ISR9024 Voltaire 9024D"
0x0008f10400411a28 "SW2  (Rack  3) ISR9024 Voltaire 9024D"

I prefer to use simpler switch names, perhaps ib-spine01, which can make parsing output easier, and allows mapping to hostnames in the case of a managed IB switch.

Note that the actual map filename is managed by opensm, so it can be different if /etc/rdma/opensm.conf has node_name_map_name defined.

-1

Short answer - you can't.

If your switch is unmanaged, then the only access to it is by SMP MADs (Subnet Management Protocol MAnagement Datagrams).

MAD that reads this string is called "NodeDescription". According to IB Spec, NodeDescription is read only.

1
  • I was hoping that wasn't the case... Thank you for your answer!
    – John
    Aug 11, 2015 at 14:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.