Functionality¶
The driver extends the capabilities of the standard Cinder LVM driver.
Cinder Sharedlvm Driver provides the ability to work with Cinder block devices on shared LVM storage directly, without using iSCSI. Cinder creates volumes with the correct Sanlock locks. When created volume is mounted on the host with the cinder-volume service, the locks are removed, and the locks are created on the host where the instances are running. If the volume is connected to the same instance, then exclusive locks are created, otherwise - non-exclusive. It is need to run the commands in order to view the locks on a node:
sanlock client status
daemon 6d91d541-1630-4384-955f-b1ea50f1c1c8.mnode2.test
p -1 helper
p -1 listener
p 857 lvmlockd
p 857 lvmlockd
p -1 status
s lvm_vol:12:/dev/mapper/vol-lvmlock:0
s lvm_global:12:/dev/mapper/global-lvmlock:0
r lvm_vol:iERhZr-6g7X-kzrs-NFIY-inzi-2eh6-mAZddI:/dev/mapper/vol-lvmlock:72351744:2 p 857
r lvm_vol:ckSMkw-0XAE-3cVD-rymx-HcXs-XrI3-ra5PH7:/dev/mapper/vol-lvmlock:74448896:2 p 857
where ckSMkw-0XAE-3cVD-rymx-HcXs-XrI3-ra5PH7
is the value of the LV UUID parameter of the volume, p
indicates that this lock is exclusive.
Cloud-manager collect data for displaying in “Volume groups (VG)” tab of Volume type. Collecting information about block storages Cinder process collects data from Agent module, which is installed on nodes with cinder-volume. It is also possible to migrate between PVs within the same Volume Group (VG), that is, one Volume Type (Volume type) without interrupting the operation of the instance to which the volume is connected. After restarting the compute node, all locks are restored using the Agent service, which must be started before instances and nova-compute service start. Agent should be started on compute nodes after access to the data store, lock store is configured and the ability to manage locks appears. The type of volume lock is displayed in the Overview tab.
Cinder Sharedlvm Driver also supports the functionality of live and normal instance migration, migrations and changing volume type for a volume.