A method, system, and related apparatus for creating thick provisioned volumes in a distributed storage system.

By introducing a zeroing progress bitmap and a rate limiting mechanism during the creation of thick backup volumes, the problem of long data zeroing operation time was solved, and the continuity and usability of zeroing operation during data read and write processes were improved.

CN115185952BActive Publication Date: 2025-10-31JINAN INSPUR DATA TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210905694.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-29
Publication Date
2025-10-31
Estimated Expiration
2042-07-29

AI Technical Summary

Technical Problem

During the creation of a thick standby volume, the data zeroing operation takes a long time and the thick standby volume cannot be read or written during the operation, which affects its normal use.

Method used

When creating a thick provisioned volume, a zeroing progress bitmap is introduced to record the zeroing status of data objects, guide data read and write operations, and control the frequency of zeroing tasks through a rate limiting mechanism.

Benefits of technology

This reduces the creation time of thick standby volumes, ensures the continuity of zeroing operations during data read and write processes, and improves the practicality and usability of thick standby volumes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115185952B_ABST
    Figure CN115185952B_ABST
Patent Text Reader

Abstract

This application provides a method for creating a thick standby volume in a distributed storage system, comprising: receiving a volume creation request; creating a data volume according to the volume creation request, and marking the data volume as a thick standby volume; creating a zeroing progress bitmap corresponding to the thick standby volume; the zeroing progress bitmap includes the status of whether data objects in the thick standby volume have performed data zeroing operations, and is used to guide the thick standby volume to perform zeroing operations. This application can ensure that the data zeroing operation of the volume is performed during the data read and write process of the thick standby volume, record the zeroing operation in real time, ensure the continuity of the zeroing operation, reduce the creation time of the thick standby volume, and improve the practicality of the thick standby volume. This application also provides a thick standby volume creation system, a computer-readable storage medium, and an electronic device for a distributed storage system, which have the above-mentioned beneficial effects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of distributed storage, and in particular to a method, system, and related apparatus for creating thick backup volumes in a distributed storage system. Background Technology

[0002] In the era of cloud computing, distributed storage systems are increasingly widely used. Distributed block storage provides storage resources to upper-layer applications such as cloud computing systems by creating data volumes. Data volumes are categorized into thin volumes and thick provisioned volumes. When a thin volume is created, the storage system does not allocate storage space. During the creation of a thick provisioned volume, the storage system allocates storage space and performs a zeroing operation on the data. Thick provisioned volumes offer better performance than thin volumes and do not carry the risk of data over-provisioning. However, currently, the zeroing operation during the creation of thick provisioned volumes takes considerable time, and the thick provisioned volume is not readable or writable during the zeroing process. Summary of the Invention

[0003] The purpose of this application is to provide a method, system, computer-readable storage medium, and electronic device for creating thick provisioned volumes in a distributed storage system.

[0004] To address the aforementioned technical problems, this application provides a method for creating thick standby volumes in a distributed storage system, the specific technical solution of which is as follows:

[0005] Receive volume creation request;

[0006] Create a data volume according to the volume creation request, and mark the type of the data volume as a thick provisioned volume;

[0007] Create a zeroing progress bitmap corresponding to the thick provisioned volume; the zeroing progress bitmap contains the status of whether the data objects in the thick provisioned volume have performed data zeroing operations, and is used to guide the thick provisioned volume to perform zeroing operations.

[0008] Optionally, when creating the zeroing progress bitmap for the thick provisioning volume, the method further includes:

[0009] The bitmap length of the zeroing progress bitmap is determined based on the number of data objects in the data volume.

[0010] Optionally, after creating the zeroing progress bitmap corresponding to the thick provisioning volume, the method further includes:

[0011] When performing data read / write operations using the thick backup volume, the position information of the data object is determined based on the offset of the data read / write operation, and the zeroing progress status corresponding to the position information is obtained.

