openstack cinder VolumeSizeExceedsAvailableQuota tips mismatch volume type

793 Views Asked by At

Create a volume will show the same error tips, no matter what --type option with.

# openstack volume create --size 500 test_vol
VolumeSizeExceedsAvailableQuota: Requested volume or snapshot exceeds allowed gigabytes quota.
 Requested 500G, quota is 965362G and 965362G has been consumed.

# openstack volume create --size 500 --type ceph_ssd test_vol_ssd
VolumeSizeExceedsAvailableQuota: Requested volume or snapshot exceeds allowed gigabytes quota.
 Requested 500G, quota is 965362G and 965362G has been consumed.

# openstack quota show
| Field                 | Value   |
| gigabytes             | 965362  |
| gigabytes___DEFAULT__ | -1      |
| gigabytes_ceph_ssd    | 9965362 |

In sometime, while create a ceph_ssd volume type, it will tips that gigabytes_ceph_ssd quota exceeds. Like this:

# openstack volume create --size 500 --type ceph_ssd test_vol_ssd
VolumeSizeExceedsAvailableQuota: Requested volume or snapshot exceeds allowed gigabytes_ceph_ssd quota.

What's wrong with that? How could I solve this question? Anything was misunderstand by me?

1

There are 1 best solutions below

0
On

Shame of my ignorance.

gigabytes means Volume gigabytes allowed for each project.

It will check whether exception.OverQuota for creating new volume previously. First will check the gigabytes for all volume capacity, and then the gigabytes_specify_volume_type while create volume with --type option.

Verify in develop environment:

$ openstack volume create --size 10 --type ceph_ssd test_vol4
VolumeSizeExceedsAvailableQuota: ... gigabytes_ceph_ssd quota. Requested 10G, quota is 16753G and 16745G has been consumed.

$ openstack volume create --size 100 test_vol4
VolumeSizeExceedsAvailableQuota: ... gigabytes quota. Requested 100G, quota is 1280970G and 1280951G has been consumed.

### created success, consumed will add +8G in gigabytes
$ openstack volume create --size 8 --type ceph_ssd test_vol4
$ openstack volume create --size 100 test_vol4
VolumeSizeExceedsAvailableQuota: ... gigabytes quota. Requested 100G, quota is 1280970G and 1280959G has been consumed.

### check quota pass by gigabytes default by not gigabytes_ceph_ssd
$ openstack volume create --size 11 --type ceph_ssd test_vol4
VolumeSizeExceedsAvailableQuota: ... gigabytes_ceph_ssd quota. Requested 11G, quota is 16753G and 16753G has been consumed.

### check quota not pass by gigabytes default
$ openstack volume create --size 12 --type ceph_ssd test_vol4
VolumeSizeExceedsAvailableQuota: ... gigabytes quota. Requested 12G, quota is 1280970G and 1280959G has been consumed.

### without limit by gigabytes default quota
$ openstack quota set --gigabytes -1 proj_name
$ openstack volume create --size 12 --type ceph_ssd test_vol4
VolumeSizeExceedsAvailableQuota: ... gigabytes_ceph_ssd quota. Requested 12G, quota is 16753G and 16753G has been consumed.

### according to the CapacityWeigher, it will distribute the volume to ceph_ssd backend without specify volume type
### we have two backend ceph pool: ceph_hdd(capacity smaller than the other), ceph_ssd
### it will no check the quota of gigabytes_ceph_ssd, bcz create without --type option
$ openstack volume create --size 100 test_vol5
$ openstack volume show test_vol5
+--------------------------------+--------------------------------------+
| Field                          | Value                                |
+--------------------------------+--------------------------------------+
| name                           | test_vol5                            |
| os-vol-host-attr:host          | node-2@ceph_ssd#ceph_ssd             |
| size                           | 100                                  |
| status                         | available                            |
| type                           | __DEFAULT__                          |
+--------------------------------+--------------------------------------+