API Doc
Search Docs...
⌘ K
OverviewDeploymentManagementOperationReferenceGlossary

Managing iSCSI targets

The iSCSI target is a storage device that an iSCSI initiator accesses, responding to the initiator's storage access requests. An iSCSI target can provide one or more LUNs for client use.

Viewing all iSCSI targets

Procedure

Run the following command on any node in the cluster to view all iSCSI targets in the cluster.

zbs-iscsi target list

Output example

ID                                    Name                                  IQN Name                                                            Creation Time                  Encrypt Method      Resiliency Type      Cap/Perf Segment   EC Param    Thin    Description    Storage Pool    Whitelist    IQN Whitelist                                                                                                                          External Use      Stripe Num    Stripe Size  Adaptive IQN Whitelist    Labels            Is Prioritized    Use Host    Allowed Host Ids                      Allowed Host Group Ids
------------------------------------  ------------------------------------  ------------------------------------------------------------------  -----------------------------  ------------------  -----------------  ----------  ----------  ------  -------------  --------------  -----------  -------------------------------------------------------------------------------------------------------------------------------------  --------------  ------------  -------------  ------------------------  ----------------  ----------------  ----------  ------------------------------------  ------------------------------------
114b6749-d902-43bc-8280-e3ad8b8f2451  test-not-select-host-and-group        iqn.2016-02.com.arcfra:system:test-not-select-host-and-group        2025-07-02 11:47:23.323384547  ENCRYPT_PLAIN_TEXT  RT_REPLICA                   (3, 3)               True                   system                                                                                                                                                              True                       8         262144  False                     []                False             True
17d46e36-bee2-45ab-8f20-a1611eb55353  test-by-manual-and-iqn-allban         iqn.2016-02.com.arcfra:system:test-by-manual-and-iqn-allban         2025-07-02 11:49:36.805802270  ENCRYPT_PLAIN_TEXT  RT_REPLICA                   (3, 3)               True                   system          */*                                                                                                                                                 True                       8         262144  False                     []                False             False

Output note

ParameterDescription
IQN NameThe IQN name of the target.
Encrypt MethodThe data encryption algorithm of the volume.
Resiliency TypeThe redundancy mode.
Cap/Perf Segment NumThe expected number of shards in the capacity tier or performance tier.
EC ParamThe EC parameters in EC redundancy mode.
IQN WhitelistThe IQN allowlist.
Stripe NumThe number of stripes.
Stripe SizeThe size of each stripe.
Adaptive IQN WhitelistWhether to use an adaptive IQN allowlist.
LabelsThe labels used for matching when creating LUNs without specifying a target.
Is PrioritizedWhether all data is kept in the performance tier.
Use HostWhether to use the allowlist specified by client hosts.
Allowed Host IdsIDs of the associated client hosts.
Allowed Host Group IdsIDs of the associated client host groups.

Viewing basic and CHAP authentication information about a specified iSCSI target

Procedure

Run the following command on any cluster node to view the basic and CHAP authentication information about a specified iSCSI target:

zbs-iscsi target show [--show_chap] <name>

ParameterDescription
--show_chapOptional. Displays the CHAP authentication information for the iSCSI target.
nameThe iSCSI target name.

Output example

----------------------  -----------------------------------------
ID                      745c5404-2a5a-4c20-97d0-0a56fbeafdb6
Name                    target-chap
IQN Name                iqn.2016-02.com.arcfra:system:target-chap
Creation Time           2025-07-04 18:17:24.24872660
Resiliency Type         RT_REPLICA
Encrypt Method          ENCRYPT_PLAIN_TEXT
Cap/Perf Segment Num    (2, 2)
EC Param
Thin                    True
Description
Storage Pool            system
Whitelist               */*
IQN Whitelist           iqn.1994-05.com.redhat:5141c8ae99f1
External Use            True
Stripe Num              8
Stripe Size             262144
Adaptive IQN Whitelist  False
Labels                  [('AVE_PROTECTED', 'TRUE')]
Is Prioritized          False
Use Host                True
Allowed Host Ids        b8f9877c-995d-41fa-b18e-0fefe4b8250c
Allowed Host Group Ids
----------------------  -----------------------------------------
Target Chap Info
---------  ------------
Chap Name  test
Secret     123456123456
Enable     True
---------  ------------
Initiator Chap Info
IQN                                  Chap Name          Secret  Enable
-----------------------------------  -----------  ------------  --------
iqn.1994-05.com.redhat:5141c8ae99f1  test         123456789012  True