[0012] The response data for the data read / write operation is returned based on the zeroing progress bitmap status.

[0013] Optionally, if the data read / write operation includes a data read operation, the response data for returning the data read / write operation based on the zeroing progress bitmap state includes:

[0014] If the state of the zeroing progress bitmap is 0, it is determined that the data object has not been zeroed, and empty data is returned;

[0015] If the state of the zeroing progress bitmap is 1, it is determined that the data object has been zeroed, and the data object is read and returned.

[0016] Optionally, if the data read / write operation includes a data write operation, the response data for returning the data read / write operation based on the zeroing progress bitmap state includes:

[0017] If the state of the zeroing progress bitmap is 0, it is determined that the data object has not been zeroed. First, the data zeroing operation is performed, and then the data object is written after the operation is completed.

[0018] If the state of the zeroing progress bitmap is 1, it is determined that the data object has been zeroed, and the write data object of the data write operation is executed.

[0019] Optional, also includes:

[0020] When a data zeroing operation task is received;

[0021] If the thick reserve volume is in a data read / write state, the data zeroing operation task is sent to the RBD process that is performing data read / write for execution;

[0022] If the thick reserve volume is not in a data read / write state, a zeroing operation is performed.

[0023] Optional, also includes:

[0024] The sending frequency of the data zeroing operation task is controlled by a preset rate limiting mechanism.

[0025] This application also provides a thick provisioned volume creation system for a distributed storage system, including:

[0026] The request receiving module receives volume creation requests.

[0027] The volume creation module is used to create a data volume according to the volume creation request and mark the type of the data volume as a thick provisioned volume;

[0028] The bitmap configuration module is used to create a zeroing progress bitmap corresponding to the thick standby volume; the zeroing progress bitmap contains the status of whether the data objects in the thick standby volume have performed data zeroing operations, and is used to guide the thick standby volume to perform zeroing operations.

[0029] Optionally, the bitmap configuration module also includes:

[0030] The bitmap length calculation unit is used to determine the bitmap length of the zeroing progress bitmap based on the number of data objects in the data volume.

[0031] Optional, also includes:

[0032] The read / write module is used to determine the location information of the data object based on the offset of the data read / write operation when performing data read / write operations using the thick reserve volume, and to obtain the zeroing progress status corresponding to the location information; and to return the response data of the data read / write operation based on the zeroing progress bitmap status.

[0033] Optionally, the read / write module includes:

[0034] The read operation module is used to determine that the data object has not been zeroed if the state of the zeroing progress bitmap is 0, and return empty data; if the state of the zeroing progress bitmap is 1, it is determined that the data object has been zeroed, and the data object is read and returned.

[0035] Optionally, the read / write module includes:

[0036] The write operation module is used to determine that the data object has not been zeroed if the state of the zeroing progress bitmap is 0, and to perform the data zeroing operation first, and then write the data object after completion; if the state of the zeroing progress bitmap is 1, it determines that the data object has been zeroed, and to perform the write operation on the data object.

[0037] Optional, also includes:

[0038] The zeroing task handling module is used to, when receiving a data zeroing operation task, send the data zeroing operation task to the RBD process performing data reading and writing for execution if the thick reserve volume is in a data reading and writing state; and perform a zeroing operation if the thick reserve volume is not in a data reading and writing state.

[0039] Optional, also includes:

[0040] The task configuration module is used to control the sending frequency of the data zeroing operation task using a preset rate limiting mechanism.

[0041] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described above.

[0042] This application also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method described above when it invokes the computer program in the memory.

[0043] This application provides a method for creating a thick standby volume in a distributed storage system, comprising: receiving a volume creation request; creating a data volume according to the volume creation request and marking the type of the data volume as a thick standby volume; creating a zeroing progress bitmap corresponding to the thick standby volume; the zeroing progress bitmap includes the status of whether the data objects in the thick standby volume have performed a data zeroing operation, and is used to guide the thick standby volume to perform a zeroing operation.

