A method, apparatus, device and medium for processing block storage tasks
By creating a storage cluster in the block storage system, selecting a master node, and processing or assigning tasks, the problems of task interruption and slow response speed are solved, thereby improving the reliability and efficiency of the system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JINAN INSPUR DATA TECH CO LTD
- Filing Date
- 2022-10-24
- Publication Date
- 2026-06-30
AI Technical Summary
In existing block storage systems, tasks are issued by the management interface. Tasks that take a long time to execute or are interrupted in the event of a single point of failure cannot take advantage of distributed storage systems, resulting in slow system response and low reliability.
The initialization block scenario for creating a storage cluster is described. The running status and storage pool information of each node are obtained, a master node is selected, and tasks are processed or allocated according to the task type. If the master node fails, a new master node is selected.
It enables efficient task processing in the block storage system, improves system response speed and reliability, and avoids task interruption issues.
Smart Images

Figure CN115629710B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of distributed storage, and in particular to a block storage task processing method, apparatus, device, and medium. Background Technology
[0002] Block storage primarily maps entire raw disk spaces to storage services used by the host. Traditional Storage Area Network (SAN) technology is an example of block storage. Traditional network storage systems use a centralized storage server to store all data, making the storage server a bottleneck for system performance and a focal point for reliability and security, failing to meet the needs of large-scale storage applications. Distributed storage systems, on the other hand, distribute data across multiple independent devices, employing a scalable system architecture. By utilizing multiple storage servers to share the storage load, they not only improve system reliability, availability, and access efficiency but also facilitate expansion.
[0003] In existing block storage systems, tasks are issued through a management interface, where the master node creates new processes for processing. For time-consuming tasks or in the event of a single point of failure, tasks will be interrupted and cannot be processed, failing to leverage the advantages of a distributed storage system, which is user-unfriendly.
[0004] In view of the above, how to achieve efficient task processing, speed up system response, and improve system reliability in block storage systems is an urgent problem to be solved by technical personnel in this field. Summary of the Invention
[0005] The purpose of this application is to provide a block storage task processing method, apparatus, device, and medium to achieve efficient task processing in a block storage system, accelerate system response speed, and improve system reliability.
[0006] To address the aforementioned technical problems, this application provides a block storage task processing method, comprising:
[0007] Scenario for creating an initial block for a storage cluster;
[0008] The running status of each node in the storage cluster is obtained, and the information of the storage pool to which each node belongs is obtained; wherein each storage pool contains multiple nodes;
[0009] Select the corresponding master node from each of the aforementioned storage pools;
[0010] When a task is received, the master node processes or assigns the task according to its type.
[0011] Preferably, obtaining the operating status of each node in the storage cluster includes:
[0012] Register DBS_MAP with the storage cluster to obtain the running status of each node.
[0013] Preferably, obtaining the information about the storage pool to which each node belongs includes:
[0014] Determine whether each node can obtain the DBS_MAP;
[0015] If so, then obtain the information of the storage pool to which each node belongs based on the DBS_MAP;
[0016] If not, then confirm that the node is a faulty node and stop the operation of the node.
[0017] Preferably, selecting the corresponding master node in each of the storage pools includes:
[0018] Create a leader object and process information object for each of the aforementioned storage pools;
[0019] The system receives lock requests for the leader object from each node in the storage pool and selects the node corresponding to the first received lock request as the master node.
[0020] Preferably, when a task is received, the step of the master node processing or assigning the task according to the type of the task includes:
[0021] When the task is a foreground task, the foreground task is processed through the master node;
[0022] When the task is a background task, the master node distributes the background task to the other nodes in the storage pool for processing.
[0023] Preferably, it further includes:
[0024] When the master node fails, a new master node is selected from the storage pool corresponding to the master node.
[0025] Preferably, the step of distributing the background task to the remaining nodes in the storage pool for processing via the master node includes:
[0026] Obtain the idle status of the nodes in the storage pool other than the master node;
[0027] The background task is assigned to the remaining nodes for processing based on the idle state.
[0028] To address the aforementioned technical problems, this application also provides a block storage task processing apparatus, comprising:
[0029] Create a module to create the initialization block scenario for the storage cluster;
[0030] The acquisition module is used to acquire the running status of each node in the storage cluster and to acquire information about the storage pool to which each node belongs; wherein each storage pool contains multiple nodes;
[0031] The selection module is used to select the corresponding master node from each of the storage pools.
[0032] The processing module is used to process or allocate tasks by the master node according to the type of the task when a task is received.
[0033] Preferably, the acquisition module includes:
[0034] The registration module is used to register DBS_MAP with the storage cluster in order to obtain the running status of each node.
[0035] Preferably, the acquisition module includes:
[0036] The judgment module is used to determine whether each node can obtain the DBS_MAP.
[0037] If yes, the storage pool retrieval module is triggered; otherwise, the confirmation module is triggered.
[0038] The storage pool acquisition module is used to acquire information about the storage pool to which each node belongs based on the DBS_MAP;
[0039] The confirmation module is used to confirm that the node is a faulty node and stop the node from running.
[0040] Preferably, the selection module includes:
[0041] The object creation module is used to create the leader object and process information object corresponding to each of the aforementioned storage pools;
[0042] The receiving module is used to receive lock requests for the leader object from each node in the storage pool, and select the node corresponding to the first lock request received as the master node.
[0043] Preferably, the processing module includes:
[0044] The task processing module is used to process the foreground task through the main node when the task is a foreground task;
[0045] The task allocation module is used to allocate the background task to the remaining nodes in the storage pool for processing through the master node when the task is a background task.
[0046] Preferably, it further includes:
[0047] The master node selection module is used to select a new master node from the storage pool corresponding to the master node when the master node fails.
[0048] Preferably, the task allocation module includes:
[0049] The idle status acquisition module is used to acquire the idle status of the nodes in the storage pool other than the master node.
[0050] The background task allocation module is used to allocate the background task to the remaining nodes for processing based on the idle status.
[0051] To address the aforementioned technical problems, this application also provides a block storage task processing device, comprising:
[0052] Memory, used to store computer programs;
[0053] A processor is used to implement the steps of the block storage task processing method described above when executing the computer program.
[0054] To address the aforementioned technical problems, this application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the block storage task processing method described above.
[0055] The block storage task processing method provided in this application involves creating an initial block scenario for the storage cluster; obtaining the running status of each node in the storage cluster and the information of the storage pool to which each node belongs; wherein each storage pool contains multiple nodes; selecting a corresponding master node in each storage pool; and when a task is received, the master node processes or assigns the task according to its type. Therefore, the above scheme achieves direct task processing by selecting a master node from the storage pool where each node in the storage cluster resides; and when a task is received, the master node processes or assigns the task according to its type. Simultaneously, task assignment avoids the problem of unmanageable task interruptions in the event of long-running tasks or single-point failures, thus achieving efficient task processing in the distributed storage system and improving system reliability.
[0056] In addition, embodiments of this application also provide a block storage task processing apparatus, device, and medium, with the same effect as above. Attached Figure Description
[0057] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0058] Figure 1 A flowchart illustrating a block storage task processing method provided in this application embodiment;
[0059] Figure 2 A schematic diagram of a block storage task processing device provided in an embodiment of this application;
[0060] Figure 3 This is a schematic diagram of a block storage task processing device provided in an embodiment of this application. Detailed Implementation
[0061] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.
[0062] The core of this application is to provide a block storage task processing method, apparatus, device, and medium.
[0063] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0064] Block storage primarily maps entire raw disk spaces to a storage service used by the host. It breaks data into blocks and stores each block individually. Each data block has a unique identifier, allowing the storage system to store smaller data items in the most convenient location. This means some data can be stored in a Linux environment, while others can be stored in a Windows instance. Block storage is typically configured to decouple data from the user's environment, distributing it across multiple environments that can best serve it. When a user requests data, the underlying storage software reassembles the data blocks from these environments and presents them to the user. It is usually deployed in a storage area network (SLAN) environment and must be bound to a functioning server. Because block storage does not rely on a single data path, it enables fast retrieval. Each block exists independently and can be partitioned, allowing access from different operating systems, giving users complete freedom in configuring their data. It is an efficient and reliable data storage method that is easy to use and manage.
[0065] In existing block storage systems, tasks are issued by the management interface and processed by a new process created by the master node. However, tasks with long execution times, or those experiencing single points of failure, will be interrupted and unable to proceed, failing to leverage the advantages of distributed storage systems and being user-unfriendly. Furthermore, due to the large scale of distributed storage systems, the lack of caching for metadata such as configuration information will result in unnecessary performance waste. Therefore, this application provides a block storage task processing method. Figure 1 A flowchart illustrating a block storage task processing method provided in an embodiment of this application. Figure 1 As shown, the method includes:
[0066] S10: Scenario for creating the initial block of the storage cluster.
[0067] S11: Obtain the running status of each node in the storage cluster and obtain information about the storage pool to which each node belongs. Each storage pool contains multiple nodes.
[0068] In practical implementation, the initial block storage scenario of the storage cluster is first created. It is understood that multiple storage nodes exist within the storage cluster, enabling large-scale storage, distributing the storage load, and improving the reliability, availability, and access efficiency of the distributed system.
[0069] Furthermore, the operating status of each node in the storage cluster is obtained to confirm its normal operation, and the operating status of each node can be synchronized to other nodes. Information about the storage pools mentioned by each node also needs to be obtained. It is understood that in a storage cluster, nodes are aggregated in sets of storage pools, with multiple storage pools existing, and each storage pool containing multiple nodes.
[0070] As a preferred embodiment, in specific implementation, the operating status of each node in the storage cluster is obtained by registering a DBS_MAP with the storage cluster. It is important to note that registering a DBS_MAP with the storage cluster also allows the acquisition of storage pool information for each node. To better obtain storage pool information, after obtaining the operating status of each node in the storage cluster, it is necessary to determine whether each node can obtain a DBS_MAP. If a node can obtain a DBS_MAP, it is confirmed as a normal node, and the storage pool information to which the node belongs can be obtained based on the DBS_MAP. If a node cannot obtain a DBS_MAP, it is confirmed as a faulty node, and its operation is stopped, its storage resources are released, and it enters a dormant state.
[0071] S12: Select the corresponding master node in each storage pool.
[0072] After obtaining the storage pool to which each node belongs, a master node is selected from each storage pool. The master node of each storage pool can process tasks and is responsible for block task allocation and information caching. In this embodiment, there are no restrictions on the method of selecting the master node; a node in the storage pool can be directly designated as the master node, or a master node can be selected by receiving a master node application request sent by a node, depending on the specific implementation.
[0073] In a preferred embodiment, a corresponding master node is selected in each storage pool, and the storage pool is initialized, creating a leader object and process information object for each storage pool. At this time, each node in the storage pool sends a lock request to the leader object. When the request is approved, the node becomes the master node. During the process of the storage pool leader object receiving lock requests from each node in the storage pool, when the first lock request is received, the node corresponding to that lock request is selected as the master node, and subsequent lock requests will not be accepted.
[0074] S13: When a task is received, the master node processes or assigns the task according to its type.
[0075] Furthermore, after the master node is selected, it is initialized, loading metadata information for all volumes in the storage pool where the master node resides. When a task is received, the master node processes or assigns the task according to its type.
[0076] Specifically, task types include foreground tasks and background tasks. Foreground tasks include, but are not limited to, information queries or content creation; background tasks include, but are not limited to, large-scale data movement or copying. Background tasks consume more node resources than foreground tasks. Therefore, upon receiving a task, if it is confirmed to be a foreground task, the master node processes it, caches the data upon successful processing, and returns the result. If the task is a background task, the master node distributes it to other nodes in the storage pool for processing.
[0077] It is important to note that during background task processing, to achieve optimal efficiency, the master node allocates background tasks based on the idle status of the remaining nodes. As a preferred embodiment, in practice, the idle status of all nodes in the storage pool except the master node is obtained, and background tasks are allocated to these nodes for processing based on their idle status.
[0078] Understandably, the states of nodes in the storage pool are not uniform, and some nodes may be processing tasks. Therefore, to efficiently handle background tasks, nodes with low idle status will not be assigned background tasks. Instead, background tasks will be distributed to idle nodes or nodes with higher idle status, thus enabling background task processing. During background task processing, because the master node distributes background tasks to the remaining nodes in the storage pool, load balancing is achieved, resulting in high processing efficiency. Furthermore, the execution progress of background tasks can be recorded in the storage pool, and the record information is cleared after the task is completed, providing a better user experience.
[0079] In this embodiment, an initialization block scenario for the storage cluster is created; the running status of each node in the storage cluster is obtained, and the information of the storage pool to which each node belongs is also obtained; each storage pool contains multiple nodes; a corresponding master node is selected in each storage pool; when a task is received, the master node processes or assigns the task according to its type. Therefore, the above scheme achieves direct task processing by selecting a master node from the storage pool where each node in the storage cluster resides; when a task is received, the master node processes or assigns the task according to its type. Simultaneously, task assignment avoids the problem of unhandled task interruptions due to long execution times or single-point failures, thus achieving efficient task processing in the distributed storage system and improving system reliability.
[0080] Furthermore, in order to overcome task processing failures caused by master node failures, as a preferred embodiment based on the above embodiments, it further includes:
[0081] When the primary node fails, a new primary node is selected from the storage pool corresponding to the primary node.
[0082] It is understandable that when the master node fails, received front-end tasks cannot be processed, and received back-end tasks cannot be assigned. Therefore, in order to ensure normal task processing, as a preferred embodiment, when the master node fails, a new master node is selected from the storage pool corresponding to the master node.
[0083] Understandably, the process of re-electing the master node is the same as the selection process in the above embodiment. Specifically, the resources of the failed master node are released, and it is placed into a dormant state, so that the failed master node does not participate in the subsequent selection of a new master node. Furthermore, the leader object receives lock requests from various nodes in the storage pool. When a request is approved, the node becomes the new master node. During the process of the storage pool leader object receiving lock requests from various nodes in the storage pool, when the first lock request is received, the node corresponding to that lock request is selected as the new master node, and subsequent lock requests will not be accepted.
[0084] In addition, for faulty master nodes, maintenance personnel can be reminded to perform maintenance on the faulty master nodes through information prompts, and the master nodes that have been troubleshooted can be put back into their respective storage pools for task processing.
[0085] In this embodiment, when the master node fails, a new master node is selected from the storage pool corresponding to the master node, ensuring the normal processing of tasks after the node failure and improving the stability of the system.
[0086] In the above embodiments, the block storage task processing method has been described in detail. This application also provides embodiments of the block storage task processing apparatus.
[0087] Figure 2 This is a schematic diagram of a block storage task processing device provided in an embodiment of this application. Figure 2 As shown, the block storage task processing device includes:
[0088] Create module 10, which is used to create the initialization block scenario for the storage cluster.
[0089] The acquisition module 11 is used to acquire the running status of each node in the storage cluster and to acquire information about the storage pool to which each node belongs. Each storage pool contains multiple nodes.
[0090] Module 12 is used to select the corresponding master node in each storage pool.
[0091] Processing module 13 is used to process or assign tasks by the master node according to the type of the task when a task is received.
[0092] In a preferred embodiment, the acquisition module includes:
[0093] The registration module is used to register DBS_MAP with the storage cluster in order to obtain the running status of each node.
[0094] In a preferred embodiment, the acquisition module includes:
[0095] The judgment module is used to determine whether each node can obtain DBS_MAP;
[0096] If yes, the storage pool retrieval module is triggered; otherwise, the confirmation module is triggered.
[0097] The storage pool acquisition module is used to obtain information about the storage pool to which each node belongs based on the DBS_MAP.
[0098] The confirmation module is used to confirm that a node is a faulty node and to stop the node from running.
[0099] In a preferred embodiment, the selected module includes:
[0100] The object creation module is used to create leader objects and process information objects for each storage pool.
[0101] The receiving module is used to receive lock requests for the leader object from each node in the storage pool, and select the node corresponding to the first lock request received as the leader node.
[0102] In a preferred embodiment, the processing module includes:
[0103] The task processing module is used to process foreground tasks through the main node when the task is a foreground task.
[0104] The task allocation module is used to distribute background tasks to other nodes in the storage pool for processing via the master node when the task is a background task.
[0105] As a preferred embodiment, it also includes:
[0106] The master node selection module is used to select a new master node from the storage pool corresponding to the master node when the master node fails.
[0107] In a preferred embodiment, the task allocation module includes:
[0108] The idle status acquisition module is used to acquire the idle status of the nodes in the storage pool other than the master node.
[0109] The background task allocation module is used to allocate background tasks to other nodes for processing based on their idle status.
[0110] In this embodiment, the block storage task processing device includes a creation module, an acquisition module, a selection module, and a processing module. It creates an initial block scenario for the storage cluster; acquires the running status of each node in the storage cluster and the information of the storage pool to which each node belongs; wherein each storage pool contains multiple nodes; selects a corresponding master node in each storage pool; when a task is received, the master node processes or assigns the task according to its type. Therefore, the above scheme, by selecting a master node from the storage pool where each node in the storage cluster resides, and by having the master node process or assign a task according to its type when it is received, achieves direct task processing. Simultaneously, task assignment avoids the problem of unhandled task interruptions due to long execution times or single-point failures, thus achieving efficient task processing in the distributed storage system and improving system reliability.
[0111] Figure 3 This is a schematic diagram of a block storage task processing device provided in an embodiment of this application. Figure 3 As shown, the block storage task processing device includes:
[0112] Memory 20 is used to store computer programs.
[0113] The processor 21 is configured to implement the steps of the block storage task processing method mentioned in the above embodiments when executing a computer program.
[0114] The block storage task processing device provided in this embodiment may include, but is not limited to, smartphones, tablets, laptops, or desktop computers.
[0115] The processor 21 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 21 may be implemented using at least one of the following hardware forms: Digital Signal Processor (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 21 may also include a main processor and a coprocessor. The main processor, also known as the Central Processing Unit (CPU), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 21 may integrate a Graphics Processing Unit (GPU), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 21 may also include an Artificial Intelligence (AI) processor, which handles computational operations related to machine learning.
[0116] The memory 20 may include one or more computer-readable storage media, which may be non-transitory. The memory 20 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In this embodiment, the memory 20 is used to store at least the following computer program 201, which, after being loaded and executed by the processor 21, is capable of implementing the relevant steps of the block storage task processing method disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 20 may also include an operating system 202 and data 203, and the storage method may be temporary or permanent storage. The operating system 202 may include Windows, Unix, Linux, etc. The data 203 may include, but is not limited to, the data involved in the block storage task processing method.
[0117] In some embodiments, the block storage task processing device may further include a display screen 22, an input / output interface 23, a communication interface 24, a power supply 25, and a communication bus 26.
[0118] Those skilled in the art will understand that Figure 3 The structure shown does not constitute a limitation on the block storage task processing device and may include more or fewer components than illustrated.
[0119] In this embodiment, the block storage task processing device includes a memory and a processor. The memory stores computer programs; the processor executes the computer programs to implement the steps of the block storage task processing method mentioned in the above embodiment. The process involves creating an initial block scenario for the storage cluster; obtaining the running status of each node in the storage cluster and the information of the storage pool to which each node belongs; wherein each storage pool contains multiple nodes; selecting a corresponding master node in each storage pool; and when a task is received, the master node processes or allocates the task according to its type. Therefore, the above scheme achieves direct task processing by selecting a master node from the storage pool where each node in the storage cluster resides; and when a task is received, the master node processes or allocates the task according to its type. Simultaneously, task allocation avoids the problem of time-consuming tasks or task interruptions due to single-point failures, thus achieving efficient task processing in the distributed storage system and improving system reliability.
[0120] Finally, this application also provides an embodiment corresponding to a computer-readable storage medium. The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps described in the above method embodiments.
[0121] It is understood that if the methods in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and executes all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0122] In this embodiment, a computer program is stored on a computer-readable storage medium. When the computer program is executed by a processor, it implements the steps described in the above method embodiment. This involves creating an initialization block scenario for the storage cluster; obtaining the running status of each node in the storage cluster and the information of the storage pool to which each node belongs; wherein each storage pool contains multiple nodes; selecting a corresponding master node in each storage pool; and when a task is received, the master node processes or assigns the task according to its type. Therefore, the above scheme achieves direct task processing by selecting a master node from the storage pool where each node in the storage cluster resides; and when a task is received, the master node processes or assigns the task according to its type. Simultaneously, task assignment avoids the problem of time-consuming tasks or task interruptions due to single-point failures, thus achieving efficient task processing in the distributed storage system and improving system reliability.
[0123] The foregoing has provided a detailed description of a block storage task processing method, apparatus, device, and medium provided in this application. The various embodiments in the specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section. It should be noted that those skilled in the art can make several improvements and modifications to this application without departing from the principles of this application, and these improvements and modifications also fall within the protection scope of the claims of this application.
[0124] It should also be noted that, in this specification, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
Claims
1. A block storage task processing method, characterized in that, include: Scenario for creating an initial block for a storage cluster; The running status of each node in the storage cluster is obtained, and the information of the storage pool to which each node belongs is obtained; wherein each storage pool contains multiple nodes; Select the corresponding master node from each of the aforementioned storage pools; When a task is received, the master node processes or assigns the task according to its type. The step of selecting the corresponding master node in each of the storage pools includes: Create a leader object and process information object for each of the aforementioned storage pools; Receive lock requests for the leader object from each of the nodes in the storage pool, and select the node corresponding to the first lock request received as the master node; When a task is received, the master node processes or assigns the task according to its type, including: When the task is a foreground task, the foreground task is processed through the master node; When the task is a background task, the master node distributes the background task to the remaining nodes in the storage pool for processing; wherein, the background task will consume more node resources than the foreground task when it is processed. Also includes: When the master node fails, a new master node is selected from the storage pool corresponding to the master node.
2. The block storage task processing method according to claim 1, characterized in that, The process of obtaining the operating status of each node in the storage cluster includes: Register DBS_MAP with the storage cluster to obtain the running status of each node.
3. The block storage task processing method according to claim 2, characterized in that, The process of obtaining information about the storage pool to which each node belongs includes: Determine whether each node can obtain the DBS_MAP; If so, then obtain the information of the storage pool to which each node belongs based on the DBS_MAP; If not, then confirm that the node is a faulty node and stop the operation of the node.
4. The block storage task processing method according to claim 1, characterized in that, The step of distributing the background tasks to the remaining nodes in the storage pool for processing via the master node includes: Obtain the idle status of the nodes in the storage pool other than the master node; The background task is assigned to the remaining nodes for processing based on the idle state.
5. A block storage task processing device, characterized in that, include: Create a module to create the initialization block scenario for the storage cluster; The acquisition module is used to acquire the running status of each node in the storage cluster and to acquire information about the storage pool to which each node belongs; wherein each storage pool contains multiple nodes; The selection module is used to select the corresponding master node from each of the storage pools. The processing module is used to process or allocate tasks according to their type when a task is received by the master node. The selection module includes: The object creation module is used to create the leader object and process information object corresponding to each of the aforementioned storage pools; A receiving module is configured to receive lock requests for the leader object from each node in the storage pool, and select the node corresponding to the first received lock request as the master node; The processing module includes: The task processing module is used to process the foreground task through the main node when the task is a foreground task; The task allocation module is used to allocate the background task to the remaining nodes in the storage pool for processing through the master node when the task is a background task; wherein, the background task will consume more node resources than the foreground task when it is processed. Also includes: The master node selection module is used to select a new master node from the storage pool corresponding to the master node when the master node fails.
6. A block storage task processing device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the block storage task processing method as described in any one of claims 1 to 4 when executing the computer program.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the block storage task processing method as described in any one of claims 1 to 4.