Disk array level migration method and device and electronic equipment

By backing up and performing parallel-level migration in the second area of ​​the disk array, the problems of data loss and migration efficiency in the prior art are solved, and higher data security and migration efficiency are achieved.

CN119861878APending Publication Date: 2025-04-22SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD

Patent Information

Application Number
CN202510336094.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-21
Publication Date
2025-04-22

AI Technical Summary

Technical Problem

Existing disk array-level migration methods cannot protect data under abnormal conditions such as unexpected power failure, pose a risk of data loss, and cannot continue to perform level migration after the storage device returns to normal state, resulting in poor data security and low level migration efficiency.

Method used

By determining the size of the fixed-length area and backing up the data to be migrated in the second area of ​​the disk array based on the size, the stripes of the second area are enabled for parallel-level migration, and finally updating the data to be migrated in the first area.

Benefits of technology

It effectively solves the problem of data loss caused by accidental power failure or other failures during disk array-level migration, improves data security, and improves migration efficiency through parallel-level migration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119861878A_ABST
    Figure CN119861878A_ABST
Patent Text Reader

Abstract

The invention provides a disk array level migration method and device and electronic equipment. Relates to the technical field of level migration. The method comprises the following steps: determining the size of a fixed-length region; the size of the fixed-length area is related to attribute information of the disk array; the disk array comprises a plurality of stripes; determining to-be-migrated data in a first region of the disk array based on the size of the fixed-length region; backing up the data to be migrated to a second area of the disk array; the second area is started under the condition that the to-be-migrated data is backed up; performing level migration on the to-be-migrated data in the stripes of the second area in a parallel mode to obtain target migration data; and based on the target migration data, updating the to-be-migrated data in the first area. Through the method and the device, the data security can be improved, and the efficiency of level migration can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of level migration, and in particular to a disk array level migration method, device and electronic device. Background Art

[0002] In the existing disk array level migration method, the disk array level migration is performed using a storage device. In the event of an abnormal situation such as an unexpected power failure, the data in the level migration process cannot be protected, resulting in the risk of data loss. Moreover, after the storage device returns to normal, the level migration cannot be continued. The existing disk array level migration method has the problems of poor data security and low level migration efficiency. Summary of the invention

[0003] Embodiments of the present application provide a disk array level migration method, device, and electronic device.

[0004] According to the first aspect of the present application, a disk array level migration method is provided, the method comprising: determining a fixed-length area size; the fixed-length area size is related to attribute information of the disk array; the disk array comprises a plurality of stripes; based on the fixed-length area size, determining the data to be migrated in the first area of ​​the disk array; backing up the data to be migrated to the second area of ​​the disk array; enabling the second area when backing up the data to be migrated; migrating the data to be migrated in the stripes of the second area in a parallel manner to obtain target migration data; and updating the data to be migrated in the first area based on the target migration data.

[0005] According to one embodiment of the present application, determining the fixed-length region size includes: obtaining attribute information of the disk array; the attribute information includes at least the number of disks in the disk array and the stripe size of the stripes in the disk array; based on the number of disks and the stripe size, calculating the fixed-length region size.

[0006] According to one embodiment of the present application, after determining the fixed-length area size, the method further includes: determining a data backup location in the second area based on the fixed-length area size; the first area includes at least one stripe; the number of stripes included in the second area is the same as the number of stripes in the first area; the data backup location represents the storage location of the backed-up data to be migrated in the stripes of the second area.

[0007] According to one embodiment of the present application, determining the data to be migrated in the first area of ​​the disk array includes: determining a starting migration position in the first area; determining an ending migration position in the first area based on the fixed-length area size and the starting migration position; determining the data between the starting migration position and the ending migration position in the first area as the data to be migrated; marking the determined starting migration position and ending migration position to obtain position marking information; and storing the position marking information in a non-volatile storage medium.

[0008] According to one embodiment of the present application, after updating the data to be migrated in the first area based on the target migration data, the method further includes: determining a second starting migration position and a second ending migration position based on the size of the fixed-length area, the starting migration position and the ending migration position; and determining the data between the second starting migration position and the second ending migration position in the first area as the next data to be migrated.

[0009] According to one embodiment of the present application, backing up the data to be migrated to the second area of ​​the disk array includes: determining the stripes in which the data to be migrated is distributed in the first area; determining the starting logical block position and the ending logical block position of each stripe within the range of the data to be migrated; based on the starting logical block position and the ending logical block position, backing up the data to be migrated in each stripe to the second area respectively; in response to the completion of the stripe backup, determining the backup mark information corresponding to the stripe and storing the backup mark information to a non-volatile storage medium.

[0010] According to one embodiment of the present application, the method also includes: in response to a restart event of the disk array, obtaining position mark information and backup mark information from a non-volatile storage medium; when the backup mark information satisfies a set first condition, performing level migration in parallel on the data backed up in the stripes of the second area to obtain target migration data; when the backup mark information does not satisfy the first condition, backing up the data to be migrated corresponding to the position mark information to the second area of ​​the disk array; wherein the first condition includes that the backup mark information indicates that all the data to be migrated corresponding to the position mark information has been backed up to the second area of ​​the disk array.

[0011] According to a second aspect of the present application, a disk array level migration device is provided, the device comprising: a calculation module for determining a fixed-length region size; the fixed-length region size is related to attribute information of the disk array; the disk array comprises a plurality of stripes; a determination module for determining the data to be migrated in a first region of the disk array based on the fixed-length region size; a backup module for backing up the data to be migrated to a second region of the disk array; the second region is enabled when the data to be migrated is backed up; a level migration module for performing level migration on the data to be migrated in the stripes of the second region in parallel to obtain target migration data; and an update module for updating the data to be migrated in the first region based on the target migration data.

[0012] According to one embodiment of the present application, the calculation module is used to: obtain attribute information of the disk array; the attribute information includes at least the number of disks in the disk array and the stripe size of the stripes in the disk array; based on the number of disks and the stripe size, calculate the fixed-length area size.

