chhost

Use the chhost command to change the name or type of a host object. This command does not affect any existing host mappings.

Syntax

Read syntax diagramSkip visual syntax diagram chhost -typehpuxtpgsgenericadminlun-namenew_name_arg-hostusernamehost_username_for_authentication-hostsecrethost_secret-nohostsecret-storageusernamestorage_username_for_authentication-storagesecretstorage_secret-nostoragesecret-sitesite_namesite_id-nosite-statuspolicyredundantcomplete-statussitealllocal-ownershipgroupowner_id | owner_name-noownershipgroup-portsetportset_id | portset_name-nopartition-partitionpartition_idpartition_name-draftpartitionpartition_namepartition_id-nodraftpartition-locationlocation_system_namelocation_system_id-nolocation host_namehost_id -autostoragediscoveryyesnosuppressofflinealertyesno
Note: Mapping a new portset to a host object can cause host application outage unless the newly mapped portset contains at least one port that is overlapping with the old portset. If volume protection is turned on, the administrator cannot change to a portset that doesn't have at least one overlapping port. To override that restriction and enforce a change, the global admin must run the chsystem -vdiskprotectionenabled no command to turn off volume protection for the system. Also, if a host is offline, the volume protection check is bypassed and chhost will allow a portset with non-overlapping ports to be used.

Parameters

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

-name new_name_arg
(Optional) Specifies the new name that you want to assign to the host object.
-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.
-hostsecret host_secret
(Optional) Configures the host secret.
Note: For iSCSI host type, it refers to an initiator secret associated with CHAP authentication.
-nohostsecret
(Optional) Removes both the hostsecret and the hostusername parameters.
-hostusername
(Optional) Specifies the host username for a host object during authentication.
Note: For the iSCSI host type, the hostusername parameter is specified and its value is used as an initiator username for one-way CHAP authentication. In case the parameter is not specified and not previously configured, by default the first IQN is used. The hostusername parameter should always be followed by hostsecret parameter.
-storagesecret storage_secret
(Optional) Configures the storage secret.
Note: For iSCSI host type, it refers to the target secret associated with CHAP authentication.
-nostoragesecret
(Optional) Removes both the storagesecret and the storageusername parameters.
-storageusername
(Optional) Specifies the storage username for a host object during authentication.
Note: For iSCSI host type, the storageusername parameter is specified and its value is used as the target username for two-way CHAP authentication. In case the parameter is not specified and not previously configured, by default the cluster_name is used.

The storageusername parameter should always be followed by storagesecret parameter.

-nosite
(Optional) Resets the site value.
-statuspolicy redundant | complete
(Optional) Specifies if complete or redundant policy is used for online status calculations.
  • Complete connectivity is where online host status indicates complete connectivity, with every host port that is logged in to every node through which that host can access volumes, and degraded host status indicates one or more of these nodes does not have a login.
  • Redundant connectivity calculation is where online host status indicates redundant connectivity, where enough host ports are logged in to enough nodes such that the removal of a single node or a single host port allows that host to access all of its volumes. In addition, there must be the same total login count from the host to each node within an I/O group. Degraded host status indicates non-redundant connectivity, in which a single point of failure prevents a host from accessing at least some of its volumes, or there is no single point of failure but the total login count from the host to each node within an I/O group is not the same.

The default value is redundant.

-statussite all | local
(Optional) Specifies whether all sites or only the local host site connectivity is used to determine online status. local is only applicable in a dual site topology for a host with a valid site. The default value is all.
-ownershipgroup owner_id | owner_name
(Optional) The name or ID of the ownership group to which the object is being added.
-noownershipgroup
(Optional) If specified, the object is removed from the ownership group to which it belongs.
-portset
(Optional) The name or ID of the portset to associate with the host object.
Note: Admin can run device discovery from the host after running this command as changing portset of a host changes I/O paths for the host. Running discovery allows host to discover the devices from valid I/O paths.
-partition partition_id|partition_name
(Optional) The name or ID of the storage partition to associate with the host object.
Note: If the host is associated with a partition, only the following host parameters are allowed:
  • -statuspolicy
  • -statussite
  • -portset
  • -nopartition.
-nopartition
(Optional) If specified, the host is removed from the partition to which it is associated.
-draftpartition
Attempt to associate this host with the specified draft partition.
-nodraftpartition
Attempt to remove this host from the draft partition.
-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.
-nolocation
(Optional) Remove the currently set location from this host.
-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 this value is set to false, then rescanning new volumes must be performed manually by the server admin.
host_name | host_id
(Required) Specifies the host object to modify, either by ID or by current name.
suppressofflinealert yes | no
(Optional) Specifies whether to generate a host offline alert if the host is offline. If the alert is suppressed and the host is offline, event is not generated.

Description

This command can change the name of the specified host to a new name, or it can change the type of host. This command does not affect any of the current host mappings.

Note: When all I/O groups are removed from an iSCSI host, the lsiscsiauth command does not display the authentication entry for that host. Use the addhostiogrp command to map the iSCSI host to at least one I/O group, and then use the addhostport command to add the iSCSI port into it. You must also add authentication for that host by using the chhost command with either the chapsecret or nochapsecret parameter.
  • The protocol of the portset must match the protocol of the host
Note: The 100 Gbps ports are mainly used for NVMe over RDMA and NVMe over TCP connections to host attachments. Any attempt to map an iSCSI host using chhost to a 100 Gbps portset will fail. This iSCSI mapping using chhost cannot be completed through any plugins or GUI. This fails because a 100 Gbps portset will not match the performance expectation for iSCSI host attach connectivity. However, user can use -force flag CLI command to map an iSCSI host to a 100 Gbps port for less demanding application or boot from SAN applications.
  • To change the portset by using the chhost command user has to check portset port_type and it must match the type of the host (FC, NVMe, or iSCSI) created.
  • 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.

An invocation example

chhost -portset myportset myhost

The following output is displayed:

No feedback