Data storage method and data storage device

By detecting block-lost strips in cloud storage and generating compressed strips, the problem of low disk space utilization in disk storage arrays is solved, and more efficient disk space utilization and data protection is achieved.

CN113986604BActive Publication Date: 2025-02-18SHENZHEN YUEZHUO DIGITAL INFORMATION TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111351828.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-16
Publication Date
2025-02-18
Estimated Expiration
2041-11-16

AI Technical Summary

Technical Problem

In the cloud storage field, when the actual number of data blocks of object data does not reach the full amount, the disk space utilization of object data in the disk storage array is reduced.

Method used

By detecting the missing block strips, a compression band is generated. The single block capacity of the data block and the verification block of the compression band are smaller than the single block capacity of the missing block strips, thereby improving the utilization of disk space.

Benefits of technology

This improves the proportion of object data in the stripe, thereby improving disk space utilization while maintaining data protection capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113986604B_ABST
    Figure CN113986604B_ABST
Patent Text Reader

Abstract

The present application provides a data storage method and a data storage device. Based on the present application, the single-block capacity of a stripe can be dynamically adjusted according to the amount of object data in the stripe. Therefore, when there is a missing-block stripe associated with any object, a compressed stripe with full actual number of data blocks and full actual number of check blocks can be obtained by lowering the single-block capacity. Since the full data blocks in the compressed stripe contain the same amount of object data as the missing-block stripe, and the full check blocks in the compressed stripe contain less check data due to the lowered single-block capacity, the proportion of object data in the stripe is increased, thereby improving the utilization of disk space. Moreover, the present application does not need to cache object data of multiple objects at the same time and wait for the complete stripe to be pieced together, nor does it need to reduce the number of blocks in the stripe. Therefore, while improving the utilization of disk space, it can take into account the cache occupancy and data protection capabilities affected by the number of blocks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to storage technology, in particular to cloud storage technology, and more particularly to a data storage method, a data storage device, a computer-readable storage medium, a management server for cloud storage, and a cloud storage system. Background Art

[0002] In the field of cloud storage, in order to improve the security of data storage, the object data of each object is stored in the disk array in the form of stripes. The stripe includes N data blocks for storing object data and M check blocks for storing check data. Both the data blocks and check blocks can be called "blocks" or "units" of the stripe.

[0003] N represents the number of full data blocks in a stripe (N is a positive integer greater than 1), and M represents the number of full check blocks in a stripe (M is a positive integer greater than or equal to 1). When no more than M data blocks fail due to disk failure or other reasons, the object data in the failed data blocks can be recovered using the check data in the check blocks.

[0004] Since the amount of object data is uncertain, the actual number of data blocks in a stripe may reach the full number of data blocks N, or it may not reach the full number of data blocks N. Regardless of whether the actual number of data blocks in a stripe reaches the full number of data blocks N, the actual number of parity blocks will be the full number of parity blocks M. This is because the full number of parity blocks M determines the security level of data protection, that is, the full number of parity blocks M determines the tolerance for the number of data blocks in the stripe.

[0005] Therefore, for a missing block stripe in which the actual number of data blocks does not reach the full number of data blocks N, the proportion of the object data contained therein in the stripe is less than the ideal data block proportion N / N+M, thereby reducing the disk space utilization of the object data in the disk storage array. Summary of the invention

[0006] In view of this, the embodiments of the present application respectively provide a data storage method, a data storage device, a computer-readable storage medium, a management server for cloud storage, and a cloud storage system, which help to improve the disk space utilization of object data.

[0007] In one embodiment, a data storage method is provided, comprising:

[0008] Detecting a missing block stripe in each stripe associated with any object, wherein the object data contained in all data blocks of each stripe is the object data of the same object, the actual number of data blocks of the missing block stripe is less than a preset number of full data blocks, and the actual number of check blocks of the missing block stripe is equal to a preset number of full check blocks;

[0009] If the missing block stripe is detected, a compressed stripe is generated to replace the missing block stripe, wherein each data block of the compressed stripe contains the object data in each data block of the missing block stripe, the actual number of data blocks of the compressed stripe is equal to the full number of data blocks, the actual number of check blocks of the compressed stripe is equal to the full number of check blocks, and the single block capacity of the data blocks and check blocks of the compressed stripe are both smaller than the single block capacity of the data blocks and check blocks of the missing block stripe.

[0010] Optionally, the generating of the compressed stripe for replacing the missing block stripe comprises: detecting the data amount of the object data contained in all the data blocks of the missing block stripe; determining the single-block amortization amount after the data amount is divided according to the full number of data blocks; determining an ideal single-block capacity that can be maximized by the single-block amortization amount, wherein the ideal single-block capacity is smaller than the single-block capacity of the data blocks and the check blocks of the missing block stripe; and generating the compressed stripe in which both the data blocks and the check blocks have the ideal single-block capacity.

[0011] Optionally, determining the ideal single-block capacity that can be maximized by the single-block averaging includes: obtaining a pre-set single-block capacity reference value sequence, wherein each reference value in the single-block capacity reference value sequence monotonically changes with a preset unit granularity as the difference; determining an ideal multiple of the single-block averaging relative to the unit granularity, wherein the product of the unit granularity and the ideal multiple is greater than or equal to the single-block averaging, and the product of the unit granularity and the difference between the ideal multiple and one is less than the single-block averaging; in the single-block capacity reference value sequence, determining the reference value that matches the product of the unit granularity and the ideal multiple as the ideal single-block capacity.

[0012] Optionally, the data storage method further includes: in response to a write operation on the object, generating at least one stripe associated with the object using the object data corresponding to the write operation and saving the stripe in a cache to wait for detection of the missing block stripe to be performed; in response to completion of the write operation, writing the compressed stripe in the cache to the disk array, and deleting the missing block stripe in the cache.

[0013] Optionally, the data storage method further includes: if the missing block stripe caused by a write operation or a delete operation is detected in the disk array, then, the missing block stripe in the disk array is read into a cache; the compressed stripe generated in the cache is written to the disk array, and the missing block stripe in the cache and the disk array is deleted.

[0014] Optionally, the data storage method further comprises: replacing the missing block stripe with the compressed stripe and storing it in the disk array.

[0015] Optionally, each physical disk in the disk array has a set first disk area and a second disk area, wherein the first disk area is used to store blocks whose single block capacity is a preset standard capacity, and the second disk area is used to store blocks whose single block capacity is less than the preset standard capacity; storing the compressed stripe in the disk array instead of the missing block stripe includes: writing each data block and check block in the compressed stripe to the second disk area of ​​each physical disk in the disk array respectively, and if the missing block stripe has been stored in the disk array, then releasing the block storage space occupied by the missing block stripe in the first disk area or the second disk area of ​​each physical disk in the disk array.

[0016] Optionally, each physical disk in the disk array further has a set third disk area; the data storage method further includes: monitoring the available space of the first disk area and the second disk area of ​​each physical disk in the disk array, and in response to a monitoring result indicating that the available space of the first disk area or the second disk area of ​​any physical disk is insufficient, mapping the third disk area as an extended area of ​​the first disk area or the second disk area with insufficient available space.

[0017] In another embodiment, a data storage device is provided, comprising:

