天天看點

修改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,指令如下所示:

[[email protected] ~]# 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.
           

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

繼續閱讀