[0013] According to one embodiment of the present application, the determination module is also used to: determine a data backup location in the second area based on the size of the fixed-length area; the first area includes at least one stripe; the number of stripes included in the second area is the same as the number of stripes in the first area; the data backup location represents the storage location of the backed-up data to be migrated in the stripe of the second area.

[0014] According to one embodiment of the present application, the determination module is used to: determine the starting migration position in the first area; determine the ending migration position in the first area based on the fixed-length area size and the starting migration position; determine the data between the starting migration position and the ending migration position in the first area as the data to be migrated; mark the determined starting migration position and ending migration position to obtain position mark information; and store the position mark information in a non-volatile storage medium.

[0015] According to one embodiment of the present application, the determination module is also used to: determine the second starting migration position and the second ending migration position based on the size of the fixed-length region, the starting migration position and the ending migration position; and determine the data between the second starting migration position and the second ending migration position in the first region as the next data to be migrated.

[0016] According to one embodiment of the present application, the backup module is used to: determine the stripes in which the data to be migrated is distributed in the first area; determine the starting logical block position and the ending logical block position of each stripe within the range of the data to be migrated; based on the starting logical block position and the ending logical block position, back up the data to be migrated in each stripe to the second area respectively; in response to the completion of the stripe backup, determine the backup mark information corresponding to the stripe and store the backup mark information to a non-volatile storage medium.

[0017] According to one embodiment of the present application, the device also includes a recovery module, which is used to: in response to a restart event of the disk array, obtain position mark information and backup mark information from a non-volatile storage medium; when the backup mark information satisfies a set first condition, perform level migration on the data backed up in the stripes of the second area in parallel to obtain target migration data; when the backup mark information does not meet the first condition, back up the data to be migrated corresponding to the position mark information to the second area of ​​the disk array; wherein the first condition includes that the backup mark information indicates that all data to be migrated corresponding to the position mark information have been backed up to the second area of ​​the disk array.

[0018] According to a third aspect of the present application, an electronic device is provided, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in the present application.

[0019] The method of the embodiment of the present application determines the size of a fixed-length region; the size of the fixed-length region is related to the attribute information of a disk array; the disk array includes multiple stripes; based on the size of the fixed-length region, determines the data to be migrated in the first region of the disk array; backs up the data to be migrated to the second region of the disk array; the second region is enabled when the data to be migrated is backed up; the data to be migrated in the stripes of the second region are migrated in parallel to obtain target migration data; based on the target migration data, the data to be migrated in the first region is updated. In this way, data security can be improved and the efficiency of level migration can be improved.

[0020] It should be understood that the teachings of the present application are not required to achieve all of the beneficial effects described above, but specific technical solutions can achieve specific technical effects, and other embodiments of the present application can also achieve beneficial effects not mentioned above. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present application will become readily understood. In the accompanying drawings, several embodiments of the present application are shown in an exemplary and non-limiting manner, wherein: In the drawings, the same or corresponding reference numerals represent the same or corresponding parts.

[0022] Figure 1 The schematic diagram shows the processing flow of the disk array level migration method provided by the embodiment of the present application. Figure 1 ; Figure 2 The schematic diagram shows the processing flow of the disk array level migration method provided by the embodiment of the present application. Figure 2 ; Figure 3 The schematic diagram shows the processing flow of the disk array level migration method provided by the embodiment of the present application. Figure 3 ; Figure 4 The schematic diagram shows the processing flow of the disk array level migration method provided by the embodiment of the present application. Figure 4 ; Figure 5 The schematic diagram shows the processing flow of the disk array level migration method provided by the embodiment of the present application. Figure 5 ; Figure 6 The schematic diagram shows the processing flow of the disk array level migration method provided by the embodiment of the present application. Figure 6 ; Figure 7 An application scenario diagram of the disk array level migration method provided in an embodiment of the present application is shown; Figure 8 Another application scenario diagram of the disk array level migration method provided in an embodiment of the present application is shown; Fig. 9 Another application scenario diagram of the disk array level migration method provided in the embodiment of the present application is shown; Fig.10 An optional schematic diagram of a disk array level migration device provided in an embodiment of the present application is shown; Fig.11 An optional schematic diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0023] In order to make the purpose, features, and advantages of the present application more obvious and easy to understand, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0024] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0025] In the following description, the terms "first\second" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0026] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0027] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.

[0028] RAID (Redundant Array of Independent Disks): is a data storage technology that combines multiple independent physical hard disks in a specific way to form a logical storage unit, thereby increasing the data read and write speed of the storage system and enhancing data redundancy to improve fault tolerance. Different RAID levels can achieve different performance and security goals.

[0029] RAID level migration refers to the process of changing an existing RAID configuration from one level to another, including upgrades from RAID0 to RAID5, RAID5 to RAID6, RAID0 to RAID5, RAID0 to RAID10, and downgrades from RAID10 to RAID0, RAID5 to RAID0, RAID6 to RAID5, RAID5 to RAID0, etc.

[0030] The processing flow of the disk array level migration method provided in the embodiment of the present application is described. Figure 1 , Figure 1 The following is a schematic diagram of the processing flow of the disk array level migration method provided in the embodiment of the present application. Figure 1 , will combine Figure 1 Steps S101-S105 are shown for explanation.

[0031] Step S101, determine the size of the fixed-length region; the size of the fixed-length region is related to the attribute information of the disk array; the disk array includes multiple stripes.

[0032] Step S102: determining the data to be migrated in the first area of ​​the disk array based on the size of the fixed-length area.

[0033] In some embodiments, the fixed-length region size may include: a storage region size of a fixed length pre-set in a disk array. The fixed-length region size may be determined based on the attribute information of the disk array. The disk array may include: a RAID. The disk array may include multiple stripes. A stripe may include: a collection of horizontal units on different disk partitions of the RAID. A stripe is a unit for organizing data blocks on different disk partitions of the RAID. The attribute information of the disk array may include: the number of disks of the disk array and the stripe size of the stripes in the disk array. The first area may include: a storage area in the RAID storing data to be migrated. The data to be migrated may include: data in the RAID waiting for RAID level migration.

