Ask Your Question

Cinder-Volumes not freeing space upon volume delete

asked 2019-05-14 15:55:18 -0500


I am running Openstack Ocata installed via Packstack, and have run into an issue with the cinder-volumes file which is in var/lib/cinder allowing me to create volumes (and the instances that they serve) until the partition which holds var/lib/cinder is completely full, and then it errors out.

Two questions - What is the fix? Of more interest here, what extra data can I append to this question to clarify further?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2019-05-14 19:06:18 -0500

updated 2019-05-14 21:11:36 -0500

First, some background.

A Packstack answer file contains a parameter CONFIG_CINDER_VOLUMES_SIZE. My Rocky Packstack deployment uses the default size, which is 20GB.

Here is my cinder-volumes file:

$ ls -lsh /var/lib/cinder/cinder-volumes
256K -rw-r-----. 1 root root 21G May 14 19:33 /var/lib/cinder/cinder-volumes

The 256K figure is the actual space this file currently uses in the filesystem. It's a sparse file that fills up as you allocate Cinder volumes. I don't think that Linux has a mechanism to release space in a file.

The fix is to provide enough space in /var/lib/cinder so that the file can grow up to its 20GB. Or you set a smaller CONFIG_CINDER_VOLUMES_SIZE when deploying Packstack, knowing that this will limit the amount of volume data that you can create.

More background information: Packstack deploys LVM as the Cinder backend and enables thin provisioning by default. The cinder-volumes file is used as the LVM physical volume:

# pvs
  PV         VG             Fmt  Attr PSize   PFree
  /dev/loop1 cinder-volumes lvm2 a--  <20.60g 1012.00m
# lvs
  LV                  VG             Attr       LSize   Pool Origin Data%  Meta%  (...)
  cinder-volumes-pool cinder-volumes twi-a-tz--  19.57g             0.00   10.55

cinder-volumes-pool is the LVM pool from which thin logical volumes are allocated, each representing a Cinder volume.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2019-05-14 15:55:18 -0500

Seen: 11 times

Last updated: May 14