Output note

  • Basic information about iSCSI targets

    ParameterDescription
    IDThe target ID.
    NameThe target name.
    IQN NameThe IQN name.
    Resiliency TypeThe redundancy mode.
    Encrypt MethodThe data encryption algorithm of the volume.
    Cap/Perf Segment NumThe expected number of shards in the capacity tier or performance tier.
    EC ParamThe EC parameters in EC redundancy mode.
    ThinWhether the new LUN created in the target are thin-provisioned.
    DescriptionThe target description.
    Storage PoolThe storage pool of the target.
    WhitelistThe IP allowlist for accessing the target.
    IQN WhitelistThe IQN allowlist for accessing the target.
    External UseWhether the iSCSI target is used for external access. Valid values: True or False.
    Stripe NumThe stripe number for new LUNs created in the target.
    Stripe SizeThe stripe size for new LUNs created in the target.
    Adaptive IQN WhitelistWhether the adaptive IQN allowlist is enabled.
    LabelsThe target label.
    Is PrioritizedWhether all data is kept in the performance tier.
    Use HostWhether to use the allowlist specified by client hosts.
    Allowed Host IdsIDs of the associated client hosts.
    Allowed Host Group IdsIDs of the associated client host groups.
  • CHAP authentication information

    • Target CHAP authentication information

      ParameterDescription
      Chap NameThe target CHAP authentication name.
      SecretThe target CHAP authentication password.
      EnableWhether target CHAP authentication is enabled. Valid values: True or False.
    • Initiator CHAP authentication information

      ParameterDescription
      IQNThe IQN name of the initiator.
      Chap NameThe initiator CHAP authentication name.
      SecretThe initiator CHAP authentication password.
      EnableWhether initiator CHAP authentication is enabled. Valid values: True or False.

Creating an iSCSI target

Procedure

Run the following command on any cluster node to create an iSCSI target, and configure its name, IQN, storage policy, CHAP authentication details, and I/O throttling rules.

zbs-iscsi target create <name> [--desc <DESC>][--iqn_date <IQN_DATE>]
                               [--iqn_naming_auth <IQN_NAMING_AUTH>]
                               [--replica_num <REPLICA_NUM>]
                               [--thin_provision <THIN_PROVISION>]
                               [--storage_pool_id <STORAGE_POOL_ID>]
                               [--whitelist <WHITELIST>]
                               [--iqn_whitelist <IQN_WHITELIST>]
                               [--adaptive_iqn_whitelist <ADAPTIVE_IQN_WHITELIST>]
                               [--chap_name <CHAP_NAME>] [--secret <SECRET>]
                               [--external_use <EXTERNAL_USE>]
                               [--stripe_num <STRIPE_NUM>]
                               [--stripe_size <STRIPE_SIZE>]
                               [--iops IOPS] [--iops_rd <IOPS_RD>]
                               [--iops_wr IOPS_WR] [--iops_max <IOPS_MAX>]
                               [--iops_rd_max <IOPS_RD_MAX>]
                               [--iops_wr_max <IOPS_WR_MAX>]
                               [--iops_max_length <IOPS_MAX_LENGTH>]
                               [--iops_rd_max_length <IOPS_RD_MAX_LENGTH>]
                               [--iops_wr_max_length <IOPS_WR_MAX_LENGTH>]
                               [--iops_io_size <IOPS_IO_SIZE>] [--bps <BPS>]
                               [--bps_rd <BPS_RD>] [--bps_wr <BPS_WR>]
                               [--bps_max <BPS_MAX>] [--bps_rd_max <BPS_RD_MAX>]
                               [--bps_wr_max <BPS_WR_MAX>]
                               [--bps_max_length <BPS_MAX_LENGTH>]
                               [--bps_rd_max_length <BPS_RD_MAX_LENGTH>]
                               [--bps_wr_max_length <BPS_WR_MAX_LENGTH>]
                               [--resiliency_type <RESILIENCY_TYPE>]
                               [--ec_algo <EC_ALGO>] [--ec_k <EC_K>] [--ec_m <EC_M>]
                               [--encrypt_method <ENCRYPT_METHOD>]
                               [--driver_name <DRIVER_NAME>]
                               [--prioritized <PRIORITIZED>]
                               [--use_host <USE_HOST>]
                               [--allowed_host_ids <ALLOWED_HOST_IDS>]
                               [--allowed_host_group_ids <ALLOWED_HOST_GROUP_IDS>]