[0044] This application creates a corresponding zeroing progress bitmap when creating a thick standby volume. The zeroing progress bitmap records the instruction progress of the thick standby volume, ensuring that the volume's data is zeroed during data read and write operations. At the same time, the zeroing progress bitmap can record the zeroing operation in real time, ensuring the continuity of the zeroing operation. That is, the zeroing operation can be executed on a schedule, reducing the creation time of the thick standby volume and improving its usability.

[0045] This application also provides a thick standby volume creation system for a distributed storage system, a computer-readable storage medium, and an electronic device, which have the aforementioned beneficial effects, and will not be elaborated here. Attached Figure Description

[0046] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0047] Figure 1 A flowchart illustrating a method for creating a thick standby volume in a distributed storage system, as provided in an embodiment of this application;

[0048] Figure 2 A flowchart illustrating another method for creating a thick provisioned volume in a distributed storage system provided in an embodiment of this application;

[0049] Figure 3 This is a schematic diagram of the thick standby volume creation system architecture of a distributed storage system provided in an embodiment of this application;

[0050] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0051] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, 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, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0052] Currently, during the creation of a thick backup volume, the data zeroing operation takes a considerable amount of time, and the thick backup volume is not readable or writable during the zeroing operation, which will seriously affect the normal use of the thick backup volume.

[0053] Please refer to Figure 1 , Figure 1 A flowchart illustrating a method for creating a thick standby volume in a distributed storage system, as provided in this application embodiment, is shown below:

[0054] S101: Receive volume creation request;

[0055] This step aims to receive volume creation requests. There are no restrictions on how to receive them or the specific content of the volume creation requests. The creation instructions set within the distributed storage system can be used as the volume creation requests for this step to achieve the creation of thick provisioned volumes.

[0056] The volume creation request must contain at least the instructions for creating the data volume, and may include relevant attribute information of the data volume, such as the creation location and size of the data volume, etc., which are not limited here.

[0057] S102: Create a data volume according to the volume creation request, and mark the type of the data volume as a thick provisioned volume;

[0058] This step aims to create a data volume and mark its type as a thick-provisioned volume. That is, after the data volume is created, its type is marked, enabling it to be used as a thick-provisioned volume in the distributed storage system.

[0059] In addition, this step can create multiple data volumes based on the volume creation request, and select one or all of them as thick provisioned volumes. The specific number of data volumes to be created can be set through the volume creation request.

[0060] It should be noted that this application embodiment describes the creation of thick provisioned volumes. For the creation of other types of data volumes, they can be marked as other types when performing this step to obtain other types of data volumes.

[0061] S103: Create the zeroing progress bitmap corresponding to the thick preparation volume.

[0062] This step aims to create a zeroing progress bitmap that corresponds to the thick provisioned volumes that have been created. If multiple thick provisioned volumes are created, a corresponding zeroing progress bitmap should be configured for each thick provisioned volume.

[0063] When creating a zeroing progress bitmap, its length needs to be determined. The bitmap length can be determined based on the number of data objects in the data volume. Bitmap length = data volume capacity / size of the data objects, i.e., the number of data objects in the data volume. The zeroing progress bitmap shows whether a data object has undergone a zeroing operation. For example, it can be identified by 0 or 1, where 0 indicates that the data object has not undergone a zeroing operation, and 1 indicates that the data object has not undergone a zeroing operation. Other states can also be used to indicate the zeroing status, and these are not limited here. However, it should be noted that the zeroing progress bitmap only needs to include the zeroing status of all data objects in the thick provisioned volume; they do not need to have the same data storage structure. Any zeroing progress bitmap that can reflect the zeroing status of all data objects in the thick provisioned volume is acceptable.

[0064] Furthermore, there are no restrictions on the storage location and storage structure of the zeroing progress bitmap. It can be stored directly in the thick backup volume or other storage media in the form of a bitmap.