[0018] The stripe detection module is configured to: detect a missing block stripe in each stripe associated with any object, wherein the object data contained in all data blocks of each stripe is the object data of the same object, the actual number of data blocks of the missing block stripe is less than a preset full number of data blocks, and the actual number of check blocks of the missing block stripe is equal to a preset full number of check blocks;

[0019] The stripe reorganization module is configured to: if the stripe detection module detects the missing block stripe, then, generate a compressed stripe for replacing the missing block stripe, wherein each data block of the compressed stripe contains the object data in each data block of the missing block stripe, the actual number of data blocks of the compressed stripe is equal to the full number of data blocks, the actual number of check blocks of the compressed stripe is equal to the full number of check blocks, and the single block capacity of the data block and the check block of the compressed stripe is smaller than the single block capacity of the data block and the check block of the missing block stripe.

[0020] Optionally, the stripe reorganization module is configured to be specifically used for: detecting the data amount of object data contained in all data blocks of the missing block stripe; determining the single-block amortization amount after the data amount is divided according to the full number of data blocks; determining an ideal single-block capacity that can be maximized by the single-block amortization amount, wherein the ideal single-block capacity is smaller than the single-block capacity of the data blocks and the check blocks of the missing block stripe; and generating the compressed stripe in which both the data blocks and the check blocks have the ideal single-block capacity.

[0021] Optionally, the data storage device further includes a stripe creation module, which is configured to: in response to a write operation on the object, generate at least one stripe associated with the object using the object data corresponding to the write operation and save it in a cache, waiting for the stripe detection module to perform detection on the missing block stripe; a stripe disk drop module, which is configured to: in response to the completion of the write operation, write the compressed stripe saved in the cache by the stripe reorganization module to the disk array, and delete the missing block stripe in the cache.

[0022] Optionally, the stripe readback module is configured to: if the stripe detection module detects the missing block stripe caused by a write operation or a delete operation in the disk array, then, read the missing block stripe detected by the stripe detection module in the disk array into the cache; the stripe disk drop module is configured to: write the compressed stripe generated by the stripe reorganization module in the cache to the disk array, and delete the missing block stripe in the cache and the disk array.

[0023] Optionally, each physical disk in the disk array has a set first disk area and a second disk area, wherein the first disk area is used to store blocks whose single block capacity is a preset standard capacity, and the second disk area is used to store blocks whose single block capacity is less than the preset standard capacity; the stripe disk placement module writes each data block and check block in the compressed stripe to the second disk area of ​​each physical disk in the disk array respectively, and if the missing block stripe has been stored in the disk array, then, the block storage space occupied by the missing block stripe in the first disk area or the second disk area of ​​each physical disk in the disk array is released.

[0024] Optionally, each physical disk in the disk array further has a set third disk area; the data storage device further includes a disk management module, which is configured to: monitor the available space of the first disk area and the second disk area of ​​each physical disk in the disk array, and in response to a monitoring result indicating that the available space of the first disk area or the second disk area of ​​any physical disk is insufficient, map the third disk area as an extended area of ​​the first disk area or the second disk area with insufficient available space.

[0025] In another embodiment, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium, and when the instructions are executed by a processor, the processor is triggered to execute the data storage method as described in the above embodiment.

[0026] In another embodiment, a management server for cloud storage is provided, comprising a processor, wherein the processor is configured to execute the data storage method as described in the above embodiment.

[0027] In another embodiment, a cloud storage system is provided, including a server cluster and a storage pool, wherein the server cluster includes the management server as described in the above embodiment, and the storage pool includes at least one of the disk arrays.

[0028] Based on the above embodiment, the single-block capacity of the stripe can be dynamically adjusted according to the amount of object data in the stripe. Therefore, when there is a missing block stripe associated with any object, a compressed stripe with full actual number of data blocks and full actual number of check blocks can be obtained by lowering the single-block capacity. Since the full data blocks in the compressed stripe contain the same amount of object data as the missing block stripe, and the full check blocks in the compressed stripe contain less check data due to the lowered single-block capacity, the proportion of object data in the stripe can be increased, thereby improving the utilization of disk space. Moreover, the above embodiment does not need to cache object data of multiple objects at the same time and wait for the complete stripe to be pieced together, nor does it need to reduce the number of check blocks in the stripe. Therefore, while improving the utilization of disk space, it can take into account the cache occupancy and data protection capabilities affected by the number of blocks. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] The following drawings are only used to illustrate and explain the present application, and do not limit the scope of the present application:

[0030] Figure 1 A schematic diagram of the data storage principle in the first test example of the present application;

[0031] Figure 2 A schematic diagram of the data storage principle in the second test example of the present application;

[0032] Figure 3 A schematic diagram of a data storage principle in an embodiment of the present application;

[0033] Figure 4 This is a schematic diagram of an exemplary flow chart of a data storage method in one embodiment of the present application;

[0034] Figure 5 For application Figure 4 A schematic diagram of the principle of a preferred disk management solution of the data storage method shown;

[0035] Figure 6 For Figure 4 A schematic diagram of the principle of a first application example of the data storage method shown;

[0036] Figure 7 For Figure 4 A schematic diagram of a second application example of the data storage method shown;

[0037] Figure 8 For Figure 4 A schematic diagram of a third application example of the data storage method shown;

[0038] Fig. 9 For Figure 4A schematic diagram of a fourth application example of the data storage method shown;

[0039] Fig.10 For Figure 4 A schematic diagram of a fifth application example of the data storage method shown;

[0040] Fig.11 For Figure 4 A schematic diagram of a sixth application example of the data storage method shown;

[0041] Fig.12 This is a schematic diagram of an exemplary structure of a data storage device in another embodiment of the present application;

[0042] Fig.13 For Fig.11 A schematic diagram of an expanded structure of the data storage device shown;

[0043] Fig.14 This is a schematic diagram of an exemplary structure of a management server in another embodiment of the present application;

[0044] Fig.15 This is a schematic diagram of an exemplary structure of a cloud storage system in another embodiment of the present application. DETAILED DESCRIPTION

[0045] In order to make the objectives, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and examples.

[0046] The generation of missing block strips may be caused by a write operation, a delete operation or an update operation on object data, where the object may represent a code stream, a device, or a target of interest, and the object data may be media data such as images, audio and video files, etc.

[0047] When the object data Dx is new data to be written to the disk array, after the object data Dx has filled several stripes, the last part of the object data written is the object data Dx_sh which is insufficient to occupy all N data blocks, thereby forming a missing block stripe in which the actual number of data blocks is less than the full number of data blocks N.

[0048] In the case where the object data Dx is updated data that has been updated (i.e., a write operation that overwrites old data), the data increment or decrement caused by the update results in the existence of object data Dx_sh after the update that is insufficient to occupy all N data blocks, thereby forming a missing block stripe in which the actual number of data blocks is less than the full number of data blocks N.

[0049] In the case where the object data Dx is reduced data after a deletion operation is performed, data blocks in at least one stripe in the reduced object data Dx are cleared due to the deletion operation, thereby forming a missing block stripe in which the actual number of data blocks is less than the full number of data blocks N.

