Use the mkhost command to create a logical
host object.
Syntax
mkhost [ -name new_name ] { -saswwpn wwpn_list | -fcwwpn wwpn_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 } -hostcluster { host_cluster_id | host_cluster_name } ] }
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 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 0 indicates not
to use the corresponding FC I/O port and 1 indicates 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
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 is created without validation of the WWPNs.
- -typehpux |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. The tpgs host type enables extra target-port unit
attentions and is required for any Solaris host.
- -hostclusterhost_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 or
iSCSI names 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.
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:
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