addhostport

Use the addhostport command to add worldwide port names (WWPNs), Internet Small Computer System Interface (iSCSI) names, or NVMe Qualified Names (NQNs) to an existing host object.

Syntax

addhostport { -saswwpnwwpn_list | -fcwwpnwwpn_list | -iscsinameiscsi_name_list | -nqnnqn_list } [ -force ] { host_name | host_id }

Parameters

-saswwpnwwpn_list
(Required if you do not use -iscsiname, -fcwwpn, or -nqn.) Specifies a list of Serial Attached SCSI (SAS) WWPNs with a 16-character hexadecimal string.
-fcwwpnwwpn_list
(Required if you do not use -iscsiname, -saswwpn, or -nqn.) Specifies a list of Fibre Channel (FC) WWPNs with a 16-character hexadecimal string.
-iscsinameiscsi_name_list
(Required if you do not use -fcwwpn, -saswwpn, or -nqn.) Specifies the comma-separated list of iSCSI names to add to the host. At least one WWPN or iSCSI name must be specified. You cannot use this parameter with the -fcwwpn or -saswwpn parameter.
-nqnnqn_list
(Required if you do not use -fcwwpn, -saswwpn, or -iscsiname.) Specifies the comma-separated list of NVMe Qualified Names (NQNs) to add to the host. The host protocol must be nvme to use this parameter.
-force
(Optional) Specifies that the list of ports be added to the host without the validation of any WWPNs or iSCSI names.
host_id | host_name
(Required) Specifies the host object to add ports to, either by ID or by name.

Description

This command adds a list of host bus adapter (HBA) WWPNs, iSCSI names, or NQNs to the specified host object. Any volumes that are mapped to this host object automatically map to the new ports.

Note: The host port can only be added if it is compatible with the protocol of the host (SCSI can have all port types except NQNs, NVMe can have only NQNs).

Only WWPNs that are logged-in unconfigured can be added. For a list of candidate WWPNs, use the lssasportcandidate or lsfcportcandidate command.

Some HBA device drivers do not log in to the fabric until they can recognize target logical unit numbers (LUNs). Because they do not log in, their WWPNs are not recognized as candidate ports. You can specify the force parameter with the addhostport command to stop the validation of the WWPN list.

Note: When all I/O groups are removed from an iSCSI host, you cannot add a port to the iSCSI host until you map the iSCSI host to at least one I/O group. After you map the iSCSI host to at least one I/O group, resubmit the addhostport command. After you add the port to the host, you must create a host authentication entry using the chhost command.
The addhostport command fails if the:
  • Host is mapped to a volume with more than one I/O group in the access set and the host port you add is an Internet Small Computer System Interface (iSCSI) name
  • Port being added is from a host system that does not support volumes mapped from multiple I/O groups

An invocation example

addhostport -saswwpn 210100E08B251DD4 host1

The resulting output:

No feedback

An invocation example

addhostport -fcwwpn 210100E08B251EE6 host1

The resulting output:

No feedback

An invocation example

addhostport -iscsiname iqn.localhost.hostid.7f000001 mchost13

The resulting output:

No feedback