mkhost
Use the mkhost command to create a logical host object.
Syntax
Parameters
- -name new_name
- (Optional) Specifies a name or label for the new host object.
- -protocol scsi | nvme
- (Optional) Specifies the protocol used by the host to communicate with the storage system. The default is scsi.
- -saswwpn wwpn_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.
- -fcwwpn wwpn_list
- (Required if you do not use -saswwpn, -iscsiname, or -nqn.) Specifies a list of Fibre Channel (FC) WWPNs with a 16-character hexadecimal string.
- -iscsiname iscsi_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.
- -nqn nqn_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.
- -iogrp iogrp_list
- (Optional) Specifies a set of one or more input/output (I/O) groups that the host can access the volumes from. I/O groups are specified by using their names or IDs, separated by a colon. Names and IDs can be mixed in the list. If this parameter is not specified, the host is associated with all I/O groups.
- -mask port_login_mask
- (Optional) Specifies which node target ports a host can access and the Fibre Channel (FC)
port mask for the host. Worldwide port names (WWPNs) in the host object must access volumes
from the node ports that are included in the mask and are in the host object's I/O group. The
port mask is 64 binary bits and is made up of a combination of 0's and 1's, where
0indicates not to use the corresponding FC I/O port and1indicates to use the corresponding FC I/O port. The right-most bit in the mask corresponds to FC I/O port 1. Valid mask values might range from0000(no ports enabled) to1111111111111111111111111111111111111111111111111111111111111111(all ports enabled). For example, a mask of111111101101enables ports 1, 3, 4, 6, 7, 8, 9, 10, 11, and 12. - -force
- (Optional) Specifies that a logical host object is created without validation of the WWPNs.
- -type hpux | tpgs | generic | openvms | adminlun | hide_secondary
- (Optional) Specifies the type of host. The default is generic. The adminlun host type is equivalent to the VVOL host type in the management GUI.
- -hostcluster host_cluster_id | host_cluster_name
- (Optional) Specifies the host cluster ID (numerical value) or name (alphanumeric value) that the new host object is created in.
Description
The mkhost command associates one or more HBA WWPNs, iSCSI names, or NQNs with a logical host object. This command creates a new host. The ID is displayed when the command completes. Subsequently, you can use this object when you map volumes to hosts by using the mkvdiskhostmap command. If you create a host directly inside a host cluster by specifying -hostcluster, it inherits any shared mappings that exist.
NQNs can be added only if the protocol is nvme. All of the other port types can be added only if the host protocol is scsi. Dual-protocol hosts are not supported. A host cannot be added to a host cluster that has a different protocol to the host. NVMe hosts must have the type set to default.
Issue the mkhost command only once. The clustered system scans the fabric for WWPNs in the host zone. The system itself cannot filter into the hosts to determine which WWPNs are in which hosts. Therefore, you must use the mkhost command to identify the hosts.
After you identify the hosts, mappings are created between hosts and volumes. These mappings effectively present the volumes to the hosts to which they are mapped. All WWPNs in the host object are mapped to the volumes.
Some HBA device drivers are not logged in to the fabric until they 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 this command to stop the validation of the WWPN list.
This command fails if you add the host to an I/O group that is associated with more host ports or host objects than is allowed by the limits within the system.
For additional information, see the mkvdiskhostmap, lssasportcandidate, and lsfcportcandidate commands.
For more information about parameter requirements for your specific host, refer to the following support site: http://www-03.ibm.com/systems/support/storage/ssic/interoperability.wss.
An invocation example
mkhost -name hostone -saswwpn 210100E08B251DD4:210100F08C262DD8 -force -mask 111111101101
The resulting output:
Host id [1] successfully created
An invocation example
mkhost -iscsiname iqn.localhost.hostid.7f000001 -name newhostThe resulting output:
Host, id [10], successfully created
An invocation example
mkhost -fcwwpn 210100E08B251EE6:210100F08C262EE7 -type openvms
The resulting output:
Host, id [1], successfully created
An invocation example
mkhost -fcwwpn 210100E08B251EE6 -site site1
The resulting output:
Host, id [1], successfully created
An invocation example
mkhost -nqn nqn.2014-08.org.nvmexpress:NVMf:uuid:644f51bf-8432-4f59-bb13-5ada20c06397 -protocol nvme
The resulting output:
Host, id [1], successfully created
