The volume service is able to make use of a volume group attached directly to the server on which the service runs. This volume group must be created exclusively for use by the block storage service and the configuration updated to point to the name of the volume group.
The following steps must be performed while logged into the system hosting the volume service as the
root user:
- Use the
pvcreatecommand to create a physical volume.#Physical volume "pvcreateDEVICEDEVICE" successfully createdReplaceDEVICEwith the path to a valid, unused, device. For example:#pvcreate /dev/sdX - Use the
vgcreatecommand to create a volume group.#Volume group "vgcreatecinder-volumesDEVICEcinder-volumes" successfully createdReplaceDEVICEwith the path to the device used when creating the physical volume. Optionally replacecinder-volumeswith an alternative name for the new volume group. - Set the
volume_groupconfiguration key to the name of the newly created volume group.#openstack-config --set /etc/cinder/cinder.conf \DEFAULT volume_groupcinder-volumesThe name provided must match the name of the volume group created in the previous step. - Ensure that the correct volume driver for accessing LVM storage is in use by setting the
volume_driverconfiguration key tocinder.volume.drivers.lvm.LVMISCSIDriver.#openstack-config --set /etc/cinder/cinder.conf \DEFAULT volume_driver cinder.volume.drivers.lvm.LVMISCSIDriver
The volume service has been configured to use LVM storage.