ParameterDescription
nameSpecifies the target name. Letters, numbers, and special symbols - and . are allowed. The iSCSI target name is case-insensitive and will be consistently converted to lowercase.
--desc <DESC>Specifies the target description.
--iqn_date <IQN_DATE>Specifies the date used to generate the target IQN, in yyyy-mm format. Default: 2016-02.
--iqn_naming_auth <IQN_NAMING_AUTH>Specifies the Naming Auth used to generate the target IQN. The format: com.companyName. Default: com.arcfra. Letters, numbers, and special characters - and . are allowed, but - cannot appear at the beginning or end.
--replica_num <REPLICA_NUM>Sets Default replication factor for new LUNs in the Target. Can be 2 or 3. Default: None.
--thin_provision <THIN_PROVISION>Specifies whether the new LUN in the target are thin-provisioned. Valid values: True or False.
--storage_pool_id <STORAGE_POOL_ID>Specifies the storage pool of the target.
--whitelist <WHITELIST>Specifies the IP allowlist for the iSCSI target. You can specify individual IP addresses or CIDR blocks. */* indicates that any IP can access the target.
--iqn_whitelist <IQN_WHITELIST>Specifies the IQN allowlist for the iSCSI target. Separate multiple IQNs with commas (,).
--adaptive_iqn_whitelist <ADAPTIVE_IQN_WHITELIST>Whether to enable adaptive IQN allowlist. Valid values: True or False. When enabled, the IQN allowlist automatically updates to include the union of the IQN allowlists of all contained LUNs. Do not set --iqn_whitelist when adaptive IQN allowlist is enabled.
--chap_name <CHAP_NAME>Specifies the target CHAP authentication name. This parameter supports 1 to 223 characters, including letters, digits, and the special characters (.), (-), and (:).
--secret <SECRET>Specifies the target CHAP authentication password. This parameter supports 12 to 16 characters, including letters and digits.
--external_use <EXTERNAL_USE>Whether the target is for external access. Valid values: True or False.
--stripe_num <STRIPE_NUM>The stripe number for new LUNs created in the target.
--stripe_size <STRIPE_SIZE>The stripe size for new LUNs created in the target.
--iops <IOPS>Specifies the total IOPS limit for the new LUN in the target.
--iops_rd <IOPS_RD>Specifies the read IOPS limit.
--iops_wr <IOPS_WR>Specifies the write IOPS limit.
--iops_max <IOPS_MAX>Specifies the total IOPS burst upper limit.
--iops_rd_max <IOPS_RD_MAX>Specifies the read IOPS burst upper limit.
--iops_wr_max <IOPS_WR_MAX>Specifies the write IOPS burst upper limit.
--iops_max_length <IOPS_MAX_LENGTH>Specifies the duration for total IOPS burst upper limit. The unit: seconds.
--iops_rd_max_length <IOPS_RD_MAX_LENGTH>Specifies the duration for read IOPS burst upper limit. The unit: seconds.
--iops_wr_max_length <IOPS_WR_MAX_LENGTH>Specifies the duration for write IOPS burst upper limit. The unit: seconds.
--iops_io_size <IOPS_IO_SIZE>The assumed average I/O data size when using IOPS throttling.
--bps <BPS>Specifies the total bandwidth limit for the new LUN in the target. The unit: bps.
--bps_rd <BPS_RD>Specifies the read bandwidth limit.
--bps_wr <BPS_WR>Specifies the write bandwidth limit.
--bps_max <BPS_MAX>Specifies the total bandwidth upper limit during I/O bursts.
--bps_rd_max <BPS_RD_MAX>Specifies the read bandwidth upper limit during I/O bursts.
--bps_wr_max <BPS_WR_MAX>Specifies the write bandwidth upper limit during I/O bursts.
--bps_max_length <BPS_MAX_LENGTH>Specifies the maximum duration for I/O at the total bandwidth during I/O bursts. The unit: seconds.
--bps_rd_max_length <BPS_RD_MAX_LENGTH>Specifies the maximum duration for I/O at the read bandwidth during I/O bursts. The unit: seconds.
--bps_wr_max_length <BPS_WR_MAX_LENGTH>Specifies the maximum duration for I/O at the write bandwidth during I/O bursts. The unit: seconds.
--resiliency_type <RESILIENCY_TYPE>Specifies the redundancy mode, either REPLICA (replication) or EC (erasure coding). Default: None.
--ec_algo <EC_ALGO>Specifies the EC algorithm. Required when the redundancy mode is EC. Default: RS.
--ec_k <EC_K>Specifies EC parameter K, valid range [2, 23]. Required when the redundancy mode is EC. Default: None.
--ec_m <EC_M>Specifies EC parameter M, valid range [1, 4]. Required when the redundancy mode is EC. Default: None.
--encrypt_method <ENCRYPT_METHOD>Specifies the data encryption method. The default is no encryption.
--driver_name <DRIVER_NAME>Specifies the driver name: iscsi or iser. Default: None.
--prioritized <PRIORITIZED>Whether to enable volume pinning by default when creating LUNs in the target. Valid values: True or False.
--use_host <USE_HOST>Whether to use the allowlist specified by client hosts. If use_host is set to true, the whitelist and iqn_whitelist parameters cannot be specified. If it is set to false, the allowed_host_ids and allowed_host_group_ids parameters cannot be specified.
--allowed_host_ids <ALLOWED_HOST_IDS>Specifies the IDs of associated client hosts. Multiple IDs must be separated by commas (,).
--allowed_host_group_ids <ALLOWED_HOST_GROUP_IDS>Specifies the IDs of associated client host groups. Multiple IDs must be separated by commas (,).

Output example

----------------------  ------------------------------------
ID                      07dfebb7-d05f-44d3-b06a-b2289a2d7418
Name                    t1
IQN Name                iqn.2016-02.com.arcfra:system:t1
Creation Time           2025-07-07 09:38:03.381779382
Resiliency Type         RT_REPLICA
Encrypt Method          ENCRYPT_PLAIN_TEXT
Replica#                2
EC Param
Thin                    True
Description
Storage Pool            system
Whitelist               */*
IQN Whitelist           */*
External Use            False
Stripe Num              8
Stripe Size             262144
Adaptive IQN Whitelist  False
Labels                  []
Is Prioritized          False
Use Host                False
Allowed Host Ids
Allowed Host Group Ids
----------------------  ------------------------------------

Updating an iSCSI target

Procedure

Run the following command on any node in the cluster to update an iSCSI target:

zbs-iscsi target update <name> [--new_name <NEW_NAME>][--desc <DESC>]
                               [--iqn_date <IQN_DATE>]
                               [--iqn_naming_auth <IQN_NAMING_AUTH>]
                               [--replica_num <REPLICA_NUM>]
                               [--thin_provision <THIN_PROVISION>]
                               [--whitelist <WHITELIST>]
                               [--iqn_whitelist <IQN_WHITELIST>]
                               [--adaptive_iqn_whitelist <ADAPTIVE_IQN_WHITELIST>]
                               [--external_use <EXTERNAL_USE>]
                               [--stripe_num <STRIPE_NUM>]
                               [--stripe_size <STRIPE_SIZE>]
                               [--enable_target_chap <ENABLE_TARGET_CHAP>]
                               [--remove_target_chap <REMOVE_TARGET_CHAP>]
                               [--target_chap_name <TARGET_CHAP_NAME>]
                               [--target_secret <TARGET_SECRET>]
                               [--iops IOPS] [--iops_rd <IOPS_RD>]
                               [--iops_wr IOPS_WR] [--iops_max <IOPS_MAX>]
                               [--iops_rd_max <IOPS_RD_MAX>]
                               [--iops_wr_max <IOPS_WR_MAX>]
                               [--iops_max_length <IOPS_MAX_LENGTH>]
                               [--iops_rd_max_length <IOPS_RD_MAX_LENGTH>]
                               [--iops_wr_max_length <IOPS_WR_MAX_LENGTH>]
                               [--iops_io_size <IOPS_IO_SIZE>] [--bps <BPS>]
                               [--bps_rd <BPS_RD>] [--bps_wr <BPS_WR>]
                               [--bps_max <BPS_MAX>] [--bps_rd_max <BPS_RD_MAX>]
                               [--bps_wr_max <BPS_WR_MAX>]
                               [--bps_max_length <BPS_MAX_LENGTH>]
                               [--bps_rd_max_length <BPS_RD_MAX_LENGTH>]
                               [--bps_wr_max_length <BPS_WR_MAX_LENGTH>]
                               [--resiliency_type <RESILIENCY_TYPE>]
                               [--ec_algo <EC_ALGO>] [--ec_k <EC_K>] [--ec_m <EC_M>]
                               [--recursive] [--prioritized <PRIORITIZED>]
                               [--use_host <USE_HOST>]
                               [--allowed_host_ids <ALLOWED_HOST_IDS>]
                               [--allowed_host_group_ids <ALLOWED_HOST_GROUP_IDS>]
ParameterDescription
nameThe name of the target to be updated.
--new_name <NEW_NAME>Renames the target. Letters, numbers, and special symbols - and . are allowed. The iSCSI target name is case-insensitive and will be consistently converted to lowercase.
--desc <DESC>Updates the target description.
--iqn_date <IQN_DATE>Updates the date used to generate the target IQN, formatted as yyyy-mm. Default: 2016-02.
--iqn_naming_auth <IQN_NAMING_AUTH>Updates the naming auth used to generate the target IQN. The format: com.companyName. Default: com.arcfra. Letters, numbers, and special characters - and . are allowed, but - cannot appear at the beginning or end.
--replica_num <REPLICA_NUM>Specifies the default replication factor for new LUNs in the target. Only supports increasing from 2 to 3 replicas.
--thin_provision <THIN_PROVISION>Whether the new LUN in the target are thin-provisioned. Valid values: True or False.
--storage_pool_id <STORAGE_POOL_ID>Updates the storage pool of the target.
--whitelist <WHITELIST>Updates the IP allowlist for the iSCSI target. Can be an IP address or a CIDR block. */* indicates that any IP can access the target.
--iqn_whitelist <IQN_WHITELIST>Updates the IQN allowlist for the iSCSI target. Separates multiple IQNs with commas (,).
--adaptive_iqn_whitelist <ADAPTIVE_IQN_WHITELIST>Whether the adaptive IQN allowlist is enabled. Valid values: True or False. When enabled, the IQN allowlist automatically updates to include the union of the IQN allowlists of all contained LUNs. Do not set --iqn_whitelist when adaptive IQN allowlist is enabled.
--external_use <EXTERNAL_USE>Whether the target is for external access. Valid values: True or False.
--stripe_num <STRIPE_NUM>Updates the stripe number for new LUNs created in the target.
--stripe_size <STRIPE_SIZE>Updates the stripe size for new LUNs created in the target.
--enable_target_chap <ENABLE_TARGET_CHAP>Enables or disables target CHAP authentication. Valid values: True or False.
--remove_target_chap <REMOVE_TARGET_CHAP>Removes the target CHAP authentication information.
--target_chap_name <TARGET_CHAP_NAME>Updates the target CHAP authentication name. This parameter supports 1 to 223 characters, including letters, digits, and the special characters (.), (-), and (:).
--target_secret <TARGET_SECRET>Updates the target CHAP authentication password. This parameter supports 12 to 16 characters, including letters and digits.
--iops <IOPS>Updates the total IOPS limit for the new LUN in the target.
--iops_rd <IOPS_RD>Updates the read IOPS limit.
--iops_wr <IOPS_WR>Updates the write IOPS limit.
--iops_max <IOPS_MAX>Updates the maximum total IOPS burst.
--iops_rd_max <IOPS_RD_MAX>Updates the read IOPS burst upper limit.
--iops_wr_max <IOPS_WR_MAX>Updates the write IOPS burst upper limit.
--iops_max_length <IOPS_MAX_LENGTH>Updates the duration for total IOPS burst upper limit. The unit: seconds.
--iops_rd_max_length <IOPS_RD_MAX_LENGTH>Updates the duration for read IOPS burst upper limit. The unit: seconds.
--iops_wr_max_length <IOPS_WR_MAX_LENGTH>Updates the duration for write IOPS burst upper limit. The unit: seconds.
--iops_io_size <IOPS_IO_SIZE>Updates the assumed average I/O data size when using IOPS throttling.
--bps <BPS>Updates the total bandwidth limit for the new LUN in the target. The unit: bps.
--bps_rd <BPS_RD>Updates the read bandwidth limit.
--bps_wr <BPS_WR>Updates the write bandwidth limit.
--bps_max <BPS_MAX>Updates the maximum total bandwidth during I/O bursts.
--bps_rd_max <BPS_RD_MAX>Updates the read bandwidth upper limit during I/O bursts.
--bps_wr_max <BPS_WR_MAX>Updates the write bandwidth upper limit during I/O bursts.
--bps_max_length <BPS_MAX_LENGTH>Updates the maximum duration for I/O at the total bandwidth during I/O bursts. The unit: seconds.
--bps_rd_max_length <BPS_RD_MAX_LENGTH>Updates the maximum duration for I/O at the read bandwidth during I/O bursts. The unit: seconds.
--bps_wr_max_length <BPS_WR_MAX_LENGTH>Updates the maximum duration for I/O at the write bandwidth during I/O bursts. The unit: seconds.
--resiliency_type <RESILIENCY_TYPE>Updates the redundancy mode, either REPLICA (replication) or EC (erasure coding). Default: None.
--ec_algo <EC_ALGO>Updates the EC algorithm. Required when the redundancy mode is EC. Default: RS.
--ec_k <EC_K>Updates EC parameter K, valid range [2, 23]. Required when the redundancy mode is EC. Default: None.
--ec_m <EC_M>Updates EC parameter M, valid range [1, 4]. Required when the redundancy mode is EC. Default: None.
--encrypt_method <ENCRYPT_METHOD>Specifies the data encryption method. The default is no encryption.
--recursiveRecursively updates the replication factor of all LUNs in the target to a greater or equal value. Default: False.
--prioritized <PRIORITIZED>Updates whether to enable volume pinning by default when creating LUNs in the target. Valid values: True or False.
--use_host <USE_HOST>Whether to use the allowlist specified by client hosts. If use_host is set to true, the whitelist and iqn_whitelist parameters cannot be specified. If it is set to false, the allowed_host_ids and allowed_host_group_ids parameters cannot be specified.
--allowed_host_ids <ALLOWED_HOST_IDS>Updates the IDs of associated client hosts. Multiple IDs must be separated by commas (,).
--allowed_host_group_ids <ALLOWED_HOST_GROUP_IDS>Updates the IDs of associated client host groups. Multiple IDs must be separated by commas (,).

