5.3. 複数の Block Storage サービスストア
Image サービス(glance)に複数の Block Storage サービス(cinder)バックエンドを設定し、glance-api.conf ファイルの enabled_backends および cinder_volume_type 設定オプションを使用して、各バックエンドのボリューム種別を設定することができます。
1 つのバックエンドを Block Storage サービスで複数のボリューム種別に関連付けることはできますが、バックエンドを Image サービス内の 1 つのボリューム種別に関連付けることしかできません。
Image サービスは、イメージが保存されるバックエンドを識別する一意の ID を持つ場所の URL を生成します。単一の Block Storage サービスストアを使用して複数の Block Storage サービスストアを使用するようにアップグレードすると、レガシーイメージの URL が cinder:// volume-id から cinder: // store-name/volume-id に更新されます。
例 1: 2 つのボリュームタイプを持つ新しいデプロイメント
Block Storage サービスに fast と slow の 2 つのボリュームタイプがある場合の、新しいデプロイメントの glance-api.conf ファイル内の Image サービスの設定を示しています。
[DEFAULT]
# list of enabled stores identified by their property group name
enabled_backends = fast:cinder, slow:cinder
# the default store, if not set glance-api service will not start
[glance_store]
default_backend = fast
# conf props for fast store instance
[fast]
rootwrap_config = /etc/glance/rootwrap.conf
cinder_volume_type = glance-fast
description = LVM based cinder store
cinder_catalog_info = volumev2::publicURL
cinder_store_auth_address = http://localhost/identity/v3
cinder_store_user_name = glance
cinder_store_password = admin
cinder_store_project_name = service
...
# conf props for slow store instance
[slow]
rootwrap_config = /etc/glance/rootwrap.conf
cinder_volume_type = glance-slow
description = NFS based cinder store
cinder_catalog_info = volumev2::publicURL
cinder_store_auth_address = http://localhost/identity/v3
cinder_store_user_name = glance
cinder_store_password = admin
cinder_store_project_name = service
...
例 2: 単一ストアから複数のストアへのアップグレード
単一の Block Storage サービスストアから複数のストアへのアップグレードにおける、glance-api.conf ファイル内の Image サービスの設定を示しています。cinder.conf で使用される default_volume_type を特定し、glance-api.conf の cinder_volume_type を更新して一致させる必要があります。
# new configuration in glance
[DEFAULT]
enabled_backends = old:cinder, new:cinder
[glance_store]
default_backend = new
rootwrap_config = /etc/glance/rootwrap.conf
cinder_volume_type = glance-new
description = LVM based cinder store
cinder_catalog_info = volumev2::publicURL
cinder_store_auth_address = http://localhost/identity/v3
cinder_store_user_name = glance
cinder_store_password = admin
cinder_store_project_name = service
...