Article directory
Cinder itself does not provide storage technology, but acts as an abstract middle management layer, providing a stable and unified Block Storage resource model to the north, and docking diverse back-end storage devices (eg LVM, CEPH) through the Plug-in and Drivers models to the south , NetApp, Datastore etc.).
back-end storage pools
For backend storage pool information, OpenStack provides us with an interface to query.
API
Administrators only. List all backend storage pools known to the scheduler service.
GET /v2/{project_id}/scheduler-stats/get_pools
response:
Response Example:
{
"pools": [
{
"name": "pool1",
"capabilities": {
"updated": "2014-10-28T00:00:00-00:00",
"total_capacity_gb": 1024,
"free_capacity_gb": 100,
"volume_backend_name": "pool1",
"reserved_percentage": 0,
"driver_version": "1.0.0",
"storage_protocol": "iSCSI",
"QoS_support": false
}
},
{
"name": "pool2",
"capabilities": {
"updated": "2014-10-28T00:00:00-00:00",
"total_capacity_gb": 512,
"free_capacity_gb": 200,
"volume_backend_name": "pool2",
"reserved_percentage": 0,
"driver_version": "1.0.1",
"storage_protocol": "iSER",
"QoS_support": true
}
}
]
}
Command Line
$ cinder get-pools --detail
+-----------------------------+------------------------------------------------------------------------------+
| Property | Value |
+-----------------------------+------------------------------------------------------------------------------+
| allocated_capacity_gb | 200 |
| backend_state | up |
| driver_version | 1.2.0 |
| filter_function | None |
| free_capacity_gb | 53041.92 |
| goodness_function | None |
| location_info | ceph:/etc/ceph/ceph.conf:ff9e5fc7-7cbd-4a50-b64d-e7e6f3c10a53:cinder:volumes |
| max_over_subscription_ratio | 20.0 |
| multiattach | True |
| name | control@rbd-1#rbd-1 |
| provisioned_capacity_gb | 456.0 |
| replication_enabled | False |
| reserved_percentage | 0 |
| storage_protocol | ceph |
| thin_provisioning_support | True |
| timestamp | 2022-10-11T13:35:09.346218 |
| total_capacity_gb | 53041.92 |
| vendor_name | Open Source |
| volume_backend_name | rbd-1 |
+-----------------------------+------------------------------------------------------------------------------+
Parameter Description
-
total_capacity_gb
: Actual total physical capacity -
provisioned_capacity_gb
: Indicates the allocated space in physical storage.For example: User A creates a 2x10G volume on Cinder from backend A, and user B directly creates a 3x10G volume from backend A without using Cinder. Assume these are all volumes served on backend a. The total provisioning ed_capacity will be 50G.
-
allocated_capacity_gb
: Cinder uses this to keep track of how much capacity is allocated through Cinder.According to the above example, "allocated_capacity" is 20G, because this is the capacity issued by Cinder. The allocated_capacity is recorded here to distinguish it from the new parameter provisioned_capacity.
-
free_capacity_gb
: Actual free capacity -
total_capacity_gb
: the total size of the capacity -
max_over_subscription_ratio
: Maximum Overprovisioning RatioIf
(provisioned_capacity_gb + 请求的容量) / total_capacity_gb > max_over_subscription_ratio
so, Cinder Backend cannot continue to create a new Volume.