mkhost

Use the mkhost command to create a logical host object.

Syntax

mkhost [ -namenew_name ] { -saswwpnwwpn_list | -fcwwpnwwpn_list | -iscsinameiscsi_name_list } [ -iogrp iogrp_list ] [ -mask port_login_mask ] [ -force ] [ -type { hpux | tpgs | generic | openvms | adminlun | hide_secondary } ] { [ -site { site_name | site_id } ] | [ -nosite ] }

Parameters

-namenew_name
(Optional) Specifies a name or label for the new host object.
-saswwpnwwpn_list
(Required if you do not use -iscsiname or -fcwwpn) Specifies a list of Serial Attached SCSI (SAS) WWPNs with a 16-character hexadecimal string.
-fcwwpnwwpn_list
(Required if you do not use -saswwpn or -iscsiname) Specifies a list of Fibre Channel (FC) WWPNs with a 16-character hexadecimal string.
-iscsinameiscsi_name_list
(Required if you do not use -fcwwpn or -saswwpn) 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.
-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 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 0 indicates that the corresponding FC I/O port cannot be used and 1 indicates that it can be used. The right-most bit in the mask corresponds to FC I/O port 1. Valid mask values might range from 0000 (no ports enabled) to 1111111111111111111111111111111111111111111111111111111111111111 (all ports enabled). For example, a mask of 111111101101 enables ports 1, 3, 4, 6, 7, 8, 9, 10, 11, and 12.
-force
(Optional) Specifies that a logical host object be created without validation of the WWPNs.
-typehpux |tpgs|generic|openvms|adminlun|hide_secondary
(Optional) Specifies the type of host. The default is generic. The tpgs parameter enables extra target-port unit attentions. Refer to Lenovo Storage V7000 host attachment documentation for more information on the hosts that require the type parameter.
-sitesite_name | site_id
(Optional) Specifies the numeric site value or site name of the new host. The site name must be an alphanumeric value. The site ID must be 1 or 2. This command does not affect system behavior when the system topology is set to standard.
-nosite
(Optional) Resets the site value.

Description

The mkhost command associates one or more HBA WWPNs or iSCSI names with a logical host object. This command creates a new host. The ID is displayed when the command completes. You can subsequently use this object when you map volumes to hosts by using the mkvdiskhostmap command.

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 do not log in to the fabric until they can see 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.

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 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

mkhost -fcwwpn 210100E08B251EE6 -site site1

The resulting output:

Host, id [1], successfully created