CN116737080A - Distributed storage system data block management method, system, equipment and storage medium - Google Patents

Distributed storage system data block management method, system, equipment and storage medium Download PDF

Info

Publication number
CN116737080A
CN116737080A CN202310782731.5A CN202310782731A CN116737080A CN 116737080 A CN116737080 A CN 116737080A CN 202310782731 A CN202310782731 A CN 202310782731A CN 116737080 A CN116737080 A CN 116737080A
Authority
CN
China
Prior art keywords
data block
service
group
allocation
metadata
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310782731.5A
Other languages
Chinese (zh)
Inventor
秦伟
尹微
文中领
周泽湘
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Toyou Feiji Electronics Co ltd
Original Assignee
Beijing Toyou Feiji Electronics Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Toyou Feiji Electronics Co ltd filed Critical Beijing Toyou Feiji Electronics Co ltd
Priority to CN202310782731.5A priority Critical patent/CN116737080A/en
Publication of CN116737080A publication Critical patent/CN116737080A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • G06F3/0607Improving or facilitating administration, e.g. storage management by facilitating the process of upgrading existing storage systems, e.g. for improving compatibility between host and storage device
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0608Saving storage space on storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • G06F3/0611Improving I/O performance in relation to response time
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • G06F3/0631Configuration or reconfiguration of storage systems by allocating resources to storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/064Management of blocks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0653Monitoring storage devices or systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2206/00Indexing scheme related to dedicated interfaces for computers
    • G06F2206/10Indexing scheme related to storage interfaces for computers, indexing schema related to group G06F3/06
    • G06F2206/1012Load balancing
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method, a system, equipment and a storage medium for managing data blocks of a distributed storage system, wherein the method comprises the following steps: distributing the data blocks to a preset collocation group; storing the reset group to a preset data block service, and establishing a mapping relation between the reset group and the data block service; and managing the mapping relation between the allocation group and the data block service based on the metadata service, and acquiring the latest information of the allocation group and the corresponding data block service information from the metadata service when the client is started. Through the processing scheme disclosed by the invention, the storage positions of the data blocks in the clusters can be efficiently and flexibly managed.

Description

