A strip conversion method and apparatus

By determining the group health value based on the health value of the metadata block during the conversion from backup stripe to coded stripe, and only reading the valid metadata block to generate the coded stripe, the problem of repeated reading in the backup stripe conversion is solved, thus improving system performance.

CN112783801BActive Publication Date: 2025-11-04SHENZHEN IPANEL TECH LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN201911013827.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-10-23
Publication Date
2025-11-04
Estimated Expiration
2039-10-23

AI Technical Summary

Technical Problem

In distributed storage systems, when converting backup striping to encoded striping, the original data of multiple sets of metadata blocks is the same, leading to repeated readings, increasing system I/O overhead, and reducing performance.

Method used

By acquiring multiple sets of metadata blocks in the backup stripe, the first metadata block with the same original data is identified, and the group health value is determined based on the health value. The original data of these metadata blocks is read only when the group health value is valid, and written into blank data blocks to generate metadata blocks for the encoded stripe, thus reducing repeated readings.

Benefits of technology

This reduces the number of times the same data blocks in the original data are read repeatedly, lowers system I/O overhead, and improves system performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112783801B_ABST
    Figure CN112783801B_ABST
Patent Text Reader

Abstract

The application provides a tape conversion method and device, which comprises the following steps: determining a plurality of groups of first metadata blocks with the same original data from a plurality of groups of metadata blocks of a backup tape to be converted; determining a group health value of each group of first metadata blocks according to a health value marked by each first metadata block in the group; reading the original data of the first metadata block with a valid health value in each group of first metadata blocks when the group health values of each group of first metadata blocks represent validity; writing the original data of each group of first metadata blocks into a corresponding blank data block to obtain a second metadata block, and writing the encoding result of the original data in the plurality of second metadata blocks into the blank data block to obtain an encoding data block. According to the application, the metadata blocks capable of being effectively read in the backup tape can be used as the metadata blocks of the encoding tape, and the number of times of repeated reading of the data blocks with the same original data is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, more particularly, to a strip conversion method and device. BACKGROUND

[0002] In a distributed storage system, according to the data storage mode, the strip can be divided into two kinds of backup system and coding system. In order to ensure the correct conversion of the backup system strip to the coding system strip, a plurality of groups of metadata blocks are set in the backup system strip, and the original data of each group of metadata blocks is the same. Taking 3 groups of metadata blocks as an example, the distribution is shown in the following table 1:

[0003]

[0004] Table 1

[0005] At present, each metadata block is marked with a health value, which indicates whether the original data of the metadata block is valid. When converting the backup system strip to the coding system strip, the group health value of each group of metadata blocks is taken as the basis. Taking group 1 as an example, when the health value of all metadata blocks in group 1 is 1, the group health value of group 1 is 1. Once there is a metadata block with a health value of 0 in group 1, the group health value of group 1 is 0. Specifically, the original data of a group of metadata blocks with a group health value of 1 is read, and then copied and coded. If one metadata block in a group of metadata blocks fails to read, the group of metadata blocks is discarded directly, and another group of metadata blocks with a group health value of 1 is read until the coding is completed.

[0006] Therefore, before the conversion of the coding system strip is successful, the data blocks with the same original data in the plurality of groups of metadata blocks will be read repeatedly, resulting in the IO overhead of the system and reducing the performance of the system. SUMMARY

[0007] Therefore, in order to solve the above problems, the present application provides a strip conversion method and device. The technical scheme is as follows:

[0008] A strip conversion method, the method comprising:

[0009] Obtaining a backup system strip to be converted; wherein the backup system strip to be converted comprises a plurality of groups of metadata blocks, each metadata block in each group of metadata blocks is marked with a health value, and the health value represents whether the original data of a metadata block is valid;

[0010] Determining a plurality of first metadata blocks with the same original data from the plurality of groups of metadata blocks;

[0011] determining a group health value of each group of the first metadata blocks according to the health values marked by each of the first metadata blocks in the group, the group health value representing whether the raw data of the group of the first metadata blocks is valid, and the raw data of the group of the first metadata blocks being valid if the raw data of one of the first metadata blocks in the group is valid;

