API Doc
Search Docs...
⌘ K
OverviewDeploymentManagementOperationReferenceGlossary
    ACOS 6.3.0
  • Arcfra Cloud Operating System>
  • CLI command>
  • Managing block storage services

Managing client hosts

A client host represents a client that intends to access storage resources. After a storage resource is associated with a client host, the corresponding client obtains access permissions to that storage resource.

Viewing all client hosts

Procedure

Run the following command on any node in the cluster to view all client hosts in the cluster:

zbs-meta host list

Output example

ID                                    Name    Group ID                              Description
------------------------------------  ------  ------------------------------------  -------------
2dd38a55-f64d-4916-8f51-1fce4cbe844e  h1      9fc99f41-c08a-4a3a-9739-a8ee9e22e57b
e3283316-90c6-4d16-a540-50bccce5e109  h2      9fc99f41-c08a-4a3a-9739-a8ee9e22e57b
ee104b5f-74b1-4600-98d6-645dbb91f77b  h3

Output note

ParameterDescription
IDThe client host ID.
NameThe client host name.
Group IDIts client host group ID.
DescriptionThe client host description.

Viewing all client hosts in a specified client host group

Procedure

Run the following command on any node in the cluster to view all client hosts in the client host group:

  • View by client host group name:

    zbs-meta host list_by_group <host_group_name>
  • View by client host group ID:

    zbs-meta host list_by_group_id <host_group_id>

Output example

ID                                    Name    Group ID                              Description
------------------------------------  ------  ------------------------------------  -------------
2dd38a55-f64d-4916-8f51-1fce4cbe844e  h1      9fc99f41-c08a-4a3a-9739-a8ee9e22e57b
e3283316-90c6-4d16-a540-50bccce5e109  h2      9fc99f41-c08a-4a3a-9739-a8ee9e22e57b

Output note

ParameterDescription
IDThe client host ID.
NameThe client host name.
Group IDIts client host group ID.
DescriptionThe client host description.

Viewing basic information, initiator details, and associated storage resource details of a specified client host

Procedure

Run the following command on any node in the cluster to view the basic information, initiator information, and associated storage resources of a specified client host:

  • View by client host name:

    zbs-meta host show <host_name> [--show_initiators] [--show_associated_resources]
  • View by client host ID:

    zbs-meta host show_by_id <host_id> [--show_initiators] [--show_associated_resources]
ParameterDescription
--show_initiatorsOptional. Displays the initiator information about the client host. If not specified, the information is not displayed.
--show_associated_resourcesOptional. Displays the associated storage resource information about the client host. If not specified, the information is not displayed.
host_nameThe client host name.
host_idThe client host ID.

Output example

-----------  ------------------------------------
ID           bcfee527-d61e-4a5d-9ba9-ab57210f2e13
Name         test-host1
Group ID     f9865678-f149-49b5-8f3d-a8010424c50f
Description
-----------  ------------------------------------
Host Initiator Info
Identifier                                                            Ips    Enable Chap    Chap Name    Chap Secret
--------------------------------------------------------------------  -----  -------------  -----------  -------------
iqn.1994-05.com.redhat:858c488e9b7                                           False
nqn.2014-08.org.nvmexpress:uuid:26755e30-4e9b-4b1e-bd32-79eff062f7d1         False

Associated Targets
Target ID
------------------------------------
beda75cd-8b44-4baf-b6b5-726414ee3a2d

Associated Luns
Parent Target ID                        Lun ID
------------------------------------  --------
beda75cd-8b44-4baf-b6b5-726414ee3a2d         1

Associated Subsystems
Subsystem ID
------------------------------------
79d6d69a-42b5-47bb-87a3-5d2d1b2b1e6e

Associated Namespaces
Parent Subsystem ID                     NS ID
------------------------------------  -------
79d6d69a-42b5-47bb-87a3-5d2d1b2b1e6e        1

Output note

  • Client host basic information

    ParameterDescription
    IDThe client host ID.
    NameThe client host name.
    Group IDIts client host group ID.
    DescriptionThe client host description.
  • Initiator information

    ParameterDescription
    IdentifierThe initiator identifier: IQN or NQN.
    IpsThe initiator IP address.
    Enable ChapWhether to enable CHAP authentication.
    Chap NameThe CHAP name.
    Chap SecretThe CHAP password.
  • Associated storage resource information

    • Associated iSCSI target information

      ParameterDescription
      Target IDThe target ID.
    • Associated iSCSI LUN information

      ParameterDescription
      Parent Target IDThe ID of the target to which the LUN belongs.
      Lun IDThe LUN ID.
    • Associated NVMe subsystem information

      ParameterDescription
      Subsystem IDThe subsystem ID.
    • Associated NVMe namespace information

      ParameterDescription
      Parent Subsystem IDThe ID of the subsystem to which the namespace belongs.
      NS IDThe namespace ID.