Output example

----------------------  ------------------------------------
ID                      07dfebb7-d05f-44d3-b06a-b2289a2d7418
Name                    t1
IQN Name                iqn.2016-02.com.arcfra:system:t1
Creation Time           2025-07-07 09:38:03.381779382
Resiliency Type         RT_REPLICA
Encrypt Method          ENCRYPT_PLAIN_TEXT
Replica#                2
EC Param
Thin                    True
Description
Storage Pool            system
Whitelist
IQN Whitelist
External Use            False
Stripe Num              8
Stripe Size             262144
Adaptive IQN Whitelist  False
Labels                  []
Is Prioritized          False
Use Host                True
Allowed Host Ids
Allowed Host Group Ids
----------------------  ------------------------------------

Deleting an iSCSI target

Procedure

Run the following command on any node in the cluster to delete a specified iSCSI target:

zbs-iscsi target delete <name> [--recursive {true | false}]

ParameterDescription
nameThe name of the target to be deleted.
--recursiveWhether to delete all LUNs in the target. Valid values: True or False. Default: None (equivalent to False).

Output note

If the command succeeds, no output is displayed.

Configuring initiator CHAP authentication

Configure client authentication for the iSCSI target.

Procedure

Run the following command on any node in the cluster to configure initiator authentication:

