第4章 クォータ管理
4.1. クォータ管理
クラウド管理者は、プロジェクトのクォータを設定、管理できます。各プロジェクトには、リソースが割り当てられており、プロジェクトユーザーには、これらのリソースを使用するパーミッションが付与されます。これにより、相互のパーミッションやリソースを干渉することなく、複数のプロジェクトが単一のクラウドを使用できます。リソースクォータのセットは、新規テナントの作成時に事前設定されます。クォータには、テナントに割り当て可能な仮想 CPU、インスタンス、RAM、Floating IP の数量が含まれます。クォータは、テナント (またはプロジェクト) と、テナントのユーザーレベルの両方で強制できます。Dashboard を使用して新規/既存のテナントの Compute または Block Storage のクォータを設定または変更できる点に注意してください。Dashboard でのプロジェクトクォータの設定および更新の手順については、「5章プロジェクト管理」を参照してください。
4.1.1. ユーザーのコンピュートクォータの表示
ユーザーに現在設定されているクォータの値を一覧表示するには、以下のコマンドを実行します。
$ nova quota-show --user [USER] --tenant [TENANT]
例
$ nova quota-show --user demoUser --tenant demo +-----------------------------+-------+ | Quota | Limit | +-----------------------------+-------+ | instances | 10 | | cores | 20 | | ram | 51200 | | floating_ips | 5 | | fixed_ips | -1 | | metadata_items | 128 | | injected_files | 5 | | injected_file_content_bytes | 10240 | | injected_file_path_bytes | 255 | | key_pairs | 100 | | security_groups | 10 | | security_group_rules | 20 | | server_groups | 10 | | server_group_members | 10 | +-----------------------------+-------+
4.1.2. ユーザーのコンピュートクォータの更新
特定のクォータ値を更新するには、以下のコマンドを実行します。
$ nova quota-update --user [USER] --[QUOTA_NAME] [QUOTA_VALUE] [TENANT] $ nova quota-show --user [USER] --tenant [TENANT]
例
$ nova quota-update --user demoUser --floating-ips 10 demo $ nova quota-show --user demoUser --tenant demo +-----------------------------+-------+ | Quota | Limit | +-----------------------------+-------+ | instances | 10 | | cores | 20 | | ram | 51200 | | floating_ips | 10 | | ... | | +-----------------------------+-------+
quota-update コマンドのオプション一覧を表示するには、以下を実行します。
$ nova help quota-update
4.1.3. ユーザーのオブジェクトストレージクォータの設定
オブジェクトストレージクォータは、以下のカテゴリーに分類できます。
- コンテナークォータ: 合計サイズ (バイト単位) または単一のコンテナーで保存可能なオブジェクト数を制限します。
- アカウントクォータ: 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
オブジェクトストレージクォータの表示および更新には、以下のコマンドを使用します。プロジェクトに含まれるすべてのユーザーには、そのプロジェクトに指定されているクォータが表示されます。プロジェクトに設定されているオブジェクトストレージのクォータを更新するには、そのプロジェクトの ResellerAdmin のロールが必要です。
アカウントクォータを表示するには、以下のコマンドを実行します。
# 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>
たとえば、アカウントに 5 GB のクォータを指定します。
# swift post -m quota-bytes:5368709120
クォータの確認をするには swift stat コマンドをもう 1 度実行します。
# swift stat Account: AUTH_b36ed2d326034beba0a9dd1fb19b70f9 Containers: 0 Objects: 0 Bytes: 0 Meta Quota-Bytes: 5368709120 X-Timestamp: 1351541410.38328 Content-Type: text/plain; charset=utf-8 Accept-Ranges: bytes

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.