修改Cinder的Volume配額

問題

爲滿足實驗室教學需求,要在一個Project裏創建30+的Volume。通過Horizon修改對應的Project的Quota後,在創建Volume的時候報 "Caught error: Maximum number of volumes allowed (10) exceeded"。

原因

通過Horizon修改Project的Quota只是調用了nova-client的quota-update,因此修改的只是nova的Quota,而現在Cinder已經是一個單獨的項目, 並有自己獨立的api服務——cinder-api,因此修改nova的Quota時,其中與Volume相關的參數Volumes及Gigabytes已經沒有了意義,因此當創建的Volume 超過了Cinder的默認Quota就會報以上的錯誤而不管你在Horizon中如果修改Project的Quota值。

解決方法

通過cinder-client的命令行工具設置Project中與Volume相關的Quota,命令如下所示:

[root@stackcc ~]# cinder help quota-update
usage: cinder quota-update [--volumes <volumes>] [--gigabytes <gigabytes>]
                           <tenant_id>

Update the quotas for a tenant.

Positional arguments:
  <tenant_id>           UUID of tenant to set the quotas for.

Optional arguments:
  --volumes <volumes>   New value for the "volumes" quota.
  --gigabytes <gigabytes>
                        New value for the "gigabytes" quota.

北方工業大學 | 雲計算研究中心 | 姜永

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章