[0050] Regardless of which of the above situations causes the missing blocks, the actual utilization of the disk space allocated to the stripe with missing blocks is only approximately equal to Np / N-p+M, which is lower than the ideal utilization N / N+M of a single stripe.

[0051] With respect to the actual utilization Np / N-p+M which is lower than the ideal utilization N / N+M, the present application first provides two test cases, which attempt to improve the disk space utilization by avoiding the occurrence of missing block stripes.

[0052] Figure 1 Schematic diagram of the data storage principle in the first test example of this application. Figure 1 The first test case shown attempts to improve disk space utilization by piecing together object data of different objects.

[0053] See also Figure 1 In the first test example, assuming that the object data Da of the first object includes object data Da_sh that only occupies Np data blocks 110, and the object data Db of the second object includes object data Db_sh that only occupies p data blocks 110, then the first test example can piece together the object data Da_sh of the first object and the object data Db_sh of the second object and store them in N data blocks 110 of the same stripe, and calculate the check data in M ​​check blocks 130.

[0054] Therefore, the first test example can avoid missing blocks, thereby improving the utilization of disk space, that is, the disk space utilization of a single stripe will be at least higher than Np / N-p+M. If all data blocks in the stripe obtained by data piecing together are completely occupied, then the disk space utilization of a single stripe can reach the ideal utilization N / N+M.

[0055] However, compared to the method in which objects exclusively occupy stripes (i.e., the object data contained in all data blocks of each stripe are the object data of the same object), the first test case that supports different objects sharing stripes will increase the complexity of the stripe maintenance logic. For example, for each stripe, in addition to maintaining its associated objects, it may be necessary to further maintain the data block position of the object data of each associated object in the stripe, thereby complicating the metadata of the stripe.

[0056] Moreover, the object data is assembled in the cache before the stripe is written to the disk array, and the object data needs to wait for the right time. Therefore, the object data waiting to be assembled will occupy a large amount of cache space, so that the implementation of the first test case must rely on a sufficiently large cache space.

[0057] That is, in order to improve the utilization of disk space, the first test example needs to increase the complexity of maintenance logic and the occupancy rate of cache space at the cost of improvement.

[0058] Figure 2 Schematic diagram of the data storage principle in the second test example of the present application. Figure 2 The second test case shown attempts to improve disk space utilization by reducing the stripe size.

[0059] See also Figure 2 In the second test example, assuming that the object data Da of the third object includes object data Dc_sh occupying only Np data blocks 110, then the second test example can downgrade the specification of the stripe to include Np data blocks 210 and Mq check blocks 230, where p is a positive integer greater than or equal to 1 and less than N, and q is a positive integer greater than or equal to 1 and less than M.

[0060] Therefore, the second test example can avoid missing blocks, thereby improving the utilization of the disk space.

[0061] However, in the stripe specification configuration, the number of check blocks changes in association with the number of data blocks. For example, for stripes that support erasure coding (EC) to achieve data protection, a high protection level specification of "N is 4, M is 2" and a low protection level specification of "N is 2, M is 1" are agreed upon. Therefore, if the stripe specification is downgraded to contain Np data blocks 210, the downgraded stripe only contains Mq check blocks 230.

[0062] Thus, the number of failed data blocks that the stripe can tolerate is reduced from M to Mq. For example, when Mq is 1, only one data block failure can be tolerated in the stripe, thus reducing the data protection capability of the stripe. That is, in order to improve the utilization of disk space, the second test example needs to reduce the data protection capability.

[0063] Based on the analysis of the test results of the first test case and the second test case, in the following embodiments, the single block capacity of the block or unit (Unit) supporting the stripe is dynamically adjustable, thereby reducing the probability of missing blocks, thereby improving disk space utilization.

[0064] At the same time, in the following embodiments that support dynamic adjustment of single-block capacity, the object's exclusivity over the stripe can be maintained, that is, the object data contained in all data blocks of each stripe are object data of the same object, so as to avoid the cost of increasing the complexity of maintenance logic and increasing the cache space occupancy rate as in the first test example; and, in the following embodiments that support dynamic adjustment of single-block capacity, the number of data blocks and check blocks of the stripe can be kept from decreasing, so as to avoid the cost of reducing data protection capabilities as in the second test.

[0065] Figure 3 FIG. 1 is a schematic diagram of a data storage principle in an embodiment of the present application. Figure 3 As shown, in an embodiment of the present application, the single block capacity of the stripe can be dynamically adjusted according to the data amount of the object data Dx in the stripe, so as to compress and store the object data Dx_sh in the missing block stripe 300 that is insufficient to occupy all data blocks in an equal amount in another stripe with a smaller single block capacity. Accordingly, the other stripe with a smaller single block capacity can be called a compressed stripe 350.

[0066] Specifically, in the embodiment of the present application, when there is a missing block stripe 300 associated with any object, by adjusting the single block capacity, the compressed stripe 350 in which the actual number of data blocks 370 and the actual number of check blocks 390 are both full can be obtained by lowering the single block capacity. Since the full N data blocks 370 in the compressed stripe 350 contain the same amount of object data Dx_sh as the Np data blocks 310 in the missing block stripe 300, and the full M check blocks 390 in the compressed stripe 350 contain less check data than the check blocks 330 of the missing block stripe 300 due to the lowering of the single block capacity, the proportion of the object data in the stripe (i.e., the compressed stripe 350) can be increased, thereby improving the utilization of the disk space.

[0067] That is, the check data stored in the check block 390 in the compressed stripe 350 is recalculated based on the object data Dx_sh in the data block 370 in the compressed stripe 350, rather than being directly taken from the check block 330 in the missing block stripe 300.

[0068] Therefore, based on the embodiments of the present application, the disk space utilization of a single compressed stripe 350 will be at least higher than Np / N-p+M, and if all data blocks 370 with smaller single-block capacity in the compressed stripe 350 are fully occupied, the disk space utilization of a single stripe can reach the ideal utilization N / N+M.

[0069] For example, taking the creation of the stripe using EC as an example, if N is 4, M is 2, and the single block capacity of the missing block stripe 300 is 2MB (megabytes), and the object data contained in all data blocks 310 of the missing block stripe 300 is 4MB, then:

[0070] In order to store 4MB of object data, the missing block stripe 300 only includes 2 data blocks, that is, the number of missing blocks p is 2, but the missing block stripe 300 still includes 2 2MB check blocks;

[0071] Therefore, the disk space utilization rate of the disk array for the object data contained in all the data blocks 310 of the missing block stripe 300 is only 4MB / (4MB+2×2MB)=50%.

[0072] In the embodiment of the present application, as long as the single block capacity of the missing block stripe 300 is reduced from 2MB to less than 2MB, a compressed stripe 350 with a larger actual number of data blocks can be used, and the disk space utilization rate of the compressed stripe 350 will be higher than 50%;

[0073] If the embodiment of the present application only needs to reduce the single block capacity of the missing block stripe 300 from 2MB to 1MB, a compressed stripe 350 with no missing blocks and full data can be obtained. In this case, the amount of check data in the check block is compressed to 2×1MB. Therefore, the disk space utilization of the object data contained in all data blocks 310 of the missing block stripe 300 in the disk array can be improved to 4MB / (4MB+2×1MB)=66.67%, that is, an ideal utilization of 66.67% is achieved.