[0065] After creating the zeroing progress bitmap, a one-to-one correspondence can be established between the thick standby volume and the zeroing progress bitmap to prevent confusion. For example, the name and tags of the thick standby volume to which the zeroing progress bitmap belongs can be configured, allowing subsequent searches for the zeroing progress bitmap to include the thick standby volume. Other methods can also be used, such as configuring the location information of the corresponding zeroing progress bitmap within the thick standby volume, ensuring that the corresponding zeroing progress bitmap can only be determined from the thick standby volume. These are just a few examples; further details are not provided here.

[0066] It is easy to understand that the creation of the zeroing progress bitmap should be after the creation of the thick provisioned volume. This application embodiment is for thick provisioned volumes. For other types of data volumes, if the same technical problem exists, the zeroing progress bitmap or other bitmaps with the same function as the zeroing progress bitmap can also be established with reference to this application embodiment.

[0067] By using a zeroing progress bitmap, the thick provisioned volume can refer to the zeroing records of the corresponding data objects in the bitmap when executing instructions. This allows for zeroing operations on the volume's data during data read / write processes as well. Since the zeroing progress bitmap records the zeroing progress of each data object in the thick provisioned volume, the zeroing operations can be performed continuously.

[0068] In this embodiment of the application, when creating a thick standby volume, a corresponding zeroing progress bitmap is also created. The zeroing progress bitmap records the instruction progress of the thick standby volume, ensuring that the volume's data is zeroed during the data read and write process. At the same time, the zeroing progress bitmap can record the zeroing operation in real time, ensuring the continuity of the zeroing operation. That is, the zeroing operation can be executed on a timer, reducing the creation time of the thick standby volume and improving its usability.

[0069] In the above embodiments, the zeroing progress bitmap is used to guide the thick standby volume to zero out data. As a preferred execution method, the following describes how to apply the thick standby volume to perform instruction operations:

[0070] When performing data read / write operations using the thick backup volume, the position information of the data object is determined based on the offset of the data read / write operation, and the zeroing progress status corresponding to the position information is obtained.

[0071] The response data for the data read / write operation is returned based on the zeroing progress bitmap status.

[0072] Since the zeroing progress bitmap records the zeroing progress state, the execution process of subsequent data read and write operations can be determined according to the zeroing progress state of the actual data object.

[0073] See here. Figure 2 , Figure 2 The flowchart of another method for creating a thick standby volume in a distributed storage system provided in this application embodiment shows the complete execution process as follows:

[0074] S201: Received volume creation request;

[0075] S202: Create a data volume according to the volume creation request, and mark the type of the data volume as a thick provisioned volume;

[0076] S203: Create a zeroing progress bitmap corresponding to the thick standby volume; the zeroing progress bitmap contains the status of whether the data objects in the thick standby volume have performed data zeroing operations, and is used to guide the thick standby volume to perform zeroing operations.

[0077] S204: When performing data read / write operations using the thick backup volume, determine the location information of the data object based on the offset of the data read / write operation, and obtain the zeroing progress status corresponding to the location information.

[0078] S205: Return the response data for the data read / write operation based on the zeroing progress bitmap status.

[0079] In the above process, compared with the previous embodiment, when performing data read and write operations using the thick provisioned volume, the position information of the data object can be determined according to the offset of the data read and write operation, and the state of the corresponding zeroing progress bitmap of the data object can be determined according to the position information. Thus, the data to be returned and the read and write operations to be performed can be determined according to the state of the zeroing progress bitmap.

[0080] The following section explains the corresponding states in the zeroing progress bitmap when performing read and write operations:

[0081] Specifically, this may include the following steps, where 0 and 1 below represent that the data object has not undergone a data zeroing operation and that the data object has undergone a data zeroing operation, respectively:

[0082] (1) If the data read / write operation includes a data read operation, the response data returned based on the zeroing progress bitmap status includes the following process:

