mkhost

Use the mkhost command to create a logical host object.

Syntax

Read syntax diagramSkip visual syntax diagram mkhost -namenew_name-protocolfcscsifcnvmerdmanvmetcpnvmesasiscsiscsinvme-saswwpnwwpn_list-fcwwpnwwpn_list-iscsinameiscsi_name_list-nqnnqn_list-fdminamehost_name -iogrp iogrp_list -force-typehpuxtpgsgenericadminlun-sitesite_namesite_id-hostclusterhost_cluster_idhost_cluster_name-ownershipgroupowner_idowner_name-portsetportset_idportset_name-partitionpartition_idpartition_name-locationlocation_system_namelocation_system_id-autostoragediscoveryyesno

Parameters

-name new_name
(Optional) Specifies a name or label for the new host object.
-protocol fcscsi | fcnvme | rdmanvme | tcpnvme | sas | iscsi | scsi | nvme
(Optional) Specifies the protocol that is used by the host to communicate with the storage system. The default is fcscsi parameter. The scsi and nvme options are deprecated.
-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 fcnvme, rdmanvme, or tcpnvme to use this parameter.
-fdminame host_name
(Required if you do not use -fcwwpn, -saswwpn, -iscsiname, or -nqn). Specifies the host name discovered through FDMI discovery. If portset is not specified with this option, then host will be added to the default FC portset.
-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.
-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 following values are the available host types:
  • generic indicates the default.
  • tpgs indicates when target port information changes (deprecated).
  • openvms indicates OpenVMS (deprecated).
  • adminlun indicates virtual volumes, which are enabled on the host.
  • hpux indicates HP-UX firmware.
  • hide_secondary (deprecated)

The host type for NVMe hosts cannot be changed. For more information about hosts that require the type parameter, see the host attachment documentation.

-site site_name | site_id
(Optional) Specifies the numeric site value or site name of the host. The site name must be an alphanumeric value. The site ID must be 1 or 2. The host site only applies when using the stretched topology. If you are using highly available storage partitions then a location can be set instead of a site.
-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.
-ownershipgroup owner_id | owner_name
(Optional) The name or ID of the ownership group to which the object is being added.
-portset portset_id | portset_name
(Optional) The name or ID of the portset to associate with the host object.
Note: If a portset that is mapped to the host is not specified, the host is associated with the default portset. For Ethernet portsets, the default portset is portset0. For Fiber Channel portsets, the default portset is portset64. These are following ownership id matching criteria:
  • Restricted owner A cannot create and map host object with owner A and with portset that is owned by owner B.
  • Global owner cannot create a host object with restricted owner A and map to portset with restricted owner B.
  • Restricted or global owner A can create and map host object that is completely owned by A with portset that is owned by global owner.
  • Global owner can create a host object with restricted owner B and map to portset with restricted owner B.
  • Policy to check portset port_type must match the type of the host (Fibre Channel, NVMe, or iSCSI) created.
-partition partition_id | partition_name
(Optional) The name or ID of the storage partition to associate with the host object. If the host is created with a partition, the -type parameter defaults to generic and the -iogrp parameter defaults to all. Only the following other parameters are allowed:
  • -fcwwpn wwpn_list
  • (Optional) -protocol fcscsi
  • (Optional) -portset
  • (Optional) -name
  • (Optional) -force
The following table lists the number of hosts supported by the system for different protocols:
Table 1. Supported network protocol type and hosts limit
Network protocol type Hosts limit per System
Fibre Channel-SCSI 2048
iSCSI 1024
FC-NVMe,
NVMe over RDMA,
or NVME over TCP,
or combination of any of these NVMe hosts
256
  • Fibre Channel-SCSI host takes the number of Fibre Channel adapters that are installed in the system.
  • Every Fibre Channel-SCSI port in the canister can allow 512 Fibre Channel-SCSI hosts. Therefore, in the case of 8 or more ports in the canisters, Fibre Channel-SCSI can allow up to 2048 hosts.
-location location_system_name | location_system_id
(Optional) Specifies the system ID or system name that is co-located with this host. The parameter is only valid if the host is in a highly available storage partition. Setting a host location will result in the I/O submitted by this host being submitted to the system in the same location while high availability is established as this can reduce the latency of I/O operations. If a host location is not set then the host will normally submit I/O operations to the storage partition's preferred system.
-autostoragediscovery yes | no
(Optional) Specifies the hosts on which the autostoragediscovery parameter is enabled. This value set to true indicates that the host operating system will automatically rescan the storage at regular intervals to discover new volumes.

If autostoragediscovery parameter is not specified, this value gets automatically set for hosts in Fibre Channel environments supporting FDMI technology. If this value is set to false, then rescanning new volumes must be performed manually by the server admin.

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 fcnvme, rdmanvme or tcpnvme. All of the other port types can be added only if the host protocol is fcscsi. 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.

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.

Note: The 100 GB ports are mainly used for NVMe over RDMA and NVMe over TCP connections to host attachments. Any attempt to map an iSCSI host by using mkhost to a 100 Gbps portset will fail. This iSCSI mapping using mkhost cannot be completed through any plugins or GUI. This fails because a 100 Gbps portset will not match the performance expectations for iSCSI host attach connectivity. However, users can use the -force flag CLI command to map an iSCSI host to a 100 Gbps port for less demanding application or boot from SAN applications.
  • While upgrading the CCU, a new host protocol is automatically updated for all the existing hosts based on their port type.
  • A host cannot be associated with an empty portset. An empty portset is one without any IP addresses or WWPNs assigned.
  • A host using NVMe over Fibre Channel cannot be changed to use the default Fibre Channel portset.
Note: An empty portset, one without an IP address or WWPN, cannot be used to create a host object.
Note: The user cannot create the NVMeFC host mapped to the default FC portset. They must configure a user-defined FC portset for the NVMeFC host.

For additional information, see the mkvdiskhostmap, lsibportcandidate, 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 -iscsiname iqn.localhost.hostid.7f000001 -name newhost

The 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

svctask mkhost -force -name fc-nvmehost -nqn nqn.2014-08.org.nvmexpress:uuid:449f8291-9c1e-446c-95c1-0942f55fa208 -portset fcnvme -protocol fcnvme

The resulting output:

Host, id [1], successfully created

An invocation example to create hostone host with an IQN iqn.localhost.hostid.7f000001 and associate it with myportset

mkhost -iscsiname iqn.localhost.hostid.7f000001 -name hostone -portset myportset

The resulting output:

Host, id [1], successfully created

An invocation example to create hosttwo host with an IQN iqn.localhost.hostid.7f000002 and associate it with default portset0

mkhost -iscsiname iqn.localhost.hostid.7f000002 -name hosttwo

The resulting output:

Host, id [1], successfully created