[0074] From the above examples, it can be seen that the embodiment of the present application generates a compressed stripe 350 with the main goal of avoiding the situation where the actual number of data blocks is lower than the full number of data blocks N, but it does not necessarily require that all data blocks 370 of the compressed stripe 350 must be full.

[0075] In addition, the embodiment of the present application only needs enough cache space to reorganize the missing block stripe 300 into a compressed stripe 350, without having to cache the object data of multiple objects at the same time waiting to piece together the complete stripe. Moreover, the embodiment does not need to reduce the number of blocks in the stripe, but can maintain the compressed stripe 350 with the same "N+M" quantity specification as the missing block stripe 300. Thus, the embodiment can improve the utilization of disk space while taking into account the cache occupancy and data protection capabilities affected by the number of blocks.

[0076] Figure 4 FIG. 1 is a schematic diagram of an exemplary flow chart of a data storage method in an embodiment of the present application. Figure 4 In this embodiment, the data storage method may include:

[0077] S410: Detect missing block stripes in each stripe associated with any object, wherein the object data contained in all data blocks of each stripe are object data of the same object, the actual number of data blocks in the missing block stripe is less than a preset full number of data blocks N, and the actual number of check blocks in the missing block stripe is equal to a preset full number of check blocks M.

[0078] This step can be triggered to execute in response to the occurrence of a specified event. For example, the specified event can be an instantaneous event indicating that a write operation, a delete operation, etc. is completed, indicating that the object data will no longer continue to change. Alternatively, the specified event can be a periodic event indicating the arrival of a periodic detection time, or an operation event indicating the occurrence of an external operation used to trigger the detection.

[0079] Furthermore, the stripe detected in this step may be a stripe of the original specification with a single block capacity that has not been "compressed", or may be a stripe that has been "compressed" at least once, that is, a compressed stripe may be allowed to be compressed again.

[0080] S430: If a missing block stripe is detected, a compressed stripe is generated to replace the missing block stripe, wherein each data block of the compressed stripe contains the object data in each data block of the missing block stripe, the actual number of data blocks of the compressed stripe is equal to the full number of data blocks N, the actual number of check blocks of the compressed stripe is equal to the full number of check blocks M, and the single block capacity of the data blocks and check blocks of the compressed stripe are both smaller than the single block capacity of the data blocks and check blocks of the missing block stripe.

[0081] In this step, all data blocks of the compressed stripe contain data, and it is not required that all data blocks must be fully filled with object data.

[0082] For example, this step may specifically include:

[0083] Detect the data volume Ce of the object data contained in all data blocks of the missing block stripe;

[0084] Determine the single-block amortization amount after the detected data amount is divided according to the number of full data blocks N. For example, the single-block amortization amount can be the quotient of the data amount Ce of the object data in the data block of the missing block stripe and the number of full data blocks N, which can be expressed as Ce / N; if the object data in the missing block stripe occupies Np data blocks, the detected data amount Ce=Cb_org×(Np), where Cb_org is the single-block capacity of the data blocks and the check blocks of the missing block stripe; if the object data in the missing block stripe only occupies Np-1 data blocks but does not occupy the last data block among the Np data blocks, the data amount Ce is the actually measured data amount;

[0085] Determine an ideal single-block capacity that can be maximized by the single-block amortization Ce / N, wherein the ideal single-block capacity may refer to a single-block capacity that can maximize the utilization of data blocks under specific constraints in the environment in which the embodiment is applied, rather than requiring that the maximum utilization must be 100% fully occupied by the single-block amortization Ce / N;

[0086] A compressed stripe is generated in which both the data block and the check block have an ideal single-block capacity, wherein the acquired object data is divided and stored in N data blocks of the compressed stripe with the ideal single-block capacity, and the check data in the check block of the compressed stripe is calculated and determined based on the object data divided and stored in the N data blocks of the compressed stripe.

[0087] At this point, the detection and compression process for missing block stripes in data storage is completed.

[0088] Furthermore, after each compression process is completed, the data storage method in this embodiment may further include: replacing the missing block stripe with the compressed stripe and storing it in the disk array. It can be understood that the replacement in this step means storing the compressed stripe in the disk array and preventing the missing block stripe to which the object data used to generate the compressed stripe belongs from occupying the disk space in the disk array.

[0089] Based on the embodiments of the present application, stripes with different single-block capacities may be stored in a disk array. To facilitate classified management of stripes with different single-block capacities, the disk space of each disk in the disk array may be divided into different areas.

[0090] Figure 5 For application Figure 4 Schematic diagram of the preferred disk management scheme of the data storage method shown. Figure 5 , each physical disk 510 in the disk array 500 may have a set first disk area A_std and a second disk area A_comp, wherein the first disk area A_std is used to store blocks whose single block capacity is a preset standard capacity Cb_std, for example, the initial single block capacity mentioned above may be set to the preset standard capacity Cb_std; and the second disk area A_comp is used to store blocks whose single block capacity is less than the preset standard capacity Cb_std. Considering that the proportion of stripes compressed due to missing blocks in all stripes will not be too large, the first disk area A_std may be set to be larger than the second disk area A_comp.

[0091] For example, the preset standard capacity Cb_std can be set to 2MB, then the first disk area A_std of each physical disk in the disk array is used to store data blocks or check blocks of all stripes with a single block capacity of 2MB; and, for all stripes with a single block capacity less than 2MB, their data blocks and check blocks are all stored in the second disk area A_comp of the corresponding physical disk in the disk array.

[0092] If the object data in the data block of the missing block stripe is new data written for the first time, the single block capacity Cb_org of the data block of the missing block stripe and the single block capacity of the check block of the missing block stripe mentioned above may be the preset standard capacity Cb_std (i.e., the initial single block capacity), while the single block capacity of the data block and the check block in the compressed stripe are both smaller than the preset standard capacity Cb_std;

[0093] If the object data in the data block of the missing block stripe is deleted or updated data, then the single block capacity Cb_org of the data block of the missing block stripe mentioned above and the single block capacity of the check block of the missing block stripe may be the preset standard capacity Cb_std, or may be a compressed capacity lower than the preset standard capacity Cb_std, and the single block capacity of the data block and the check block in the compressed stripe is smaller.

[0094] Based on Figure 5 The disk management scheme shown is as follows Figure 4 S450 in the illustrated process may specifically include: writing each data block and check block in the generated compressed stripe to the second disk area A_comp of the corresponding physical disk 510 in the disk array 500, respectively; and, if the missing block stripe has been stored in the disk array 500, releasing the block storage space occupied by the missing block stripe in the first disk area A_std (the case where the single block capacity Cb_org of the data blocks and check blocks of the missing block stripe is equal to the preset standard capacity Cb_std) or the second disk area A_comp (the case where the single block capacity Cb_org of the data blocks and check blocks of the missing block stripe is less than the preset standard capacity Cb_std).

[0095] Still see Figure 5 Considering that there is a certain uncertainty in the usage rates of the first disk area A_std and the second disk area A_comp, each physical disk 510 in the disk array 500 may further have a set third disk area A_rsv, and the third disk area A_rsv is used as a reserved disk area.