[0034] Step S103, backing up the data to be migrated to the second area of ​​the disk array; the second area is enabled when backing up the data to be migrated.

[0035] In some embodiments, the second area may include: a reserved area of ​​RAID. The second area is enabled when backing up the data to be migrated, and the logical space of the second area is a data backup area used internally by RAID during level migration.

[0036] Step S104: Migrate the data to be migrated in the stripes of the second area in parallel to obtain target migration data.

[0037] As an example, determine the data in the three stripes of backup Stripe1, backup Stripe2 and backup Stripe3 in the second area of ​​the original RAID. Read data from backup Stripe1 for level migration to obtain the target migration data of Stripe1 of the new RAID; at the same time, read data from backup Stripe2 for level migration to obtain the target migration data of Stripe2 of the new RAID; at the same time, read data from backup Stripe3 for level migration to obtain the target migration data of Stripe3 of the new RAID.

[0038] Step S105: updating the data to be migrated in the first area based on the target migration data.

[0039] In some embodiments, parallelism may include, during the level migration process, data in multiple stripes are simultaneously level migrated. The target migration data may include: data obtained after the data to be migrated is migrated in parallel. The target migration data may be used to update the data to be migrated in the first area. Updating the data to be migrated in the first area may include: writing the target migration data into the first area to overwrite the data to be migrated in the first area.

[0040] As an example, the disk array may be a RAID 5 disk array composed of 3 disks, each of which has a capacity of 1TB and a stripe size of 64MB. According to the number of disks in the RAID 5 disk array and the stripe size of the stripes in the disk array, the fixed-length region size is determined to be 512MB. The first region of the RAID 5 disk array is the first 2TB space of the disk array. The second region of the RAID 5 disk array is the last 1TB space of the disk array. In the first region of the disk array, data to be migrated of 512MB in size is determined. Next, the determined data to be migrated is backed up to the second region of the disk array. After the backup is completed, the data to be migrated in the stripes of the second region is migrated from RAID5 to RAID6 in parallel, that is, the multiple 64MB stripes of the second region are migrated from RAID5 to RAID6 at the same time to obtain the target migration data of RAID6. Finally, the original 512MB of data to be migrated in the first region is replaced with the target migration data of RAID6.

[0041] The method of the embodiment of the present application backs up the data to be migrated to the second area through the fixed-length area backup method, effectively solving the problem of data loss caused by accidental power failure or other failures in the disk array during the level migration process, and improving data security. At the same time, the data to be migrated in the stripes of the second area can be migrated in parallel, which can make full use of disk resources, reduce the level migration time, and thus improve the efficiency of level migration.

[0042] In some embodiments, the processing flow of the disk array level migration method is shown as follows: Figure 2 ,like Figure 2 As shown, determining the size of the fixed-length region in step S101 may include: Step S201, obtaining attribute information of the disk array.

[0043] Step S202, based on the number of disks and the stripe size, calculate the size of the fixed-length area.

[0044] In this embodiment, the attribute information of the disk array may include: the number of disks in the disk array and the stripe size of the stripes in the disk array. The fixed-length region size may include: the stripe size that is an integer multiple of the number of disks in the RAID before level migration. Based on the number of disks and the stripe size, the fixed-length region size calculated can be expressed by the following formula: Fixed-length region size = number of disks in the RAID before migration × stripe size × a Wherein, a is a positive integer.

[0045] In some embodiments, after determining the size of the fixed-length area in step S101, the method further includes: determining a data backup location in the second area based on the size of the fixed-length area.

[0046] In this embodiment, the first area may include at least one stripe. The number of stripes included in the second area is the same as the number of stripes in the first area. The data backup position may represent the storage position of the backed-up data to be migrated in the stripes of the second area. The starting position of the data backup may be the starting position of the second area of ​​the RAID. The starting position of the second area is after the first area. The storage size corresponding to the data backup position is equal to the fixed-length area size.

[0047] In the embodiment of the present application, the fixed-length region size is calculated by obtaining the attribute information of the disk array, such as the number of disks and the stripe size. This ensures that the size of the fixed-length region matches the actual configuration of the disk array, improves the flexibility of level migration, can make full use of disk resources, and reduces the level migration time, thereby improving the efficiency of level migration. By calculating the fixed-length region size, the data to be migrated is backed up to the second region, which effectively solves the problem of data loss caused by accidental power failure or other failures of the disk array during the level migration process, and improves data security.

[0048] In some embodiments, the processing flow of the disk array level migration method is shown as follows: Figure 3 ,like Figure 3 As shown, determining the data to be migrated in the first area of ​​the disk array in step S102 may include: Step S301, determining a starting migration position in a first region.

[0049] Step S302: determining the end migration position in the first region based on the fixed-length region size and the start migration position.

[0050] Step S303: determine the data between the start migration position and the end migration position in the first area as data to be migrated.

[0051] In this embodiment, the starting migration position may include: the position where the level migration starts in the first area of ​​the disk array. The position where the level migration starts in the first area may include the starting lba (logical block address, logical address of the data block) of the first area. Specifically, the starting migration position may be LWM (Low Water Mark). The ending migration position may include: the position of the end level migration determined in the first area according to the size of the fixed-length area and the starting migration position. Specifically, the ending migration position may be HWM (High Water Mark). The ending migration position and the starting migration position can jointly determine the range of the data to be migrated. Specifically, the data between LWM and HWM is the data to be migrated.

[0052] Step S304: Mark the determined starting migration position and ending migration position to obtain position marking information.

[0053] Step S305: storing the position mark information in a non-volatile storage medium.

[0054] In this embodiment, the position marking information may include: information obtained after marking the determined starting migration position and ending migration position. The position marking information can be used to record the range of data to be migrated. The non-volatile storage medium may include: a storage medium that can still retain data in the event of a power outage. The non-volatile storage medium may specifically include: NAND flash memory and FLASH flash memory. The non-volatile storage medium may also include other non-volatile memories, which are not limited in the embodiments of the present application.

