what's the good way to handle lock for Cinder LVM backend storage?

asked 2015-12-22 21:28:02 -0600

sunzen.wang gravatar image

currently locking_type = 1 is set for LVM. while sometimes there is remaining lock files, such as

# ls /run/lock/lvm/V_cinder-volumes
V_cinder-volumes      V_cinder-volumes:aux

This causes other LVM management operations like pvs/lvs get pending, and also some remaining LVM operations submitted from cinder-volume service, shown as following:

# systemctl status openstack-cinder-volume
openstack-cinder-volume.service - OpenStack Cinder Volume Server
   Loaded: loaded (/usr/lib/systemd/system/openstack-cinder-volume.service; enabled)
   Active: active (running) since Tue 2015-12-22 16:13:06 CST; 18h ago
 Main PID: 37633 (cinder-volume)
   CGroup: /system.slice/openstack-cinder-volume.service
           ├─  960 /sbin/lvremove --config activation { retry_deactivation = 1}  -f cinder-volumes/clone-snap-c2917d7a-8146-4bff-8e7b-6c68f581d565
           ├─  974 /sbin/vgs --noheadings --unit=g -o name,size,free,lv_count,uuid --separator : --nosuffix cinder-volumes
           ├─ 5455 /sbin/lvremove --config activation { retry_deactivation = 1}  -f cinder-volumes/volume-68309258-78a4-48bc-af7c-3ecce42a9800
           ├─ 5773 /sbin/lvremove --config activation { retry_deactivation = 1}  -f cinder-volumes/volume-d40612df-fefe-48ec-852a-aaca3b8d1a73
           ├─ 7328 /sbin/vgs --noheadings --unit=g -o name,size,free,lv_count,uuid --separator : --nosuffix cinder-volumes
           ├─ 8003 /sbin/lvcreate -n volume-3e7d1527-061f-4bff-aae2-c4486f8ef466 cinder-volumes -L 1g
           ├─ 8017 /sbin/lvs --noheadings --unit=g -o vg_name,name,size --nosuffix cinder-volumes
           ├─ 8030 /sbin/lvs --noheadings --unit=g -o vg_name,name,size --nosuffix cinder-volumes
           ├─37633 /usr/bin/python2 /usr/bin/cinder-volume --config-file /usr/share/cinder/cinder-dist.conf --config-file /etc/cinder/cinder.conf --logfile /var/log/cinder/volume.log
           └─37649 /usr/bin/python2 /usr/bin/cinder-volume --config-file /usr/share/cinder/cinder-dist.conf --config-file /etc/cinder/cinder.conf --logfile /var/log/cinder/volume.log

I wonder what's the good way to handle lock for cinder LVM backend storage.

Previously, when i want to conduct LVM management operations (to check what causes no response from some cinder volume operations ), I deleted those remaining file lock. Now i get aware that maybe cause more remaining LVM operations submitted from cinder-volume service. What a dilemma!

Could anyone help me make LVM work well for Cinder? Lock is one point. any other information is appreciated.



edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted

answered 2016-01-15 03:57:00 -0600

sunzen.wang gravatar image

Let me update.

The 'pending' lock shows some lv operation is doing. Found out it takes much time to delete a volume, as it always zero-ing the backend lv according to default configuration entry: volume_clear=zero

So it helps to change configuration to "volume_clear=none". Of course, it is acceptable in current environment.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools


Asked: 2015-12-22 21:28:02 -0600

Seen: 306 times

Last updated: Jan 15 '16