[0083] If the state of the zeroing progress bitmap is 0, it indicates that the data object has not been zeroed and empty data is returned.

[0084] If the state of the zeroing progress bitmap is 1, it is determined that the data object has been zeroed, and the data object is read and returned.

[0085] When performing a data read operation, if the state of the data object in the zeroing progress bitmap is 0, it indicates that the zeroing operation has not been performed and it needs to be zeroed later. In this case, empty data can be returned. If the state of the data object in the zeroing progress bitmap is 1, it indicates that the zeroing process has been completed, and the data of the data object can be read directly and returned as response data.

[0086] (2) If the data read / write operation includes a data write operation, the response data for the data read / write operation returned based on the zeroing progress bitmap status includes the following process:

[0087] If the status of the zeroing progress bitmap is 0, it indicates that the data object has not been zeroed. First, perform the zeroing operation on the data, and then write the data object after completion.

[0088] If the zeroing progress bitmap status is 1, it indicates that the data object has been zeroed and the write operation can be performed directly on the data object.

[0089] When performing a data write operation, if the state of the data object in the zeroing progress bitmap is 0, it indicates that the zeroing operation has not been performed. In this case, the zeroing operation is performed first, and the data is written after the zeroing operation is completed. If the state of the data object in the zeroing progress bitmap is 1, it indicates that the zeroing process has been completed, and data can be written directly.

[0090] As can be seen from the above process, the operations performed and the response data returned are different depending on the different operations and the different states in the zeroing progress bitmap. This ensures that other data objects can also be zeroed when data read and write operations are performed on the thick standby volume, and the state is recorded through the zeroing progress bitmap. This makes the zeroing operation process of each data object in the thick standby volume highly independent, thereby improving the high availability of the thick standby volume.

[0091] Furthermore, based on the above embodiments, after the thick standby volume is created, if a data zeroing operation task is received and the thick standby volume is in a data read / write state, the data zeroing operation task is sent to the RBD process performing data read / write for execution. Subsequent data read / write operations can be performed in accordance with the above process. If the thick standby volume is not in a data read / write state, the zeroing operation can be performed directly. Simultaneously, a preset rate limiting mechanism can be used to control the sending frequency of the data zeroing operation task, avoiding frequent execution of the data zeroing operation task and mitigating the impact on services.

[0092] The corresponding execution flow at this time can be as follows:

[0093] Step 1: Receive the data zeroing operation task;

[0094] The second step is to determine whether the thick standby volume is in a data read / write state; if yes, proceed to the third step; if no, proceed to the fourth step.

[0095] The third step is to send the data zeroing operation task to the RBD process that performs data reading and writing.

[0096] Step 4: Perform the zeroing operation based on the data zeroing task.

[0097] The data zeroing operation task is sent to the RBD process that performs data reading and writing, so that the RBD process can execute the data zeroing operation task after performing data reading and writing, so as to complete the data zeroing operation task.

[0098] As can be seen from the above process, it is precisely because the embodiments of this application add a zeroing progress bitmap of the volume during the creation process of the thick standby volume and record the zeroing progress of the thick standby volume that the data zeroing operation of the volume can be performed during the data reading and writing process of the thick standby volume. At the same time, the zeroing progress bitmap ensures the continuity of the zeroing operation, that is, the zeroing operation can be executed on a timed basis, reducing the creation time of the thick standby volume and improving the practicality of the thick standby volume.

[0099] The following describes the thick standby volume creation system for the distributed storage system provided in the embodiments of this application. The thick standby volume creation system described below can be referred to in correspondence with the thick standby volume creation method described above.

[0100] See Figure 3 , Figure 3This application provides a schematic diagram of a thick provisioned volume creation system architecture for a distributed storage system, comprising:

[0101] The request receiving module receives volume creation requests.

[0102] The volume creation module is used to create a data volume according to the volume creation request and mark the type of the data volume as a thick provisioned volume;