[0055] As an example, first in the first area of ​​RAID, the starting migration position is set to the logical address of the starting data block of the first area. During initialization, LWM and HWM are consistent, and both are the logical addresses of the starting data block. Based on the determined fixed-length area size and the starting migration position, the ending migration position is determined in the first area, and the ending migration position is obtained as the starting address plus the address offset corresponding to the fixed-length area size. The HWM is moved by the address offset corresponding to the fixed-length area size to obtain the logical address of the data block corresponding to the ending migration position. The data between LWM and HWM in the first area is determined as the data to be migrated. Based on the set marker, the address values ​​of the starting migration position and the ending migration position are recorded to obtain the position mark information, and the position mark information is stored in a non-volatile storage medium.

[0056] In the embodiment of the present application, the data to be migrated is backed up to the second area through the fixed-length area backup method, and the location mark information corresponding to the data to be migrated is stored in the non-volatile storage medium, so that during the data migration process, the data to be migrated can be quickly located and accessed, which effectively solves the problem of data loss caused by accidental power failure or other failures during the level migration of the disk array, and improves data security. At the same time, the data to be migrated in the stripes of the second area can be migrated in parallel, which can make full use of disk resources, reduce the level migration time, and thus improve the efficiency of level migration.

[0057] In some embodiments, the processing flow of the disk array level migration method is shown as follows: Figure 4 ,like Figure 4 As shown, in step S105, after updating the data to be migrated in the first area based on the target migration data, the disk array level migration method may further include: Step S401, determining a second starting migration position and a second ending migration position based on the size of the fixed-length region, the starting migration position and the ending migration position.

[0058] Step S402: determine the data between the second starting migration position and the second ending migration position in the first area as the next data to be migrated.

[0059] In this embodiment, after updating the data to be migrated in the first area based on the target migration data, the starting migration position and the ending migration position are moved by the address offset corresponding to the fixed-length area size to obtain the second starting migration position and the second ending migration position. The specific process of determining the data between the second starting migration position and the second ending migration position in the first area as the next data to be migrated is similar to the process of determining the data between the starting migration position and the ending migration position in the first area as the data to be migrated in step S303, and will not be repeated here.

[0060] As an example, taking the starting migration position as lba0, the ending migration position as lba20, and the address offset corresponding to the fixed-length area size as 20, the second starting migration position is determined to be the ending migration position plus 1, that is, lba21. Based on the fixed-length area size and the second starting migration position, the second ending migration position is determined to be lba41. Then, the data between the second starting migration position (lba21) and the second ending migration position (lba41) in the first area is determined as the next data to be migrated. After completing the level migration of the next data to be migrated, continue to determine the starting and ending positions of the next fixed-length area in the first area in the same way until all the data to be migrated in the first area have completed the level migration.

[0061] In the embodiment of the present application, after completing the migration of a fixed-length area, by determining the second starting migration position and the second ending migration position, the migration of the next fixed-length area is continued, which can quickly locate and access the data to be migrated, ensure the continuity and orderliness of the level migration, and improve data security. At the same time, the data to be migrated in the stripes of the second area can be migrated in parallel, which can make full use of disk resources, reduce the level migration time, and thus improve the efficiency of the level migration.

[0062] In some embodiments, the processing flow of the disk array level migration method is shown as follows: Figure 5 ,like Figure 5 As shown, backing up the data to be migrated to the second area of ​​the disk array in step S103 may include: Step S501: determine the stripes in which the data to be migrated is distributed in the first area.

[0063] Step S502: determine the starting logical block position and the ending logical block position of each stripe within the range of data to be migrated.

[0064] Step S503: based on the starting logical block position and the ending logical block position, back up the data to be migrated in each stripe to the second area respectively.

[0065] Step S504: in response to the stripe backup being completed, determine the backup mark information corresponding to the stripe and store the backup mark information in a non-volatile storage medium.

[0066] In this embodiment, each stripe is a specific storage area in the first area of ​​the disk array, and the data to be migrated can be stored in multiple stripes. The starting logical block position may include: the starting logical block address of the data to be migrated in a stripe. The ending logical block position may include: the ending logical block address of the data to be migrated in a stripe. The backup mark information may be used to identify whether the data to be migrated in the stripe has been successfully backed up to the second area. The data range to be migrated may include: the data range between the starting migration position and the ending migration position in the first area.

[0067] As an example, determine the stripes in which the data to be migrated is distributed in the first area, for example, the data to be migrated is distributed in the three stripes of Stripe1, Stripe2 and Stripe3 of the original RAID. Determine the starting logical block position and the ending logical block position of Stripe1 within the range of the data to be migrated. Determine the starting logical block position and the ending logical block position of Stripe2 within the range of the data to be migrated. Determine the starting logical block position and the ending logical block position of Stripe3 within the range of the data to be migrated. Based on the starting logical block position and the ending logical block position, back up the data to be migrated in each stripe to the second area respectively. For example, data is read from the starting logical block position to the ending logical block position of Stripe1, and the data of Stripe1 in the original RAID is backed up to the backup Stripe1 in the second area. In response to the completion of the backup of Stripe1, the backup status of Stripe1 is set to "completed", and the timestamp of the backup completion is recorded to obtain the backup mark information, and the backup mark information is stored in the non-volatile storage medium; at the same time, data is read from the starting logical block position to the ending logical block position of Stripe2, and the data of Stripe2 in the original RAID is backed up to the backup Stripe2 in the second area. In response to the completion of the backup of Stripe2, the backup status of Stripe2 is set to "completed", and the timestamp of the backup completion is recorded to obtain the backup mark information, and the backup mark information is stored in the non-volatile storage medium; at the same time, data is read from the starting logical block position to the ending logical block position of Stripe3, and the data of Stripe3 in the original RAID is backed up to the backup Stripe3 in the second area. In response to the completion of the Stripe3 backup, the backup status of Stripe3 is set to "completed", and the timestamp of the backup completion is recorded, the backup mark information is obtained, and the backup mark information is stored in a non-volatile storage medium. In the embodiment of the present application, the data to be migrated is backed up to the second area through the fixed-length area backup method, and the backup mark information corresponding to the data to be migrated is stored in the non-volatile storage medium, so that during the data migration process, the data to be migrated can be quickly located and accessed, effectively solving the problem of data loss caused by accidental power failure or other failures during the level migration of the disk array, and improving data security. At the same time, the data to be migrated in the stripes of the second area can be migrated in parallel, which can make full use of disk resources, reduce the level migration time, and thus improve the efficiency of level migration.

