Chapter 11. block


This chapter describes the commands under the block command.

11.1. block storage cleanup

Do block storage cleanup. This command requires ``--os-volume-api-version`` 3.24 or greater.

Usage:

openstack block storage cleanup [-h] [-f {csv,json,table,value,yaml}]
                                       [-c COLUMN]
                                       [--quote {all,minimal,none,nonnumeric}]
                                       [--noindent] [--max-width <integer>]
                                       [--fit-width] [--print-empty]
                                       [--sort-column SORT_COLUMN]
                                       [--sort-ascending | --sort-descending]
                                       [--cluster <cluster>] [--host <host>]
                                       [--binary <binary>] [--up | --down]
                                       [--disabled | --enabled]
                                       [--resource-id <resource-id>]
                                       [--resource-type <Volume|Snapshot>]
                                       [--service-id SERVICE_ID]
Copy to Clipboard Toggle word wrap

Expand
Table 11.1. Command arguments
ValueSummary

-h, --help

Show this help message and exit

--cluster <cluster>

Name of block storage cluster in which cleanup needs to be performed (name only)

--host <host>

Host where the service resides. (name only)

--binary <binary>

Name of the service binary.

--up

Filter by up status. if this is set, services need to be up.

--down

Filter by down status. if this is set, services need to be down.

--disabled

Filter by disabled status.

--enabled

Filter by enabled status.

--resource-id <resource-id>

Uuid of a resource to cleanup.

--resource-type <Volume|Snapshot>

Type of resource to cleanup.

--service-id SERVICE_ID

The service id field from the db, not the uuid of the service.

Expand
Table 11.2. Output formatter options
ValueSummary

-f {csv,json,table,value,yaml}, --format {csv,json,table,value,yaml}

The output format, defaults to table

-c COLUMN, --column COLUMN

Specify the column(s) to include, can be repeated to show multiple columns

--sort-column SORT_COLUMN

Specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated

--sort-ascending

Sort the column(s) in ascending order

--sort-descending

Sort the column(s) in descending order

Expand
Table 11.3. CSV formatter options
ValueSummary

--quote {all,minimal,none,nonnumeric}

When to include quotes, defaults to nonnumeric

Expand
Table 11.4. JSON formatter options
ValueSummary

--noindent

Whether to disable indenting the json

Expand
Table 11.5. Table formatter options
ValueSummary

--max-width <integer>

Maximum display width, <1 to disable. you can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. implied if --max- width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

--print-empty

Print empty table if there is no data to show.

11.2. block storage cluster list

List block storage clusters. This command requires ``--os-volume-api-version`` 3.7 or greater.

Usage:

openstack block storage cluster list [-h]
                                            [-f {csv,json,table,value,yaml}]
                                            [-c COLUMN]
                                            [--quote {all,minimal,none,nonnumeric}]
                                            [--noindent]
                                            [--max-width <integer>]
                                            [--fit-width] [--print-empty]
                                            [--sort-column SORT_COLUMN]
                                            [--sort-ascending | --sort-descending]
                                            [--cluster <name>]
                                            [--binary <binary>] [--up]
                                            [--down] [--disabled] [--enabled]
                                            [--num-hosts <hosts>]
                                            [--num-down-hosts <hosts>]
                                            [--long]
Copy to Clipboard Toggle word wrap

Expand
Table 11.6. Command arguments
ValueSummary

-h, --help

Show this help message and exit

--cluster <name>

Filter by cluster name, without backend will list all clustered services from the same cluster.

--binary <binary>

Cluster binary.

--up

Filter by up status.

--down

Filter by down status.

--disabled

Filter by disabled status.

--enabled

Filter by enabled status.

--num-hosts <hosts>

Filter by number of hosts in the cluster.

--num-down-hosts <hosts>

Filter by number of hosts that are down.

--long

List additional fields in output

Expand
Table 11.7. Output formatter options
ValueSummary

-f {csv,json,table,value,yaml}, --format {csv,json,table,value,yaml}

The output format, defaults to table

-c COLUMN, --column COLUMN

Specify the column(s) to include, can be repeated to show multiple columns

--sort-column SORT_COLUMN

Specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated

--sort-ascending

Sort the column(s) in ascending order

--sort-descending

Sort the column(s) in descending order

Expand
Table 11.8. CSV formatter options
ValueSummary

--quote {all,minimal,none,nonnumeric}

When to include quotes, defaults to nonnumeric

Expand
Table 11.9. JSON formatter options
ValueSummary

