The Cinder block storage service provides persistent block storage volumes for OpenStack instances. The Cinder service is enabled by default.
Cinder requires some form of backing storage. Currently, you can only connect to a storage device using the iSCSI protocol. The default is to use the Linux Logical Volume Manager (LVM) on a storage node to store volume. However, you can use various external iSCSI storage devices by enabling vendor-specific Cinder volume drivers. You can also configure multiple backing storage devices.
Using an NFS driver for Cinder volumes is not supported.
Cinder also provides a backup service, which enables you to automatically back up volumes to an external storage. You can use NFS or the Swift object service as the backing storage for Cinder backups.
Currently using Ceph as the backing storage for either Cinder volumes or Cinder backup is not supported.
The LVM volume driver enables you to use the iSCSI protocol to connect to volumes in a volume group managed by the Linux Logical Volume Manager (LVM) on a storage node.
The LVM volume driver is supported only with Oracle Linux 7 storage nodes. You cannot use this driver with Oracle VM Server storage nodes.
The Cinder service (the enable_cinder
property) and the LVM storage backend (the
enable_cinder_backend_lvm
property) are
enabled by default.
By default, the Cinder service creates and manages the volumes
in an LVM volume group named cinder-volumes
on the storage nodes. If you prefer, you can configure a
different LVM volume group name:
$ kollacli property set cinder_volume_group openstack-volumes
Whether you use the default LVM volume group name or your own, you have to manually create the LVM volume group on the storage nodes. Perform the following steps on each storage node:
Install the LVM tools.
The LVM tools are usually installed by default. If they not installed, install them:
# yum install lvm2
Use the pvcreate command to set up the devices that you want to use as physical volumes with LVM.
# pvcreate [
options
]device
...CautionWhen you run this command, all the data on the disk will be lost.
For example, to set up the
/dev/sdb
and/dev/sdc
devices as physical volumes:#
pvcreate -v /dev/sd[bc]
Set up physical volume for "/dev/sdb" with 41943040 available sectors Zeroing start of device /dev/sdb Writing physical volume data to disk "/dev/sdb" Physical volume "/dev/sdb" successfully created ...Use the vgcreate command to create the LVM volume group.
# vgcreate [
options
]volume_group_name
physical_volume
...For example, to create the
cinder-volumes
LVM volume group from the physical volumes/dev/sdb
and/dev/sdc
:#
vgcreate -v cinder-volumes /dev/sd[bc]
Adding physical volume '/dev/sdb' to volume group 'cinder-volumes' Adding physical volume '/dev/sdc' to volume group 'cinder-volumes' Archiving volume group "cinder-volumes" metadata (seqno 0). Creating volume group backup "/etc/lvm/backup/cinder-volumes" (seqno 1). Volume group "cinder-volumes" successfully created
For more information, see the lvm(8)
,
pvcreate(8)
, vgcreate(8)
,
and other LVM manual pages.
If you have dedicated storage appliances that support iSCSI volume drivers for Cinder, you can use these instead of, or in addition to, the Cinder LVM volume driver.
The Cinder service (the enable_cinder
property) and the iSCSI storage backend (the
enable_cinder_backend_iscsi
property) are
enabled by default.
To enable an iSCSI volume driver, you add the configuration
settings for the driver to the
/etc/kolla/config/cinder.conf
file on the
master node. If
this file does not exist, create it. The format of the
configuration settings is as follows:
[DEFAULT] enabled_backends = MYdriver-1 [MYdriver-1] volume_backend_name =name
volume_driver = cinder.volume.drivers.driver_name
setting_name
=setting
...
The enabled_backends
setting is required to
enable the [MYdriver-1]
configuration
section. The volume_driver
configuration
setting is used to specify the volume driver, and the settings
that follow this are specific to the selected volume driver.
For more information about the available Cinder volume drivers and their configuration settings, see the OpenStack Configuration Reference:
http://docs.openstack.org/mitaka/config-reference/block-storage/volume-drivers.html
For the Oracle ZFS Storage Appliance iSCSI driver, use:
volume_driver = cinder.volume.drivers.zfssa.zfssaiscsi.ZFSSAISCSIDriver
For more information about this driver, including the required configuration on the storage appliance itself, see http://docs.openstack.org/mitaka/config-reference/block-storage/drivers/zfssa-iscsi-driver.html.
The following is an example configuration for the Oracle ZFS Storage Appliance iSCSI driver:
enabled_backends = zfsISCSIdriver-1 [zfsISCSIdriver-1] volume_backend_name = cinder-volumes volume_driver = cinder.volume.drivers.zfssa.zfssaiscsi.ZFSSAISCSIDriver san_ip = 10.10.10.10 san_login = cinder san_password = password zfssa_pool = mypool zfssa_project = myproject zfssa_initiator_username = iqn.name zfssa_initiator_group = default zfssa_target_portal = 10.10.10.11:3260 zfssa_target_interfaces = e1000g0
By default, the Cinder block storage service uses the iSCSI
protocol to connect instances to volumes.
The iscsid
container runs on compute nodes
and handles the iSCSI session using an iSCSI initiator name that
is generated when you deploy Nova compute services.
If you prefer, you can configure your own iSCSI initiator name.
You set the iSCSI initiator name in the
/etc/iscsi/initiatorname.iscsi
file on each
compute node. If the initiatorname.iscsi
file does not exist, create it. The file has one line, which
contains the name of the initiator, in the format:
InitiatorName=iqn.yyyy
-mm
.naming-authority
:unique_name
For example:
InitiatorName=iqn.1988-12.com.oracle:myiscsihost
The Nova compute service supports iSCSI multipath for failover
purposes and increased performance. Multipath is enabled by
default (configured with the
enable_multipathd
property). When multipath
is enabled, the iSCSI initiator (the Compute node) is able to
obtain a list of addresses from the storage node that the
initiator can use as multiple paths to the iSCSI LUN.
The Cinder service provides the ability to back up Cinder volumes to an external storage. By default, the backup driver is configured to use NFS. However, you need to configure the NFS share as the location for the backups, as follows:
$ kollacli property set cinder_backup_sharehost_name
:path
where host_name
is the fully
qualified DNS name or IP address of the host that exports the
NFS share, and path
is the full path
to the share on that host.
You can configure separate shares for individual hosts or groups, see Section 4.5, “Setting Properties for Groups or Hosts” for details.
You can also configure mount options for the NFS share, as follows:
$ kollacli property set backup_mount_options_nfs nfs_mount-options
For example, by default Cinder supports NFS version 4.1 or higher. If the NFS host uses an earlier version of NFS, this can cause errors. To downgrade the NFS version, configure the NFS version as a mount option. For example to specify that NFS version 4 is used:
$ kollacli property set backup_mount_options_nfs "vers=4,minorversion=0"
If you enable the Swift object storage service (see Section 4.12, “Setting up Swift” for details), you can back up Cinder volumes to Swift instead of an NFS share. To do this you, need to change the default backup driver, as follows:
$ kollacli property set cinder_backup_driver swift
Do not set the cinder_backup_swift_user
and
cinder_backup_swift_key
properties. By
default, these properties are not set and this is sufficient
for Cinder backup to operate.