Follow

The following host commands allow you to create a host, to map a volume or a snapshot to a host and to query the mapping, to add a port to a host and to query the ports by host.


host.add_port  

ROLE: Admin, Pool Admin

Description

Add port to host.

Syntaxhost.add_port host=HOST port=[(WWN|IQN0,(WWN|IQN)...] [type=FC|ISCSI] 
ArgumentstypeiSCSI or FC
portLogged in initiator (multiple values, separated by commas)
hostName of an existing host
Examplehost.add_port name=host1 port=1000000c9c06f340 
FFC port 1000000c9c06f340 added to host host1 



host.clear_chap  

ROLE: Admin, Pool Admin

Description

Clears CHAP settings.

  • This command clears the CHAP username and secret from both initiator and target
  • This command clears the CHAP authentication type and sets the host CHAP to NONE 
Syntaxhost.clear_chap host=HOST 
ArgumentshostName of an existing host
Example
host.clear_chap host=h1 
Host "h1" CHAP settings cleared 



host.create 

ROLE: Admin, Pool Admin

Description

Create a new host.

Syntaxhost.create name=NAME [host_type={DEFAULT|ESXI|HPUX}] 
Argumentshost_typeDEFAULT, ESXI or HPUX
portA maximum of 65 Latin characters, numbers, spaces, and the following symbols: "^&'@()[]$=!-#{}%.+~_" (excluding quotation marks). Leading and trailing whitespace characters are stripped. 
Examplehost.create name=host1 
Host host1 created 



host.delete  

ROLE: Admin, Pool Admin

Description

Delete host. 

Syntaxhost.delete host=HOST 
ArgumentshostName of an existing host
Example
host.delete name=host1 
Host host1 deleted 



host.initiator_query 

ROLE: Admin, Pool Admin

Description

List logged-in initiators which are not assigned to any host in the system.

  • Run the command with no parameter to return both FC and ISCSI initiators
  • Run the command using the protocol parameter in order to filter out the query results. 
Syntaxhost.initiator_query [{ISCSI|FC}] 
ArgumentsprotocoliSCSI or FC
ExampleQuery for FC initiators 
host.initiator_query protocol=FC 

WWPN               PROTOCOL
21000024ff3cee01   FC
21000024ff3cf0cc   FC 

ExampleQuery for ISCSI initiators 
host.initiator_query protocol=ISCSI 

WWPN                                   PROTOCOL
iqn.1994-05.com.infinidat:iscsi-man03  iSCSI
iqn.1994-05.com.infinidat:iscsi-man02  iSCSI
iqn.1994-05.com.infinidat:iscsi-man04  iSCSI
iqn.1994-05.com.infinidat:iscsi-man01  iSCSI 



host.map  

ROLE: Admin, Pool Admin

Description

Map a volume or a snapshot to a host. 

Syntaxhost.map host=HOST [vol=VOL[,VOL,...]] [snap=SNAP[,SNAP,...]] [lun=LUN] 
ArgumentslunSCSI logical unit number (LUN) 
snap Name of an existing volume snapshot (multiple values, separated by commas) 
vol Name of an existing volume (multiple values, separated by commas) 
host Name of an existing host 
Examplehost.map name=host1 vol=vol1 
Volume vol1 mapped to LUN LUN1 in host host1 



host.map_query 

ROLE: All Roles

Description

List existing mappings for hosts (clustered hosts included).

Syntaxhost.map_query [host=HOST] [map_type={HOST|CLUSTER}]
Argumentsmap_typeCLUSTER or HOST 
hostName of an existing host
Examplehost.map_query 
HOST  VOLUME LUN ID MAPPING TYPE
h1    vol1   1      HOST
h2    vol2   11     CLUSTER



host.port_query  

ROLE: All Roles 

Description

List ports of existing hosts.

Hosts with no ports are not listed.

Syntaxhost.port_query [host=HOST] [port=SCSIADDRESS] 
ArgumentsportA WWN or IQN address. A WWN address consists of a 16-digit hexadecimal number, optionally delimited by colons to 8 groups of two digits each. An IQN address begins with the string "iqn.", optionally followed by a domain registration date, followed by an organizational naming authority, and optionally followed by a colon and a custom string of choosing, e.g "iqn.2001-04.com.example:diskarrays-sn-a8675309".
host Name of an existing host 
ExampleAn output example for an FC host 
host.port_query name=host1 
HOST  TYPE PORT             LOGGED IN
host1 FC   1000000c9c06f340 yes 
ExampleAn output example of an iSCSI host
host.port_query 
HOST       TYPE  PORT                                 LOGGED IN
interop006 ISCSI iqn.1991-05.com.microsoft:interop006 yes 
interop008 ISCSI iqn.1991-05.com.microsoft:interop008 no



host.query  

ROLE: All Roles 

Description

List existing hosts. 

Syntaxhost.query [host=HOST[,HOST,...]] [cluster=CLUSTER[,CLUSTER,...]] [auth_type={NONE|CHAP|MUTUAL_CHAR},{NONE|CHAP|MUTUAL_CHAR}...]] [host_type={DEFAULT|ESXI|HPUX}] 
Argumentshost_type DEFAULT, ESXI or HPUX
auth_type Authentication method required of host when connecting through iSCSI: NONE, CHAP or MUTUAL_CHAP (multiple values, separated by commas)
cluster Name of an existing cluster (multiple values, separated by commas)
host Name of an existing host (multiple values, separated by commas)
ExampleRunning the command for with no parameters
host.query  
NAME        CLUSTER    LUNS  FC PORTS ISCSI IQNS AUTH TYPE  CREATED AT 
iscsi-man01 -          3     0        1          NONE       2016-05-10 10:00:00
iscsi-man02 -          3     0        1          NONE       2016-05-10 10:00:00
ExampleRunning the command in detailed mode 
host.query name=iscsi-man01 --detailed 