Creating a client host

Procedure

Run the following command on any node in the cluster to create a client host and set its name, description, client host group, and initiator information:

zbs-meta host create <host_name> [--desc DESC] [--group_name GROUP_NAME] [--initiators INITIATORS]
ParameterDescription
host_nameThe client host name.
--desc <DESC>The client host description.
--group_name GROUP_NAMESpecifies the name of its client host group.
--initiators INITIATORSThe initiator information.
The specified content must be enclosed in double quotation marks (""). Within the quotation marks: Separate multiple initiators by forward slashes (/). Separate multiple elements within a single initiator by semicolons (;). Separate multiple IP addresses by commas (,).
The format of a single initiator is: identifier;ips;enable_chap;chap_name;chap_secret
. Examples:
iqn;ip1,ip2;True;name;secret
nqn;ip1;;;
;ip1,ip2;;;
iqn;ip1;True;name;secret/iqn;;;;/nqn;;;;

Output example

-----------  ------------------------------------
ID           9c312691-0be9-443c-8033-8aa6a60bf712
Name         h4
Group ID
Description
-----------  ------------------------------------

Updating a client host

Procedure

Run the following command on any node in the cluster to update the client host. This is a full update command, and all parameters must be specified:

zbs-meta host update <host_name> <new_host_name> <desc> <group_name> <initiators>
ParameterDescription
host_nameThe name of the client host.
new_host_nameRenames the client host.
descUpdates the client host description.
group_nameUpdates its client host group.
initiatorsUpdates the initiator information.
The specified content must be enclosed in double quotation marks (""). Within the quotation marks: Separate multiple initiators by forward slashes (/). Separate multiple elements within a single initiator by semicolons (;). Separate multiple IP addresses by commas (,).
The format of a single initiator is: identifier;ips;enable_chap;chap_name;chap_secret
. Examples:
iqn;ip1,ip2;True;name;secret
nqn;ip1;;;
;ip1,ip2;;;
iqn;ip1;True;name;secret/iqn;;;;/nqn;;;;

Output example

-----------  ------------------------------------
ID           ee104b5f-74b1-4600-98d6-645dbb91f77b
Name         h3
Group ID
Description  new desc
-----------  ------------------------------------

Batch moving client hosts into a client host group

Procedure

Run the following command on any node of the cluster to batch move client hosts into the client host group. All client hosts must not belong to any client host group before the move.

zbs-meta host batch_add_hosts_to_group <group_name> <host_ids>
ParameterDescription
group_nameSpecifies the client host group to which the client hosts will be moved.
host_idsSpecifies the IDs of the client hosts. Multiple IDs must be separated by commas (,).

Output example

ID                                    Name    Group ID                              Description
------------------------------------  ------  ------------------------------------  -------------
2dd38a55-f64d-4916-8f51-1fce4cbe844e  h1      9fc99f41-c08a-4a3a-9739-a8ee9e22e57b
e3283316-90c6-4d16-a540-50bccce5e109  h2      9fc99f41-c08a-4a3a-9739-a8ee9e22e57b

Output note

ParameterDescription
IDThe client host ID.
NameThe client host name.
Group IDIts client host group ID.
DescriptionThe client host description.

Batch moving client hosts out of a client host group

Procedure

Run the following command on any node of the cluster to batch move client hosts out of the client host group. All client hosts must belong to the same client host group before the move.

zbs-meta host batch_remove_hosts_from_group <group_name> <host_ids>
ParameterDescription
group_nameSpecifies the client host group to which the client hosts belong.
host_idsSpecifies the IDs of the client hosts. Multiple IDs must be separated by commas (,).

Output example

ID                                    Name    Group ID    Description
------------------------------------  ------  ----------  -------------
2dd38a55-f64d-4916-8f51-1fce4cbe844e  h1
e3283316-90c6-4d16-a540-50bccce5e109  h2

Output note

ParameterDescription
IDThe client host ID.
NameThe client host name.
Group IDIts client host group ID.
DescriptionThe client host description.

Deleting a client host

Procedure

Run the following command on any node in the cluster to delete the client host:

  • Delete by client host name:

    zbs-meta host delete <host_name>

  • Delete by client host ID:

    zbs-meta host delete_by_id <host_id>

ParameterDescription
host_nameThe name of the client host.
host_idThe ID of the client host.

Output note

If the command succeeds, no output is displayed.

Batch deleting client hosts

Procedure

Run the following command on any node in the cluster to delete client hosts in a batch:

zbs-meta host batch_delete_by_id <host_ids>
ParameterDescription
host_idsSpecifies the IDs of the client hosts. Multiple IDs must be separated by commas (,).

Output note

If the command succeeds, no output is displayed.