[0096] Accordingly, the data storage method in the embodiment of the present application can be performed as follows: Figure 4The process shown further includes: monitoring the available space of the first disk area A_std and the second disk area A_comp of each physical disk 510 in the disk array 500; in response to a monitoring result indicating insufficient available space in the first disk area A_std or the second disk area A_comp of any physical disk 510, mapping the third disk area A_rsv as an extended area of ​​the first disk area A_std or the second disk area A_comp of which the available space is insufficient.

[0097] The third disk area A_rsv can be set relatively small, that is, the third disk area A_rsv can be set smaller than the first disk area A_std. For example, the disk area of ​​the physical disk 510 can be divided into 60% of the first disk area A_std, 20% of the second disk area A_comp, and 20% of the third disk area A_rsv.

[0098] Furthermore, the first disk area A_std and the second disk area A_comp may carry a file system, and the third disk area A_rsv used as a reserved area may carry a file system, or may also adopt a bare disk configuration without a file system.

[0099] In the case where the first disk area A_std and the second disk area A_comp carry a file system, a preset standard capacity Cb_std may be set for the first disk area A_std through the initialization process of the file system. In addition, in order to implement standardized management of a compressed single block capacity that is smaller than the preset standard capacity Cb_std, a single block capacity reference value sequence may also be set for the second disk area A_comp through the initialization process of the file system.

[0100] For example, if the preset standard capacity Cb_std is set to 2MB, the single block capacity reference value sequence can be set in the range of [0.25, 1.75]MB, and monotonically change with a unit granularity of 0.25MB as the difference. The third disk area A_rsv, which can be mapped as an extended area of ​​the first disk area A_std or the second disk area A_comp, can store a single block capacity of a stripe in the range of [0.25, 1.75]MB.

[0101] For the above-mentioned case of setting a sequence of reference values ​​of single-block capacity, when determining the ideal single-block capacity that can be maximized by the single-block amortization amount, S430 may specifically include:

[0102] Acquire a preset sequence of single-block capacity reference values, wherein each reference value in the sequence of single-block capacity reference values ​​may be monotonically varied with a preset unit granularity as a difference;

[0103] Determine the ideal multiple Num of the single-block amortization Ce / N relative to the unit granularity ΔLen, wherein the product of the unit granularity ΔLen and the ideal multiple Num is greater than or equal to the single-block amortization Ce / N, and the product of the unit granularity ΔLen and the difference Num-1 of the ideal multiple Num minus one is less than the single-block amortization Ce / N, that is, the capacity represented by the product of the unit granularity ΔLen and the ideal multiple Num is the capacity that can be maximized under the conditional constraints of the single-block capacity reference value sequence, (Num-1)×ΔLen<Ce / N≤Num×ΔLen;

[0104] In the single block capacity reference value sequence, a reference value that matches the product of the unit granularity ΔLen and the ideal multiple Num is determined as the ideal single block capacity.

[0105] In order to better understand the above data storage method in the embodiments of the present application, further description is given below in conjunction with several application examples.

[0106] Figure 6 For Figure 4 The schematic diagram of the first application example of the data storage method shown in FIG. Figure 6 In the first application example shown, the detected stripe contains newly written object data, and the detection of the missing block stripe is an immediate detection in response to the completion of the write operation.

[0107] See also Figure 6 For a write operation for writing new object data, the data storage method in the embodiment of the present application may further include step S600 occurring before S410: in response to a write operation for any object, a stripe is generated using the object data corresponding to the write operation, and the generated stripe is stored in the cache 530 to wait for detection of missing stripes. Usually, the single block capacity of the stripe generated in this step is configured by default as a preset standard capacity Cb_std.

[0108] Accordingly, for Figure 6 The first application example shown is Figure 4 S410 in the illustrated process can detect a missing block stripe 610 in a stripe associated with an object in the cache 530 before the stripe is written from the cache 530 to the disk array 500. If a missing block stripe 610 is detected, S430 uses the object data in the data blocks of the missing block stripe 610 whose single block capacity is the preset standard capacity Cb_std to obtain a compressed stripe 630 whose single block capacity is less than the preset standard capacity Cb_std.

[0109] And, if Figure 4After S430 in the illustrated process, the data storage method in the embodiment of the present application may further include S450: in response to the completion of the write operation, the compressed stripe 630 in the cache 530 is written to the disk array 500, that is, written to the second disk area A_comp of each physical disk 510 of the disk array 500 or the third disk area A_rsv as its extension, and the missing block stripe 610 in the cache 530 is deleted. At the same time, the remaining stripes that are not compressed due to the full data blocks can be written to the first disk area A_std of each physical disk 510 of the disk array 500 or the third disk area A_rsv as its extension.

[0110] Figure 7 For Figure 4 The schematic diagram of the second application example of the data storage method shown in FIG. Figure 7 In the second application example shown, the detected stripe contains newly written object data, and the detection of the missing block stripe is a periodic detection after the write operation is completed and the stripe is stored in the disk array, or a detection triggered in response to an operation event.

[0111] See also Figure 7 For write operations for writing new object data, the data storage method in the embodiment of the present application may further include step S700 occurring before S410: in response to a write operation for any object, a stripe is generated using the object data corresponding to the write operation, and the generated stripe is first stored in the cache 530 and then written from the cache 530 to the disk array 500. Normally, the single-block capacity of the stripe generated in this step is configured by default to the preset standard capacity Cb_std. Therefore, all stripes generated in this step can be written to the first disk area A_std of each physical disk 510 of the disk array 500 or the third disk area A_rsv as an extension thereof.

[0112] Accordingly, for Figure 7 The second application example shown is as follows: Figure 4 S410 in the illustrated process can detect a missing block stripe 710 in the first write stripe associated with the object in the disk array 500. If a missing block stripe 710 caused by a write operation is detected in the disk array 500, then the data storage method in the embodiment of the present application may further include step S790 occurring before S430: reading (or reading back) the missing block stripe 710 detected in the disk array 500 into the cache 530.

[0113] Then, by Figure 4In S430 of the illustrated process, the compressed stripe 730 having a single block capacity smaller than the preset standard capacity Cb_std is obtained by using the object data in the data blocks of the missing block stripe 710 having a single block capacity equal to the preset standard capacity Cb_std.

[0114] And, in such Figure 4 After S430 in the illustrated process, the data storage method in the embodiment of the present application may further include S450: in response to the formation of the compressed stripe 730, the compressed stripe 730 in the cache 530 is written to the disk array 500, that is, written to the second disk area A_comp of each physical disk 510 of the disk array 500 or the third disk area A_rsv as an extension thereof, and the missing block stripe 710 read back to the cache 530 and the missing block stripe 710 in the first disk area A_std of each physical disk 510 of the disk array 500 or the third disk area A_rsv as an extension thereof are deleted.

[0115] Figure 8 For Figure 4 The schematic diagram of the third application example of the data storage method shown in FIG. Figure 8 In the third application example shown, the detected stripe contains object data on which an update operation (ie, a write operation that overwrites old data) has been performed, and the detection of the missing block stripe is an instant detection in response to the completion of the write operation.