--noindent

Whether to disable indenting the json

Expand
Table 11.10. Table formatter options
ValueSummary

--max-width <integer>

Maximum display width, <1 to disable. you can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. implied if --max- width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

--print-empty

Print empty table if there is no data to show.

11.3. block storage cluster set

Set block storage cluster properties. This command requires ``--os-volume-api- version`` 3.7 or greater.

Usage:

openstack block storage cluster set [-h] [--binary <binary>]
                                           [--enable | --disable]
                                           [--disable-reason <reason>]
                                           <cluster>
Copy to Clipboard Toggle word wrap

Expand
Table 11.11. Positional arguments
ValueSummary

<cluster>

Name of block storage cluster to update (name only)

Expand
Table 11.12. Command arguments
ValueSummary

-h, --help

Show this help message and exit

--binary <binary>

Name of binary to filter by; defaults to cinder- volume (optional)

--enable

Enable cluster

--disable

Disable cluster

--disable-reason <reason>

Reason for disabling the cluster (should be used with --disable option)

11.4. block storage cluster show

Show detailed information for a block storage cluster. This command requires ``--os-volume-api-version`` 3.7 or greater.

Usage:

openstack block storage cluster show [-h]
                                            [-f {json,shell,table,value,yaml}]
                                            [-c COLUMN] [--noindent]
                                            [--prefix PREFIX]
                                            [--max-width <integer>]
                                            [--fit-width] [--print-empty]
                                            [--binary <binary>]
                                            <cluster>
Copy to Clipboard Toggle word wrap

Expand
Table 11.13. Positional arguments
ValueSummary

<cluster>

Name of block storage cluster.

Expand
Table 11.14. Command arguments
ValueSummary

-h, --help

Show this help message and exit

--binary <binary>

Service binary.

Expand
Table 11.15. Output formatter options
ValueSummary

-f {json,shell,table,value,yaml}, --format {json,shell,table,value,yaml}

The output format, defaults to table

-c COLUMN, --column COLUMN

Specify the column(s) to include, can be repeated to show multiple columns

Expand
Table 11.16. JSON formatter options
ValueSummary

--noindent

Whether to disable indenting the json

Expand
Table 11.17. Shell formatter options
ValueSummary

--prefix PREFIX

Add a prefix to all variable names

Expand
Table 11.18. Table formatter options
ValueSummary

--max-width <integer>

Maximum display width, <1 to disable. you can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. implied if --max- width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

--print-empty

Print empty table if there is no data to show.

11.5. block storage log level list

List log levels of block storage service. Supported by --os-volume-api-version 3.32 or greater.

Usage:

openstack block storage log level list [-h]
                                              [-f {csv,json,table,value,yaml}]
                                              [-c COLUMN]
                                              [--quote {all,minimal,none,nonnumeric}]
                                              [--noindent]
                                              [--max-width <integer>]
                                              [--fit-width] [--print-empty]
                                              [--sort-column SORT_COLUMN]
                                              [--sort-ascending | --sort-descending]
                                              [--host <host>]
                                              [--service <service>]
                                              [--log-prefix <log-prefix>]
Copy to Clipboard Toggle word wrap

Expand
Table 11.19. Command arguments
ValueSummary

-h, --help

Show this help message and exit

--host <host>

List block storage service log level of specified host (name only)

--service <service>

List block storage service log level of the specified service (name only)

--log-prefix <log-prefix>

Prefix for the log, e.g. sqlalchemy

Expand
Table 11.20. Output formatter options
ValueSummary

-f {csv,json,table,value,yaml}, --format {csv,json,table,value,yaml}

The output format, defaults to table

-c COLUMN, --column COLUMN

Specify the column(s) to include, can be repeated to show multiple columns

--sort-column SORT_COLUMN

Specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated

--sort-ascending

Sort the column(s) in ascending order

--sort-descending

Sort the column(s) in descending order

Expand
Table 11.21. CSV formatter options
ValueSummary

--quote {all,minimal,none,nonnumeric}

When to include quotes, defaults to nonnumeric

Expand
Table 11.22. JSON formatter options
ValueSummary

--noindent

Whether to disable indenting the json

Expand
Table 11.23. Table formatter options
ValueSummary

--max-width <integer>

Maximum display width, <1 to disable. you can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. implied if --max- width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

--print-empty

Print empty table if there is no data to show.

11.6. block storage log level set

Set log level of block storage service Supported by --os-volume-api-version 3.32 or greater.