zbs-iscsi initiator_chap create <name> <iqn> <chap_name> <chap_password> {true|false}

ParameterDescription
nameThe target name.
iqnThe IQN name of the initiator.
chap_nameThe initiator CHAP authentication name. This parameter supports 1 to 512 characters, including letters, digits, and the special characters (.), (-), and (:).
chap_passwordThe initiator CHAP authentication password. This parameter supports 12 to 512 characters, including letters and digits.
true or falseWhether to enable initiator authentication.

Output example

[root@zbs17-73 11:45:52 ~]$zbs-iscsi initiator_chap create t2 iqn.2016-02.com.arcfra:system:tttt admin1234 admin12345678 True
----------------------  ------------------------------------
ID                      0d07024b-1d62-49ae-afab-da06cd9f7ce2
Name                    t2
IQN Name                iqn.2016-02.com.arcfra:system:t2
Creation Time           2024-06-18 11:07:42.615775691
Resiliency Type         RT_REPLICA
Encrypt Method          ENCRYPT_PLAIN_TEXT
Replica#                2
EC Param
Thin                    True
Description
Storage Pool            system
Whitelist               */*
IQN Whitelist           */*
External Use            False
Stripe Num              8
Stripe Size             262144
Adaptive IQN Whitelist  False
Labels                  []
Is Prioritized          False
Use Host                False
Allowed Host Ids
Allowed Host Group Ids
----------------------  ------------------------------------