Name                 iscsi-man01
Cluster             
-
LUNs                 
3
Allocated Capacity   32.98 TB
FC Ports           
 0
iSCSI IQNs         
 1
Auth Type           
NONE
CHAP Target User   
 -
CHAP Initiator User 

Created At         
 2016-07-25 10:00:00
Updated AT
           2016-07-25 10:00:00




host.remove_port  

ROLE: Admin, Pool Admin

Description

Remove port from host. 

Syntaxhost.remove_port host=HOST port=[(WWN|IQN),(WWN|IQN)...]  [type=(FC|ISCSI)]
Argumentshost Name of an existing host 
typeiSCSI or FC 
portA WWN or IQN address. A WWN address consists of a 16-digit hexadecimal number, optionally delimited by colons to 8 groups of two digits each. An IQN address begins with the string "iqn.", optionally followed by a domain registration date, followed by an organizational naming authority, and optionally followed by a colon and a custom string of choosing, e.g "iqn.2001-04.com.example:diskarrays-sn-a8675309". (multiple values, separated by commas) 
Examplehost.remove_port name=host1 port=1000000c9c06f340 
FC port 1000000c9c06f340 removed from host host1 



host.rename  

ROLE: Admin, Pool Admin

Description

Rename host.

Syntaxhost.rename host=HOST new_name=NAME 
Argumentsnew_nameA maximum of 65 Latin characters, numbers, spaces, and the following symbols: "^&'@()[]$=!-#{}%.+~_" (excluding quotation marks). Leading and trailing whitespace characters are stripped. 
hostName of an existing host 
Examplehost.rename name=host1 new_name=host2 
Host host1 renamed to host2 



host.set_auth_type  

ROLE: Admin, Pool Admin

Description

Set iSCSI host authentication method.

  • Inbound secret - the key with which the host authenticates with InfiniBox
  • Outbound secret - the key with which InfiniBox authenticates with the host

Available authentication types:

  • CHAP - the host has to authenticate with InfiniBox
  • MUTUAL_CHAP - both host and InfiniBox have to authenticate to each other
  • NONE - no authentication is required 
Syntaxhost.set_auth_type host=HOST type=METHOD 
ArgumentstypeAuthentication method required of host when connecting through iSCSI: NONE, CHAP or MUTUAL_CHAP 
host Name of an existing host 
ExampleSetting the authentication method of an iSCSI host to CHAP
host.set_auth_type name=h1 type=chap
Host "h1" iSCSI authentication type set to CHAP, auto-generated inbound secret: 'MVqaQWmB572mB0xzeito'
ExampleSetting the authentication method of an iSCSI host to MUTUAL_CHAP
host.set_auth_type name=h1 type=MUTUAL_CHAP
Host "h1" iSCSI authentication type set to MUTUAL_CHAP, auto-generated inbound secret: 'cbAl0V2yk6mhLEyV3PAt', auto-generated outbound secret: 'yYqXkGNzxR8CZIjQpjii'
ExampleRemoving an existing authentication requirement
host.set_auth_type name=h1 type=NONE
Host "h1" iSCSI authentication type set to NONE



host.set_chap  

ROLE: Admin, Pool Admin

DescriptionSet iSCSI host CHAP usernames and secrets.
Syntaxhost.set_chap host=HOST [inbound_user=STR] [inbound_secret=STR] [outbound_user=STR] [outbound_secret=STR]  
ArgumentshostName of an existing host 
outbound_secret Any sequence of characters
outbound_userAny sequence of characters
inbound_secretAny sequence of characters
inbound_userAny sequence of characters
ExampleSetting the host authentication without details 
host.set_chap name=h1 
Host "h1" CHAP settings updated 
ExampleSetting the inbound name and secret 
host.set_chap name=h1 inbound_user=admin inbound_secret=cbA10V2yk6mhLEyV3PAe 
Host "h1" CHAP settings updated 



host.set_host_type  

ROLE: Admin, Pool Admin

Description

Set host type. 

Syntaxhost.set_host_type host=HOST host_type=[DEFAULT|ESXI|HPUX]
Argumentshost Name of an existing host  
host_type DEFAULT, ESXI or HPUX



host.set_path_optimized_state 

ROLE: Admin, Pool Admin

Description

Set ALUA optimized state for LUNS mapped to a host. 

Syntaxhost.set_path_optimized_state host=HOST optimized=YESNO 
Argumentsoptimized Either yes or no
host Name of an existing host  



host.unmap  

ROLE: Admin, Pool Admin

Description

Unmap a volume or a snapshot from a host. 

Syntaxhost.unmap host=HOST [vol=VOL[,VOL,...]] [snap=SNAP[,SNAP,...]] [lun=LUN[,LUN,...]] 
ArgumentssnapName of an existing volume snapshot (multiple values, separated by commas) 
volName of an existing volume (multiple values, separated by commas) 
host Name of an existing host 
lun SCSI logical unit number (LUN) (multiple values, separated by commas)
Examplehost.unmap name=host1 vol=vol1 
Volume vol1 unmapped from LUN LUN1 in host host1 
Was this article helpful?
0 out of 0 found this helpful

0 out of 0 found this helpful

Last edited: 2022-08-06 08:32:28 UTC

Comments