Cinder provides a block storage mechanism, which is ideal to use with Nova for mounting disks. One disk volume is created when we create a Nova compute instance. However, often we need to attach multiple disk volumes to a compute instance. Cinder lets us create more volumes, and we can connect them to our compute instances.
Creating a Cinder volume and attaching it to a Nova compute instance
How to do it...
Let's start by creating a 5 GB volume:
- name: create 5G test volume
os_volume:
state: present
size: 5
display_name: data
The os_volume module takes a size and a display name as parameters and creates a volume. This volume is not attached to the compute instance yet. We'll attach this volume to our...