OpenStack - Deal with Partitions instead of Devices for Ceph
For a RH-OSP PoC platform, I had to deploy OSD and journal on the same hard drive.
It’s not recommended to have both on the same disk because you’re going to have bad IO performance.
But if you need to do this, follow these quick steps:
1. Modify hiera file
The first step is to modify the Ceph hieradata file.
In our case, we will using two disks with two partitions on each disk:
- OSD: /dev/sdX1
- Journal: /dev/sdX2
2. Create a firstboot template
The second step consist to create a script for erasing and creating partitions for the Ceph storage.
Any configuration possible via cloud-init may be performed at this step, either by applying cloud-config yaml or running arbitrary additional scripts.
Don’t forget to map the file in the ressource_registry scope in your heat environment file
More info: here or here