5.3. ユーザーの Object Storage クォータの設定
オブジェクトストレージクォータは、以下のカテゴリーに分類できます。
- コンテナークォータ: 合計サイズ (バイト単位) または単一のコンテナーで保存可能なオブジェクト数を制限します。
- アカウントクォータ: Object Storage サービスでユーザーが利用可能な合計サイズ (バイト単位) を制限します。
コンテナークォータまたはアカウントクォータのいずれかを設定するには、Object Storage プロキシーサーバーにおいて、proxy-server.conf
ファイルの [pipeline:main]
セクションに container_quotas
または account_quotas
(または両方) のパラメーターを追加する必要があります。
[pipeline:main] pipeline = catch_errors [...] tempauth container-quotas \ account-quotas slo dlo proxy-logging proxy-server [filter:account_quotas] use = egg:swift#account_quotas [filter:container_quotas] use = egg:swift#container_quotas
[pipeline:main]
pipeline = catch_errors [...] tempauth container-quotas \
account-quotas slo dlo proxy-logging proxy-server
[filter:account_quotas]
use = egg:swift#account_quotas
[filter:container_quotas]
use = egg:swift#container_quotas
オブジェクトストレージクォータの表示および更新には、以下のコマンドを使用します。プロジェクトに含まれるすべてのユーザーには、そのプロジェクトに指定されているクォータが表示されます。プロジェクトに設定されているオブジェクトストレージのクォータを更新するには、そのプロジェクトの ResellerAdmin のロールが必要です。
アカウントクォータを表示するには、以下のコマンドを実行します。
swift stat
# swift stat
Account: AUTH_b36ed2d326034beba0a9dd1fb19b70f9
Containers: 0
Objects: 0
Bytes: 0
Meta Quota-Bytes: 214748364800
X-Timestamp: 1351050521.29419
Content-Type: text/plain; charset=utf-8
Accept-Ranges: bytes
クォータを更新するには、以下を実行します。
swift post -m quota-bytes:<BYTES>
# swift post -m quota-bytes:<BYTES>
たとえば、アカウントに 5 GB のクォータを指定します。
swift post -m quota-bytes:5368709120
# swift post -m quota-bytes:5368709120