Usage:

openstack block storage log level set [-h] [--host <host>]
                                             [--service <service>]
                                             [--log-prefix <log-prefix>]
                                             <log-level>
Copy to Clipboard Toggle word wrap

Expand
Table 11.24. Positional arguments
ValueSummary

<log-level>

Desired log level.

Expand
Table 11.25. Command arguments
ValueSummary

-h, --help

Show this help message and exit

--host <host>

Set block storage service log level of specified host (name only)

--service <service>

Set block storage service log level of specified service (name only)

--log-prefix <log-prefix>

Prefix for the log, e.g. sqlalchemy

11.7. block storage resource filter list

List block storage resource filters

Usage:

openstack block storage resource filter list [-h]
                                                    [-f {csv,json,table,value,yaml}]
                                                    [-c COLUMN]
                                                    [--quote {all,minimal,none,nonnumeric}]
                                                    [--noindent]
                                                    [--max-width <integer>]
                                                    [--fit-width]
                                                    [--print-empty]
                                                    [--sort-column SORT_COLUMN]
                                                    [--sort-ascending | --sort-descending]
Copy to Clipboard Toggle word wrap

Expand
Table 11.26. Command arguments
ValueSummary

-h, --help

Show this help message and exit

Expand
Table 11.27. Output formatter options
ValueSummary

-f {csv,json,table,value,yaml}, --format {csv,json,table,value,yaml}

The output format, defaults to table

-c COLUMN, --column COLUMN

Specify the column(s) to include, can be repeated to show multiple columns

--sort-column SORT_COLUMN

Specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated

--sort-ascending

Sort the column(s) in ascending order

--sort-descending

Sort the column(s) in descending order

Expand
Table 11.28. CSV formatter options
ValueSummary

--quote {all,minimal,none,nonnumeric}

When to include quotes, defaults to nonnumeric

Expand
Table 11.29. JSON formatter options
ValueSummary

--noindent

Whether to disable indenting the json

Expand
Table 11.30. Table formatter options
ValueSummary

--max-width <integer>

Maximum display width, <1 to disable. you can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. implied if --max- width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

--print-empty

Print empty table if there is no data to show.

11.8. block storage resource filter show

Show filters for a block storage resource type

Usage:

openstack block storage resource filter show [-h]
                                                    [-f {json,shell,table,value,yaml}]
                                                    [-c COLUMN] [--noindent]
                                                    [--prefix PREFIX]
                                                    [--max-width <integer>]
                                                    [--fit-width]
                                                    [--print-empty]
                                                    <resource>
Copy to Clipboard Toggle word wrap

Expand
Table 11.31. Positional arguments
ValueSummary

<resource>

Resource to show filters for (name).

Expand
Table 11.32. Command arguments
ValueSummary

-h, --help

Show this help message and exit

Expand
Table 11.33. Output formatter options
ValueSummary

-f {json,shell,table,value,yaml}, --format {json,shell,table,value,yaml}

The output format, defaults to table

-c COLUMN, --column COLUMN

Specify the column(s) to include, can be repeated to show multiple columns

Expand
Table 11.34. JSON formatter options
ValueSummary

--noindent

Whether to disable indenting the json

Expand
Table 11.35. Shell formatter options
ValueSummary

--prefix PREFIX

Add a prefix to all variable names

Expand
Table 11.36. Table formatter options
ValueSummary

--max-width <integer>

Maximum display width, <1 to disable. you can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. implied if --max- width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

--print-empty

Print empty table if there is no data to show.

11.9. block storage snapshot manageable list

List manageable snapshots. Supported by --os-volume-api-version 3.8 or greater.

Usage:

openstack block storage snapshot manageable list [-h]
                                                        [-f {csv,json,table,value,yaml}]
                                                        [-c COLUMN]
                                                        [--quote {all,minimal,none,nonnumeric}]
                                                        [--noindent]
                                                        [--max-width <integer>]
                                                        [--fit-width]
                                                        [--print-empty]
                                                        [--sort-column SORT_COLUMN]
                                                        [--sort-ascending | --sort-descending]
                                                        [--cluster <cluster>]
                                                        [--detailed <detailed>]
                                                        [--marker <marker>]
                                                        [--limit <limit>]
                                                        [--offset <offset>]
                                                        [--sort <key>[:<direction>]]
                                                        [<host>]
Copy to Clipboard Toggle word wrap

Expand
Table 11.37. Positional arguments
ValueSummary