[0068] In some embodiments, the processing flow of the disk array level migration method is shown as follows: Figure 6 ,like Figure 6 As shown, the disk array level migration method may include: Step S601 , in response to a restart event of the disk array, obtaining position mark information and backup mark information from a non-volatile storage medium.

[0069] In this embodiment, the disk array restart event may include: RAID restart. RAID restart may cause a Write Hole problem. Write Hole means that if the RAID is powered off or restarted when updating the internal data of the stripe, some data in the stripe will be updated, but other data in the stripe will not be updated. Therefore, after the RAID restarts, the data in the stripe is incomplete and inconsistent.

[0070] Step S602a: when the backup mark information satisfies the set first condition, the data in the stripes backed up in the second area are migrated in parallel to obtain target migration data.

[0071] Step S602b: when the backup mark information does not satisfy the first condition, the to-be-migrated data corresponding to the position mark information is backed up to the second area of ​​the disk array.

[0072] In this embodiment, the first condition may include: the backup mark information indicates that all the data to be migrated corresponding to the position mark information has been backed up to the second area of ​​the disk array. When all the data to be migrated corresponding to the position mark information has been backed up to the second area of ​​the disk array, it is determined that the backup mark information meets the set first condition. When all the data to be migrated corresponding to the position mark information has not been backed up to the second area of ​​the disk array, it is determined that the backup mark information does not meet the set first condition.

[0073] As an example, in response to a RAID restart event, location mark information and backup mark information are obtained from the non-volatile memory. The location mark information records that the data to be migrated is distributed in three stripes, Stripe1, Stripe2 and Stripe3, in the first area of ​​the original RAID.

[0074] In the case that all the data to be migrated corresponding to the position mark information represented by the backup mark information has been backed up to the second area of ​​the original RAID, determine the data in the three stripes of backup Stripe1, backup Stripe2 and backup Stripe3 backed up in the second area of ​​the original RAID. Read data from backup Stripe1 for level migration to obtain the target migration data of Stripe1 of the new RAID. After obtaining the target migration data, replace the data of Stripe1 in the first area of ​​the original RAID with the target migration data of the new RAID; at the same time, read data from backup Stripe2 for level migration to obtain the target migration data of Stripe2 of the new RAID. After obtaining the target migration data, replace the data of Stripe2 in the first area of ​​the original RAID with the target migration data of the new RAID; at the same time, read data from backup Stripe3 for level migration to obtain the target migration data of Stripe3 of the new RAID. After obtaining the target migration data, replace the data of Stripe3 in the first area of ​​the original RAID with the target migration data of the new RAID.

[0075] When all the data to be migrated corresponding to the location mark information represented by the backup mark information are not all backed up to the second area of ​​the original RAID, the data to be migrated in three stripes, Stripe1, Stripe2 and Stripe3 in the first area of ​​the original RAID are determined. Data is read from the starting logical block position to the ending logical block position of Stripe1, and the data of Stripe1 in the original RAID is backed up to the backup Stripe1 in the second area. In response to the completion of the backup of Stripe1, the backup status of Stripe1 is set to "completed", and the timestamp of the backup completion is recorded to obtain the backup mark information, and the backup mark information is stored in the non-volatile storage medium; at the same time, data is read from the starting logical block position to the ending logical block position of Stripe2, and the data of Stripe2 in the original RAID is backed up to the backup Stripe2 in the second area. In response to the completion of the backup of Stripe2, the backup status of Stripe2 is set to "completed", and the timestamp of the backup completion is recorded to obtain the backup mark information, and the backup mark information is stored in the non-volatile storage medium; at the same time, data is read from the starting logical block position to the ending logical block position of Stripe3, and the data of Stripe3 in the original RAID is backed up to the backup Stripe3 in the second area. In response to the completion of the backup of Stripe3, the backup status of Stripe3 is set to "completed", and the timestamp of the backup completion is recorded to obtain the backup mark information, and the backup mark information is stored in the non-volatile storage medium. Then, the data to be migrated in the stripes of the second area are migrated in parallel to obtain the target migration data. Finally, based on the target migration data, the data to be migrated in the first area is updated.

[0076] In the embodiment of the present application, the data to be migrated is backed up to the second area through the fixed-length area backup method, and the location mark information and backup mark information corresponding to the data to be migrated are stored in a non-volatile storage medium, so that during the data migration process, the data to be migrated can be quickly located and accessed, and it can be accurately determined whether the data has been backed up, thereby avoiding the write hole problem, ensuring the integrity and consistency of the data, and effectively solving the problem of data loss caused by accidental power failure or other failures during the level migration of the disk array, thereby improving data security. At the same time, the data to be migrated in the stripes of the second area can be migrated in parallel, which can make full use of disk resources, reduce the level migration time, and thus improve the efficiency of level migration.

[0077] Figure 7 An application scenario diagram of the disk array level migration method provided in an embodiment of the present application is shown.

[0078] refer to Figure 7An application scenario of the disk array level migration method provided in an embodiment of the present application is applied to the RAID level migration process.

[0079] Step L1, preprocessing. Specifically, calculate the fixed-length area size and the location of the data backup. The fixed-length area size is the stripe size of the integer multiple of the number of RAID disks before the level migration, that is, the fixed-length area size = the number of RAID disks before migration × stripe size × a, where a is a positive integer. RAID may include a first area and a second area. The first area may include at least one stripe. The number of stripes included in the second area is the same as the number of stripes in the first area. The data backup location may represent the storage location of the backed-up data to be migrated in the stripes of the second area. The starting position of the data backup may be the starting position of the second area of ​​the RAID. The starting position of the second area is after the first area. The storage size corresponding to the data backup location is equal to the fixed-length area size.

