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
pvcreate
command to create a physical volume.#
Physical volume "pvcreate
DEVICE
DEVICE
" successfully createdReplaceDEVICE
with the path to a valid, unused, device. For example:#
pvcreate /dev/sdX
-
Use the
vgcreate
command to create a volume group.#
Volume group "vgcreate
cinder-volumes
DEVICE
cinder-volumes
" successfully createdReplaceDEVICE
with the path to the device used when creating the physical volume. Optionally replacecinder-volumes
with an alternative name for the new volume group. -
Set the
volume_group
configuration key to the name of the newly created volume group.#
openstack-config --set /etc/cinder/cinder.conf \
DEFAULT volume_group
cinder-volumes
The 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_driver
configuration 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.