In a cluster with tiered deployment, data is automatically distributed across tiers based on access frequency. Frequently accessed data resides in the faster performance tier, while infrequently accessed data is demoted to the slower capacity tier. The commands described in this section are used to manage data demotion in the cluster.
Precaution
The commands in this section are intended only for troubleshooting and for viewing the internal state of the cluster. Do not use these commands to change the cluster's default behavior unless you fully understand their impact.
Procedure
Run the following command on any node in the cluster to enable data demotion:
zbs-meta drain enable
Output example
EnabledProcedure
Run the following command on any node in the cluster to disable data demotion:
zbs-meta drain disable
Output example
DisabledProcedure
Run the following command on any node in the cluster to configure data demotion parameters:
zbs-meta drain update [--cmd_timeout_ms <CMD_TIMEOUT_MS>] [--generate_cmds_per_round_limit <GENERATE_CMDS_PER_ROUND_LIMIT>] [--distribute_cmds_per_chunk_limit <DISTRIBUTE_CMDS_PER_CHUNK_LIMIT>]
| Parameter | Description |
|---|---|
--cmd_timeout_ms <CMD_TIMEOUT_MS> | Optional. Specifies the timeout for a demotion command in milliseconds. Default: 600000. Valid range: 60000–720000. |
--generate_cmds_per_round_limit <GENERATE_CMDS_PER_ROUND_LIMIT> | Optional. Specifies the maximum number of demotion commands generated per round. Default: 1024. Valid range: 2–4096. |
--distribute_cmds_per_chunk_limit <DISTRIBUTE_CMDS_PER_CHUNK_LIMIT> | Optional. Specifies the maximum number of demotion commands generated per chunk for the cluster. Default: 128. Valid range: 2–4096. |
Output note
If the command succeeds, no output is displayed.
Procedure
Run the following command on any node in the cluster to query the current data demotion parameters:
zbs-meta drain show
Output example
Cluster enable drain: 1
Allow drain: 0
Scan interval: 180s
Generate cmds interval: 30s
Drain no lease timeout: 600s
Drain cmd timeout: 600s
Max number of drain cmds generated per round: 1024
Max number of drain cmds distributed per chunk: 128Output note
| Parameter | Description |
|---|---|
Cluster enable drain | Whether data demotion is enabled for the cluster. 1 = Enabled, 0 = Disabled. |
Allow drain | Whether data demotion is allowed by the demotion policy. 1 = Enabled, 0 = Disabled. |
Scan interval | The scan interval for the cluster. |
Generate cmds interval | The interval for generating demotion commands. |
Drain no lease timeout | If an extent remains without a lease longer than this value, a demotion command is issued. |
Drain cmd timeout | The timeout for demotion commands. |
Max number of drain cmds generated per round | The maximum number of demotion commands generated per round for the cluster. |
Max number of drain cmds distributed per chunk | The maximum number of demotion commands generated per chunk for the cluster. |
Procedure
Run the following command on any node in the cluster to view extents currently under demotion:
zbs-meta drain list
Output example
No drain command is running.