[0080] Step L2, move the fixed-length area and record the position to the non-volatile memory. Specifically, starting from the starting lba of the first area of ​​the RAID, the LWM and HWM are consistent in the initial state, which is equal to the starting lba of the RAID. Move the HWM to the size of a fixed-length area containing multiple stripes, record the LWM and HWM at this time as position mark information, and store it in the non-volatile memory. Among them, the data between the LWM and HWM in the first area is the data to be migrated.

[0081] Step L3, data backup, and record whether the backup is completed in the non-volatile memory. Specifically, the data to be migrated is distributed between the LWM and the HWM in the first area of ​​the original RAID. Based on the LWM and the HWM, the data to be migrated is backed up to the second area of ​​the original RAID respectively. In response to the completion of the backup of the data to be migrated between the LWM and the HWM, the timestamp of the backup completion is recorded, the backup mark information is obtained, and the backup mark information is stored in the non-volatile memory.

[0082] Step L4, level migration. Specifically, read the data to be migrated backed up in the second area to perform level migration, and obtain the target migration data of the new RAID. Finally, replace the data between LWM and HWM in the first area with the target migration data of the new RAID.

[0083] Step L5, determine whether the level migration of all fixed-length areas has been completed. Specifically, if the level migration of all fixed-length areas has been completed, then end. If the level migration of all fixed-length areas has not been completed, return to step L2, and continue to move the LWM and HWM in the first area according to the size of the fixed-length area to obtain the second LWM and the second HWM. The data between the second LWM and the second HWM in the first area is the next data to be migrated.

[0084] Understandably, Figure 7 The application scenarios of the disk array level migration method are only some exemplary implementations of the present application. The application scenarios of the disk array level migration method in the present application include but are not limited to Figure 7 The application scenario of the disk array level migration method shown in FIG.

[0085] Figure 8 Another application scenario diagram of the disk array level migration method provided in an embodiment of the present application is shown.

[0086] refer to Figure 8 Another application scenario of the disk array level migration method provided in the embodiment of the present application is applied to the level migration recovery process after RAID restart.

[0087] Step A1, read the fixed-length area position in the non-volatile memory. Specifically, read the position mark information from the non-volatile memory. The position mark information records that the data to be migrated is distributed between the LWM and the HWM in the first area of ​​the original RAID.

[0088] Step A2, reading the backup mark in the non-volatile memory. Specifically, the backup mark information is read from the non-volatile memory. The backup mark information indicates whether the data to be migrated between the LWM and the HWM is backed up.

[0089] Step A3, determine whether the backup is complete. Specifically, determine whether the backup mark information indicates that the backup of the data to be migrated between LWM and HWM is complete. If the backup is complete, jump to step A5; if the backup is not complete, jump to step A4. Step A4, data backup, and record whether the backup is completed in the non-volatile memory. Specifically, the data to be migrated is distributed between the LWM and the HWM in the first area of ​​the original RAID. Based on the LWM and the HWM, the data to be migrated is backed up to the second area of ​​the original RAID respectively. In response to the completion of the backup of the data to be migrated between the LWM and the HWM, the timestamp of the backup completion is recorded, the backup mark information is obtained, and the backup mark information is stored in the non-volatile memory.

[0090] Step A5, level migration. Specifically, read the data to be migrated backed up in the second area to perform level migration, and obtain the target migration data of the new RAID. Finally, replace the data between the LWM and HWM in the first area with the target migration data of the new RAID.

[0091] Step A6, judging whether the level migration of all fixed-length regions is completed. Specifically, if the level migration of all fixed-length regions is completed, the process ends. If the level migration of all fixed-length regions is not completed, the process jumps to step A7.

[0092] Step A7, move the fixed-length area and record the position to the non-volatile memory. Specifically, continue to move the LWM and HWM in the first area according to the size of the fixed-length area to obtain the second LWM and the second HWM. The data between the second LWM and the second HWM in the first area is the next data to be migrated, and the second LWM and the second HWM at this time are recorded as position mark information and stored in the non-volatile memory. Then jump to step A4.

[0093] Understandably, Figure 8 The application scenarios of the disk array level migration method are only some exemplary implementations of the present application. The application scenarios of the disk array level migration method in the present application include but are not limited to Figure 8 The application scenario of the disk array level migration method shown in FIG.

[0094] Fig. 9 Another application scenario diagram of the disk array level migration method provided in an embodiment of the present application is shown.

[0095] refer to Fig. 9 Another application scenario of the disk array level migration method provided in the embodiment of the present application is applied to the RAID level migration process.

[0096] The RAID includes multiple disks, which may include old disk 0, old disk 1 to old disk n, and newly added / empty disks. n is a positive integer, and the embodiment of the present application does not limit the specific number of n. The RAID includes m stripes from Stripe1 to Stripem.

[0097] (1) RAID in the initial state, including the waiting area and the reserved area. The LWM and HWM in the initial state are consistent and equal to the starting lba of the RAID. The waiting area may include: the area between the HWM and the reserved area. The RAID data in the waiting area has not yet been migrated. The reserved area is the reserved area of ​​RAID. The logical space of the reserved area is not exposed to the user. The logical space of the reserved area is the data backup area used internally by the RAID during level migration.

[0098] (2) Move the HWM to a fixed-length area size containing multiple stripes to form the first level migration area in the RAID. The level migration area can include three stripes: Stripe1, Stripe2, and Stripe3. Back up the data of Stripe1 in the original RAID to the reserved area backup Stripe1; at the same time, back up the data of Stripe2 in the original RAID to the reserved area backup Stripe2; at the same time, back up the data of Stripe3 in the original RAID to the reserved area backup Stripe3. Read data from the backup Stripe1 respectively, calculate the verification data of Stripe1 of the new RAID, write the verification data of Stripe1 of the new RAID into Stripe1 in the original RAID, and replace the data in Stripe1; at the same time, read data from the backup Stripe2, calculate the verification data of Stripe2 of the new RAID, write the verification data of Stripe2 of the new RAID into Stripe2 in the original RAID, and replace the data in Stripe2; at the same time, read data from the backup Stripe3, calculate the verification data of Stripe3 of the new RAID, write the verification data of Stripe3 of the new RAID into Stripe3 in the original RAID, and replace the data in Stripe3.

