Defining Port Groups
The basic idea behind the port groups is the ability to divide the fabric into sub-groups and give each group an identifier that can be used to relate to all nodes in this group. The port groups is a separate feature from the routing chains, but is a mandatory prerequisite for it. In addition, it is used to define the participants in each of the routing algorithms.
In order to define a port group policy file, set the parameter 'pgrp_policy_file' in the opensm configuration file.
pgrp_policy_file /opt/ufm/files/conf/opensm/port_groups_policy_file.conf
The port groups policy file details the port groups in the fabric. The policy file should be composed of one or more paragraphs that define a group. Each paragraph should begin with the line 'port-group' and end with the line 'end-port-group'.
For example:
port-group
…port group qualifiers…
end-port-group
Unlike the port group's beginning and ending which do not require a colon, all qualifiers must end with a colon (':'). Also - a colon is a predefined mark that must not be used inside qualifier values. An inclusion of a colon in the name or the use of a port group, will result in the policy's failure.
Parameter | Description | Example |
name | Each group must have a name. Without a name qualifier, the policy fails. | name: grp1 |
use | 'use' is an optional qualifier that one can define in order to describe the usage of this port group (if undefined, an empty string is used as a default). | use: first port group |
There are several qualifiers used to describe a rule that determines which ports will be added to the group. Each port group may contain one or more rules of the rule qualifiers in the table below (at least one rule shall be defined for each port group).
Parameter | Description | Example |
guid list | Comma separated list of guids to include in the group. If no specific physical ports were configured, all physical ports of the guid are chosen. However, for each guid, one can detail specific physical ports to be included in the group. This can be done using the following syntax:
port-guid: 0x283@3
port-guid: 0x286@1/5/7
port-guid: 0x289@2-5
port-guid: 0x289@2-5/7/9-13/18
port-guid: 0x283@5-8/12/14, 0x286, 0x289/6/8/12 | port-guid: 0x283, 0x286, 0x289 |
port guid range | It is possible to configure a range of guids to be chosen to the group. However, while using the range qualifier, it is impossible to detail specific physical ports. Note: A list of ranges cannot be specified. The below example is invalid and will cause the policy to fail: port-guid-range: 0x283-0x289, 0x290-0x295 | port-guid-range: 0x283-0x289 |
port name | One can configure a list of hostnames as a rule. Hosts with a node description that is built out of these hostnames will be chosen. Since the node description contains the network card index as well, one might also specify a network card index and a physical port to be chosen. For example, the given configuration will cause only physical port 2 of a host with the node description ‘kuku HCA-1’ to be chosen. port and hca_idx parameters are optional. If the port is unspecified, all physical ports are chosen. If hca_idx is unspecified, all card numbers are chosen. Specifying a hostname is mandatory. One can configure a list of hostname/port/hca_idx sets in the same qualifier as follows: port-name: hostname=kuku; port=2; hca_idx=1 , hostname=host1; port=3, hostname=host2 Note: port-name qualifier is not relevant for switches, but for HCA’s only. | port-name: hostname=kuku; port=2; hca_idx=1 |
port regexp | One can define a regular expression so that only nodes with a matching node description will be chosen to the group | port-regexp: SW* |
It is possible to specify one physical port to be chosen for matching nodes (there is no option to define a list or a range of ports). The given example will cause only nodes that match physical port 3 to be added to the group. | port-regexp: SW*:3 | |
union rule | It is possible to define a rule that unites two different port groups. This means that all ports from both groups will be included in the united group. | union-rule: grp1, grp2 |
subtract rule | One can define a rule that subtracts one port group from another. The given rule, for example, will cause all the ports which are a part of grp1, but not included in grp2, to be chosen. In subtraction (unlike union), the order does matter, since the purpose is to subtract the second group from the first one. There is no option to define more than two groups for union/subtraction. However, one can unite/subtract groups which are a union or a subtraction themselves, as shown in the port groups policy file example. | subtract-rule: grp1, grp2 |
There are 3 predefined, automatically created port groups that are available for use, yet cannot be defined in the policy file (if a group in the policy is configured with the name of one of these predefined groups, the policy fails) -
ALL – a group that includes all nodes in the fabric
ALL_SWITCHES – a group that includes all switches in the fabric.
ALL_CAS – a group that includes all HCA's in the fabric.
port-group
name: grp3
use: Subtract of groups grp1 and grp2
subtract-rule: grp1, grp2
end-port-group
port-group
name: grp1
port-guid: 0x281, 0x282, 0x283
end-port-group
port-group
name: grp2
port-guid-range: 0x282-0x286
port-name: hostname=server1 port=1
end-port-group
port-group
name: grp4
port-name: hostname=kika port=1 hca_idx=1
end-port-group
port-group
name: grp3
union-rule: grp3, grp4
end-port-group