Continuing the journey of my private cloud project, I embarked on integrating the OpenStack Cinder CSI plugin to enhance storage capabilities. However, a space constraint prompted the addition of an NVME disk (Toshiba 256GB M.2 2242) to facilitate Cinder’s functionality.
Cinder
Cinder, as elucidated in the official documentation, is the OpenStack Block Storage service for providing volumes to Nova virtual machines, containers and more.
Configuration of the new disk
The incorporation of the new disk necessitated a sequence of steps. After powering down the host, I appended the disk and rebooted the system. Then I listed all the available disks.
sudo fdisk --list
There in the output I found my new disk ready to be used.
Disk /dev/nvme0n1: 238.47 GiB, 256060514304 bytes, 500118192 sectors
Disk model: TOSHIBA
...
With the disk identified, I initialized the physical volume with pvcreate
and
added the disk to the volume group cinder-volumes
.
sudo pvcreate -f /dev/nvme0n1
sudo vgcreate -f cinder-volumes /dev/nvme0n1
Then I modified the /etc/kolla/globals.yaml
file with the following values.
enable_cinder: "yes"
enable_cinder_backend_lvm: "yes"
cinder_volume_group: "cinder-volumes"
Finally, I re-ran the Ansible playbook to add the new configuration.
kolla-ansible -i all-in-one deploy
This enabled Cinder and it was ready to be used by the plugin.
Nova
Based on the official documentation, Nova is the OpenStack service that provides a way to provision compute instances
Instances not turning up after restart
One of the things I notice right away is that after perfoming host restarts,
instances didn’t turn on again. After a bit of research I discovered that there
was a missing value in /etc/kolla/nova-compute/nova.conf
.
[DEFAULT]
resume_guests_state_on_host_boot = True
Now if I restarted the main node then every machine would start.
Sadly Kolla-Ansible currently don’t support adding extra values in it’s configuration files. So everytime I run the playbooks I have to manually add this line otherwise is going to be replaced by default values.
Conclusion
The integration of the Cinder service yielded manifold benefits. Not only did it diversify storage options by offloading virtual machine data to a distinct storage unit, but it also furnished Kubernetes with dynamic storage provisions, augmenting the versatility of my applications.