[0099] (3) The completion area can indicate that the RAID data in this area has completed the level migration. After the level migration of all stripes in the first level migration area is completed, the LMW and HWM are moved to start the level migration of the second level migration area. The step size of the movement is the fixed-length area size. The operation of each stripe in the level migration area is the same as described in (2). The other waiting areas are operated in sequence until all level migration areas have completed the level migration. For example, the level migration positions of the stripes of Stripem-2, Stripem-1, and Stripem are completed. The level migration of the entire RAID is completed. At this time, LMW and HWM are equal, which is equal to the starting lba of the RAID plus the size of the RAID.

[0100] Understandably, Fig. 9 The application scenarios of the disk array level migration method are only some exemplary implementations of the present application. The application scenarios of the disk array level migration method in the present application include but are not limited to Fig. 9 The application scenario of the disk array level migration method shown in FIG.

[0101] The following is a description of an exemplary structure of a software module included in the disk array level migration device 90 provided in an embodiment of the present application. In some embodiments, for example, Fig.10As shown, the disk array level migration device 90 may include: a calculation module 901, used to determine the size of a fixed-length area; the fixed-length area size is related to the attribute information of the disk array; the disk array includes multiple stripes; a determination module 902, used to determine the data to be migrated in the first area of ​​the disk array based on the fixed-length area size; a backup module 903, used to back up the data to be migrated to the second area of ​​the disk array; the second area is enabled when the data to be migrated is backed up; a level migration module 904, used to perform level migration on the data to be migrated in the stripes of the second area in parallel to obtain target migration data; an update module 905, used to update the data to be migrated in the first area based on the target migration data.

[0102] In some embodiments, the calculation module 901 is used to: obtain attribute information of the disk array; the attribute information includes at least the number of disks in the disk array and the stripe size of the stripes in the disk array; based on the number of disks and the stripe size, calculate the fixed-length area size.

[0103] In some embodiments, the determination module 902 is also used to: determine the data backup location in the second area based on the fixed-length area size; the first area includes at least one stripe; the number of stripes included in the second area is the same as the number of stripes in the first area; the data backup location represents the storage location of the backed-up data to be migrated in the stripe of the second area.

[0104] In some embodiments, the determination module 902 is used to: determine the starting migration position in the first area; determine the ending migration position in the first area based on the fixed-length area size and the starting migration position; determine the data between the starting migration position and the ending migration position in the first area as data to be migrated; mark the determined starting migration position and ending migration position to obtain position mark information; and store the position mark information in a non-volatile storage medium.

[0105] In some embodiments, the determination module 902 is also used to: determine the second starting migration position and the second ending migration position based on the fixed-length region size, the starting migration position and the ending migration position; and determine the data between the second starting migration position and the second ending migration position in the first region as the next data to be migrated.

[0106] In some embodiments, the backup module 903 is used to: determine the stripes in which the data to be migrated is distributed in the first area; determine the starting logical block position and the ending logical block position of each stripe within the range of the data to be migrated; based on the starting logical block position and the ending logical block position, back up the data to be migrated in each stripe to the second area respectively; in response to the completion of the stripe backup, determine the backup mark information corresponding to the stripe and store the backup mark information to a non-volatile storage medium.

[0107] In some embodiments, the disk array level migration device 90 also includes a recovery module, which is used to: in response to a restart event of the disk array, obtain position mark information and backup mark information from a non-volatile storage medium; when the backup mark information satisfies a set first condition, perform level migration on the data backed up in the stripes in the second area in parallel to obtain target migration data; when the backup mark information does not meet the first condition, back up the data to be migrated corresponding to the position mark information to the second area of ​​the disk array; wherein the first condition includes the backup mark information indicating that all data to be migrated corresponding to the position mark information have been backed up to the second area of ​​the disk array. It should be noted that the description of the device in the embodiment of the present application is similar to the description of the method embodiment above, and has similar beneficial effects as the method embodiment, so it will not be repeated. Figures 1 to 9 The present invention can be understood by referring to the description of any one of the accompanying drawings.

[0108] According to an embodiment of the present application, the present application also provides an electronic device and a non-transitory computer-readable storage medium.

[0109] Fig.11 A schematic block diagram of an example electronic device 800 that can be used to implement an embodiment of the present application is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.

[0110] like Fig.11 As shown, the electronic device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a ROM 802 or a computer program loaded from a storage unit 808 into a RAM 803. In the RAM 803, various programs and data required for the operation of the electronic device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An I / O interface 805 is also connected to the bus 804.

[0111] Multiple components in the electronic device 800 are connected to the I / O interface 805, including: an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the electronic device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0112] The computing unit 801 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above, such as the disk array level migration method. For example, in some embodiments, the disk array level migration method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded into the RAM 803 and executed by the computing unit 801, one or more steps of the disk array level migration method described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform the disk array level migration method in any other appropriate manner (e.g., by means of firmware).

[0113] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0114] The program code for implementing the method of the present application can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, implements the functions / operations specified in the flow chart and / or block diagram. The program code can be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0115] In the context of the present application, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0116] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0117] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0118] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0119] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the expected results of the technical solution disclosed in this application can be achieved, and this document is not limited here.

[0120] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0121] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A disk array level migration method, characterized in that: The method comprises: Determine the size of the fixed-length region; the size of the fixed-length region is related to the attribute information of the disk array; the disk array includes a plurality of stripes; Determining the data to be migrated in the first area of ​​the disk array based on the size of the fixed-length area; Backing up the data to be migrated to the second area of ​​the disk array; the second area is enabled when backing up the data to be migrated; Migrating the data to be migrated in the stripes of the second area in parallel to obtain target migration data; Based on the target migration data, the data to be migrated in the first area is updated.

