[openstack-dev] [Cinder] Confusion about the respective use cases for volume's admin_metadata, metadata and glance_image_metadata

Zhangleiqiang (Trump) zhangleiqiang at huawei.com
Sun May 4 09:33:16 UTC 2014


Hi, stackers:

I have some confusion about the respective use cases for volume's admin_metadata, metadata and glance_image_metadata. 

I know glance_image_metadata comes from image which is the volume created from, and it is immutable. Glance_image_metadata is used for many cases, such as billing, ram requirement, etc. And it also includes property which can effects the "use-pattern" of volume, such as volumes with "hw_scsi_mode=virtio-scsi" will be supposed that there is corresponding virtio-scsi driver installed and will be used as a device of "virtio-scsi" controller which has higher performance when booting from it with scsi bus type.

However, volume is constantly having blocks changed, which may result in situations as follows:

1. A volume not created from image or created from image without "hw_scsi_mode" property at first but then has the virtio-scsi driver manually installed, there will be no method to make the volume used with virito-scsi controller when booting from it. 

2. If a volume was created from an image with "hw_scsi_mode" property at first, and then the "virtio-scsi" driver in the instance is uninstalled, there will be no method to make the volume not used with "virtio-scsi" controller when booting from it.

For the first situation, is it suitable to set corresponding metadata to volume? Should we use metadata or admin_metadata? I notice that volumes will have "attach_mode" and "readonly" admin_metadata and empty metadata after created, and I can't find the respective use cases for admin_metada and metadata.

For the second situation, what is the better way to handle it?

Any advice?


----------
zhangleiqiang (Trump)

Best Regards





More information about the OpenStack-dev mailing list