Updating initiator CHAP authentication settings

Procedure

Run the following command on any node in the cluster to update initiator authentication settings:

zbs-iscsi initiator_chap update <name> <iqn> <chap_name> <chap_password> {true|false}

ParameterDescription
nameThe target name.
iqnThe IQN name of the initiator.
chap_nameThe initiator CHAP authentication name. This parameter supports 1 to 512 characters, including letters, digits, and the special characters (.), (-), and (:).
chap_passwordThe initiator CHAP authentication password. This parameter supports 12 to 512 characters, including letters and digits.
true or falseWhether to enable initiator authentication.

Output example

[root@zbs17-73 13:39:24 ~]$zbs-iscsi initiator_chap update t2 iqn.2016-02.com.arcfra:system:tttt admin1234 admin12345678 True
----------------------  ------------------------------------
ID                      0d07024b-1d62-49ae-afab-da06cd9f7ce2
Name                    t2
IQN Name                iqn.2016-02.com.arcfra:system:t2
Creation Time           2024-06-18 11:07:42.615775691
Resiliency Type         RT_REPLICA
Encrypt Method          ENCRYPT_PLAIN_TEXT
Replica#                2
EC Param
Thin                    True
Description
Storage Pool            system
Whitelist               */*
IQN Whitelist           */*
External Use            False
Stripe Num              8
Stripe Size             262144
Adaptive IQN Whitelist  False
Labels                  []
Is Prioritized          False
Use Host                False
Allowed Host Ids
Allowed Host Group Ids
----------------------  ------------------------------------