Distributed storage system data block management method, system, equipment and storage medium
Technical Field
The present invention relates to the field of data storage technologies, and in particular, to a method, a system, an apparatus, and a storage medium for managing data blocks in a distributed storage system.
Background
Distributed storage is generally classified into object storage, file storage, and block storage according to the manner in which the user uses. The size constraints of objects, files, disk blocks are very broad, as small as a few KB, as large as a few TB. In order to facilitate data management and scheduling, the distributed storage generally blocks large files, different data blocks can be distributed in different storage devices, the advantage of multiple devices is fully utilized to improve the concurrent access performance, and in addition, the data blocks with relatively fixed sizes are convenient to adopt redundancy strategies such as multiple copies or erasure codes to improve the reliability of data.
Distributed storage has the great advantage of supporting lateral expansion, dynamically increasing storage devices as the amount of stored data increases. How to efficiently and flexibly manage the storage locations of data blocks in a cluster, i.e. managing the correspondence between data blocks and storage devices, is an important issue that must be addressed by distributed storage.
One prior art technique manages data block storage locations by a metadata server that centrally maintains the mapping of data blocks to storage devices. When the client accesses the data block, firstly, the position information of the data block is queried from the metadata server through the data block ID, and then a request is sent to the corresponding storage device to access the data block. The method can flexibly schedule the storage position of the data block and fully utilize the storage resource of the system. However, because the client needs to request the metadata server to obtain the location information when accessing the data block. When the number of clients is large and IO requests are frequent, the metadata server may become a bottleneck of the system, limiting the size and expansion capability of the distributed storage system. In addition, IO delay is increased in the mode. Although these problems can be alleviated to some extent by caching location information at the client, cache effectiveness is largely dependent on the cache hit probability.
In the other prior art, the storage position is obtained through hash mapping, the ID of the storage device is obtained through hash calculation on the ID of the data block, and then the information of the storage device is queried. This approach typically employs a consistent hashing algorithm to reduce the amount of data that migrates when the distributed storage topology changes. The metadata server does not need to maintain the position information of each data block, and the load of the metadata server is reduced. However, the client obtains the storage device ID through hash computation, which limits flexibility in data block distribution, although avoiding the problem of frequent access to the metadata server in the first method. For example, when the system capacity is increased by a plurality of nodes, a large amount of data migration is involved to influence normal service access. In addition, the method cannot ensure the balance of the stored data in the disk, even if the system has available space, the residual storage space of the system cannot be used because the space of the individual disk is occupied, and the space utilization rate of the whole system is reduced.
It is apparent that the above-mentioned conventional data block management method still has inconvenience and defects in use, and further improvement is needed. How to create a new data block management method becomes the aim of improvement in the current industry.
Disclosure of Invention
In view of this, embodiments of the present disclosure provide a method for managing data blocks of a distributed storage system, which at least partially solves the problems in the prior art.
In a first aspect, an embodiment of the present disclosure provides a method for managing data blocks of a distributed storage system, the method including the steps of:
distributing the data blocks to a preset collocation group;
storing the reset group to a preset data block service, and establishing a mapping relation between the reset group and the data block service;
and managing the mapping relation between the allocation group and the data block service based on the metadata service, and acquiring the latest information of the allocation group and the corresponding data block service information from the metadata service when the client is started.
According to a specific implementation of an embodiment of the disclosure, the method further includes:
subscribing to the update event of the reset group and the data block service.
According to a specific implementation manner of the embodiment of the present disclosure, the allocation of the data blocks to the preset allocation groups includes the following steps:
establishing a mapping from the data block to the allocation group, and distributing by a metadata service according to the current storage space and load state of the system when the data block is created, wherein the mapping is calculated by the following formula:
wherein W is i The weight value selected for the set of settings; i is a resetting group; n (N) i Remaining available capacity ratio for the homing group relative to the target capacity; m is M i =Min(M 1 …M n ) Service available capacity ratio for provisioning group corresponding data block, M 1 The ratio of available capacity for the service of the 1 st data block corresponding to the allocation group, M n The available capacity proportion of the nth data block service is corresponding to the collocation group; l (L) i =Max(L 1 …L n ) Serving the current load proportion, L, for the set of data blocks 1 For the current load proportion of the service corresponding to the 1 st data block of the collocation group, L n The current load proportion of the nth data block service is corresponding to the reset group; delta is the weight scale factor of the load value.
According to a specific implementation of an embodiment of the disclosure, the method further includes:
when a new data block is added, the client applies for the data block storage quota to the metadata service in batches, and the method comprises the following steps: judging whether an unused data block quota is applied for; when the unused data block storage quota is not applied, applying for the storage quota to the metadata service in batches; the metadata service decides a target allocation group stored by the data block to be created according to the current storage space and the load condition, and returns an allocation group ID list to the client; the method comprises the steps of,
when the unused data block storage quota is applied for, determining a preset group in which the data block is to be stored; determining information of the data block service according to the mapping relation between the resetting group and the data block service; sending a request for creating the data block to a data block service; and returning the corresponding reset group ID after receiving the reply result of the data block service.
According to a specific implementation manner of the embodiment of the present disclosure, the storing the homing group to a preset data block service includes:
and storing the allocation groups into a preset number of data block services respectively.
According to a specific implementation manner of the embodiment of the present disclosure, the correspondence between the data block and the preset group is kept unchanged in the whole life cycle of the data block, and the user needs to provide the corresponding preset group ID when accessing the data block.
In a second aspect, embodiments of the present disclosure provide a distributed storage system data block management system, the system comprising:
a data block allocation module configured to allocate data blocks to preset allocation groups;
the allocation module of the homing group is configured to store the homing group to a preset data block service and establish a mapping relation between the homing group and the data block service;
and the management group allocation module is configured to manage the mapping relation between the allocation group and the data block service based on metadata service, and acquire the latest information of the allocation group and the corresponding data block service information from the metadata service when a client is started.
According to a specific implementation of an embodiment of the disclosure, the homing component allocation module further includes:
the capacity expansion module is configured to apply for the data block storage quota to the metadata service batch by the client when a new data block is added, and comprises the following steps:
judging whether an unused data block quota is applied for; when the unused data block storage quota is not applied, applying for the storage quota to the metadata service in batches; the metadata service decides a target allocation group stored by the data block to be created according to the current storage space and the load condition, and returns an allocation group ID list to the client; the method comprises the steps of,
when the unused data block storage quota is applied for, determining a preset group in which the data block is to be stored; determining information of the data block service according to the mapping relation between the resetting group and the data block service; sending a request for creating the data block to a data block service; and returning the corresponding reset group ID after receiving the reply result of the data block service.
In a third aspect, embodiments of the present disclosure further provide an electronic device, including:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores instructions executable by the at least one processor, which when executed by the at least one processor, cause the at least one processor to implement the distributed storage system data block management method of any one of the foregoing first aspect or any implementation of the first aspect.
In a fourth aspect, the presently disclosed embodiments also provide a non-transitory computer-readable storage medium storing computer instructions that, when executed by at least one processor, cause the at least one processor to perform the distributed storage system data block management method of the foregoing first aspect or any implementation of the first aspect.
In a fifth aspect, embodiments of the present disclosure also provide a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, cause the computer to perform the distributed storage system data block management method of the first aspect or any implementation of the first aspect.
According to the data block management method of the distributed storage system in the embodiment of the disclosure, through decoupling of the allocation and maintenance functions of the mapping relation between the data blocks and the allocation groups, the metadata service is responsible for allocating the allocation groups where the data blocks are placed, and the user stores the allocation groups where the data blocks are located. The metadata service manages storage resources with the granularity of the allocation groups, so that the data volume of metadata is reduced, and the updating frequency of the metadata is reduced. The client applies for the data block storage quota in batches, so that interaction with the metadata service is reduced, and time delay for creating the data block is reduced. When the storage nodes are added, the metadata service can realize flexible management of storage resources through scheduling the allocation group, and realize system capacity expansion under the condition of not carrying out data migration. The data blocks are placed into the homing group, and the metadata service only maintains the mapping relation between the homing group and the data block service, so that the number of metadata managed by the metadata service can be greatly reduced, and complete caching of the metadata by clients is further realized. In addition, since the provisioning group and the data block service are updated only when the system topology changes, the update frequency of metadata is also greatly reduced. Compared with the metadata service which directly manages the position information of the data blocks, the load of the metadata service can be greatly reduced, and the expansion capacity of the distributed storage system is improved.
Drawings
The foregoing is merely an overview of the present invention, and the present invention is further described in detail below with reference to the accompanying drawings and detailed description.
Fig. 1 is a schematic flow chart of a method for managing data blocks of a distributed storage system according to an embodiment of the disclosure;
FIG. 2 is a block flow diagram of a method for managing data blocks in a distributed storage system according to an embodiment of the present disclosure;
fig. 3 is a flow chart of a method for creating a data block according to an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of a distributed storage system data block management system according to an embodiment of the present disclosure; and
fig. 5 is a schematic diagram of an electronic device according to an embodiment of the disclosure.
Detailed Description
Embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
Other advantages and effects of the present disclosure will become readily apparent to those skilled in the art from the following disclosure, which describes embodiments of the present disclosure by way of specific examples. It will be apparent that the described embodiments are merely some, but not all embodiments of the present disclosure. The disclosure may be embodied or practiced in other different specific embodiments, and details within the subject specification may be modified or changed from various points of view and applications without departing from the spirit of the disclosure. It should be noted that the following embodiments and features in the embodiments may be combined with each other without conflict. All other embodiments, which can be made by one of ordinary skill in the art without inventive effort, based on the embodiments in this disclosure are intended to be within the scope of this disclosure.
It is noted that various aspects of the embodiments are described below within the scope of the following claims. It should be apparent that the aspects described herein may be embodied in a wide variety of forms and that any specific structure and/or function described herein is merely illustrative. Based on the present disclosure, one skilled in the art will appreciate that one aspect described herein may be implemented independently of any other aspect, and that two or more of these aspects may be combined in various ways. For example, an apparatus may be implemented and/or a method practiced using any number of the aspects set forth herein. In addition, such apparatus may be implemented and/or such methods practiced using other structure and/or functionality in addition to one or more of the aspects set forth herein.
In addition, in the following description, specific details are provided in order to provide a thorough understanding of the examples. However, it will be understood by those skilled in the art that the aspects may be practiced without these specific details.
The embodiment of the invention provides a data block management method of a distributed storage system, which reduces access requests to a metadata server when a client accesses a data block under the condition of meeting the flexibility of data block storage position management, improves the expansion capacity of the system and meets the requirement of ultra-large-scale distributed storage on data block position management.
Fig. 1 is a schematic diagram of a flow of a method for managing data blocks of a distributed storage system according to an embodiment of the disclosure.
FIG. 2 is a flow chart of a method of managing data blocks of a distributed storage system corresponding to FIG. 1. The distributed system consists of three components, namely a Client (Client), a data block service (Chunk Server) and a metadata service (MetaServer).
The data block service (Chunk Server) is responsible for managing data blocks (Chunk) stored in a certain storage device, and processing operation requests of clients to the data blocks. When the system expands the storage capacity, the corresponding data block service needs to be added while the storage devices are added through the corresponding data block service of each storage device.
The metadata service (MetaServer) is responsible for managing the metadata of the distributed storage, collecting the status of the data block service at regular time, and managing the storage space of the cluster. Typically, the entire cluster has only one primary metadata service, and multiple standby nodes are grouped into clusters for high availability support.
A Client (Client) provides a programming interface for a user to use distributed storage, including creation, deletion, reading and writing of data blocks, and the like. There is a limit to the size of the data block beyond which data storage needs to be partitioned. The client enables data block access by communicating with metadata services and data block service messages.
As shown in fig. 2, the technical problem to be solved by the present invention is how to manage the storage locations of data blocks.
The invention adopts a two-stage mapping data block position management mode. The data blocks are assigned to a specified allocation group, and then the allocation group is stored to a specified set of data block services. Different homing groups may be mapped to several data block services according to the copy policy, for example, when a 2-copy policy is employed, the homing groups may be stored to two data block services respectively. The group and data block service mapping relationship is set as metadata information managed by the metadata service. The client acquires the latest configuration group information and the corresponding data block service information from the metadata service when starting, subscribes to the update event of the latest configuration group information and the corresponding data block service information, and ensures that the client can acquire the latest metadata information in time. The mapping of data blocks to the set of settings is allocated by the metadata service at the time of data block creation based on the current storage space and load state of the system. The correspondence between the data blocks and the homing groups remains unchanged throughout the life cycle of the data blocks, and the user needs to provide their corresponding homing group IDs when accessing the data blocks. The homing group here is similar to a primary directory, but is not specified by a user name and creation, but is defined and uniformly managed by a metadata service. The number of metadata service management metadata after introduction of the homing group is no longer related to the number of data blocks but only to the number of data block services. When a new data block service joins the cluster, the metadata service creates a new set of allocation groups according to the storage space corresponding to the data block service.
As shown in fig. 1, at step S110, data blocks are assigned to preset homing groups.
In an embodiment of the present invention, the allocation of the data blocks to the preset allocation groups includes the following steps: establishing a mapping from the data block to the allocation group, and distributing by a metadata service according to the current storage space and load state of the system when the data block is created, wherein the mapping is calculated by the following formula:
wherein W is i The weight value selected for the set of settings; i is a resetting group; n (N) i Remaining available capacity ratio for the homing group relative to the target capacity; m is M i =Min(M 1 ...M n ) Service available capacity ratio for provisioning group corresponding data block, M 1 The ratio of available capacity for the service of the 1 st data block corresponding to the allocation group, M n The available capacity proportion of the nth data block service is corresponding to the collocation group; l (L) i =Max(L 1 ...L n ) Serving the current load proportion, L, for the set of data blocks 1 For the current load proportion of the service corresponding to the 1 st data block of the collocation group, L n The current load proportion of the nth data block service is corresponding to the reset group; delta is the weight scale factor of the load value.
More specifically, the metadata service allocates a data block quota procedure comprising the steps of:
the data block service periodically reports the capacity state of the allocation group, the capacity state of the storage device, the load state of the service and other information to the metadata service. Suppose that group i phase is put backThe ratio of the remaining available capacity to the target capacity is N i The proportion of the available capacity of the data block service corresponding to the allocation group is M i =Min(M 1 ...M n ) And taking the minimum value in the available capacity proportion of the plurality of data block services corresponding to the allocation group. The current load proportion of the data block service is L i =Max(L 1 ...L n ) And taking the maximum value in the load proportion of the plurality of data block services corresponding to the allocation group. Delta is the weight scale factor of the load value, and the weight value W selected by the homing group is calculated as follows i
When the metadata service receives a data block quota application, the weight value W of each homing group is calculated respectively i And taking the data block storage quota as the selected probability weight, and then selecting a specified number of the assigned groups as the data block storage quota to reply to the data block service. The probability that the homing group with larger weight value is selected is higher, new data blocks are stored in the homing group with higher available space proportion and lower load, and therefore dynamic balance of the storage space and the load of the whole system is achieved.
More specifically, step S120 is next followed.
At step S120, the homing group is stored to a preset data block service, and a mapping relationship is established between the homing group and the data block service.
In an embodiment of the present invention, the storing the homing group in a preset data block service includes: and storing the allocation groups into a preset number of data block services respectively.
In the embodiment of the invention, the corresponding relation between the data block and the preset group is kept unchanged in the whole life cycle of the data block, and the corresponding preset group ID is required to be provided when a user accesses the data block.
Next, the process goes to step S130.
At step S130, the mapping relationship between the provisioning group and the data block service is managed based on a metadata service, and the latest information of the provisioning group and the corresponding data block service information are acquired from the metadata service at the time of client start.
In an embodiment of the present invention, the method further includes: subscribing to the update event of the reset group and the data block service.
In an embodiment of the present invention, the method further includes: when a new data block is added, the client applies for the data block storage quota to the metadata service in batches, and the method comprises the following steps:
judging whether an unused data block quota is applied for; when the unused data block storage quota is not applied, applying for the storage quota to the metadata service in batches; the metadata service decides a target allocation group stored by the data block to be created according to the current storage space and the load condition, and returns an allocation group ID list to the client; the method comprises the steps of,
when the unused data block storage quota is applied for, determining a preset group in which the data block is to be stored; determining information of the data block service according to the mapping relation between the resetting group and the data block service; sending a request for creating the data block to a data block service; and returning the corresponding reset group ID after receiving the reply result of the data block service.
More specifically, a set of settings corresponding to the data block is determined at the time of creation of the data block. The data block creation flow is shown in fig. 3, and the user invokes a data block creation interface provided by the client, where the parameters include a data block ID.
The client first checks to see if there is currently an applied unused data chunk store quota. If not, the client may apply for multiple data block storage quotas at a time in order to reduce the metadata service load. And after receiving the request of the client, the metadata service determines a target allocation group stored by the data block to be created according to the current storage space and the load condition, and returns an allocation group ID list to the client.
And if the client contains the data block quota which is applied for not use, allocating 1 quota to the data block, namely determining a reset group in which the data block is to be stored. And determining information of the data block service according to the mapping relation between the reset group cached by the client and the data block service. And sending a request for creating the data block to the data block service, wherein the request comprises the data block ID and the reset group ID. And after receiving the reply result, the client returns the corresponding reset group ID to the user, and the flow of creating the data block is completed.
And when the data block is read and written, the user provides the reset ID where the data block is located. When the data block is read and written, a user calls a read/write interface of the data block provided by the client, and parameters comprise the data block ID and the reset group ID. And the client finds the data block service information corresponding to the locally cached allocation group according to the corresponding relation between the locally cached allocation group and the data block service, sends a data block read/write request to the data block service, and returns a result to the caller after the read/write is completed. No interaction with the metadata service is required during reading/writing of the data blocks.
In the embodiment of the invention, the metadata service creates a new allocation group according to the storage space corresponding to the new data block service, and the method comprises the following steps:
receiving registration information sent by a data block service, wherein the registration information comprises basic information of the data block server and corresponding storage space information; the metadata service updates a data block service list, creates preset number of reset groups according to the capacity of the storage device corresponding to the data block service, and updates the corresponding relation between the reset groups and the data block service; and the client obtains the latest reset group and the related information of the corresponding data service according to the subscribed related change event.
More specifically, when the system expands, the metadata service creation allocation group allocates a newly added data block service. The newly joined data chunk service first registers information with the metadata service. The metadata service updates a data block service information list of the cluster and creates a number of homing groups assigned to the data block service. The number of allocation groups allocated to a data block service depends on the capacity of the corresponding storage device for that data block service. Assuming that the target capacity of each allocation group is PG_SIZE, the capacity of the storage device corresponding to the data block service is DEV_SIZE, and the number of allocation groups allocated to the data block service is DEV_SIZE/PG_SIZE.
Because the corresponding relation of the original set and the data block service is not changed, data migration does not occur. The newly created data blocks are preferentially distributed to the newly created reset groups, and data equalization among the data block services can be completed after a period of time. In addition, other homing groups and newly created homing groups can be subjected to position exchange by using a mode of system load balancing priority so as to balance the load of each data block service.
The distributed storage system (Ceph) also uses a homing group (PG) to manage Object storage locations, but uses a hash mapping manner, where the Object ID obtains a PG ID through hash modulo, and the PG ID obtains a set of OSDs (Object-Based Storage Device) stored by the PG ID through a crum algorithm (consistent hash algorithm). In this scheme, the metadata service (MON) does not need to manage the object placement position, and the Client calculates the corresponding OSD through a unified hash algorithm. However, the main problem is that the node expansion is not friendly, and when the OSD is added, the partial PG previously allocated to other OSD needs to be shifted to a new OSD. If more OSDs are added, the number of PGs in each OSD needs to be increased to further cause more data migration, affecting normal services.
In the embodiment of the invention, the mapping relation between PG and storage nodes is maintained by a metadata server, so that the number of PG and OSD can be dynamically increased without influencing the prior data storage. The original PG can be dynamically adjusted to migrate for balancing the load. The flexibility of the storage location scheduling is greatly improved compared with the Ceph scheme.
According to the data block management method of the distributed storage system, the data blocks are placed in the homing group, the metadata service only maintains the mapping relation between the homing group and the data block service, the number of metadata managed by the metadata service can be greatly reduced, and then the complete caching of metadata by a Client (Client) is realized. In addition, because the configuration group and the data block service are updated only when the system topology changes, the updating frequency of the metadata is also greatly reduced. Compared with the metadata service which directly manages the position information of the data blocks, the load of the metadata service can be greatly reduced, and the expansion capacity of the distributed storage system is improved.
Compared with the prior art adopting a hash position mapping management mode, when a storage node is added, partial data needs to be migrated to a newly added node to realize system capacity expansion, and normal service access can be affected. The invention has the advantage that a more flexible scheduling mode can be adopted when the node expands capacity. After adding the node, a new allocation group can be created, and the new data block is guided to be stored in the allocation groups, so that the capacity expansion of the system can be realized without executing data migration.
The invention decouples the allocation and maintenance functions of the mapping relation between the data blocks and the allocation groups, and the metadata service is responsible for allocating the allocation groups to which the data blocks belong, but does not save and maintain the mapping information. The user is responsible for maintaining the mapping relationship between the data blocks and the homing groups. Because the user itself holds the data block ID while holding its corresponding set ID does not add much business logic. By adopting the method, the load of metadata service can be greatly reduced on the premise of keeping flexible scheduling of the system data block position.
Fig. 4 illustrates a distributed storage system data block management system 400 provided by the present invention, including a data block allocation module 410, a homing allocation module 420, and a management block allocation module 430.
The data block allocation module 410 is configured to allocate data blocks to preset allocation groups;
the allocation module 420 is configured to store the allocation group to a preset data block service, and establish a mapping relationship between the allocation group and the data block service;
the management group allocation module 430 is configured to manage a mapping relationship between the configuration group and the data block service based on a metadata service, and obtain, when a client is started, information of the latest configuration group and corresponding data block service information from the metadata service.
In an embodiment of the present invention, the configuration module further includes:
the capacity expansion module is configured to apply for the data block storage quota to the metadata service batch by the client when a new data block is added, and comprises the following steps:
judging whether an unused data block quota is applied for; when the unused data block storage quota is not applied, applying for the storage quota to the metadata service in batches; the metadata service decides a target allocation group stored by the data block to be created according to the current storage space and the load condition, and returns an allocation group ID list to the client; the method comprises the steps of,
when the unused data block storage quota is applied for, determining a preset group in which the data block is to be stored; determining information of the data block service according to the mapping relation between the resetting group and the data block service; sending a request for creating the data block to a data block service; and returning the corresponding reset group ID after receiving the reply result of the data block service.
Referring to fig. 5, an embodiment of the present disclosure also provides an electronic device 50, including:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the distributed storage system data block management method of the foregoing method embodiments.
The disclosed embodiments also provide a non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the distributed storage system data block management method in the foregoing method embodiments.
The disclosed embodiments also provide a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, cause the computer to perform the distributed storage system data block management method of the foregoing method embodiments.
Referring now to fig. 5, a schematic diagram of an electronic device 50 suitable for use in implementing embodiments of the present disclosure is shown. The electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 5 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 5, the electronic device 50 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 501, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 502 or a program loaded from a storage means 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 50 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
In general, the following devices may be connected to the I/O interface 505: input devices 506 including, for example, a touch screen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; an output device 507 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 508 including, for example, magnetic tape, hard disk, etc.; and communication means 509. The communication means 509 may allow the electronic device 50 to communicate with other devices wirelessly or by wire to exchange data. While an electronic device 50 having various means is shown, it should be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 509, or from the storage means 508, or from the ROM 502. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 501.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring at least two internet protocol addresses; sending a node evaluation request comprising the at least two internet protocol addresses to node evaluation equipment, wherein the node evaluation equipment selects an internet protocol address from the at least two internet protocol addresses and returns the internet protocol address; receiving an Internet protocol address returned by the node evaluation equipment; wherein the acquired internet protocol address indicates an edge node in the content distribution network.
Alternatively, the computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: receiving a node evaluation request comprising at least two internet protocol addresses; selecting an internet protocol address from the at least two internet protocol addresses; returning the selected internet protocol address; wherein the received internet protocol address indicates an edge node in the content distribution network.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. The name of the unit does not in any way constitute a limitation of the unit itself, for example the first acquisition unit may also be described as "unit acquiring at least two internet protocol addresses".
It should be understood that portions of the present disclosure may be implemented in hardware, software, firmware, or a combination thereof.
The foregoing is merely specific embodiments of the disclosure, but the protection scope of the disclosure is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the disclosure are intended to be covered by the protection scope of the disclosure. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (10)