[0012] reading the raw data of the first metadata blocks in each group of the first metadata blocks whose health values represent validity in a case that the group health values of each group of the first metadata blocks all represent validity;

[0013] writing the raw data of each group of the first metadata blocks read into a corresponding blank data block to obtain a second metadata block of the encoding strip, and writing the encoding result of the raw data in the second metadata blocks into the blank data block to obtain the encoding data block of the encoding strip.

[0014] Preferably, the determining of the group health value of each group of the first metadata blocks according to the health values marked by each of the first metadata blocks in the group comprises:

[0015] calculating the sum of the health values marked by each of the first metadata blocks in each group of the first metadata blocks;

[0016] judging whether the sum of the health values corresponding to the group of the first metadata blocks is greater than 0;

[0017] if greater than 0, the group health value of the group of the first metadata blocks is 1, and 1 represents that the raw data of the group of the first metadata blocks is valid;

[0018] if not greater than 0, the group health value of the group of the first metadata blocks is 0, and 0 represents that the raw data of the group of the first metadata blocks is invalid.

[0019] Preferably, the method further comprises, after the reading of the raw data of the first metadata blocks in each group of the first metadata blocks whose health values represent validity:

[0020] marking the read first metadata blocks with a use state according to the reading result.

[0021] Preferably, the method further comprises:

[0022] deleting the first metadata blocks in the to-be-converted backup encoding strip whose use states represent non-use.

[0023] Preferably, the method further comprises:

[0024] determining that the to-be-converted backup encoding strip cannot be subjected to strip conversion in a case that the group health values of each group of the first metadata blocks do not all represent validity.

[0025] A strip conversion device, the device comprising:

[0026] an acquisition module, configured to acquire a to-be-converted backup strip; wherein the to-be-converted backup strip comprises a plurality of groups of metadata blocks, each metadata block in each group of metadata blocks is marked with a health value, and the health value represents whether the original data of a metadata block is valid;

[0027] a first determination module, configured to determine, from the plurality of groups of metadata blocks, a plurality of groups of first metadata blocks with the same original data;

[0028] a second determination module, configured to determine, according to the health value marked in each first metadata block in each group of first metadata blocks, a group health value of the group of first metadata blocks, the group health value represents whether the original data of a group of first metadata blocks is valid, and the original data of a group of first metadata blocks is valid when the original data of a first metadata block in the group of first metadata blocks is valid;

[0029] a reading module, configured to read, in a case where the group health value of each group of first metadata blocks represents validity, the original data of the first metadata block with the health value representing validity in each group of first metadata blocks;

[0030] a writing module, configured to write the original data of each group of first metadata blocks read into a corresponding blank data block to obtain a second metadata block of the encoded strip, and write the encoding result of the original data in the plurality of second metadata blocks into the blank data block to obtain an encoded data block of the encoded strip.

[0031] Preferably, the second determination module is specifically configured to:

[0032] calculate the sum of the health values marked in each first metadata block in each group of first metadata blocks, determine whether the sum of the health values corresponding to the group of first metadata blocks is greater than 0, if yes, the group health value of the group of first metadata blocks is 1, and 1 represents that the original data of the group of first metadata blocks is valid, and if no, the group health value of the group of first metadata blocks is 0, and 0 represents that the original data of the group of first metadata blocks is invalid.

[0033] Preferably, the reading module is further configured to:

[0034] mark the read first metadata block with a use state according to the reading result.

[0035] Preferably, the apparatus further comprises:

[0036] a deletion module, configured to delete the first metadata block with the use state representing non-use in the to-be-converted backup strip.

[0037] Preferably, the apparatus further comprises:

[0038] The third determining module is configured to determine that the to-be-converted backup strip cannot be converted in the case that the group health values of each group of the first metadata blocks do not all represent validity.