[0116] See also Figure 8 For a write operation intended to update object data in the disk array 500, the data storage method in the embodiment of the present application may further include step S800 occurring before S410: in response to a write operation on an object, generating a stripe using the object data corresponding to the write operation. Typically, the single-block capacity of the stripe generated in this step is configured by default to a preset standard capacity Cb_std.

[0117] Accordingly, for Figure 8 The third application example shown is as follows: Figure 4 S410 in the illustrated process can detect a missing block stripe 810 in the stripe associated with the object in the cache 530 before the stripe is written from the cache 530 to the disk array 500. If a missing block stripe 810 is detected, S430 uses the object data in the data blocks of the missing block stripe 810 whose single block capacity is the preset standard capacity Cb_std to obtain a compressed stripe 830 whose single block capacity is less than the preset standard capacity Cb_std.

[0118] And, in such Figure 4After S430 in the illustrated process, the data storage method in the embodiment of the present application may further include S450: in response to the completion of the update operation, the compressed stripe 830 in the cache 530 is written to the disk array 500, that is, written to the second disk area A_comp of each physical disk 510 of the disk array 500 or the third disk area A_rsv as an extension thereof, and the missing block stripe 810 in the cache 530 is deleted. In addition, the existing stripe 850 in the disk array 500 that is intended to be covered by the missing block stripe 810 is also deleted, and the existing stripe 850 may be stored in one of the first disk area A_std and the second disk area A_comp of each physical disk 510 of the disk array 500, or the third disk area A_rsv as an extension area of ​​one of the two.

[0119] Fig. 9 For Figure 4 FIG. 1 is a schematic diagram showing a fourth application example of the data storage method. Fig. 9 In the fourth application example shown, the stripe being detected contains object data on which an update operation (i.e., a write operation that overwrites old data) has been performed, and the detection of the missing block stripe is a periodic detection after the update operation is completed and the update has taken effect in the disk array, or a detection triggered in response to an operation event.

[0120] See also Fig. 9 For a write operation intended to update object data in the disk array 500, the data storage method in the embodiment of the present application may further include step S900 occurring before S410: in response to a write operation for any object, a stripe is generated using the object data corresponding to the write operation, and the generated stripe is first stored in the cache 530 and then written from the cache 530 to the disk array 500 to cover the existing stripe intended to be updated in the disk array 500. The single block capacity of the stripe generated in this step is the same as the single block capacity of the existing stripe intended to be covered, that is, the single block capacity of the stripe generated in this step depends on the single block capacity of the existing stripe intended to be covered.

[0121] If the stripe generated in step S900 intends to cover the existing stripe in the first disk area A_std or the third disk area A_rsv as an extension of each physical disk 510 of the disk array 500, the single block capacity of the stripe generated in this step is the preset standard capacity Cb_std ( Fig. 9 Take this case as an example).

[0122] If the stripe generated by S900 is intended to cover the existing stripe (i.e., the existing compressed stripe) in the second disk area A_comp or the third disk area A_rsv as an extension of each physical disk 510 of the disk array 500, then the single block capacity of the stripe generated in this step is the aforementioned reference value lower than the preset standard capacity Cb_std.

[0123] Accordingly, for Fig. 9 The fourth application example shown in Figure 4 S410 in the illustrated process can detect a missing block stripe 910 in a stripe associated with an object and on which a write operation has been performed in the disk array 500. If a missing block stripe 910 caused by a write operation is detected in the disk array 500, the data storage method in the embodiment of the present application may further include step S990 occurring before S430: reading (or reading back) the missing block stripe 910 detected in the disk array 500 into the cache 530.

[0124] Then, by Figure 4 In S430 of the illustrated process, the compressed stripe 930 with a smaller single block capacity is obtained by using the object data in the data blocks of the missing block stripe 910 whose single block capacity is the preset standard capacity Cb_std or lower than the preset standard capacity Cb_std.

[0125] And, in such Figure 4 After S430 in the illustrated process, the data storage method in the embodiment of the present application may further include S450: in response to the formation of the compressed stripe 930, the compressed stripe 930 in the cache 530 is written to the disk array 500, that is, written to the second disk area A_comp of each physical disk 510 of the disk array 500 or the third disk area A_rsv as an extension thereof, and the missing block stripe 910 read back to the cache 530 is deleted, and the missing block stripe 910 in one of the first disk area A_std and the second disk area A_comp of each physical disk 510 of the disk array 500, or the third disk area A_rsv as an extension area of ​​one of the two, is also deleted.

[0126] Fig.10 For Figure 4 The schematic diagram of the fifth application example of the data storage method shown in FIG. Fig.10 In the fifth application example shown, the detected stripe contains object data on which a deletion operation has been performed, and the deletion operation is the first deletion of the object data.

[0127] See also Fig.10The data storage method in the embodiment of the present application may further include step S1000 occurring before step S410: performing a deletion operation on an existing stripe in the disk array 500, resulting in p data blocks of the existing stripe being cleared and forming a missing block stripe 1010. Fig.10 In the fifth application example shown, the missing block stripe 1010 is an existing stripe in the first disk area A_std or the third disk area A_rsv extended therefrom, that is, the single block capacity of the missing block stripe 1010 is the preset standard capacity Cb_std.

[0128] Accordingly, for Fig.10 The fifth application example shown in Figure 4 S410 in the illustrated process may detect a missing block stripe 1010 in the stripe associated with the object and on which the deletion operation is performed in the disk array 500 in response to the completion of the deletion operation, or in response to the occurrence of a periodic time or operation event after the deletion operation is completed. If a missing block stripe 1010 caused by the deletion operation is detected in the disk array 500, then the data storage method in the embodiment of the present application may further include step S1090 occurring before S430: reading (or reading back) the missing block stripe 1010 detected in the disk array 500 into the cache 530.

[0129] Then, by Figure 4 In S430 of the illustrated process, the compressed stripe 1030 having a single block capacity lower than the preset standard capacity Cb_std is obtained by using the object data in the data blocks of the missing block stripe 1010 having a single block capacity equal to the preset standard capacity Cb_std.

[0130] And, in such Figure 4 After S430 in the shown process, the data storage method in the embodiment of the present application may further include S450: writing the compressed stripe 1030 in the cache 530 to the disk array 500, that is, writing to the second disk area A_comp of each physical disk 510 of the disk array 500 or the third disk area A_rsv as its extension, and deleting the missing block stripe 1010 read back to the cache 530, and also deleting the missing block stripe 1010 in the first disk area A_std of each physical disk 510 of the disk array 500 or the third disk area A_rsv as its extension area.

[0131] Fig.11 For Figure 4 FIG. 1 is a schematic diagram showing a sixth application example of the data storage method. Fig.11In the sixth application example shown, the detected stripe contains object data on which a deletion operation has been performed, and the deletion operation is a deletion in a non-first deletion of the object data. Accordingly, all stripes detected as missing block stripes in the sixth application example may be compressed stripes that have been generated due to a previous deletion, and the compressed stripes generated in the sixth application example may be compressed stripes that have been "compressed" again using the compressed stripes generated due to a previous deletion.