2. The method according to claim 1, characterized in that Determining the size of the fixed-length region includes: Acquire attribute information of the disk array; the attribute information includes at least the number of disks of the disk array and the stripe size of the stripes in the disk array; The fixed-length area size is calculated based on the number of disks and the stripe size.

3. The method according to claim 1, characterized in that After determining the size of the fixed-length region, the method further includes: Based on the size of the fixed-length region, determining a data backup location in the second region; the first region includes at least one stripe; the number of stripes included in the second region is the same as the number of stripes in the first region; The data backup location represents a storage location of the backed-up data to be migrated in the stripe of the second area.

4. The method according to claim 1, characterized in that The determining the data to be migrated in the first area of ​​the disk array includes: determining a starting migration position in the first region; Determining a termination migration position in the first region based on the size of the fixed-length region and the starting migration position; Determine the data between the starting migration position and the ending migration position in the first region as the data to be migrated; Marking the determined starting migration position and ending migration position to obtain position marking information; The position mark information is stored in a non-volatile storage medium.

5. The method according to claim 4, characterized in that After updating the data to be migrated in the first area based on the target migration data, the method further includes: Determining a second starting migration position and a second ending migration position based on the size of the fixed-length region, the starting migration position and the ending migration position; The data between the second starting migration position and the second ending migration position in the first area is determined as the next data to be migrated.

6. The method according to claim 1, characterized in that The step of backing up the data to be migrated to the second area of ​​the disk array includes: Determine each stripe in which the data to be migrated is distributed in the first area; Determine the starting logical block position and the ending logical block position of each stripe within the range of data to be migrated; Based on the starting logical block position and the ending logical block position, backing up the data to be migrated in each stripe to the second area respectively; In response to the stripe backup being completed, backup mark information corresponding to the stripe is determined and the backup mark information is stored in a non-volatile storage medium.

7. The method according to claim 1, characterized in that The method further comprises: In response to a restart event of the disk array, acquiring position mark information and backup mark information from a non-volatile storage medium; When the backup mark information satisfies the set first condition, the data backed up in the stripes of the second area are migrated in parallel to obtain target migration data; When the backup mark information does not satisfy the first condition, backing up the to-be-migrated data corresponding to the position mark information to the second area of ​​the disk array; The first condition includes that the backup mark information indicates that all the to-be-migrated data corresponding to the location mark information has been backed up to the second area of ​​the disk array.

8. A disk array level migration device, characterized in that: The device comprises: A calculation module, used to determine the size of a fixed-length region; the size of the fixed-length region is related to the attribute information of a disk array; the disk array includes a plurality of stripes; A determination module, configured to determine the data to be migrated in the first area of ​​the disk array based on the size of the fixed-length area; A backup module, used for backing up the data to be migrated to a second area of ​​the disk array; the second area is enabled when backing up the data to be migrated; a level migration module, configured to perform level migration on the data to be migrated in the stripes of the second area in parallel to obtain target migration data; An updating module is used to update the data to be migrated in the first area based on the target migration data.

9. The device according to claim 8, characterized in that The calculation module is used for: Acquire attribute information of the disk array; the attribute information includes at least the number of disks of the disk array and the stripe size of the stripes in the disk array; The fixed-length area size is calculated based on the number of disks and the stripe size.

10. The device according to claim 8, characterized in that The determining module is also used for: Based on the size of the fixed-length region, determining a data backup location in the second region; the first region includes at least one stripe; the number of stripes included in the second region is the same as the number of stripes in the first region; The data backup location represents a storage location of the backed-up data to be migrated in the stripe of the second area.

11. The device according to claim 8, characterized in that The determination module is used for: determining a starting migration position in the first region; Determining a termination migration position in the first region based on the size of the fixed-length region and the starting migration position; Determine the data between the starting migration position and the ending migration position in the first region as the data to be migrated; Marking the determined starting migration position and ending migration position to obtain position marking information; The position mark information is stored in a non-volatile storage medium.

12. The device according to claim 11, characterized in that The determining module is also used for: Determining a second starting migration position and a second ending migration position based on the size of the fixed-length region, the starting migration position and the ending migration position; The data between the second starting migration position and the second ending migration position in the first area is determined as the next data to be migrated.

13. The device according to claim 8, characterized in that The backup module is used for: Determine each stripe in which the data to be migrated is distributed in the first area; Determine the starting logical block position and the ending logical block position of each stripe within the range of data to be migrated; Based on the starting logical block position and the ending logical block position, backing up the data to be migrated in each stripe to the second area respectively; In response to the stripe backup being completed, backup mark information corresponding to the stripe is determined and the backup mark information is stored in a non-volatile storage medium.

14. The device according to claim 8, characterized in that The device also includes a recovery module, which is used to: In response to a restart event of the disk array, acquiring position mark information and backup mark information from a non-volatile storage medium; When the backup mark information satisfies the set first condition, the data backed up in the stripes of the second area are migrated in parallel to obtain target migration data; When the backup mark information does not satisfy the first condition, backing up the to-be-migrated data corresponding to the position mark information to the second area of ​​the disk array; The first condition includes that the backup mark information indicates that all the to-be-migrated data corresponding to the location mark information has been backed up to the second area of ​​the disk array.

15. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Storage system and method for migrating data in storage system

    CN113805794A

  • Data migration method and device for disk array, equipment and medium

    CN115437578A

  • Upgrading migration method and device and degrading migration method and device for redundant array of independent disks

    CN116185311A

  • Method, device and system for degrading from TP-RAID to RAID6

    CN116560574A

  • Cloud hard disk migration method and device, electronic equipment and storage medium

    CN118170324A

Cited By

  • Data migration method and device, electronic equipment, storage medium and program product

    CN120872255A

  • Data migration method and device, electronic equipment, storage medium and program product

    CN120872255B