[0103] The bitmap configuration module is used to create a zeroing progress bitmap corresponding to the thick standby volume; the zeroing progress bitmap contains the status of whether the data objects in the thick standby volume have performed data zeroing operations, and is used to guide the thick standby volume to perform zeroing operations.

[0104] This application provides a thick standby volume creation system for a distributed storage system. When creating a thick standby volume in the distributed storage system, a corresponding zeroing progress bitmap is also created. The zeroing progress bitmap records the instruction progress of the thick standby volume, ensuring that the volume's data is zeroed during data read and write operations. At the same time, the zeroing progress bitmap can record the zeroing operation in real time, ensuring the continuity of the zeroing operation, that is, the zeroing operation can be executed on a timed basis, reducing the creation time of the thick standby volume and improving its usability.

[0105] Based on the above embodiments, as a preferred embodiment, the bitmap configuration module further includes:

[0106] The bitmap length calculation unit is used to determine the bitmap length of the zeroing progress bitmap based on the number of data objects in the data volume.

[0107] Based on the above embodiments, as a preferred embodiment, it further includes:

[0108] The read / write module is used to determine the location information of the data object based on the offset of the data read / write operation when performing data read / write operations using the thick reserve volume, and to obtain the zeroing progress status corresponding to the location information; and to return the response data of the data read / write operation based on the zeroing progress bitmap status.

[0109] Based on the above embodiments, as a preferred embodiment, the read / write module includes:

[0110] The read operation module is used to determine that the data object has not been zeroed if the state of the zeroing progress bitmap is 0, and return empty data; if the state of the zeroing progress bitmap is 1, it is determined that the data object has been zeroed, and the data object is read and returned.

[0111] Based on the above embodiments, as a preferred embodiment, the read / write module includes:

[0112] The write operation module is used to determine that the data object has not been zeroed if the state of the zeroing progress bitmap is 0, and to perform the data zeroing operation first, and then write the data object after completion; if the state of the zeroing progress bitmap is 1, it determines that the data object has been zeroed, and to perform the write operation on the data object.

[0113] Based on the above embodiments, as a preferred embodiment, it further includes:

[0114] The zeroing task handling module is used to, when receiving a data zeroing operation task, send the data zeroing operation task to the RBD process performing data reading and writing for execution if the thick reserve volume is in a data reading and writing state; and perform a zeroing operation if the thick reserve volume is not in a data reading and writing state.

[0115] Based on the above embodiments, as a preferred embodiment, it further includes:

[0116] The task configuration module is used to control the sending frequency of the data zeroing operation task using a preset rate limiting mechanism.

[0117] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed, can perform the steps provided in the above embodiments. The storage medium may include various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0118] This application also provides an electronic device that may include a memory and a processor. The memory stores a computer program, and when the processor calls the computer program in the memory, it can implement the steps provided in the above embodiments. Of course, the electronic device may also include various network interfaces, power supplies, and other components.

[0119] This application also provides an electronic device, see [link to document]. Figure 4 The present application provides a structural diagram of an electronic device, as shown in the embodiment. Figure 4 As shown, it may include a processor 1410 and a memory 1420.

[0120] The processor 1410 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 1410 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 1410 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), 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 1410 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 1410 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.

[0121] The memory 1420 may include one or more computer-readable storage media, which may be non-transitory. The memory 1420 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 1420 is used to store at least the following computer program 1421, which, after being loaded and executed by the processor 1410, is capable of implementing the relevant steps in the thick provisioning volume creation performed by the electronic device side as disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 1420 may also include an operating system 1422 and data 1423, etc., and the storage method may be temporary storage or permanent storage. The operating system 1422 may include Windows, Linux, Android, etc.

[0122] In some embodiments, the electronic device may further include a display screen 1430, an input / output interface 1440, a communication interface 1450, a sensor 1460, a power supply 1470, and a communication bus 1480.

[0123] certainly, Figure 4 The structure of the electronic device shown does not constitute a limitation on the electronic device in the embodiments of this application. In practical applications, the electronic device may include more than [other components]. Figure 4 More or fewer components as shown, or combinations of certain components.

[0124] The various embodiments in this 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. As the system provided in the embodiments corresponds to the method provided in the embodiments, the description is relatively simple; relevant parts can be found in the method section.

[0125] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only for the purpose of helping to understand the method and core ideas of this application. 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.

[0126] 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 method for creating a thick provisioned volume in a distributed storage system, characterized in that, include: Receive volume creation request; Create a data volume according to the volume creation request, and mark the type of the data volume as a thick provisioned volume; When creating the thick standby volume, a zeroing progress bitmap corresponding to the thick standby volume is also created. The zeroing progress bitmap contains the status of whether the data objects in the thick standby volume have performed a data zeroing operation, and is used to guide the thick standby volume to perform a zeroing operation; When a data zeroing operation task is received; If the thick reserve volume is in a data read / write state, the data zeroing operation task is sent to the RBD process that is performing data read / write for execution; If the thick reserve volume is not in a data read / write state, a zeroing operation is performed.

2. The method for creating a thick prepared roll according to claim 1, characterized in that, When creating the zeroing progress bitmap for the thick provisioned volume, the following is also included: The bitmap length of the zeroing progress bitmap is determined based on the number of data objects in the data volume.

3. The method for creating a thick prepared roll according to claim 1, characterized in that, After creating the zeroing progress bitmap corresponding to the thick provisioned volume, the process also includes: When performing data read / write operations using the thick backup volume, the position information of the data object is determined based on the offset of the data read / write operation, and the zeroing progress status corresponding to the position information is obtained. The response data for the data read / write operation is returned based on the zeroing progress bitmap status.

4. The method for creating a thick prepared roll according to claim 3, characterized in that, If the data read / write operation includes a data read operation, the response data returned based on the zeroing progress bitmap state for the data read / write operation includes: If the state of the zeroing progress bitmap is 0, it is determined that the data object has not been zeroed, and empty data is returned; If the state of the zeroing progress bitmap is 1, it is determined that the data object has been zeroed, and the data object is read and returned.

5. The method for creating a thick prepared roll according to claim 1, characterized in that, If the data read / write operation includes a data write operation, the response data returned based on the zeroing progress bitmap state for the data read / write operation includes: If the state of the zeroing progress bitmap is 0, it is determined that the data object has not been zeroed. First, the data zeroing operation is performed, and then the data object is written after the operation is completed. If the state of the zeroing progress bitmap is 1, it is determined that the data object has been zeroed, and the write data object of the data write operation is executed.

6. The method for creating a thick prepared roll according to claim 5, characterized in that, Also includes: The sending frequency of the data zeroing operation task is controlled by a preset rate limiting mechanism.

7. A thick provisioned volume creation system for a distributed storage system, characterized in that, include: The request receiving module receives volume creation requests. The volume creation module is used to create a data volume according to the volume creation request and mark the type of the data volume as a thick provisioned volume; The bitmap configuration module is used to create a zeroing progress bitmap corresponding to the thick standby volume when creating the thick standby volume; The zeroing progress bitmap contains the status of whether the data objects in the thick standby volume have performed a data zeroing operation, and is used to guide the thick standby volume to perform a zeroing operation; The zeroing task handling module is used when a data zeroing operation task is received; If the thick reserve volume is in a data read / write state, the data zeroing operation task is sent to the RBD process performing data read / write for execution; if the thick reserve volume is not in a data read / write state, the zeroing operation is performed.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method for creating a thick standby volume in a distributed storage system as described in any one of claims 1-6.

9. An electronic device, characterized in that, The system includes a memory and a processor, wherein the memory stores a computer program, and the processor invokes the computer program in the memory to implement the steps of the thick standby volume creation method for a distributed storage system as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Disk optimization method and device based on distributed storage system

    CN114579062A