[0132] See also Fig.11 The data storage method in the embodiment of the present application may further include step S1100 occurring before S410: a deletion operation is performed on an existing stripe (i.e., an existing compressed stripe) in the second disk area A_comp of the disk array 500 or the third disk area A_rsv as an extension thereof, resulting in p data blocks of the existing stripe being cleared and forming a missing block stripe 1110, wherein the single block capacity of the missing block stripe 1110 is lower than the preset standard capacity Cb_std.

[0133] Accordingly, for Fig.11 The sixth application example shown in Figure 4 S410 in the illustrated process may detect a missing block stripe 1110 in a stripe associated with an object and on which a deletion operation has been performed in the disk array 500 in response to the completion of a deletion operation or in response to the occurrence of a periodic time or operation event after the completion of the deletion operation. If a missing block stripe 1110 caused by a deletion operation is detected in the disk array 500, the data storage method in the embodiment of the present application may further include step S1190 occurring before S430: reading (or reading back) the missing block stripe 1110 detected in the disk array 500 into the cache 530.

[0134] Then, by Figure 4 In S430 of the illustrated process, the object data in the data blocks of the compressed missing block stripe 1110 is used to obtain a compressed stripe 1130 with a lower single-block capacity.

[0135] And, in such Figure 4 After S430 in the shown process, the data storage method in the embodiment of the present application may further include S450: writing the compressed stripe 1130 in the cache 530 to the second disk area A_comp of each physical disk 510 of the disk array 500 or the third disk area A_rsv as its extension, and deleting the missing block stripe 1110 read back to the cache 530, and also deleting the missing block stripe 1110 in the second disk area A_comp of each physical disk 510 of the disk array 500 or the third disk area A_rsv as its extension.

[0136] As can be seen from the above application examples, the data storage method provided in the embodiments of the present application can be applied to various scenarios and can be executed repeatedly.

[0137] Fig.12 FIG. 1 is a schematic diagram of an exemplary structure of a data storage device in another embodiment of the present application. Fig.12 As shown, in another embodiment, a data storage device is provided, which may include a stripe detection module 1210 and a stripe reassembly module 1230 .

[0138] The stripe detection module 1210 may be configured to detect a missing stripe in each stripe associated with any object, wherein the actual number of data blocks in the missing stripe is less than a preset number of full data blocks N, and the actual number of check blocks in the missing stripe is equal to a preset number of full check blocks M. For the configuration of the stripe detection module 1210, see Figure 4 The further description about S410 in the data storage method is not repeated here.

[0139] The stripe reorganization module 1230 is configured as follows: if the stripe detection module 1210 detects a stripe with missing blocks, then a compressed stripe is generated to replace the stripe with missing blocks, wherein each data block of the compressed stripe contains object data in each data block of the stripe with missing blocks, the actual number of data blocks of the compressed stripe is equal to the full number of data blocks N, the actual number of check blocks of the compressed stripe is equal to the full number of check blocks M, and the single block capacity of the data blocks and check blocks of the compressed stripe are both smaller than the single block capacity of the data blocks and check blocks of the stripe with missing blocks.

[0140] For example, the stripe reorganization module 1230 can be configured to be specifically used for: detecting the data amount Ce of the object data contained in all the data blocks of the missing block stripe detected by the stripe detection module 1210; determining the single-block amortization amount after the detected data amount is divided according to the full number of data blocks N, for example, the single-block amortization amount can be the quotient of the data amount Ce of the object data in the data blocks of the missing block stripe and the full number of data blocks N, which can be expressed as Ce / N; determining the ideal single-block capacity that can be maximized by the single-block amortization amount Ce / N; generating a compressed stripe in which both the data blocks and the check blocks have the ideal single-block capacity, wherein the acquired object data is divided and stored in the N data blocks of the compressed stripe with the ideal single-block capacity, and the check data in the check block of the compressed stripe is calculated and determined based on the object data divided and stored in the N data blocks of the compressed stripe.

[0141] Alternatively, it can also be considered that the stripe reassembly module 1230 may include the following multiple submodules:

[0142] A data acquisition submodule, used to detect the data volume Ce of the object data contained in all data blocks of the missing block stripe detected by the stripe detection module 1210;

[0143] The amortization estimation submodule is used to determine the amortization amount Ce / N of a single block after the detected data amount is divided according to the number of full data blocks N;

[0144] The capacity estimation submodule is used to determine the ideal single-block capacity that can be maximized by the single-block amortization Ce / N;

[0145] The stripe compression submodule is used to generate a compressed stripe in which both the data block and the check block have an ideal single block capacity.

[0146] For the configuration of the stripe reassembly module 1230, please refer to Figure 4 The further description about S430 in the data storage method is not repeated here.

[0147] In addition, the data storage device in this embodiment may further include a stripe placement module 1250, which may be configured to store the compressed stripe generated by the stripe reorganization module 1230 in the disk array instead of the missing block stripe detected by the stripe detection module.

[0148] If the data storage device in the embodiment of the present application is used, Figure 5 According to the disk management scheme shown, the stripe write module 1250 can write each block in the compressed stripe to the second disk area of ​​each physical disk in the disk array, and release the block storage space occupied by the missing block stripe in the first disk area or the second disk area of ​​each physical disk in the disk array.

[0149] Accordingly, the stripe reassembly module 1230, or a capacity estimation submodule that may be included in the stripe reassembly module 1230, may be configured to specifically:

[0150] Acquire a preset sequence of single-block capacity reference values, wherein each reference value in the sequence of single-block capacity reference values ​​may be monotonically varied with a preset unit granularity as a difference;

[0151] Determine the ideal multiple Num of the single-block amortization Ce / N relative to the unit granularity ΔLen, wherein the product of the unit granularity ΔLen and the ideal multiple Num is greater than or equal to the single-block amortization Ce / N, and the product of the unit granularity ΔLen and the difference between the ideal multiple Num minus one is less than the single-block amortization Ce / N, that is, the capacity represented by the product of the unit granularity ΔLen and the ideal multiple Num is the capacity that can be maximized under the conditional constraints of the single-block capacity reference value sequence, (Num-1)×ΔLen<Ce / N≤Num×ΔLen;

[0152] In the single block capacity reference value sequence, a reference value that matches the product of the unit granularity ΔLen and the ideal multiple Num is determined as the ideal single block capacity.

[0153] Fig.13 For Fig.11 The extended structure diagram of the data storage device shown in FIG. Fig.13 For the scenario where the above data storage device is used, Figure 5 In the case of the disk management scheme shown, the data storage device may further include a disk management module 1270, which is configured to: monitor the available space of the first disk area and the second disk area of ​​each physical disk in the disk array, and in response to a monitoring result indicating insufficient available space in the first disk area or the second disk area of ​​any physical disk, map the third disk area as an extended area of ​​the first disk area or the second disk area with insufficient available space.

[0154] In addition, for writing new data, such as Fig.13 As shown, the data storage device may further include a stripe creation module 1291, which may be configured to: in response to a write operation on any object, generate at least one stripe associated with the object using the object data corresponding to the write operation, and store the generated stripe in the cache 530 to wait for the stripe detection module 1210 to perform detection on the missing block stripe; accordingly, the stripe detection module 1210 may detect the missing block stripe in the stripes associated with the object in the cache before the stripe is written from the cache to the disk array; and the stripe placement module 1250 may write the compressed stripe stored in the cache 530 by the stripe reorganization module 1230 to the disk array 500 in response to the completion of the write operation, and delete the missing block stripe in the cache 530.

