Cinder errors

In this section, we will explore a few of the more common errors you might encounter with Cinder. While we highlight just a few of the errors you may come across, the troubleshooting techniques we illustrate should be helpful in various troubleshooting situations.

Missing the cinder-volumes volume group

When using LVM to back Cinder, OpenStack expects there to be a volume group named cinder-volumes. When running the vgdisplay command, you can check for the cinder-volumes volume group as shown here:

Missing the cinder-volumes volume group

If you attempt to create cinder volume without having a volume group named cinder-volumes, it's very likely that your volume will end up in an error state as illustrated in the following screenshot with MyVol2:

Missing the cinder-volumes volume group

You can further confirm that this is the issue by checking the scheduler log at /var/log/cinder/scheduler.log file. In this log file, you are looking for an error similar to the one shown here:

Missing the cinder-volumes volume group

The last line in the log file may point to the fact that No valid host was found, but if you look further up in the log, you will note the logline that says Volume group cinder-volumes not found. This is a clue that points to the fact that you are missing a volume group named cinder-volumes. To resolve this issue, you can rename your volume group by running vgrename as in the following example:

vgrename my-volumes cinder-volumes

You can confirm the rename by running vgdisplay again and make sure that the value of the VG Name line is cinder-volumes.

The volume stuck in the creating state

At some point, you may find yourself in a situation where you have a Cinder volume stuck in the creating state. An example of this is the last volume in the following output:

The volume stuck in the creating state

The problem with having a volume stuck in the creating state is that Cinder will not let you delete it. When you attempt to delete a volume in this state, you will receive an error similar to the one given here:

Delete for volume 
87395813-5d5d-4587-a708-8bff4e5c9daf
 failed: Invalid volume: Volume status must be available or error, but current status is: creating. (HTTP 400) (Request-ID: req-20d4120a-9c91-466b-8e6b-f0b76f4356de)
ERROR: Unable to delete any of the specified volumes.

As illustrated in the preceding error, Cinder will not let you delete a volume unless it is in the Available or Error state. To fix this issue, you can run the cinder reset-state command:

cinder reset-state 
87395813-5d5d-4587-a708-8bff4e5c9daf

After running this command, the volume will be moved to the available or error state, after which you can use the delete command to remove the volume if it's in error, or you can attach the volume if it's available. Make sure that the ID passed into this command matches the ID of the volume you are targeting. This command changes the status of the volume in the database, so you need to make sure that the Cinder database is initialized and running as expected.

Insufficient free space

If you attempt to create a volume only to be confronted with an error similar to the one here, then you may want to check a few things:

Volume group "cinder-volumes" has insufficient free space

If you are using LVM, then you can run vgdisplay to confirm the volume group size you are working with. If necessary, you can use vgextend to increase the size of the volume group.

Not sending heartbeat

Suppose that during your troubleshooting, you come across a series of errors in the /var/log/cinder/volume.log file similar to the one given here:

2015-10-19 05:01:38.492 2499 ERROR cinder.service [-] Manager for service cinder-volume tc-ost1 is reporting problems, not sending heartbeat. Service will appear "down".

This error indicates that Cinder may not be running properly. To further troubleshoot the problem, look at the log entries that have been recorded just before the heartbeat errors appear. Here, you will likely find clues pointing to the cause of the root issue.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset