Created by Jon Bernard
Out of the Box
Multiple Backends
Volume Types
Using Gluster
When Things Go Wrong
Three cinder process running:
$ openstack-status … == Cinder services == openstack-cinder-api: active openstack-cinder-scheduler: active openstack-cinder-volume: active …
$ for i in api scheduler volume; do sudo service openstack-cinder-$i status; done openstack-cinder-api (pid 2983) is running... openstack-cinder-scheduler (pid 3028) is running... openstack-cinder-volume (pid 3562) is running... // status can be replaced with start, stop, or restart // to manipulate the cinder services
LVM is the default storage provider
$ sudo vgs VG #PV #LV #SN Attr VSize VFree cinder-volumes 1 0 0 wz--n- 200.60g 200.60g
One LVM backend
Logical volumes are created in cinder-volumes
All configuration is in /etc/cinder/cinder.conf
Thin provisioning is not ready yet
TGT provides network access to volumes via iSCSI
Configuration at /etc/tgt/targets.conf
TGT is configured to include targets created by cinder:
$ sudo grep cinder /etc/tgt/targets.conf include /etc/cinder/volumes/*
See current iSCSI exports
$ sudo tgt-admin --show
/etc/cinder/cinder.conf
# a list of backends that will be served by this compute node enabled_backends=lvmdriver-1,lvmdriver-2,lvmdriver-3 [lvmdriver-1] volume_group=cinder-volumes-1 volume_driver=cinder.volume.drivers.lvm.LVMISCSIDriver volume_backend_name=LVM_iSCSI [lvmdriver-2] volume_group=cinder-volumes-2 volume_driver=cinder.volume.drivers.lvm.LVMISCSIDriver volume_backend_name=LVM_iSCSI # same as 1, scheduler will balance [lvmdriver-3] volume_group=cinder-volumes-3 volume_driver=cinder.volume.drivers.lvm.LVMISCSIDriver volume_backend_name=LVM_iSCSI_b # different, scheduler will wait
Make sure these definitions are completely before or after the [DEFAULT] section
Create a volume type
$ cinder type-create lvm $ cinder type-key lvm set volume_backend_name=LVM_iSCSI $ cinder extra-specs-list (just to check the settings are there)
Create a volume using the specified type
$ cinder create --volume-type lvm --display-name my-volume 1
Your gluster volume(s) must be mountable (test this)
/etc/cinder/cinder.conf
[gluster-driver-1] volume_backend_name=GLUSTER volume_driver=cinder.volume.drivers.glusterfs.GlusterfsDriver glusterfs_shares_config=/etc/cinder/shares.conf glusterfs_mount_point_base=/var/lib/cinder/volumes
/etc/cinder/shares.conf
hostname:gluster-volume-1 hostname:gluster-volume-2 hostname:gluster-volume-3
/etc/cinder/cinder.conf
[ceph] volume_backend_name = CEPH volume_driver = cinder.volume.drivers.rbd.RBDDriver rbd_user = cinder rbd_pool = volumes
/etc/ceph/ceph.conf
[global] mon_host = 172.16.0.12
/etc/ceph/ceph.client.cinder.keyring
[client.cinder] key = MY-CINDER-KEY
Lots of moving pieces, order of events is crucial
Even with perfect configuration, it still might break
Logs are your first line of defence
$ sudo ls /var/log/cinder/ api.log scheduler.log volume.log
/usr/bin/cinder
Command Line!
Allows you to isolate cinder from the rest of openstack
Helpful to understand the current state
Try commands directly and inspect results immediately
cinder-volume will continue running but nothing will work
Often the volume group is wrong or missing
2014-02-20 14:54:55 ERROR cinder.volume.manager […] Error encountered during initialization of driver: LVMISCSIDriver 2014-02-20 14:54:55 ERROR cinder.volume.manager […] Unexpected error while running command. Command: vgs --noheadings -o name cinder-volumes Exit code: 5 Stdout: '' Stderr: ' Volume group "cinder-volumes" not found\n Skipping volume group cinder-volumes\n' 2014-02-20 14:56:21 INFO cinder.volume.manager [-] Updating volume status 2014-02-20 14:56:21 WARNING cinder.volume.manager [-] Unable to update stats, driver is uninitialized
You'll see this if you've run out of space
2014-02-19 11:41:20 WARNING [cinder.scheduler.filters.capacity_filter] Insufficient free space for volume creation (requested / avail): 5/0.0 2014-02-19 11:41:20 ERROR [cinder.scheduler.manager] Failed to schedule_create_volume: No valid host was found.
Failures of any kind almost always result in a stacktrace
If the error isn't obvious, look at the offending source code
Send me an email