| name | openstack-cinder |
| description | OpenStack Cinder block storage service. Provides persistent volume management for cloud instances including volume creation, snapshots, backups, LVM/iSCSI backend, volume types with QoS, encryption (LUKS), volume migration, and multi-backend support. Use for deploying, configuring, operating, and troubleshooting OpenStack block storage. |
| user-invocable | true |
| allowed-tools | Read Grep Glob |
| metadata | {"extensions":{"gsd-skill-creator":{"version":1,"createdAt":"2026-02-23","triggers":{"intents":["cinder","volume","block storage","snapshot","backup","LVM","iSCSI","volume type","storage backend"],"contexts":["deploying openstack storage","managing volumes","troubleshooting storage","configuring storage backends"]}}}} |
OpenStack Cinder -- Block Storage Service
Cinder provides persistent block storage volumes that attach to Nova compute instances. Unlike ephemeral storage (which disappears when an instance is deleted), Cinder volumes persist independently of the instance lifecycle. They can be detached from one instance and reattached to another, snapshotted for point-in-time copies, and backed up for disaster recovery.
Architecture
Cinder uses a backend driver architecture that abstracts the underlying storage technology. The storage backend handles the actual block device operations while Cinder provides a uniform API.
- LVM/iSCSI backend: The default for single-node deployments. Cinder creates logical volumes in an LVM volume group and exports them over iSCSI to the compute host. Simple, well-understood, and requires no external storage infrastructure.
- Ceph (RBD) backend: The standard for multi-node production deployments. Cinder creates RBD images in a Ceph pool. Provides replication, snapshots, and thin provisioning natively.
- NFS backend: Mounts NFS shares and creates volume files on them. Useful for environments with existing NFS infrastructure.
Service components:
cinder-api: Receives REST API requests and routes them to the scheduler.
cinder-scheduler: Selects the appropriate backend and volume node for each operation using configurable filters and weighers.
cinder-volume: Manages the actual volume lifecycle on the backend. One instance per backend.
cinder-backup: Handles volume backup and restore operations to a backup target (Swift, NFS, Ceph).
Deploy
Kolla-Ansible Configuration
Key settings in globals.yml:
enable_cinder: "yes"
enable_cinder_backup: "yes"
cinder_volume_group: "cinder-volumes"
LVM Volume Group Setup
Before deploying Cinder with the LVM backend, create the volume group:
lsblk
pvcreate /dev/sdb
vgcreate cinder-volumes /dev/sdb
vgs
If using a loop device for testing (not recommended for production):
dd if=/dev/zero of=/var/lib/cinder/cinder-volumes.img bs=1M count=20480
losetup /dev/loop0 /var/lib/cinder/cinder-volumes.img
pvcreate /dev/loop0
vgcreate cinder-volumes /dev/loop0
Container Verification
docker ps --format '{{.Names}}' | grep cinder
openstack volume service list
Configure
Volume Types and Extra Specs
Volume types define storage classes with specific capabilities. Extra specs control backend behavior.
openstack volume type create lvm-standard
openstack volume type set lvm-standard --property volume_backend_name=lvm-1
openstack volume type create lvm-performance
openstack volume type set lvm-performance \
--property volume_backend_name=lvm-1 \
--property provisioning:type=thick
openstack volume type set lvm-standard --property is_default=true
QoS Policies
openstack volume qos create standard-qos \
--consumer front-end \
--property read_iops_sec=1000 \
--property write_iops_sec=500 \
--property total_bytes_sec=104857600
openstack volume qos associate standard-qos lvm-standard
Volume Encryption
Cinder supports volume encryption using LUKS (dm-crypt). Requires Nova to have the os-brick encryption connector configured.
openstack volume type create encrypted-volumes
openstack volume type set encrypted-volumes --encryption-provider luks \
--encryption-cipher aes-xts-plain64 \
--encryption-key-size 256 \
--encryption-control-location front-end
Note: Volume encryption requires Barbican (key management) or a static key in cinder.conf. For single-node lab deployments, a static key is simpler but less secure.
Backend Configuration
The LVM backend is configured through Kolla-Ansible's cinder-volume.conf override:
[lvm-1]
volume_driver = cinder.volume.drivers.lvm.LVMVolumeDriver
volume_group = cinder-volumes
volume_backend_name = lvm-1
target_protocol = iscsi
target_helper = lioadm
Oversubscription Ratios
Control how much virtual capacity Cinder can allocate beyond physical capacity:
max_over_subscription_ratio = 1.0
Operate
Volume CRUD
openstack volume create --size 10 my-volume
openstack volume create --size 20 --image cirros --bootable boot-volume
openstack volume list
openstack volume show my-volume
openstack volume delete my-volume
Attach and Detach
openstack server add volume my-instance my-volume
openstack volume show my-volume -c attachments
openstack server remove volume my-instance my-volume
Snapshot Management
openstack volume snapshot create --volume my-volume my-snapshot
openstack volume create --snapshot my-snapshot --size 10 restored-volume
openstack volume snapshot list
openstack volume snapshot delete my-snapshot
Volume Backup and Restore
openstack volume backup create my-volume --name my-backup
openstack volume backup restore my-backup restored-volume
openstack volume backup list
Extending Volumes
openstack volume set --size 20 my-volume
Transfer Volumes Between Projects
openstack volume transfer request create my-volume --name transfer-1
openstack volume transfer request accept <transfer-id> <auth-key>
Force-Detach Stuck Volumes
openstack volume set --state available my-volume
cinder reset-state --state available --attach-status detached my-volume
Troubleshoot
Volume Stuck in Creating/Deleting State
Symptoms: Volume shows "creating" or "deleting" status indefinitely.
Diagnostic sequence:
- Check cinder-volume logs:
docker logs cinder_volume 2>&1 | tail -50. Look for errors about LVM commands or iSCSI target creation failures.
- Check volume group space:
vgs cinder-volumes. If VFree is 0, no space to create volumes.
- Check LVM directly:
lvs cinder-volumes. Look for the logical volume corresponding to the Cinder volume UUID.
- Reset state if needed:
openstack volume set --state error <volume> then delete, or openstack volume set --state available <volume> if the underlying LV exists.
- Check iSCSI target:
targetcli ls to see if the iSCSI target was created but Cinder lost track of it.
Volume Attach Failures
Symptoms: openstack server add volume fails or times out; instance does not see the block device.
Diagnostic sequence:
- Check iSCSI initiator (compute host):
iscsiadm -m session to list active iSCSI sessions. If the volume target is not connected, check iscsid service.
- Check target availability:
targetcli ls on the volume host. The target should be listed with the correct LUN.
- Check Nova compute logs:
docker logs nova_compute 2>&1 | grep <volume-id>. Look for os-brick connector errors.
- Check multipath (if configured):
multipath -ll. Misconfigured multipath can cause attach failures or device conflicts.
- Check device busy: If a previous detach did not clean up, the device may still be in use. Check
lsblk and dmsetup ls for stale mappings.
Snapshot Failures
Symptoms: Snapshot creation fails or produces a zero-size snapshot.
Diagnostic sequence:
- Check VG space: Snapshots (LVM COW) consume space from the volume group.
vgs cinder-volumes to check free space.
- COW overflow: If the volume changes faster than the snapshot can track, the COW snapshot becomes invalid. Check
lvs for snapshot status (should show active, not "invalid").
- Volume in use: Some backends require the volume to be detached for consistent snapshots. Check
openstack volume show <volume> -c status.
- Check cinder-volume logs:
docker logs cinder_volume 2>&1 | grep snapshot. Look for LVM errors.
Backup Failures
Symptoms: Backup creation fails, times out, or backup service is not available.
Diagnostic sequence:
- Check backup service:
openstack volume service list | grep backup. Must show status "up" and state "enabled".
- Check backup container:
docker ps | grep cinder_backup. If not running, check docker logs cinder_backup.
- Check backup storage: If backing up to Swift, verify Swift is operational. If NFS, verify the NFS mount is accessible.
- Check space: Backup target must have sufficient space. For Swift:
openstack object store account show. For NFS: df -h <nfs-mount>.
- Check cinder-backup logs:
docker logs cinder_backup 2>&1 | tail -50.
Volume Group Not Found
Symptoms: cinder-volume fails to start or reports "VG cinder-volumes not found."
Diagnostic sequence:
- Check VG exists:
vgs on the host. If cinder-volumes is not listed, it was never created or the disk failed.
- Check VG name match: Compare
cinder_volume_group in globals.yml with the actual VG name. They must match exactly.
- Check physical volume:
pvs to verify the underlying disk/partition is still a PV. Disk failure or partition table changes can remove PV metadata.
- Loop device (if used): Check
losetup -l to verify the loop device is still attached. Loop devices do not persist across reboots without explicit configuration.
- Recreate if needed:
pvcreate /dev/<disk> && vgcreate cinder-volumes /dev/<disk>. Warning: this destroys any existing data on the device.
Integration Points
- Keystone: All Cinder API calls require Keystone authentication. Cinder registers
volumev3 service and endpoint in the Keystone catalog. Service user cinder authenticates for internal operations.
- Nova: Nova uses os-brick to connect Cinder volumes to instances. When
openstack server add volume is called, Nova coordinates with Cinder to export the volume (iSCSI target) and connect it to the hypervisor (iSCSI initiator). The nova-compute service must have access to the iSCSI network.
- Glance: Cinder can create bootable volumes directly from Glance images (
openstack volume create --image). Glance can also use Cinder as a backend store for image data.
- Swift: When
cinder_backup_driver: swift is configured, Cinder stores volume backups as objects in Swift containers. This provides object-level redundancy for backup data.
NASA SE Cross-References
| SE Phase | Cinder Activity | Reference |
|---|
| Phase B (Preliminary Design) | Design storage backend: LVM vs Ceph trade study. Plan volume group sizing. Define volume types and QoS requirements. Design backup strategy. | SP-6105 SS 4.3-4.4 |
| Phase C (Final Design & Build) | Create LVM volume group. Configure globals.yml storage parameters. Define volume types and encryption policies. Configure backup target. | SP-6105 SS 5.1 |
| Phase D (Integration & Test) | Verify volume creation, attachment to instances, snapshot operations, and backup/restore cycle. Test volume resize. Verify bootable volume creation from Glance images. | SP-6105 SS 5.2-5.3 |
| Phase E (Operations) | Day-2 volume management: provision volumes, manage snapshots and backups, handle stuck volumes, monitor VG capacity, transfer volumes between projects, extend volumes. | SP-6105 SS 5.4-5.5 |