[0155] For an update operation (i.e., a write operation that overwrites existing data) or a delete operation of any object, the stripe detection module 1210 can detect missing block stripes in the stripes associated with the object in the disk array 500; and Fig.13 As shown, the data storage device may further include a stripe readback module 1293, which may be configured as follows: if the stripe detection module 1210 detects a missing block stripe caused by an update operation (i.e., a write operation that overwrites existing data) or a delete operation in the disk array 500, then the missing block stripe detected by the stripe detection module 1210 in the disk array 500 is read (or read back) into the cache 530; accordingly, the stripe placement module 1250 may write the compressed stripe generated by the stripe reorganization module 1230 in the cache 530 into the disk array 500, and delete the missing block stripes in the cache 530 and the disk array 530.

[0156] Fig.14 FIG. 1 is a schematic diagram of an exemplary structure of a management server in another embodiment of the present application. Fig.14 In another embodiment, a cloud storage management server is provided, including a processor 1410, which can be configured to execute the data storage method in the aforementioned embodiment.

[0157] The processor 1410 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1410 may be implemented in at least one hardware form of 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 is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state.

[0158] Moreover, if Fig.14 The management server shown may also include a memory 1430 used as a cache 530, a communication module 1450 for communicating with other access devices in a wireless or wired manner, and an interface module 1470 for performing access operations on the disk array.

[0159] In addition, if Fig.14 The management server shown may also include a computer-readable storage medium 1490, in which instructions are stored, and when these instructions are executed by the processor 1410, the processor 1410 may be triggered to execute the data storage method in the aforementioned embodiment. It is understood that the computer-readable storage medium 1490 may also be independent of the management server, and the instructions stored therein may also be used by processors in other electronic devices to execute the data storage method in the aforementioned embodiment.

[0160] Fig.15 FIG. 1 is an exemplary structural diagram of a cloud storage system in another embodiment of the present application. Fig.15 As shown, in another embodiment, a cloud storage system is provided, which may include a server cluster 1510 and a storage pool 1530, wherein the server cluster 1510 may include Fig.14 The management server shown, that is, at least one server in the server cluster 1510 can be as shown in FIG. Fig.14The management server shown in FIG. 15A , and the storage pool 1530 may include at least one disk array, for example, Figure 5 The disk array 500 is shown.

[0161] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A data storage method, characterized in that: include: Detecting a missing block stripe in each stripe associated with any object, wherein the object data contained in all data blocks of each stripe is the object data of the same object, the actual number of data blocks of the missing block stripe is less than a preset number of full data blocks, and the actual number of check blocks of the missing block stripe is equal to a preset number of full check blocks; If the missing block stripe is detected, a compressed stripe is generated to replace the missing block stripe by reducing the single block capacity, wherein each data block of the compressed stripe contains the object data in each data block of the missing block stripe, the actual number of data blocks of the compressed stripe is equal to the full number of data blocks, the actual number of check blocks of the compressed stripe is equal to the full number of check blocks, and the single block capacity of the data blocks and check blocks of the compressed stripe are both smaller than the single block capacity of the data blocks and check blocks of the missing block stripe.

2. The data storage method according to claim 1, characterized in that: The generating of the compressed stripe for replacing the missing block stripe comprises: Detecting the data amount of the object data contained in all the data blocks of the missing block stripe; Determine the single-block amortization amount after the data amount is divided according to the number of full blocks of the data blocks; Determine an ideal single block capacity that can be maximized by the single block amortization amount, wherein the ideal single block capacity is smaller than the single block capacity of the data block and the check block of the missing block stripe; The compressed stripe is generated in which both the data block and the check block have the ideal single block capacity.

3. The data storage method according to claim 2, characterized in that: The determining of an ideal single block capacity that can be maximally utilized by the single block amortization amount includes: Acquire a preset sequence of single-block capacity reference values, wherein each reference value in the sequence of single-block capacity reference values ​​varies monotonically with a preset unit granularity as a difference; Determine an ideal multiple of the single-block amortization amount relative to the unit granularity, wherein the product of the unit granularity and the ideal multiple is greater than or equal to the single-block amortization amount, and the product of the unit granularity and the difference between the ideal multiple and one is less than the single-block amortization amount; In the single block capacity reference value sequence, a reference value that matches the product of the unit granularity and the ideal multiple is determined as the ideal single block capacity.

4. The data storage method according to claim 1, characterized in that: The data storage method further comprises: In response to a write operation on the object, at least one stripe associated with the object is generated using the object data corresponding to the write operation and stored in a cache to wait for detection of the missing stripe to be performed; In response to completion of the write operation, the compressed stripe in the cache is written to the disk array, and the missing block stripe in the cache is deleted.

5. The data storage method according to claim 1, characterized in that: The data storage method further comprises: If the missing block stripe caused by a write operation or a delete operation is detected in the disk array, then the missing block stripe in the disk array is read into a cache; The compressed stripe generated in the cache is written to the disk array, and the missing block stripe in the cache and the disk array is deleted.

6. A data storage device, characterized in that: include: The stripe detection module is configured to: detect a missing block stripe in each stripe associated with any object, wherein the object data contained in all data blocks of each stripe is the object data of the same object, the actual number of data blocks of the missing block stripe is less than a preset full number of data blocks, and the actual number of check blocks of the missing block stripe is equal to a preset full number of check blocks; The stripe reorganization module is configured as follows: if the stripe detection module detects the missing block stripe, then, a compressed stripe for replacing the missing block stripe is generated by reducing the single block capacity, wherein each data block of the compressed stripe contains the object data in each data block of the missing block stripe, the actual number of data blocks of the compressed stripe is equal to the full number of data blocks, the actual number of check blocks of the compressed stripe is equal to the full number of check blocks, and the single block capacity of the data blocks and check blocks of the compressed stripe are both smaller than the single block capacity of the data blocks and check blocks of the missing block stripe.

7. The data storage device according to claim 6, characterized in that: The stripe reassembly module is configured to be specifically used for: Detecting the data amount of the object data contained in all the data blocks of the missing block stripe; Determine the single-block amortization amount after the data amount is divided according to the number of full blocks of the data blocks; Determine an ideal single block capacity that can be maximized by the single block amortization amount, wherein the ideal single block capacity is smaller than the single block capacity of the data block and the check block of the missing block stripe; The compressed stripe is generated in which both the data block and the check block have the ideal single block capacity.

8. A computer-readable storage medium, wherein instructions are stored in the computer-readable storage medium, characterized in that: When the instructions are executed by a processor, the processor is caused to execute the data storage method according to any one of claims 1 to 5.

9. A management server for cloud storage, characterized in that: The device comprises a processor configured to execute the data storage method according to any one of claims 1 to 5.

10. A cloud storage system, characterized in that: It comprises a server cluster and a storage pool, wherein the server cluster comprises the management server as claimed in claim 9, and the storage pool comprises at least one of the disk arrays.

Citation Information

Patent Citations

  • Disk array space division method and device, electronic equipment and storage medium

    CN111522501A

  • Data storage method, device and system and storage medium

    CN112019788A