Revision history [back]

click to hide/show revision 1
initial version

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

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.