<host>

Cinder host on which to list manageable snapshots. Takes the form: host@backend-name#pool

Expand
Table 11.38. Command arguments
ValueSummary

-h, --help

Show this help message and exit

--cluster <cluster>

Cinder cluster on which to list manageable snapshots. Takes the form: cluster@backend-name#pool. (supported by --os-volume-api-version 3.17 or later)

--detailed <detailed>

Returns detailed information (default=true).

--marker <marker>

Begin returning snapshots that appear later in the snapshot list than that represented by this reference. This reference should be json like. Default=None.

--limit <limit>

Maximum number of snapshots to return. default=none.

--offset <offset>

Number of snapshots to skip after marker. Default=None.

--sort <key>[:<direction>]

Comma-separated list of sort keys and directions in the form of <key>[:<asc|desc>]. Valid keys: size, reference. Default=None.

Expand
Table 11.39. Output formatter options
ValueSummary

-f {csv,json,table,value,yaml}, --format {csv,json,table,value,yaml}

The output format, defaults to table

-c COLUMN, --column COLUMN

Specify the column(s) to include, can be repeated to show multiple columns

--sort-column SORT_COLUMN

Specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated

--sort-ascending

Sort the column(s) in ascending order

--sort-descending

Sort the column(s) in descending order

Expand
Table 11.40. CSV formatter options
ValueSummary

--quote {all,minimal,none,nonnumeric}

When to include quotes, defaults to nonnumeric

Expand
Table 11.41. JSON formatter options
ValueSummary

--noindent

Whether to disable indenting the json

Expand
Table 11.42. Table formatter options
ValueSummary

--max-width <integer>

Maximum display width, <1 to disable. you can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. implied if --max- width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

--print-empty

Print empty table if there is no data to show.

11.10. block storage volume manageable list

List manageable volumes. Supported by --os-volume-api-version 3.8 or greater.

Usage:

openstack block storage volume manageable list [-h]
                                                      [-f {csv,json,table,value,yaml}]
                                                      [-c COLUMN]
                                                      [--quote {all,minimal,none,nonnumeric}]
                                                      [--noindent]
                                                      [--max-width <integer>]
                                                      [--fit-width]
                                                      [--print-empty]
                                                      [--sort-column SORT_COLUMN]
                                                      [--sort-ascending | --sort-descending]
                                                      [--cluster <cluster>]
                                                      [--detailed <detailed>]
                                                      [--marker <marker>]
                                                      [--limit <limit>]
                                                      [--offset <offset>]
                                                      [--sort <key>[:<direction>]]
                                                      [<host>]
Copy to Clipboard Toggle word wrap

Expand
Table 11.43. Positional arguments
ValueSummary

<host>

Cinder host on which to list manageable volumes. takes the form: host@backend-name#pool

Expand
Table 11.44. Command arguments
ValueSummary

-h, --help

Show this help message and exit

--cluster <cluster>

Cinder cluster on which to list manageable volumes. Takes the form: cluster@backend-name#pool. (supported by --os-volume-api-version 3.17 or later)

--detailed <detailed>

Returns detailed information (default=true).

--marker <marker>

Begin returning volumes that appear later in the volume list than that represented by this reference. This reference should be json like. Default=None.

--limit <limit>

Maximum number of volumes to return. default=none.

--offset <offset>

Number of volumes to skip after marker. default=none.

--sort <key>[:<direction>]

Comma-separated list of sort keys and directions in the form of <key>[:<asc|desc>]. Valid keys: size, reference. Default=None.

Expand
Table 11.45. Output formatter options
ValueSummary

-f {csv,json,table,value,yaml}, --format {csv,json,table,value,yaml}

The output format, defaults to table

-c COLUMN, --column COLUMN

Specify the column(s) to include, can be repeated to show multiple columns

--sort-column SORT_COLUMN

Specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated

--sort-ascending

Sort the column(s) in ascending order

--sort-descending

Sort the column(s) in descending order

Expand
Table 11.46. CSV formatter options
ValueSummary

--quote {all,minimal,none,nonnumeric}

When to include quotes, defaults to nonnumeric

Expand
Table 11.47. JSON formatter options
ValueSummary

--noindent

Whether to disable indenting the json

Expand
Table 11.48. Table formatter options
ValueSummary

--max-width <integer>

Maximum display width, <1 to disable. you can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. implied if --max- width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

--print-empty

Print empty table if there is no data to show.

Back to top
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2025 Red Hat