1. A method for managing data blocks of a distributed storage system, the method comprising the steps of:
distributing the data blocks to a preset collocation group;
storing the reset group to a preset data block service, and establishing a mapping relation between the reset group and the data block service;
and managing the mapping relation between the allocation group and the data block service based on the metadata service, and acquiring the latest information of the allocation group and the corresponding data block service information from the metadata service when the client is started.
2. The distributed storage system data block management method of claim 1, wherein the method further comprises:
subscribing to the update event of the reset group and the data block service.
3. The method for managing data blocks of a distributed storage system according to claim 1, wherein said assigning data blocks to preset allocation groups comprises the steps of:
establishing a mapping from the data block to the allocation group, and distributing by a metadata service according to the current storage space and load state of the system when the data block is created, wherein the mapping is calculated by the following formula:
wherein W is i The weight value selected for the set of settings; i is a resetting group; n (N) i Remaining available capacity ratio for the homing group relative to the target capacity; m is M i =Min(M 1 …M n ) Service available capacity ratio for provisioning group corresponding data block, M 1 The ratio of available capacity for the service of the 1 st data block corresponding to the allocation group, M n The available capacity proportion of the nth data block service is corresponding to the collocation group; l (L) i =Max(L 1 …L n ) Serving the current data block for the set of settingsLoad ratio, L 1 For the current load proportion of the service corresponding to the 1 st data block of the collocation group, L n The current load proportion of the nth data block service is corresponding to the reset group; delta is the weight scale factor of the load value.
4. A method of managing data blocks of a distributed storage system according to claim 3, characterized in that said method further comprises:
when a new data block is added, the client applies for the data block storage quota to the metadata service in batches, and the method comprises the following steps:
judging whether an unused data block quota is applied for; when the unused data block storage quota is not applied, applying for the storage quota to the metadata service in batches; the metadata service decides a target allocation group stored by the data block to be created according to the current storage space and the load condition, and returns an allocation group ID list to the client; the method comprises the steps of,
when the unused data block storage quota is applied for, determining a preset group in which the data block is to be stored; determining information of the data block service according to the mapping relation between the resetting group and the data block service; sending a request for creating the data block to a data block service; and returning the corresponding reset group ID after receiving the reply result of the data block service.
5. The distributed storage system data block management method according to claim 1, wherein the storing the provisioning group to a preset data block service comprises:
and storing the allocation groups into a preset number of data block services respectively.
6. The method of claim 5, wherein the correspondence between the data blocks and the set of sets is maintained throughout the life of the data blocks, and wherein the user accesses the data blocks by providing their corresponding set of IDs.
7. A distributed storage system data block management system, the system comprising:
a data block allocation module configured to allocate data blocks to preset allocation groups;
the allocation module of the homing group is configured to store the homing group to a preset data block service and establish a mapping relation between the homing group and the data block service;
and the management group allocation module is configured to manage the mapping relation between the allocation group and the data block service based on metadata service, and acquire the latest information of the allocation group and the corresponding data block service information from the metadata service when a client is started.
8. The distributed storage system data block management system of claim 7, wherein the provisioning group allocation module further comprises:
the capacity expansion module is configured to apply for the data block storage quota to the metadata service batch by the client when a new data block is added, and comprises the following steps:
judging whether an unused data block quota is applied for; when the unused data block storage quota is not applied, applying for the storage quota to the metadata service in batches; the metadata service decides a target allocation group stored by the data block to be created according to the current storage space and the load condition, and returns an allocation group ID list to the client; the method comprises the steps of,
when the unused data block storage quota is applied for, determining a preset group in which the data block is to be stored; determining information of the data block service according to the mapping relation between the resetting group and the data block service; sending a request for creating the data block to a data block service; and returning the corresponding reset group ID after receiving the reply result of the data block service.
9. An electronic device, comprising:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores instructions executable by the at least one processor, which when executed by the at least one processor, cause the at least one processor to perform the distributed storage system data block management method of any one of claims 1 to 6.
10. A non-transitory computer-readable storage medium storing computer instructions that, when executed by at least one processor, cause the at least one processor to perform the distributed storage system data block management method of any of claims 1-6.
CN202310782731.5A 2023-06-29 2023-06-29 Distributed storage system data block management method, system, equipment and storage medium Pending CN116737080A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310782731.5A CN116737080A (en) 2023-06-29 2023-06-29 Distributed storage system data block management method, system, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310782731.5A CN116737080A (en) 2023-06-29 2023-06-29 Distributed storage system data block management method, system, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116737080A true CN116737080A (en) 2023-09-12