Disabling initiator CHAP authentication

Procedure

Run the following command on any node in the cluster to disable initiator CHAP authentication:

zbs-iscsi initiator_chap remove <name> <iqn>

Output example

[root@scvm31 12:44:34 ~]$zbs-iscsi initiator_chap remove fl-iscsi-chap iqn.2016-02.com.arcfra:system:fl-iscsi-chap
------------- -------------------------------------------
ID c640ae8b-5d78-47fc-8018-54dbc061ca99
Name fl-iscsi-chap
IQN Name iqn.2016-02.com.arcfra:system:fl-iscsi-chap
Creation Time 2019-03-21 12:31:19.373503032
Replica# 2
Thin True
Description
Storage Pool system
Whitelist */*
IQN Whitelist */*
External Use False
------------- -------------------------------------------

Updating Target CHAP authentication

Update the CHAP authentication for the iSCSI target.

Procedure

Run the following command on any node in the cluster:

zbs-iscsi target update [--enable_target_chap <ENABLE_TARGET_CHAP>] [--target_chap_name <TARGET_CHAP_NAME>] [--target_secret <TARGET_SECRET>] [--remove_target_chap <REMOVE_TARGET_CHAP>] <name>

ParameterDescription
--enable_target_chap <ENABLE_TARGET_CHAP>Enables or disables target CHAP authentication. Valid values: True or False.
--target_chap_name <TARGET_CHAP_NAME>The target CHAP authentication username. This parameter supports 1 to 223 characters, including letters, digits, and the special characters (.), (-), and (:).
--target_secret <TARGET_SECRET>The target CHAP authentication password. This parameter supports 12 to 16 characters, including letters and digits.
--remove_target_chap <REMOVE_TARGET_CHAP>Removes the target CHAP authentication information. Default: None.
nameThe iSCSI target name.

Output example

[root@scvm31 12:40:57 ~]$zbs-iscsi target update --enable_target_chap true --target_chap_name xxx2 --target_secret abc123456789 t2
----------------------  ------------------------------------
ID                      0d07024b-1d62-49ae-afab-da06cd9f7ce2
Name                    t2
IQN Name                iqn.2016-02.com.arcfra:system:t2
Creation Time           2024-06-18 11:07:42.615775691
Resiliency Type         RT_REPLICA
Encrypt Method          ENCRYPT_PLAIN_TEXT
Replica#                2
EC Param
Thin                    True
Description
Storage Pool            system
Whitelist               */*
IQN Whitelist           */*
External Use            False
Stripe Num              8
Stripe Size             262144
Adaptive IQN Whitelist  False
Labels                  []
Is Prioritized          False
Use Host                False
Allowed Host Ids
Allowed Host Group Ids
----------------------  ------------------------------------