The invention discloses a method for scheduling storage capacity in a
high availability scene of block storage service, and relates to the technical field of OpenStack. Comprising the steps of 1, deploying an Openstack environment: adopting Openstack-helm to carry out
containerization deployment, and deploying an API service, a scheduler and a Volume Manager in a pod form, 2, improving a
cinder project of OpensStack, and 3, aiming at a storage service high-availability scene, before distributed capacity information of a self.stats
storage pool is updated to Volume stats, updating the distributed capacity information of the self.stats
storage pool to the Volume Manager, and then updating the distributed capacity information of the self.stats
storage pool to the Volume Manager in the Volume Manager in the Volume Manager in the Volume Manager in the Volume Manager in the Volume Manager in the Volume Manager. The method comprises the following steps of: acquiring volume and information of a same storage
pool by utilizing condition query of a
database interface, updating distributed volume information of the storage
pool in self.stats, updating the distributed volume information of the storage
pool in the self.stats into volumeats,
synchronizing the volumeats information to a scheduler, and performing storage volume scheduling according to the volumeats information through the scheduler. The method comprises the following steps of: acquiring the volume and information of the same storage pool by utilizing condition query of a
database interface, updating the distributed volume information of the storage pool in the self.stats, and updating the distributed volume information of the storage pool in the self.stats into the volumeats.