[0039] The strip conversion method and device provided by the present application can determine the first metadata blocks with the same original data from the multiple groups of metadata blocks of the to-be-converted backup strip, i.e., each column of metadata blocks with the same original data in Table 1 is regarded as a group; further, the group health value of each group is determined according to the health value marked by each first metadata block, i.e., the group health value of each column of metadata blocks in Table 1 is determined by the health value of each metadata block in the column, and the group health value represents validity in the case that the health value of one of the metadata blocks in the column represents validity; finally, in the case that the group health values of each group of the first metadata blocks all represent validity, the original data of the first metadata block with the health value representing validity in each group is read and written into a corresponding blank data block to obtain a second metadata block of the encoded strip, and the encoding result of the original data in the multiple second metadata blocks is written into the blank data block to obtain the encoded data block of the encoded strip, so that the multiple second metadata blocks and the encoded data block form the encoded strip.

[0040] Based on the present application, the metadata block capable of being effectively read in the backup strip can be used as the metadata block of the encoded strip, the number of times of repeated reading of the data block with the same original data is reduced, the IO overhead of the system is reduced, and the system performance is improved. BRIEF DESCRIPTION OF DRAWINGS

[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description only constitute the embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor based on the provided drawings.

[0042] Figure 1 An example of the encoded strip;

[0043] Figure 2 A method flowchart of the strip conversion method provided by the embodiment of the present application;

[0044] Figure 3 A part of the method flowchart of the strip conversion method provided by the embodiment of the present application;

[0045] Figure 4 A structure schematic diagram of the strip conversion device provided by the embodiment of the present application. DETAILED DESCRIPTION

[0046] With reference to the accompanying drawings, the technical solutions in the embodiments of the present application will be clearly and completely described below, obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all the other embodiments obtained by those skilled in the art without creative efforts belong to the scope of the present application.

[0047] For the convenience of understanding, first, the concept of encoding storage is introduced:

[0048] Disk striping: when multiple processes access the disk at the same time, disk conflicts will occur. Most disk systems have restrictions on the number of accesses (I / O operations per second) and data transfer rates (amount of data transferred per second). When these limits are reached, the processes that need to access the disk later have to wait, which is called disk conflict. Disk striping refers to using striping technology to divide a continuous piece of data into many small parts and store them on different disks.

[0049] Data block: a data block is a group of records arranged in order and continuity, which is a data unit for transmission between main memory and input / output devices or external memory. There are three ways to correspond between the physical record of data and the logical record of data (logically related, occupying a group of adjacent units of data on the memory): ① one block is one record; ② one block contains several logical records; ③ one logical record occupies several blocks. The size of the data block can be fixed or variable, and there is a gap between blocks. The design of the data block size is influenced by many factors, including input / output efficiency, storage space cost, and computer application characteristics, etc.

[0050] Each data block has a corresponding index node, and the index node stores the index number of the data block. The file system reads the data of the data block according to the index number.

[0051] Backup system: a way of data storage, at least two data blocks in a strip, one of which stores metadata, and the other is a mirror of the data block. If there are more than 2 data blocks, the excess data blocks are also a mirror of the metadata block data.

[0052] Encoding system: the data processing method of the encoding system is to reduce the space occupancy rate of 1:n (n>=1, that is, one metadata, at least one mirror corresponding to it) storage in the backup system, and reduce the hardware cost, so the encoding system generally uses 2:1, that is, metadata is 2, and encoded data is 1.

[0053] More clearly: assuming that two data blocks are used to store metadata, then one data block can be used to store the encoded data of the metadata, the occupancy ratio of metadata and encoded data is 2:1, that is, metadata uses 2 / 3 of the storage space. In the backup system, the 1:1 metadata and mirror is 50% of the metadata dominant ratio. So it can be seen that the encoding system is to save hardware cost.

[0054] Further, taking the backup system band shown in Table 1 as an example, the backup system band is described:

[0055] The storage mode of the encoding system data is original data + encoded data, and the data block of the encoding system band is also the metadata block storing the original data + the encoded data block storing the encoded data. In order to save storage space, the data of the encoding system is generally stored with 150% redundancy; and the data storage of the backup system is at least 200% storage scheme in order to ensure safety, and 300% storage scheme is generally used in the market. Taking 150% redundancy as an example, in order to convert the data of the backup system into the data of the encoding system to reduce the storage space of the data, while not reducing the safety of the storage, 4+2, 8+4, 6+3 and other storage schemes are used here.

[0056] The backup system band is stored according to the number of metadata blocks in the encoding system band, that is, the metadata blocks in the backup system band are converted into the metadata blocks of the encoding system band, and the encoded data blocks in the encoding system band are obtained by encoding the metadata blocks. The following is an example of 4+2 storage mode to describe the encoding system band, see Table 2. Figure 1 4 represents 4 metadata blocks (i.e. block 1~block 4) in the encoding system band, 2 represents 2 encoded data blocks (i.e. block 5~block 6) in the encoding system band, and the size of each data block is the same. Assuming that the size of each data block is 4M, the data amount of the metadata block is 16M, and the data amount of the encoded data block is 8M.

[0057] In order to ensure the correct conversion of the backup system band to the encoding system band, the number of metadata blocks in each group of the backup system band is consistent with the number of metadata blocks in the encoding system band, which is 4. Continue to refer to Table 1, one group of metadata blocks of the backup system band corresponds to the metadata blocks of the encoding system band, groups 1~3 are 3 groups of backup data of the backup system band, and the original data of groups 1, 2 and 3 are completely the same. The original data of the metadata blocks in each group is continuous, that is, data blocks *1, *2, *3 and *4 (where * represents 1 / 2 / 3 in the column) are an ordered set. In addition, the original data of metadata block *1 is completely the same, corresponding to block 1 of the encoding system band; the original data of metadata block *2 is completely the same, corresponding to block 2 of the encoding system band; the original data of metadata block *3 is completely the same, corresponding to block 3 of the encoding system band; and the original data of metadata block *4 is completely the same, corresponding to block 4 of the encoding system band.

[0058] The embodiment of the present application provides a strip conversion method for converting a backup strip into a coding strip, a method flow chart of the method is as shown in the figure, and the method comprises the following steps. Figure 2

[0059] S10, obtaining a backup strip to be converted; wherein the backup strip to be converted comprises a plurality of groups of metadata blocks, each metadata block in each group of metadata blocks is marked with a health value, and the health value represents whether the original data of a metadata block is valid.

[0060] In the embodiment, the backup strip is still taken as an example for description in table 1 for the convenience of understanding.

[0061] The backup strip comprises three groups of metadata blocks, and each of data blocks *1, *2, *3 and *4 in each group of metadata blocks is marked with a health value representing whether the original data of the data block is valid. Taking data block *1 as an example, the health value of the data block can be determined when the original data of the data block is stored in the corresponding disk, if the original data is successfully stored, the health value represents that the data block is valid, otherwise, the health value represents that the data block is invalid. Specifically, the health value 1 represents validity, and the health value 0 represents invalidity.

[0062] S20, determining a plurality of first metadata blocks with the same original data from the plurality of groups of metadata blocks.

[0063] In the embodiment, the backup strip is still taken as an example for description in table 1 for the convenience of understanding.

[0064] The original data of metadata block *1 in the backup strip is completely same, the original data of metadata block *2 is completely same, the original data of metadata block *3 is completely same, and the original data of metadata block *4 is completely same, so metadata blocks 11, 21 and 31 can be taken as a group of first metadata blocks, metadata blocks 12, 22 and 32 can be taken as a group of first metadata blocks, metadata blocks 13, 23 and 33 can be taken as a group of first metadata blocks, and metadata blocks 14, 24 and 34 can be taken as a group of first metadata blocks.

[0065] In the following, each metadata block in a group of first metadata blocks is referred to as a first metadata block, for example, metadata block 11 in a group of first metadata blocks is first metadata block 11, metadata block 21 is first metadata block 21, and metadata block 31 is first metadata block 31.

[0066] ​S30, determining a group health value of the group of first metadata blocks according to the health values marked by each of the first metadata blocks in the group of first metadata blocks, the group health value representing whether the original data of the group of first metadata blocks is valid, and the original data of the group of first metadata blocks being valid if the original data of one of the first metadata blocks in the group of first metadata blocks is valid.

[0067] In this embodiment, for the convenience of understanding, the backup strip shown in Table 1 is taken as an example to illustrate the backup strip:

[0068] There are four groups of first metadata blocks in the backup strip, namely *1, *2, *3 and *4. Taking one of the groups of first metadata blocks *1, i.e., the first metadata blocks 11, 21 and 31, as an example to illustrate the process of determining the group health value:

[0069] First, the health values marked by the first metadata blocks 11, 21 and 31 respectively are obtained, and since the health value 1 represents valid and the health value 0 represents invalid, it can be determined whether all the three health values are 0. If not, it indicates that there is a first metadata block with valid original data in the first metadata blocks 11, 21 and 31, that is, the part of the original data corresponding to the block 1 in the encoding strip is valid, and at this time the group health value of the group of first metadata blocks is set to 1; if all are 0, it indicates that there is no first metadata block with valid original data in the first metadata blocks 11, 21 and 31, that is, the part of the original data corresponding to the block 1 in the encoding strip is invalid and cannot be used, and at this time the group health value of the group of first metadata blocks is set to 0.

[0070] In some other embodiments, the step S30 of "determining a group health value of the group of first metadata blocks according to the health values marked by each of the first metadata blocks in the group of first metadata blocks" can adopt the following steps, and a part of the method flow chart is shown as follows: Figure 3

[0071] S301, calculating the sum of the health values marked by each of the first metadata blocks in the group of first metadata blocks.

[0072] S302, determining whether the sum of the health values corresponding to the group of first metadata blocks is greater than 0; if yes, performing step S303; if not, performing step S304.

[0073] S303, the group health value of the group of first metadata blocks is 1, and 1 represents that the original data of the group of first metadata blocks is valid;

[0074] S304, the group health value of the group of first metadata blocks is 0, and 0 represents that the original data of the group of first metadata blocks is invalid.

[0075] ​In this embodiment, for the convenience of understanding, the backup strip is still taken as an example to be explained as shown in Table 1:

[0076] There are four groups of first metadata blocks in the backup strip, namely *1, *2, *3 and *4. Taking one of the groups of first metadata blocks *1, i.e. first metadata blocks 11, 21 and 31, as an example to explain the process of determining the group health value:

[0077] First, the health values marked by the first metadata blocks 11, 21 and 31 respectively are obtained, and the sum of the three health values is calculated; further, it is judged whether the sum of the three health values is greater than 0; if the sum of the three health values is greater than 0, it indicates that there is a valid first metadata block of the original data in the first metadata blocks 11, 21 and 31, that is, the part of the original data corresponding to block 1 in the encoding strip is valid, at this time, the group health value of the group of first metadata blocks is set to 1; if the sum of the three health values is not greater than 0 (i.e. equal to 0), it indicates that there is no valid first metadata block of the original data in the first metadata blocks 11, 21 and 31, that is, the part of the original data corresponding to block 1 in the encoding strip is invalid and cannot be used, at this time, the group health value of the group of first metadata blocks is set to 0.

[0078] S40, in the case that the group health value of each group of first metadata blocks indicates validity, reading the original data of the first metadata block with the health value indicating validity in each group of first metadata blocks.

[0079] In this embodiment, the group health value of each group of first metadata blocks indicates validity, which indicates that each part of the original data in the backup strip to be converted is valid and the strip is intact and not damaged. Further, the original data of the first metadata block with the health value of 1 can be read from each group of first metadata blocks.

[0080] In this embodiment, for the convenience of understanding, the backup strip is still taken as an example to be explained as shown in Table 1:

[0081] There are four groups of first metadata blocks in the backup strip, namely *1, *2, *3 and *4. Taking one of the groups of first metadata blocks *1, i.e. first metadata blocks 11, 21 and 31, as an example to explain the process of reading the part of the original data:

[0082] Assuming that the health value of the first metadata block 11 is 1, the health value of the first metadata block 21 is 0, and the health value of the first metadata block 31 is 1, the group health value of the group of first metadata blocks is 1: assuming that the original data of the first metadata block 11 is read first, the disk corresponding to the first metadata block 11 is specifically linked, the disk content is read into the memory, and if the reading is successful, it indicates that the corresponding part of the original data of the group of first metadata blocks is read successfully, and at the same time, in order to facilitate the user to find the data source, the use state of the first metadata block 11 is marked as "in use"; if the reading fails due to reasons such as network exception, the use state of the first metadata block 11 is marked as "unused", and a new first metadata block is selected to read data. Since the health value of the first metadata block 21 is 0, the valid original data cannot be read, and the use state of the first metadata block 21 is marked as "unused".

[0083] The original data stored in the memory of the disk corresponding to the first metadata block 31 is continuously read into the memory; if the reading is successful, the use state of the first metadata block 11 is marked as "in use"; if the reading fails, it indicates that the corresponding part of the original data of the group of first metadata blocks fails to be read, and the to-be-converted backup striped tape is damaged and cannot be converted into an encoded striped tape, so there is no need to read other groups of first metadata blocks.

[0084] It should be noted that in the case where the group health value of each group of first metadata blocks is not uniform, it is determined that the to-be-converted backup striped tape cannot be converted into a striped tape. At this time, a prompt information can be generated to remind the user to repair the to-be-converted backup striped tape.

[0085] S50, the original data of each group of first metadata blocks read is written into a corresponding blank data block to obtain a second metadata block of the encoded striped tape, and the encoding result of the original data in the plurality of second metadata blocks is written into the blank data block to obtain the encoding data block of the encoded striped tape.

[0086] In this embodiment, for the convenience of understanding, the backup striped tape shown in Table 1 is taken as an example to illustrate the backup striped tape:

[0087] There are four groups of first metadata blocks in the backup striped tape, namely *1, *2, *3 and *4. After step S40, the original data corresponding to the four groups of first metadata blocks respectively exists in the memory, at this time, the original data corresponding to each group can be copied into a blank data block (i.e. a data block with a flag of 0 and not used by other data) in the data block management pool in turn according to the order of the four groups of first metadata blocks, the disk corresponding to the blank data block is specifically linked, and the original data is written into the disk, so as to obtain the metadata blocks of the encoded striped tape-block 1~block 4.

[0088] Taking the 4+2 storage mode as an example, that is, the encoded striped tape has 4 metadata blocks and 2 encoding data blocksFigure 1 The original data of the block 1~block 4 is encoded to obtain the encoded data of the block 5 and the encoded data of the block 6, and the encoded data of the block 5 and the encoded data of the block 6 are sequentially copied to a blank data block in the data block management pool, and are specifically linked to a disk corresponding to the blank data block and written into the disk, so that the encoded data block of the encoding strip, the block 5~block 6, is obtained.

[0089] It should be noted that if the disk fails to write the blank data block, it means that there is a problem such as network exception, switch, etc. in the blank data block, at this time, the blank data block is marked as an abnormal state, and a new blank data block is allocated from the data block management pool for writing the original data / encoded data.

[0090] When all the original data and the encoded data are written, the four metadata blocks of the encoding strip and the two encoded data blocks are generated, at this time, the encoding strip is generated according to the order of the block 1~block 6.

[0091] Further, after the encoding strip is generated, the encoding strip can be replaced by the to-be-converted backup strip, specifically, the identification of the encoding strip is replaced by the identification of the to-be-converted backup strip, after the replacement is completed, the encoding strip represents the strip being used in the system, and the to-be-converted backup strip can be recycled for other strips, specifically, the first metadata block representing unused state in the to-be-converted strip can be deleted.

[0092] In the embodiment, the backup strip is described by taking the backup strip shown in Table 1 as an example for convenience of understanding.

[0093] Suppose that the usage states of the first metadata block 11, the first metadata block 22, the first metadata block 33 and the first metadata block 34 are "in use", that is, the original data is used by the encoding strip, then the other first metadata blocks except the above four first metadata blocks can be cleaned and set to initialization 0, indicating no usage state.

[0094] The strip conversion method provided in the embodiment can use the metadata block that can be effectively read in the backup strip as the metadata block of the encoding strip, so that the number of times of repeated reading of the same data block of the original data is reduced, the IO overhead of the system is reduced, and the system performance is improved.

[0095] Based on the strip conversion method provided in the above embodiment, the embodiment of the present application further provides a device for executing the above strip conversion method, and a structure diagram of the device is shown in Figure 4 The device comprises:

[0096] The acquisition module 10 is configured to acquire a backup tape to be converted, wherein the backup tape to be converted comprises a plurality of groups of metadata blocks, each metadata block in each group of metadata blocks is marked with a health value, and the health value represents whether the original data of a metadata block is valid.

[0097] The first determination module 20 is configured to determine, from the plurality of groups of metadata blocks, a plurality of first metadata blocks with the same original data.

[0098] The second determination module 30 is configured to determine, according to the health value marked on each first metadata block in each group of first metadata blocks, a group health value of the group of first metadata blocks, the group health value represents whether the original data of the group of first metadata blocks is valid, and the original data of the group of first metadata blocks is valid when the original data of a first metadata block in the group of first metadata blocks is valid.

[0099] The reading module 40 is configured to read, when the group health value of each group of first metadata blocks represents valid, the original data of the first metadata block with the health value representing valid in each group of first metadata blocks.

[0100] The writing module 50 is configured to write the original data of each group of first metadata blocks read into a corresponding blank data block to obtain a second metadata block of the encoded tape, and write the encoding result of the original data in the plurality of second metadata blocks into the blank data block to obtain an encoded data block of the encoded tape.

[0101] Optionally, the second determination module 30 is specifically configured to:

[0102] calculate the sum of the health values marked on each first metadata block in each group of first metadata blocks, determine whether the sum of the health values corresponding to the group of first metadata blocks is greater than 0, if the sum is greater than 0, the group health value of the group of first metadata blocks is 1, and 1 represents that the original data of the group of first metadata blocks is valid, and if the sum is not greater than 0, the group health value of the group of first metadata blocks is 0, and 0 represents that the original data of the group of first metadata blocks is invalid.

[0103] Optionally, the reading module 40 is further configured to:

[0104] mark the read first metadata block with a use state according to the reading result.

[0105] Optionally, the apparatus further comprises:

[0106] The deletion module is configured to delete the first metadata block with the use state representing non-use in the backup tape to be converted.

[0107] Optionally, the apparatus further comprises:

[0108] The third determining module is configured to determine that the backup strip cannot be converted into a strip in the case that the group health values of each group of the first metadata blocks do not represent validity.

[0109] The strip conversion device provided by the embodiment of the present application can use the metadata blocks capable of being effectively read in the backup strip as the metadata blocks of the encoding strip, so that the number of times of repeated reading of the same data blocks of the original data is reduced, the IO overhead of the system is reduced, and the system performance is improved.

[0110] The above describes in detail the strip conversion method and device provided by the present application, and the principles and implementation manners of the present application are described by using specific examples. The above embodiment is only used to help understand the method of the present application and the core idea thereof. Meanwhile, for those skilled in the art, the specific implementation manners and application ranges can be changed according to the idea of the present application. In conclusion, the content of the specification should not be understood as a limitation of the present application.

[0111] It should be noted that each embodiment in the specification is described in a progressive manner, and each embodiment mainly describes the differences from other embodiments. The same or similar parts of each embodiment can be understood by referring to each other. For the device disclosed in the embodiments, the description is relatively simple because it corresponds to the method disclosed in the embodiments. The relevant parts can be understood by referring to the description of the method.

[0112] It should also be noted that the relationship terms such as first and second in the specification are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between the entities or operations. Moreover, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device inherently includes a series of elements, or further includes the elements inherent in the process, method, article or device. Without more limitations, the element defined by the statement "including a" does not exclude the presence of another identical element in the process, method, article or device including the element.

[0113] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A strip conversion method, characterized in that, The method includes: Obtain the backup strip to be converted; wherein, the backup strip to be converted includes multiple sets of metadata blocks, and each metadata block in each set of metadata blocks is marked with a health value, the health value indicating whether the original data of a metadata block is valid; From the multiple sets of metadata blocks, determine the first metadata block that is identical to the original data in multiple sets of metadata blocks; The group health value of the first metadata block is determined based on the health value marked by each first metadata block in each group. The group health value indicates whether the original data of a group of first metadata blocks is valid, and the original data of the group of first metadata blocks is valid if the original data of one first metadata block in a group is valid. If the group health value of each group of first metadata blocks indicates that the group is valid, read the original data of the first metadata block in each group whose health value indicates that the group is valid. The original data of each group of first metadata blocks is written into a corresponding blank data block to obtain a second metadata block of the encoded stripe, and the encoding results of the original data in multiple second metadata blocks are written into the blank data block to obtain the encoded data block of the encoded stripe.

2. The method according to claim 1, characterized in that, The step of determining the group health value of the first metadata blocks in each group based on the health value marked by each first metadata block includes: Calculate the sum of the health values ​​marked in each first metadata block within each group; Determine if the sum of the health values ​​corresponding to the first data block in this group is greater than 0; If it is greater than 0, the group health value of the first metadata block of the group is 1, and 1 indicates that the original data of the first metadata block of the group is valid; If the value is not greater than 0, the group health value of the first metadata block of the group is 0, and 0 indicates that the original data of the first metadata block of the group is invalid.

3. The method according to claim 1, characterized in that, After reading the original data of the first metadata block in each group, which represents the valid first metadata block based on the health value, the process further includes: The usage status is marked on the first metadata block read based on the read results.

4. The method according to claim 3, characterized in that, The method further includes: Delete the first metadata block that is not used in the status representation of the backup strip to be converted.

5. The method according to claim 1, characterized in that, The method further includes: If the group health value of the first metadata block in each group is not uniform, indicating that the stripe to be converted cannot be converted.

6. A strip conversion device, characterized in that, The device includes: The acquisition module is used to acquire the backup strip to be converted; wherein, the backup strip to be converted includes multiple sets of metadata blocks, and each metadata block in each set of metadata blocks is marked with a health value, the health value indicating whether the original data of a metadata block is valid; The first determining module is used to determine, from the multiple sets of metadata blocks, a first metadata block that is identical to multiple sets of original data; The second determining module is used to determine the group health value of the first metadata blocks in each group based on the health value marked by each first metadata block in each group. The group health value represents whether the original data of a group of first metadata blocks is valid, and the original data of the group of first metadata blocks is valid if the original data of one first metadata block in a group of first metadata blocks is valid. The read module is used to read the original data of the first metadata block in each group where the health value indicates that the group health value is valid, provided that the group health value of each first metadata block indicates that the group health value is valid. The writing module is used to write the original data of each group of first metadata blocks into a corresponding blank data block to obtain a second metadata block of the encoded stripe, and to write the encoding result of the original data in multiple second metadata blocks into a blank data block to obtain the encoded data block of the encoded stripe.

7. The apparatus according to claim 6, characterized in that, The second determining module is specifically used for: Calculate the sum of the health values ​​marked by each first metadata block in each group; determine whether the sum of the health values ​​corresponding to the first metadata blocks in the group is greater than 0; if it is greater than 0, the group health value of the first metadata blocks in the group is 1, and 1 indicates that the original data of the first metadata blocks in the group is valid; If the value is not greater than 0, the group health value of the first metadata block of the group is 0, and 0 indicates that the original data of the first metadata block of the group is invalid.

8. The apparatus according to claim 6, characterized in that, The reading module is also used for: The usage status is marked on the first metadata block read based on the read results.

9. The apparatus according to claim 8, characterized in that, The device further includes: The deletion module is used to delete the first metadata block that is not used in the status representation of the backup strip to be converted.

10. The apparatus according to claim 6, characterized in that, The device further includes: The third determining module is used to determine that the backup stripe to be converted cannot be converted if the group health value of each group of first metadata blocks is not uniformly characterized as valid.

Citation Information

Patent Citations

  • Safe data deleting method and system based on erasure codes

    CN104484126A

  • Distributed type encoding method based on dynamic band configuration

    CN105302500A