How to use the new feature of cinder about read-only volume

Asked by renminmin on 2014-02-13

I found cinder in havana version add a new feature about the read-only volume.
So I create a volume with setting volume metadata with key="readonly" and value="True", and attached it to an instance.
However, it doesn't work. I still can write data in volume.

Any wrong with my steps?
How could I use the read-only volume?
Does multi-attach readonly volume support?

Question information

Language:
English Edit question
Status:
Answered
For:
Cinder Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Zhi Yan Liu (lzy-dev) said :
#1

>>> Any wrong with my steps?

1. Under current volume readonly feature implementation approach, we need the support from Cinder and Nova hypervisor both sides. Currently I only implemented libvirt hypervisor driver within Nova side.

2. The Cinder side code change had been merged in H, but Nova side change change [1] been merged in I early [2][3]

[1] https://review.openstack.org/#/c/44455/7
[2] https://github.com/openstack/nova/blob/master/nova/virt/libvirt/volume.py#L148
[3] https://github.com/openstack/nova/blob/stable/havana/nova/virt/libvirt/volume.py#L134

So I'm not sure if there is a code version issue in your test deployment.

>>> How could I use the read-only volume?

For now I think the test steps what you mentioned in above question is correct.

>>> Does multi-attach readonly volume support?

I believe multi-attach is another dedicated use case. There is one wiki page maybe you can refer https://wiki.openstack.org/wiki/Cinder/blueprints/multi-attach-volume .

Can you help with this problem?

Provide an answer of your own, or ask renminmin for more information if necessary.

To post a message you must log in.