Family

ID=87918325

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310782731.5A Pending CN116737080A (en) 2023-06-29 2023-06-29 Distributed storage system data block management method, system, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116737080A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117453148A (en) * 2023-12-22 2024-01-26 柏科数据技术(深圳)股份有限公司 Data balancing method, device, terminal and storage medium based on neural network
CN117609195A (en) * 2024-01-24 2024-02-27 济南浪潮数据技术有限公司 Object management method, device and equipment of distributed storage system and medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117453148A (en) * 2023-12-22 2024-01-26 柏科数据技术(深圳)股份有限公司 Data balancing method, device, terminal and storage medium based on neural network
CN117453148B (en) * 2023-12-22 2024-04-02 柏科数据技术(深圳)股份有限公司 Data balancing method, device, terminal and storage medium based on neural network
CN117609195A (en) * 2024-01-24 2024-02-27 济南浪潮数据技术有限公司 Object management method, device and equipment of distributed storage system and medium

Similar Documents

Publication Publication Date Title
US10467025B2 (en) Managing delivery of code and dependent data using application containers
US10394847B2 (en) Processing data in a distributed database across a plurality of clusters
US11553034B2 (en) Server computer management system for supporting highly available virtual desktops of multiple different tenants
US20190220266A1 (en) Upgrading Bundled Applications In A Distributed Computing System
CN116737080A (en) Distributed storage system data block management method, system, equipment and storage medium
US20100088448A1 (en) Virtual computing accelerator and program downloading method for server-based virtual computing
US20180067963A1 (en) File management in thin provisioning storage environments
KR20150017984A (en) The method and apparatus for distributing data in a hybrid cloud environment
JP2018518733A (en) File operation method and apparatus
CN110933140B (en) CDN storage allocation method, system and electronic equipment
CN110401731B (en) Method and apparatus for distributing content distribution nodes
CN111124299A (en) Data storage management method, device, equipment, system and storage medium
CN110069265B (en) Service cluster upgrading method and device and storage medium
CN116774933A (en) Virtualization processing method of storage device, bridging device, system and medium
CN114625536B (en) Video memory allocation method, device, medium and electronic equipment
CN115543965A (en) Cross-machine-room data processing method, device, storage medium, and program product
CN110489158B (en) Method, device, medium and electronic equipment for optimizing code hosting platform
CN110545313B (en) Message push control method and device and electronic equipment
CN109614089B (en) Automatic generation method, device, equipment and storage medium of data access code
US10908958B2 (en) Shared memory in memory isolated partitions
US9405470B2 (en) Data processing system and data processing method
CN115562871A (en) Memory allocation management method and device
CN112148448B (en) Resource allocation method, apparatus, device and computer readable medium
WO2023029610A1 (en) Data access method and device, and storage medium
CN113873052B (en) Domain name resolution method, device and equipment of Kubernetes cluster

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination