mkhost

The mkhost command creates a logical host object.

Syntax

Read syntax diagramSkip visual syntax diagram
>>- svctask -- -- mkhost -- --+---------------------+-- -------->
                              '- -name -- new_name -'      

>--+- -hbawwpn -- wwpn_list ------+----------------------------->
   '- -iscsiname--iscsi_name_list-'   

>-- --+-----------------------+-- ------------------------------>
      '- -iogrp -iogrp_list  -'      

>-- --+-------------------------+-- --+----------+-------------->
      '- -mask -port_login_mask-'     '- -force -'   

>--+------------------------+----------------------------------><
   '- -type --+- hpux ----+-'   
              +- tpgs ----+     
              '- generic -'     

Parameters

-name new_name
(Optional) Specifies a name or label for the new host object.
-hbawwpn wwpn_list
(Required if you do not use iscsiname) Specifies a list of host bus adapter (HBA) worldwide port names (WWPNs) to add to the specified host object. You cannot use this parameter with the iscsiname parameter.
-iscsiname iscsi_name_list
(Required if you do not use hbawwpn) Specifies one or more iSCSI names of this host. Up to 16 names can be specified, and each name can contain up to 255 characters. Each name should comply with the iSCSI standard, RFD 3720. At least one WWPN or iSCSI name must be specified. You cannot use this parameter with the hbawwpn parameter.
-iogrp iogrp_list
(Optional) Specifies a set of one or more I/O groups that the host can access the VDisks 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 that a host can access. The port mask is four binary bits and is made up of a combination of 0's and 1's, where 0 indicates that the corresponding target port cannot be used and 1 indicates that it can be used.. The right-most bit in the mask corresponds to the lowest numbered target port (1 not 4) on a node. Valid mask values range from 0000 (no ports enabled) to 1111 (all ports enabled). For example, a mask of 0011 enables port 1 and port 2. The default value is 1111 (all ports enabled).
-force
(Optional) Specifies that a logical host object be created without validation of the WWPNs.
-type hpux | tpgs | generic
(Optional) Specifies the type of host: hpux, tpgs, or generic. The default is generic. The tpgs parameter enables extra target port unit attentions. Refer to SAN Volume Controller host attachment documentation for more information on the hosts that require the type parameter.

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 virtual disks to hosts by using the mkvdiskhostmap command.

Issue the mkhost command only once. The cluster scans the fabric for WWPNs in the host zone. The cluster itself cannot filter into the hosts to determine which WWPNs are in which hosts. Therefore, you must use the svctask mkhost command to identify the hosts.

After you identify the hosts, mappings are created between hosts and virtual disks. These mappings effectively present the virtual disks to the hosts to which they are mapped. All WWPNs in the host object are mapped to the virtual disks.

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

For additional information, see the svctask mkvdiskhostmap and svcinfo lshbaportcandidate commands.

An invocation example

svctask mkhost -name hostone -hbawwpn 210100E08B251DD4 -force -mask 1001

The resulting output

Host id [1] successfully created

An invocation example

svctask mkhost -iscsiname iqn.localhost.hostid.7f000001 -name newhost

The resulting output

Host, id [10], successfully created
Library | Support | Terms of use | Feedback
© Copyright IBM Corporation 2003, 2009. All Rights Reserved.