CN116185311A - Upgrading migration method, degrading migration method and device for redundant array of independent disk - Google Patents

Upgrading migration method, degrading migration method and device for redundant array of independent disk Download PDF

Info

Publication number
CN116185311A
CN116185311A CN202310467823.4A CN202310467823A CN116185311A CN 116185311 A CN116185311 A CN 116185311A CN 202310467823 A CN202310467823 A CN 202310467823A CN 116185311 A CN116185311 A CN 116185311A
Authority
CN
China
Prior art keywords
target
area
disk
redundant array
independent disks
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202310467823.4A
Other languages
Chinese (zh)
Other versions
CN116185311B (en
Inventor
李飞龙
王见
孙明刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202310467823.4A priority Critical patent/CN116185311B/en
Publication of CN116185311A publication Critical patent/CN116185311A/en
Application granted granted Critical
Publication of CN116185311B publication Critical patent/CN116185311B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0647Migration mechanisms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0683Plurality of storage devices
    • G06F3/0689Disk arrays, e.g. RAID, JBOD
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a method for upgrading and migrating a redundant array of independent disks, a method and a device for degrading and migrating the redundant array of independent disks. According to the method provided by the embodiment of the invention, the original band reserved area and the level migration area are arranged in the original RAID, the target band reserved area and the target area are arranged in the target RAID, and a plurality of disk bands in the sequential level migration area are concurrently migrated to the target band reserved area or the target area in the upgrading migration process, so that the level migration efficiency of the RAID card can be remarkably improved in a concurrent migration mode. Meanwhile, the level migration area and the strip reservation area are combined to perform dislocation migration, so that data is not lost in the level migration process of the redundant array of independent disks, the problem of data write holes after restarting of the redundant array of independent disks due to unexpected power failure or other faults is solved, and the data security in the level migration process is effectively ensured.

Description

Upgrading migration method, degrading migration method and device for redundant array of independent disk
Technical Field
The present disclosure relates to the field of computer hardware design, and in particular, to a method and apparatus for upgrading and downgrading a redundant array of independent disks.
Background
At present, redundant array of independent disks (Redundant Array of Independent Disks, abbreviated as RAID) storage technology has encountered a great bottleneck in terms of improving data security and I/O performance, and with the rapid development of hardware semiconductor chip technology in recent years, the industry proposes hard RAID storage technology based on soft RAID storage technology, wherein RAID cards are the most critical component units of the hard RAID storage technology. RAID cards are hard RAID storage techniques proposed on the basis of soft RAID storage techniques in order to improve the I/O performance and data security of the storage center. As the name suggests, hard RAID storage technology gives some algorithms, data management and some functions in soft RAID storage technology to hardware management and implementation to improve the I/O performance and data security of the storage system. In terms of physical connection, the RAID card is a functional board card for organizing hard disks connected with the server into a plurality of RAID arrays according to RAID levels. The most important component units of both soft and hard RAID storage technologies (RAID cards) are RAID arrays, which are the most important technology in the storage field, currently include RAID levels 0, 1, 5, 6, 10, 50, 60, which use stripes, mirroring and parity to ensure data reliability, and concurrently process I/O through multiple disk drives in the array to improve the I/O performance of the RAID array.
However, when the level migration is performed by the current RAID card, writing operations of the RAID card to the stripe can only be performed sequentially, and writing operations cannot be performed concurrently, which results in lower disk drop efficiency in the migration process.
Disclosure of Invention
In order to solve the technical problems or at least partially solve the technical problems, the application provides a method for upgrading and migrating a redundant array of independent disks, a method for downgrading and migrating, and a device thereof.
According to one aspect of the embodiment of the application, a level migration method of a redundant array of independent disks is provided, which comprises the following steps:
determining an original redundant array of independent disks to be subjected to upgrade migration, wherein the original redundant array of independent disks comprises an original stripe reservation area and a plurality of level migration areas, the size of the original stripe reservation area and the size of the level migration areas form a preset proportional relation, and each level migration area comprises a plurality of disk stripes;
determining a target redundant array of independent disks, wherein the target redundant array of independent disks comprises a target strip reserved area and a target area, the target strip reserved area is constructed based on the original strip reserved area and a target disk, the target area is constructed based on a plurality of level migration areas and the target disk, and the target disk is a disk inserted into the original redundant array of independent disks;
And sequentially and concurrently migrating the disk stripes in each level migration area to the target stripe reservation area or the target area based on the logical block addresses.
In an alternative embodiment, the determining the original redundant array of independent disks to perform the upgrade migration includes:
acquiring an upgrade migration task aiming at the RAID card, wherein the upgrade migration task carries at least one RAID mark;
and determining the RAID corresponding to the RAID identifier in the RAID card as an original RAID.
In an alternative embodiment, the determining the target redundant array of independent disks includes:
determining a target disk inserted into the original redundant array of independent disks, and acquiring a first disk area from the target disk according to the number of the stripes corresponding to the reserved areas of the original stripes;
constructing the target stripe reservation based on the first disk region and the original stripe reservation;
constructing the target area based on a second disk area in the target disk and the level migration area, wherein the second disk area is a disk area except the first disk area in the target disk;
And constructing the target RAID based on the target stripe reserved area and the target area.
In an optional implementation manner, the sequentially concurrently migrating the disk stripes in each level migration area to the target stripe reservation area or the target area based on the logical block address includes:
acquiring the number of strips corresponding to the level migration area, and pulling the coroutines with the corresponding number according to the number of strips corresponding to the level migration area;
and calling the coroutine to concurrently migrate the disk strips in each level migration area to the target strip reserved area or the target area according to the arrangement sequence of the logical block addresses from small to large.
In an optional implementation manner, invoking the coroutine to concurrently migrate the disk stripes in each level migration area to the target stripe reservation area or the target area according to the order of the logical block addresses from small to large includes:
calling the coroutine to acquire a target level migration area matched with the tape reservation area, and concurrently migrating the disk tape of the target level migration area to the target tape reservation area;
And calling the coroutine to sequentially and concurrently migrate the disk strips of other level migration areas to the target area, wherein the other level migration areas are level migration areas except the target level migration area in the original independent disk redundant array.
In an optional implementation manner, the calling the coroutine obtains a target level migration area matched with the target band reservation area according to the logical block address, and concurrently migrates the disk band of the target level migration area to the target band reservation area, including:
acquiring the number of the strips corresponding to the target strip reserved area;
obtaining target disk strips matched with the strips in number, and taking a level migration area where the target disk strips are located as the target level migration area;
and calling the coroutine to concurrently migrate the disk strips of the target level migration area to the target strip reservation area.
In an optional implementation manner, the calling the coroutine sequentially migrates the disk stripes of other levels of migration areas to the target area according to the logical block address, including:
acquiring other level migration areas of the original redundant array of independent disks;
And calling the coroutine to sequentially and concurrently migrate the disk strips of the other level migration areas to the target area according to the arrangement sequence of the logical block addresses of the disk strips in the other level migration areas from small to large.
In an alternative embodiment, after invoking the coroutine to concurrently migrate the disk stripes of the other level migration regions to the target region in turn, the method further includes:
and recording the position information of the target stripe reservation area in the target redundant array of independent disks.
In an alternative embodiment, the method further comprises:
monitoring whether a restart event occurs to the target RAID card;
under the condition that the target RAID card is determined to have a restarting event, acquiring a target RAID currently migrated target disk stripe;
determining a level migration area where the target disk stripe is located from the original redundant array of independent disks, and acquiring backup data of the target disk stripe from the level migration area where the target disk stripe is located;
and migrating the backup data to the target RAID.
According to another aspect of the embodiment of the present application, there is further provided a level migration method of a redundant array of independent disks, including:
determining an original redundant array of independent disks to be subjected to degradation migration, wherein the original redundant array of independent disks comprises a plurality of level migration areas, and each level migration area comprises a plurality of disk stripes;
determining a target redundant array of independent disks, wherein the target redundant array of independent disks is obtained based on a target disk and a plurality of level migration areas, and the target disk is removed from the original redundant array of independent disks;
and sequentially and concurrently migrating the disk strips in each level migration zone to the target RAID (redundant array of independent disks) based on the logical block addresses.
In an alternative embodiment, the determining the original redundant array of independent disks to perform the downgrade migration includes:
acquiring a demotion migration task aiming at the RAID card, wherein the demotion migration task carries at least one RAID mark;
and determining the RAID corresponding to the RAID identifier in the RAID card as an original RAID.
In an alternative embodiment, the obtaining the target redundant array of independent disks includes:
the determination is made of the target disk that was removed,
determining a plurality of level migration areas in the original redundant array of independent disks as a third area, and determining a fourth area corresponding to the target disk;
removing a fourth area corresponding to the target disk from the third area to obtain an updated third area;
and constructing the target RAID based on the updated third area.
In an optional implementation manner, the sequentially migrating the disk stripes in each level migration area to the target redundant array of independent disks based on the logical block address, includes:
acquiring the number of strips corresponding to the level migration area, and pulling the coroutines with the corresponding number according to the number of strips corresponding to the level migration area;
and calling the coroutine to concurrently migrate the disk strips in each level migration zone to the target redundant array of independent disks according to the arrangement sequence of the logical block addresses from large to small.
In an optional implementation manner, after invoking the coroutine to concurrently migrate the disk stripes in each level migration zone to the target redundant array of independent disks according to the order of the logical block addresses from large to small, the method further includes:
Taking the area except the disk stripe in the target redundant array of independent disks as a stripe reservation area;
and recording the position information of the reserved area of the strip in the target redundant array of independent disks.
In an alternative embodiment, the method further comprises:
monitoring whether a restart event occurs to the target RAID card;
under the condition that the target RAID card is determined to have a restarting event, acquiring a target RAID currently migrated target disk stripe;
determining a level migration area where the target disk stripe is located from the original redundant array of independent disks, and acquiring backup data of the target disk stripe from the level migration area where the target disk stripe is located;
and migrating the backup data to the target RAID.
According to another aspect of the embodiments of the present application, there is further provided a level migration system of a redundant array of independent disks, the system including: the system comprises a controller and a RAID card, wherein the controller is connected with the RAID card, and the RAID card comprises a plurality of RAID;
The controller being adapted to perform the method of any of the preceding claims 1-16.
In an alternative embodiment, the controller includes: and the cache is used for storing the position information of the tape reserved area in the target RAID after the tape of the magnetic disk in each level migration area is concurrently migrated to the target RAID.
In an alternative embodiment, the level shift region is based on an LWP low water pointer and an HWP high water pointer.
According to another aspect of the embodiment of the present application, there is also provided an upgrade migration apparatus for a redundant array of independent disks, including:
the system comprises an acquisition module, a storage module and a storage module, wherein the acquisition module is used for determining an original redundant array of independent disks to be subjected to upgrade migration, the original redundant array of independent disks comprises an original strip reserved area and a plurality of level migration areas, the size of the original strip reserved area and the size of the level migration areas form a preset proportional relation, and each level migration area comprises a plurality of disk strips;
the system comprises a determining module, a determining module and a judging module, wherein the determining module is used for determining a target redundant array of independent disks, the target redundant array of independent disks comprises a target strip reserved area and a target area, the target strip reserved area is constructed based on the original strip reserved area and a target disk, the target area is constructed based on a plurality of level migration areas and the target disk, and the target disk is a disk inserted into the original redundant array of independent disks;
And the processing module is used for sequentially and concurrently migrating the disk stripes in each level migration area to the target stripe reservation area or the target area based on the logical block address.
According to another aspect of the embodiments of the present application, there is also provided a downgrade migration apparatus of redundant array of independent disks, including:
the system comprises an acquisition module, a storage module and a storage module, wherein the acquisition module is used for determining an original redundant array of independent disks for performing degradation migration, the original redundant array of independent disks comprises a plurality of level migration areas, and each level migration area comprises a plurality of disk stripes;
the determining module is used for determining a target redundant array of independent disks, wherein the target redundant array of independent disks is obtained based on a target disk and a plurality of level migration areas, and the target disk is removed from the original redundant array of independent disks;
and the processing module is used for sequentially and concurrently migrating the disk strips in each level migration zone to the target redundant array of independent disks based on the logical block address.
According to another aspect of the embodiments of the present application, there is also provided a storage medium including a stored program that performs the steps described above when running.
According to another aspect of the embodiments of the present application, there is provided an electronic device including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus; wherein: a memory for storing a computer program; and a processor for executing the steps of the method by running a program stored on the memory.
Embodiments of the present application also provide a computer program product comprising instructions which, when run on a computer, cause the computer to perform the steps of the above method.
Compared with the prior art, the technical scheme provided by the embodiment of the application has the following advantages: according to the method provided by the embodiment of the invention, the original band reserved area and the level migration area are arranged in the original RAID, the target band reserved area and the target area are arranged in the target RAID, and a plurality of disk bands in the sequential level migration area are concurrently migrated to the target band reserved area or the target area in the upgrading migration process, so that the level migration efficiency of the RAID card can be remarkably improved in a concurrent migration mode. Meanwhile, the level migration area and the strip reservation area are combined to perform dislocation migration, so that data is not lost in the level migration process of the redundant array of independent disks, the problem of data write holes after restarting of the redundant array of independent disks due to unexpected power failure or other faults is solved, and the data security in the level migration process is effectively ensured.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a schematic diagram illustrating a level migration process of a redundant array of independent disks according to an embodiment of the present disclosure;
FIG. 2 is a flowchart of a method for migrating an RAID according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram illustrating a level migration process of a redundant array of independent disks according to an embodiment of the present disclosure;
FIG. 4 is a flowchart of a method for downgrade migration of redundant array of independent disks according to an embodiment of the present application;
FIG. 5 is a schematic diagram illustrating a level migration process of a redundant array of independent disks according to an embodiment of the present disclosure;
FIG. 6 is a schematic diagram illustrating a level migration process of a redundant array of independent disks according to an embodiment of the present disclosure;
FIG. 7 is a schematic diagram illustrating a level migration process of a redundant array of independent disks according to an embodiment of the present disclosure;
FIG. 8 is a schematic diagram illustrating a level migration process of a redundant array of independent disks according to an embodiment of the present disclosure;
FIG. 9 is a block diagram of a level migration system for redundant array of independent disks according to an embodiment of the present application;
FIG. 10 is a block diagram of a level shifting apparatus for redundant array of independent disks according to an embodiment of the present application;
FIG. 11 is a block diagram of a level shifting apparatus for redundant array of independent disks according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments, the exemplary embodiments of the present application and the descriptions thereof are used to explain the present application and do not constitute undue limitations of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present application based on the embodiments herein.
It should be noted that in this document, relational terms such as "first" and "second" and the like are used solely to distinguish one entity or action from another similar entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Currently, as shown in fig. 1, the existing level migration process steps are as follows:
upgrade (one): (1) reading all data discs, and calculating new data P ', Q'; (2) writing data of the column where D12 is located into the newly inserted empty disc position; (3) writing data of the column of the D8 into the column of the original D12; (4) writing new data Q' to the original D8 column; (5) new data P' is written to the original P column.
(II) degradation: (1) reading original data P and Q, and calculating new data P'; (2) writing new data P' into P; (3) writing the column in which D8 is positioned into the data of the original Q column; (4) and writing the data of the D12 column into the column where the original D8 is.
It follows that current level migration suffers from the following drawbacks:
(1) The RAID array can only sequentially write the stripes during level migration, and cannot concurrently execute the write operations. Resulting in lower tray drop efficiency. (2) lack of write hole protection during RAID array level migration. For example, the original Q check data of the above-mentioned downgrade (3) step is updated to D8 data, but the check data P' of the stripe is not updated, at which time the RAID card is restarted due to unexpected power failure or other failure. In this case, the stripe data is in an inconsistent state. After the system is restarted, if D0 in the stripe fails again, D3 needs to be recovered by checking the data P'. In the data recovery process, P 'data is used, and since the P' check data is not updated, it is obvious that the recovered data is wrong and is not the original D0 data.
Based on the above, the embodiment of the application provides a method for upgrading and migrating a method and a device for downgrading and migrating a redundant array of independent disks. The method provided by the embodiment of the invention can be applied to any needed electronic equipment, for example, the electronic equipment can be a server, a terminal and the like, is not particularly limited, and is convenient to describe and is called as the electronic equipment for short hereinafter.
According to an aspect of the embodiments of the present application, a method embodiment of an upgrade migration method of a redundant array of independent disks is provided, and fig. 2 is a flowchart of an upgrade migration method of a redundant array of independent disks provided in the embodiments of the present application, where, as shown in fig. 2, the method includes:
step S11, determining an original redundant array of independent disks to be subjected to upgrade migration, wherein the original redundant array of independent disks comprises an original stripe reserved area and a plurality of level migration areas, the size of the original stripe reserved area and the size of the level migration areas form a preset proportional relation, and each level migration area comprises a plurality of disk stripes.
The method provided by the embodiment of the application is applied to the controller of the RAID card, specifically, the original RAID to be executed with upgrade migration is determined, and the method comprises the following steps of A1-A2:
and A1, acquiring an upgrade migration task aiming at the RAID card, wherein the upgrade migration task carries at least one RAID mark.
In the embodiment of the application, an upgrade migration command issued by a client is received. And analyzing the upgrade migration command to obtain at least one RAID (redundant array of independent disks) identifier. And generating an upgrade migration task based on the RAID.
In the embodiment of the application, the client may receive a Command Line (CLI) input by a user, or the client receives input information of the user on a graphical interface, and generates an upgrade migration Command. And then the client side issues an upgrade migration command to the controller, and the controller analyzes the upgrade migration command to obtain the RAID (redundant array of independent disks) identifier carried by the RAID, wherein the RAID identifier can be the position identifier or the number of the RAID. Finally, the controller generates an upgrade migration task based on the RAID identification.
And step A2, determining the RAID corresponding to the RAID identifier in the RAID card as an original RAID.
In this embodiment of the present application, the controller obtains the corresponding raid from the raid card by using the raid id, determines the raid as the original raid, and reads the current raid level of the original raid at the same time, where the raid level may be: RAID0, RAID1, RAID5, RAID6, RAID10, RAID50, and RAID60. The original redundant array of independent disks includes a plurality of disk stripes to be subject to level migration, each disk stripe including a plurality of stripe blocks.
In this embodiment of the present application, the original redundant array of independent disks includes an original stripe reservation area and a plurality of level migration areas, where the size of the original stripe reservation area and the size of the level migration area form a preset proportional relationship, and each level migration area includes a plurality of disk stripes, for example: the size of the reserved area of the strip is N times of the level migration area, and N is more than or equal to 1. Specifically, the original disk stripe may be divided before performing the upgrade migration task, where the dividing process includes: determining the number of preset strips; and sequentially selecting disk strips with preset strip numbers from a plurality of disk strips of an original redundant array of independent disks to form a plurality of level migration areas.
In the embodiment of the present application, the plurality of disk stripes in the original redundant array of independent disks are arranged in order of logical block addresses (Logical Block Address, abbreviated as LBA) from small to large, for example: the disk stripe in the original RAID is according to LBA: 0-LBA: x are arranged in sequence. Because of the current upgrade migration, a corresponding number of disk stripes may be selected from the original RAID from small to large order of logical block addresses (i.e., LBAs: 0-LBAs: X) to form a level migration zone.
In the embodiment of the present application, the controller first obtains a preset number of bands configured in advance, for example: the preset number of stripes may be 3. And secondly, splitting a plurality of level migration areas from a plurality of disk stripes of the original redundant array of independent disks according to the preset stripe number. For example: the original redundant array of independent disks comprises: and splitting the disk stripe strips 0-7 according to the preset stripe number 3 to obtain a plurality of level migration areas, wherein the first level migration area comprises: disk stripe0, disk stripe1, disk stripe2. The second level migration zone includes: disk stripe3, disk stripe4, disk stripe5. The third level migration zone includes: disk stripe6 and disk stripe7.
It should be noted that, the original redundant array of independent disks is divided into a plurality of level migration areas, so that when level migration is performed, the disk stripe in the level migration area is used as backup data. In addition, the upgrade migration operation is convenient to be executed on the disk strips in the level migration area according to the arrangement sequence, for example: the first level migration area contains three disk stripes of disk stripe0, disk stripe1 and disk stripe2, and only after the level migration area is completed, the three disk stripes of disk stripe0, disk stripe1 and disk stripe2 are moved to the next level migration area.
In step S12, it is determined that the target redundant array of independent disks includes a target stripe reservation area and a target area, where the target stripe reservation area is constructed based on the original stripe reservation area and the target disk, the target area is constructed based on the multiple level migration areas and the target disk, and the target disk is a disk inserted into the original redundant array of independent disks.
In this embodiment of the present application, the controller first obtains a pre-established target redundant array of independent disks, and since the level migration is an upgrade, the target redundant array of independent disks includes: the original stripe reserved area and the level migration area in the original redundant array of independent disks also comprise the newly inserted target disk.
Specifically, a target redundant array of independent disks is obtained, which comprises the following steps B1-B4;
and B1, determining an inserted target disk, and acquiring a first disk area from the target disk according to the number of the stripes corresponding to the reserved area of the original stripes.
And B2, constructing a target tape reserved area based on the first disk area and the original tape reserved area.
And B3, constructing a target area based on a second disk area and a level migration area in the target disk, wherein the second disk area is a disk area except the first disk area in the target disk.
And step B4, constructing a target redundant array of independent disks based on the target stripe reserved area and the target area.
As an example, as shown in fig. 3, the RAID level of the original RAID is RAID5, and the original RAID includes: a plurality of level migration areas in which data (i.e., the hatched portion in fig. 3) is written, and an original stripe reservation area 320, which is empty. When the original RAID is required to be upgraded from RAID5 to RAID6, firstly, a target RAID corresponding to RAID6 is constructed, specifically, an inserted target disk is determined, a first disk area is obtained from the target disk by utilizing the number of stripes corresponding to the original stripe reservation area, and the first disk area is combined with the original stripe reservation area to obtain a target stripe reservation area of the target RAID. And then, acquiring a second disk area except the first disk area in the target disk, and combining the second disk area with the use area of the original redundant array of independent disks to obtain the target area of the target redundant array of independent disks. And finally, constructing a complete target redundant array of independent disks based on the target stripe reserved area and the target area.
It should be noted that, the purpose of setting the reserved area of the stripe is to realize the dislocation migration of the disk stripe when the subsequent redundant array of independent disks is upgraded. Meanwhile, the disk strips in the level migration area can be used as data backup in the level migration process, so that under the condition that the RAID card is restarted due to unexpected power failure or other faults, the data recovery in the target RAID can be performed through the backup data in the original RAID. Therefore, the problem of data loss in the migration process caused by restarting the redundant array of independent disks card due to faults is solved.
And S13, sequentially and concurrently migrating the disk stripes in each level migration area to a target stripe reservation area or a target area based on the logical block address.
In the embodiment of the application, the disk stripes in each level migration zone are sequentially and concurrently migrated to the target stripe reservation zone or the target zone based on the logical block address, and the method comprises the following steps of C1-C2:
step C1, obtaining the number of strips corresponding to the level migration area, and pulling the coroutines with the corresponding number according to the number of strips corresponding to the level migration area.
In the embodiment of the application, the controller first determines the number of coroutines according to the preset number of stripes, where the preset number of stripes is the same as the number of coroutines. Next, the controller pulls the corresponding coroutine using the corollary Cheng Shuliang.
It should be noted that, by setting the same number of co-programs as the preset number of the stripes, in the subsequent process of executing the level migration, one co-program executes the level migration of one stripe, and simultaneously, the disk stripes of the level migration area are concurrently migrated to the target redundant array of independent disks through multiple co-programs, so that the level migration of multiple stripes is performed concurrently, and the level migration efficiency of the redundant array of independent disks is improved.
And C2, calling a cooperative program to concurrently migrate the disk strips in each level migration area to a target strip reserved area or a target area according to the arrangement sequence of the logical block addresses from small to large.
In the embodiment of the present application, the calling coroutine concurrently migrates the disk stripe in each level migration zone to the target stripe reservation zone or the target zone according to the order of the logical block addresses from small to large, and the method includes the following steps C201-C202:
and step C201, calling a cooperative program to acquire a target level migration area matched with the target band reservation area according to the logical block address, and concurrently migrating the disk band of the target level migration area to the target band reservation area.
In the embodiment of the application, firstly, the number of the stripes corresponding to the target stripe reservation area is obtained, and secondly, the matched target disk stripes in the original redundant array of independent disks are obtained according to the number of the stripes corresponding to the target stripe reservation area. For example: and if the number of the stripes corresponding to the target stripe reservation area is 3, taking the first 3 disk stripes in the original redundant array of independent disks as target disk stripes. And then taking the level migration area where the target disk stripe pair is located as a target level migration area. Finally, calling the cooperative program to concurrently migrate the logical block addresses of the disk stripes in the target level migration area to the target stripe reservation area from small to large
It should be noted that, since the purpose of the stripe reservation is to shift the disk stripe when the redundant array of independent disks is upgraded. The disk stripe migrated to the target stripe reservation begins at logical block address 0. Based on this, during the migration process, the logical block addresses (LBA: 0-LBA: N) corresponding to the first 3 disk stripes may be obtained, and the logical block addresses are migrated to the target stripe reserved area from small to large. It should be noted that the level migration area is understood to be sliding, that is, after the first level migration area completes migration, the second level migration area is automatically migrated.
As an example, as shown in fig. 3, the number of stripes corresponding to the target stripe reservation area is 3, and the number of stripes corresponding to the level migration area is 3, where the first 3 stripes (stripe 0, stripe1, and stripe 2) in the original redundant array of independent disks may be used as the target stripes, and the level migration area corresponding to the target stripes is the first level migration area, so that the stripes (stripe 0, stripe1, and stripe 2) in the first level migration area in the original redundant array of independent disks are directly and concurrently migrated to the target stripe reservation area.
Or the number of stripes corresponding to the target stripe reservation area is 6, and the number of stripes corresponding to the level migration area is 3, at this time, the first 6 stripes (stripe 0, stripe1, stripe2, stripe3, stripe4, stripe 5) in the original redundant array of independent disks may be used as target stripes, and the level migration area corresponding to the target stripes is a first level migration area and a second level migration area, so that the stripes (stripe 0, stripe1, and stripe 2) in the first level migration area in the original redundant array of independent disks are directly migrated to the target stripe reservation area concurrently. After the disk stripe migration in the first level migration zone is completed, the disk stripes (disk stripe3, disk stripe4 and disk stripe 5) in the second level migration zone in the original redundant array of independent disks are directly and concurrently migrated to the target stripe reservation zone.
And step C202, calling a cooperative program to sequentially and concurrently migrate the disk strips of other level migration areas to a target area according to the logical block address, wherein the other level migration areas are level migration areas except the target level migration area in the original redundant array of independent disks.
In the embodiment of the application, other level migration areas of the original redundant array of independent disks are obtained; and the calling cooperative program sequentially and concurrently migrates the disk strips of the migration areas of other levels to the target area according to the arrangement sequence of the logical block addresses of the disk strips of the migration areas of other levels from small to large.
In the embodiment of the application, after the migration of the target stripe reservation area is completed, the calling cooperative program sequentially and concurrently migrates the disk stripes of other levels of migration areas to the target area according to the order of the logical block addresses of the disk stripes in other levels of migration areas from small to large (for example, LBA: M-LBA: P).
According to the method provided by the embodiment of the invention, a fixed band reserved area and a fixed-length level migration area are provided according to the number of the magnetic disks forming the redundant array of independent disks, the migration task of the level migration area is automatically moved to the next level migration area after being completed, the circulation is performed until the level migration of the whole RAID array is completed, the concurrent level migration is performed on a plurality of magnetic disk bands in the level migration area, and the level migration efficiency of the independent magnetic Yu Zhenlie card is improved in a concurrent mode.
In this embodiment of the present application, after calling the cooperative program to migrate the disk stripes of the other level migration areas to the target area in sequence, the method further includes: and recording the position information of the target strip reserved area in the target redundant array of independent disks. It should be noted that, after each execution of the migration of the full-level migration area, the controller automatically records the location information of the target stripe reservation area, so as to determine whether the sequence of the subsequent level migration is from top to bottom or from bottom to top.
According to the method provided by the embodiment of the invention, the level migration areas in the original redundant array of independent disks are determined, and a plurality of disk strips in the level migration areas are sequentially and concurrently migrated to the target redundant array of independent disks until the whole redundant array of independent disks is migrated, so that the level migration efficiency of the redundant array of independent disks card can be obviously improved by adopting a concurrent migration mode. Meanwhile, in the level migration process, the mode of combining the level migration area with the strip reserved area is adopted, so that data is not lost in the level migration process of the redundant array of independent disks, the problem of data write holes after restarting of the redundant array of independent disks due to unexpected power failure or other faults is solved, and the data security in the level migration process is effectively ensured.
In an embodiment of the present application, the method further includes: monitoring whether a restarting event occurs to the target RAID card; under the condition that the restart event of the target RAID card is determined, acquiring a target RAID currently migrated target disk stripe; determining a level migration zone where a target disk stripe is located from an original redundant array of independent disks, and acquiring backup data of the target disk stripe from the level migration zone where the target disk stripe is located; and migrating the backup data to the target redundant array of independent disks.
According to the method, the disk strips in the level migration area in the original redundant array of independent disks can be used as data backup in the level migration process, so that under the condition that the redundant array card of independent disks is restarted due to unexpected power failure or other faults, data recovery in the target redundant array of independent disks can be performed through backup data in the original redundant array of independent disks. Therefore, the problem of data loss in the migration process caused by restarting the redundant array of independent disks card due to faults is solved.
According to an aspect of the embodiments of the present application, a method embodiment of a level migration method of a redundant array of independent disks is provided, and fig. 4 is a flowchart of a level migration method of a redundant array of independent disks provided in the embodiments of the present application, as shown in fig. 4, where the method includes:
in step S21, an original redundant array of independent disks to be subjected to degradation migration is determined, where the original redundant array of independent disks includes a plurality of level migration areas, and each level migration area includes a plurality of disk stripes.
The method provided by the embodiment of the invention is applied to the controller of the RAID card, wherein the method for determining the original RAID to be subjected to degradation migration comprises the following steps: acquiring a demotion migration task aiming at the RAID card, wherein the demotion migration task carries at least one RAID mark; and determining the RAID corresponding to the RAID identifier in the RAID card as an original RAID.
Specifically, the method for obtaining the degradation migration task for the redundant array of independent disks card comprises the following steps of:
and D1, receiving a degradation migration command issued by the client.
And D2, analyzing the degradation migration command to obtain at least one redundant array of independent disks identifier.
And D3, generating a degraded migration task based on the RAID (redundant array of independent disks) identification.
In the embodiment of the application, the client may receive a Command line (abbreviated as CLI) input by a user, or the client receives input information of the user on a graphical interface, and generates a downgrade migration Command. And then the client side issues a degradation migration command to the controller, and the controller analyzes the degradation migration command to obtain the RAID (redundant array of independent disks) identifier carried by the controller, wherein the RAID identifier can be the position identifier or the number of the RAID. Finally, the controller generates a downgraded migration task based on the redundant array of independent disks identification.
In this embodiment of the present application, the controller obtains the corresponding raid from the raid card by using the raid id, determines the raid as the original raid, and reads the current raid level of the original raid at the same time, where the raid level may be: RAID0, RAID1, RAID5, RAID6, RAID10, RAID50, and RAID60. The original redundant array of independent disks includes a plurality of disk stripes to be subject to level migration, each disk stripe including a plurality of stripe blocks.
In an embodiment of the present application, the original redundant array of independent disks includes a plurality of level migration areas, each level migration area including a plurality of disk stripes. Specifically, the original disk stripe may be partitioned before performing the destage migration task, where the partitioning process includes: determining the number of preset strips; and sequentially selecting disk strips with preset strip numbers from a plurality of disk strips of an original redundant array of independent disks to form a plurality of level migration areas. It should be noted that, since the current level migration is downgrade, the corresponding number of disk stripes may be selected from the original redundant array of independent disks from the order of the logical block address from large to small (LBA: X-LBA: 0) to form the level migration zone.
In step S22, a target redundant array of independent disks is determined, wherein the target redundant array of independent disks is obtained based on a target disk and a plurality of level migration areas, and the target disk is a disk removed from the original redundant array of independent disks.
In the embodiment of the present application, the controller first obtains a pre-established target redundant array of independent disks, and because the target redundant array of independent disks is a destage migration task, the target redundant array of independent disks includes: the multiple levels of migration areas in the original redundant array of independent disks also comprise newly inserted target disks.
Specifically, determining the target redundant array of independent disks includes: determining a removed target disk, determining a plurality of level migration areas in an original redundant array of independent disks as a third area, and determining a fourth area corresponding to the target disk; removing a fourth area corresponding to the target disk from the third area to obtain an updated third area; and constructing a target redundant array of independent disks based on the updated third area.
As an example, as shown in fig. 5, when the original redundant array of independent disks needs to be upgraded from RAID6 to RAID5, a target redundant array of independent disks corresponding to RAID5 is first constructed, and specifically, because the current downgrade migration is performed, the controller needs to remove the target disk determined to be removed from the original redundant array of independent disks, so that it is required to obtain a third area corresponding to the original redundant array of independent disks, determine a fourth area corresponding to the target hard disk from the third area, and remove the fourth area corresponding to the target hard disk from the third area, thereby obtaining the target redundant array of independent disks.
And S23, sequentially and concurrently migrating the disk strips in each level migration zone to the target RAID (redundant array of independent disks) based on the logical block addresses.
In the embodiment of the application, the disk stripes in each level migration zone are sequentially and concurrently migrated to the target redundant array of independent disks, including the following steps E1-E2:
step E1, obtaining the number of the strips corresponding to the level migration area, and pulling the corresponding number according to the number of the strips corresponding to the level migration area.
In the embodiment of the application, the controller firstly determines the coroutine number according to the number of the strips corresponding to the level migration area, wherein the number of the strips corresponding to the level migration area is the same as the coroutine number. Next, the controller pulls the corresponding coroutine using the corollary Cheng Shuliang.
It should be noted that, by setting the same number of coroutines as the number of the stripes, in the subsequent process of executing the level migration, one coroutine executes the level migration of one stripe, and simultaneously, the disk stripes of the level migration area are concurrently migrated to the target redundant array of independent disks through multiple coroutines, so that the level migration of multiple stripes is performed concurrently, and the level migration efficiency of the redundant array of independent disks is improved.
And E2, calling a cooperative program to concurrently migrate the disk strips in each level migration zone to the target redundant array of independent disks according to the arrangement sequence of the logical block addresses from large to small.
In this embodiment of the present application, since the current downgrade migration is performed, the level migration needs to be performed on the disk stripe in a reverse order, and the calling cooperative program sequentially and concurrently migrates the disk stripe in the level migration area to the use area according to the arrangement order (for example, the order of LBA: X-LBA: 0 in fig. 5) from large to small of the logical block addresses of the disk stripe in the level migration area.
As an example, the number of stripes corresponding to the level migration area is 3, where 3 disk stripes (stripe 7, stripe6, and stripe 5) corresponding to the last 3 in the original redundant array of independent disks may be used as the target disk stripe, and the level migration area corresponding to the target disk stripe is the first level migration area, so that the stripes (stripe 7, stripe6, and stripe 5) in the first level migration area in the original redundant array of independent disks are directly migrated to the usage area concurrently. After all the level migration areas in the original redundant array of independent disks are migrated, the target redundant array of independent disks takes the areas except the used area as the reserved area of the strip.
According to the method provided by the embodiment of the invention, a fixed band reserved area and a fixed-length level migration area are provided according to the number of the formed magnetic disks of the redundant array of independent disks, the migration task of the level migration area is automatically moved to the next level migration area after being completed, the circulation is performed until the level migration of the whole redundant array of independent disks is completed, the concurrent level migration is performed on a plurality of magnetic disk bands in the level migration area, and the level migration efficiency of the redundant array of independent disks is improved in a concurrent mode.
In an embodiment of the present application, after the invoking the cooperative program concurrently migrates the disk stripe of the level migration area to the usage area, the method further includes: taking the area except the disk stripe in the target redundant array of independent disks as a stripe reservation area; and recording the position information of the reserved area of the strip in the target redundant array of independent disks. It should be noted that, since the stripe reservation area does not exist in the original redundant array of independent disks, and when the level migration task is degradation, the reverse migration is performed according to the logical block address, so after all the disk stripes are migrated to the target redundant array of independent disks, a remaining area (i.e. an area where no disk stripe exists) exists in the target redundant array of independent disks, and the area is used as the disk stripe reservation area. In addition, after each execution of the migration of the full-level migration area, the controller automatically records the location information of the reserved area of the stripe, so as to determine whether the sequence of the subsequent level migration is from top to bottom or from bottom to top.
According to the method provided by the embodiment of the invention, the level migration areas in the original redundant array of independent disks are determined, and a plurality of disk strips in the level migration areas are sequentially and concurrently migrated to the target redundant array of independent disks until the whole redundant array of independent disks is migrated, so that the level migration efficiency of the redundant array of independent disks card can be obviously improved by adopting a concurrent migration mode. Meanwhile, in the level migration process, the mode of combining the level migration area with the strip reserved area is adopted, so that data is not lost in the level migration process of the redundant array of independent disks, the problem of data write holes after restarting of the redundant array of independent disks due to unexpected power failure or other faults is solved, and the data security in the level migration process is effectively ensured.
In addition, the level migration task is executed by a coroutine, belongs to a background task, and can still process the I/O request of a foreground host in the execution process of the level migration background task of the RAID card. Compared with the prior art, the method has the advantage that the foreground I/O request is suspended as long as the RAID card executes the level migration task. Improving I/O performance.
In an embodiment of the present application, the method further includes: monitoring whether a restarting event occurs to the target RAID card; under the condition that the restart event of the target RAID card is determined, acquiring a target RAID currently migrated target disk stripe; determining a level migration zone where a target disk stripe is located from an original redundant array of independent disks, and acquiring backup data of the target disk stripe from the level migration zone where the target disk stripe is located; and migrating the backup data to the target redundant array of independent disks.
According to the method, the disk strips in the level migration area in the original redundant array of independent disks can be used as data backup in the level migration process, so that under the condition that the redundant array card of independent disks is restarted due to unexpected power failure or other faults, data recovery in the target redundant array of independent disks can be performed through backup data in the original redundant array of independent disks. Therefore, the problem of data loss in the migration process caused by restarting the redundant array of independent disks card due to faults is solved.
The embodiment of the application also provides a level migration method of the redundant array of independent disks, which comprises the following steps: acquiring a level migration task aiming at the RAID card, wherein the level migration task carries at least one RAID identifier and a level migration type; and determining the RAID corresponding to the RAID identifier in the RAID card as an original RAID. Detecting whether a stripe reserved area exists in the original redundant array of independent disks, and if the stripe reserved area does not exist in the original redundant array of independent disks, migrating the disks in the original redundant array of independent disks based on a specified migration strategy corresponding to the class migration type to obtain a target redundant array of independent disks.
As an example, as shown in fig. 6, in the case that a stripe reserved area does not exist in the original Redundant Array of Independent Disks (RAID) and the level migration type is directly downgraded from the redundant array of independent disks level 10 (RAID 10) to the redundant array of independent disks level 0 (RAID 0), the information of the disk 2 and the disk 4 in the original redundant array of independent disks (RAID 10) is directly deleted, at this time, a target redundant array of independent disks (RAID 0) including the disk 1 and the disk 3 is obtained, then the member disks of the target redundant array of independent disks are configured as the disk 1 and the disk 3, and the configuration information is saved.
As shown in fig. 7, in the case where there is no stripe reservation in the original redundant array of independent disks and the level migration type is directly upgraded from redundant array of independent disks level 0 (RAID 10) to redundant array of independent disks level 10 (RAID 10), data in disk 1 and disk 3 in the original redundant array of independent disks (RAID 0) is written to a specified partition in disk 2 and disk 4. Obtaining a target redundant array of independent disks (RAID 10) comprising a disk 1, a disk 2, a disk 3 and a disk 4, and then configuring member disk information of the RAID10 to be the disk 1, the disk 2, the disk 3 and the disk 4; and saving the configuration information.
As shown in fig. 8, in the case where there is no stripe reservation in the original RAID and the level migration type is downgraded from RAID level 1 (RAID 1) to RAID level 0 (RAID 0), data 1, data 2, data 3, and data disk 4 are kept unchanged. The logical block addresses of the data 5, the data 6, the data 7 and the data 8 in the magnetic disk 2 are determined by using the spatial distribution of the target array, and the data 5, the data 6, the data 7 and the data 8 are written into the magnetic disk 2 based on the logical block addresses. And (5) circulating the rest data to finish degradation, and storing final array configuration information. Wherein, determining the logical block addresses of the data 5, the data 6, the data 7 and the data 8 in the disk 2 by using the spatial distribution of the target array can be alternatively writing corresponding amounts of data in the disk 1 and the disk 2. For example: during downgrade migration, firstly, data 1-4 are written in the disk 1, secondly, data 5-8 are written in the disk 2, then 9-12 are written in the disk 1, and finally, data 13-16 are written in the disk 2.
Fig. 9 is a block diagram of a level migration system of a redundant array of independent disks according to an embodiment of the present application, where the device may be implemented as part or all of an electronic device by software, hardware, or a combination of both. As shown in fig. 9, the system includes: the controller 61 and the RAID card 62, the controller 61 is connected with the RAID card 62, and the RAID card 62 comprises a plurality of RAID; the controller is configured to execute the level migration method of the redundant array of independent disks of the above embodiment.
In the present embodiment, the controller 61 includes: and caching the position information of the tape reserved area in the target RAID after the tape of the magnetic disk stored in each level migration area is concurrently migrated to the target RAID.
In the embodiment of the application, the level migration zone is formed based on an LWP low water level pointer and an HWP high water level pointer.
Fig. 10 is a block diagram of an upgrade migration apparatus for a redundant array of independent disks according to an embodiment of the present application, where the apparatus may be implemented as part or all of an electronic device by software, hardware, or a combination of both. As shown in fig. 10, the apparatus includes:
An obtaining module 71, configured to determine an original redundant array of independent disks to be subjected to upgrade migration, where the original redundant array of independent disks includes an original stripe reservation area and a plurality of level migration areas, and a size of the original stripe reservation area and a size of the level migration area form a preset proportional relationship, and each level migration area includes a plurality of disk stripes;
a determining module 72, configured to determine a target redundant array of independent disks, where the target redundant array of independent disks includes a target stripe reservation area and a target area, where the target stripe reservation area is configured based on an original stripe reservation area and a target disk, and the target area is configured based on a plurality of level migration areas and the target disk, and the target disk is a disk inserted into the original redundant array of independent disks;
the processing module 73 is configured to sequentially concurrently migrate the disk stripes in each level migration area to the target stripe reservation area or the target area based on the logical block address.
In this embodiment of the present application, the obtaining module 71 is specifically configured to obtain an upgrade migration task for a redundant array of independent disks card, where the upgrade migration task carries at least one redundant array of independent disks identifier; and determining the RAID corresponding to the RAID identifier in the RAID card as an original RAID.
In this embodiment of the present application, the processing module 73 is configured to determine an inserted target disk, and obtain a first disk area from the target disk according to the number of stripes corresponding to the target stripe reservation area; constructing a target stripe reservation region based on the first disk region and the target stripe reservation region; constructing a target area based on a second disk area and a level migration area in the target disk, wherein the second disk area is a disk area except the first disk area in the target disk; and constructing a target redundant array of independent disks based on the target stripe reserved area and the target area.
In this embodiment of the present application, the execution module 74 is configured to obtain the number of strips corresponding to the level migration area, and pull a corresponding number of coroutines according to the number of strips corresponding to the level migration area; and the calling cooperative program concurrently migrates the disk strips in each level migration area to a target strip reserved area or a target area according to the arrangement sequence of the logical block addresses from small to large.
In this embodiment, the execution module 74 is configured to invoke a cooperative procedure to obtain a target level migration area that is matched with the stripe reservation area according to the logical block address, and concurrently migrate the disk stripe of the target level migration area to the target stripe reservation area; and the calling cooperative program sequentially and concurrently migrates the disk strips of other level migration areas to the target area according to the logical block address, wherein the other level migration areas are level migration areas except the target level migration areas in the original redundant array of independent disks.
In the embodiment of the present application, the execution module 74 is configured to obtain the number of stripes corresponding to the target stripe reservation region; obtaining target disk strips matched with the number of the strips, and taking a level migration area where the target disk strips are located as a target level migration area; and calling the cooperative program to concurrently migrate the disk strips of the target level migration area to the target strip reservation area.
In the embodiment of the present application, the execution module 74 is configured to obtain the number of stripes corresponding to the target stripe reservation region; obtaining target disk strips matched with the number of the strips, and taking a level migration area where the target disk strips are located as a target level migration area; and the calling cooperative program concurrently migrates the logical block addresses of the disk stripes in the target level migration area to the target stripe reservation area from the small to the large arrangement order.
In an embodiment of the present application, the apparatus further includes: and the recording module is used for recording the position information of the target strip reserved area in the target redundant array of independent disks.
In an embodiment of the present application, the apparatus further includes: the monitoring module is used for monitoring whether a restart event occurs to the target RAID card; under the condition that the restart event of the target RAID card is determined, acquiring a target RAID currently migrated target disk stripe; determining a level migration zone where a target disk stripe is located from an original redundant array of independent disks, and acquiring backup data of the target disk stripe from the level migration zone where the target disk stripe is located; and migrating the backup data to the target redundant array of independent disks.
Fig. 11 is a block diagram of a downgrade migration apparatus for redundant array of independent disks according to an embodiment of the present application, where the apparatus may be implemented as part or all of an electronic device by software, hardware, or a combination of both. As shown in fig. 11, the apparatus includes:
an obtaining module 81, configured to determine an original redundant array of independent disks to be subjected to downgrade migration, where the original redundant array of independent disks includes a plurality of level migration areas, and each level migration area includes a plurality of disk stripes;
a determining module 82, configured to determine a target redundant array of independent disks, where the target redundant array of independent disks is obtained based on a target disk and a plurality of level migration areas, and the target disk is a disk removed from the original redundant array of independent disks;
the processing module 83 is configured to sequentially migrate the disk stripes in each level migration zone to the target redundant array of independent disks concurrently based on the logical block addresses.
In this embodiment of the present application, the obtaining module 81 is configured to receive a demotion migration command issued by a client; resolving the degradation migration command to obtain at least one Redundant Array of Independent Disks (RAID) identifier; a destage migration task is generated based on the RAID identification.
In this embodiment of the present application, the processing module 83 is configured to determine a removed target disk, determine a plurality of level migration areas in the original redundant array of independent disks as a third area, and determine a fourth area corresponding to the target disk; removing a fourth region corresponding to the target disk from the third region to obtain an updated third region; and constructing a target redundant array of independent disks based on the updated third area.
In this embodiment, the execution module 84 is configured to obtain the number of strips corresponding to the level migration area, and pull a corresponding number of coroutines according to the number of strips corresponding to the level migration area; and calling a cooperative program to sequentially and concurrently migrate the disk strips in each level migration zone to the target redundant array of independent disks.
In this embodiment, the execution module 84 is configured to invoke the cooperative procedure to sequentially transfer the disk stripes of the level migration area to the target redundant array of independent disks according to the order of the logical block addresses of the disk stripes of the level migration area from large to small.
In an embodiment of the present application, the apparatus further includes: the recording module is used for taking the area except the disk stripes in the target redundant array of independent disks as a stripe reservation area; and recording the position information of the reserved area of the strip in the target redundant array of independent disks.
In an embodiment of the present application, the apparatus further includes: the monitoring module is used for monitoring whether a restart event occurs to the target RAID card; under the condition that the restart event of the target RAID card is determined, acquiring a target RAID currently migrated target disk stripe; determining a level migration zone where a target disk stripe is located from an original redundant array of independent disks, and acquiring backup data of the target disk stripe from the level migration zone where the target disk stripe is located; and migrating the backup data to the target redundant array of independent disks.
The embodiment of the application further provides an electronic device, as shown in fig. 12, the electronic device may include: the device comprises a processor 1501, a communication interface 1502, a memory 1503 and a communication bus 1504, wherein the processor 1501, the communication interface 1502 and the memory 1503 are in communication with each other through the communication bus 1504.
A memory 1503 for storing a computer program;
the processor 1501, when executing the computer program stored in the memory 1503, implements the steps of the above embodiments.
The communication bus mentioned by the above terminal may be a peripheral component interconnect standard (Peripheral Component Interconnect, abbreviated as PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, abbreviated as EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the terminal and other devices.
The memory may include random access memory (Random Access Memory, RAM) or non-volatile memory (non-volatile memory), such as at least one disk memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; but also digital signal processors (Digital Signal Processing, DSP for short), application specific integrated circuits (Application Specific Integrated Circuit, ASIC for short), field-programmable gate arrays (Field-Programmable Gate Array, FPGA for short) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
In yet another embodiment provided herein, a computer readable storage medium is provided, where instructions are stored, when the computer readable storage medium runs on a computer, to cause the computer to perform the level migration method of the redundant array of independent disks according to any one of the above embodiments.
In yet another embodiment provided herein, there is also provided a computer program product containing instructions that, when run on a computer, cause the computer to perform the level migration method of a redundant array of independent disks of any one of the embodiments described above.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present application, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital subscriber line), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk), etc.
The foregoing description is only of the preferred embodiments of the present application and is not intended to limit the scope of the present application. Any modifications, equivalent substitutions, improvements, etc. that are within the spirit and principles of the present application are intended to be included within the scope of the present application.
The foregoing is merely a specific embodiment of the application to enable one skilled in the art to understand or practice the application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (22)

1. The upgrade migration method of the redundant array of independent disks is characterized by comprising the following steps of:
determining an original redundant array of independent disks to be subjected to upgrade migration, wherein the original redundant array of independent disks comprises an original stripe reservation area and a plurality of level migration areas, the size of the original stripe reservation area and the size of the level migration areas form a preset proportional relation, and each level migration area comprises a plurality of disk stripes;
Determining a target redundant array of independent disks, wherein the target redundant array of independent disks comprises a target strip reserved area and a target area, the target strip reserved area is constructed based on the original strip reserved area and a target disk, the target area is constructed based on a plurality of level migration areas and the target disk, and the target disk is a disk inserted into the original redundant array of independent disks;
and sequentially and concurrently migrating the disk stripes in each level migration area to the target stripe reservation area or the target area based on the logical block addresses.
2. The method of claim 1, wherein determining the original redundant array of independent disks to perform the upgrade migration comprises:
acquiring an upgrade migration task aiming at the RAID card, wherein the upgrade migration task carries at least one RAID mark;
and determining the RAID corresponding to the RAID identifier in the RAID card as an original RAID.
3. The method of claim 1, wherein determining the target redundant array of independent disks comprises:
Determining a target disk inserted into the original redundant array of independent disks, and acquiring a first disk area from the target disk according to the number of the stripes corresponding to the reserved areas of the original stripes;
constructing the target stripe reservation based on the first disk region and the original stripe reservation;
constructing the target area based on a second disk area in the target disk and the level migration area, wherein the second disk area is a disk area except the first disk area in the target disk;
and constructing the target RAID based on the target stripe reserved area and the target area.
4. The method of claim 1, wherein sequentially concurrently migrating disk stripes within each of the level migration areas to the target stripe reservation or the target area based on logical block addresses comprises:
acquiring the number of strips corresponding to the level migration area, and pulling the coroutines with the corresponding number according to the number of strips corresponding to the level migration area;
and calling the coroutine to concurrently migrate the disk strips in each level migration area to the target strip reserved area or the target area according to the arrangement sequence of the logical block addresses from small to large.
5. The method of claim 4, wherein the invoking the coroutine to concurrently migrate the disk stripes in each of the level migration areas to the target stripe reservation or the target area in the order of the logical block addresses from small to large comprises:
calling the coroutine to acquire a target level migration area matched with the target band reservation area according to the logical block address, and concurrently migrating the disk band of the target level migration area to the target band reservation area;
and calling the coroutine to sequentially and concurrently migrate the disk strips of other level migration areas to the target area according to the logical block address, wherein the other level migration areas are level migration areas except the target level migration areas in the original redundant array of independent disks.
6. The method of claim 5, wherein the invoking the coroutine to obtain a target-level migration zone matching the target-level migration zone according to the logical block address and concurrently migrate disk stripes of the target-level migration zone to the target-stripe reservation zone comprises:
acquiring the number of the strips corresponding to the target strip reserved area;
Obtaining target disk strips matched with the strips in number, and taking a level migration area where the target disk strips are located as the target level migration area;
and calling the coroutine to transfer the logical block addresses of the disk stripes in the target level migration area to the target stripe reservation area from small to large.
7. The method of claim 5, wherein invoking the coroutine to concurrently migrate disk stripes of other levels of migration regions to the target region in turn according to the logical block address comprises:
acquiring other level migration areas of the original redundant array of independent disks;
and calling the coroutine to sequentially and concurrently migrate the disk strips of the other level migration areas to the target area according to the arrangement sequence of the logical block addresses of the disk strips in the other level migration areas from small to large.
8. The method of claim 5, wherein after invoking the coroutine to concurrently migrate disk stripes of other levels of migration regions to the target region in turn, the method further comprises:
and recording the position information of the target stripe reservation area in the target redundant array of independent disks.
9. The method according to claim 1, wherein the method further comprises:
monitoring whether a restart event occurs to the target RAID card;
under the condition that the target RAID card is determined to have a restarting event, acquiring a target RAID currently migrated target disk stripe;
determining a level migration area where the target disk stripe is located from the original redundant array of independent disks, and acquiring backup data of the target disk stripe from the level migration area where the target disk stripe is located;
and migrating the backup data to the target RAID.
10. The degradation migration method for the redundant array of independent disks is characterized by comprising the following steps of:
determining an original redundant array of independent disks to be subjected to degradation migration, wherein the original redundant array of independent disks comprises a plurality of level migration areas, and each level migration area comprises a plurality of disk stripes;
determining a target redundant array of independent disks, wherein the target redundant array of independent disks is obtained based on a target disk and a plurality of level migration areas, and the target disk is removed from the original redundant array of independent disks;
And sequentially and concurrently migrating the disk strips in each level migration zone to the target RAID (redundant array of independent disks) based on the logical block addresses.
11. The method of claim 10, wherein determining the original redundant array of independent disks to perform the downgrade migration comprises:
acquiring a demotion migration task aiming at the RAID card, wherein the demotion migration task carries at least one RAID mark;
and determining the RAID corresponding to the RAID identifier in the RAID card as an original RAID.
12. The method of claim 10, wherein determining the target redundant array of independent disks comprises:
the determination is made of the target disk that was removed,
determining a plurality of level migration areas in the original redundant array of independent disks as a third area, and determining a fourth area corresponding to the target disk;
removing a fourth area corresponding to the target disk from the third area to obtain an updated third area;
and constructing the target RAID based on the updated third area.
13. The method of claim 10, wherein sequentially concurrently migrating the disk stripes within each of the level migration areas to the target redundant array of independent disks based on logical block addresses, comprises:
acquiring the number of strips corresponding to the level migration area, and pulling the coroutines with the corresponding number according to the number of strips corresponding to the level migration area;
and calling the coroutine to concurrently migrate the disk strips in each level migration zone to the target redundant array of independent disks according to the arrangement sequence of the logical block addresses from large to small.
14. The method of claim 13, wherein after invoking the coroutine to concurrently migrate disk stripes within each of the level migration regions to the target redundant array of independent disks in the order in which the logical block addresses are arranged from big to small, the method further comprises:
taking the area except the disk stripe in the target redundant array of independent disks as a stripe reservation area;
and recording the position information of the reserved area of the strip in the target redundant array of independent disks.
15. The method according to claim 10, wherein the method further comprises:
Monitoring whether a restart event occurs to the target RAID card;
under the condition that the target RAID card is determined to have a restarting event, acquiring a target RAID currently migrated target disk stripe;
determining a level migration area where the target disk stripe is located from the original redundant array of independent disks, and acquiring backup data of the target disk stripe from the level migration area where the target disk stripe is located;
and migrating the backup data to the target RAID.
16. A level migration system for a redundant array of independent disks, the system comprising: the system comprises a controller and a RAID card, wherein the controller is connected with the RAID card, and the RAID card comprises a plurality of RAID;
the controller being adapted to perform the method of any of the preceding claims 1-15.
17. The system of claim 16, wherein the controller comprises: and the cache is used for recording the position information of the tape reserved area in the target RAID after the tape in each level migration area is concurrently migrated to the target RAID.
18. The system of claim 16, wherein the level transition zone is based on an LWP low water pointer and an HWP high water pointer.
19. An upgrade migration apparatus for a redundant array of independent disks, comprising:
the system comprises an acquisition module, a storage module and a storage module, wherein the acquisition module is used for determining an original redundant array of independent disks to be subjected to upgrade migration, the original redundant array of independent disks comprises an original strip reserved area and a plurality of level migration areas, the size of the original strip reserved area and the size of the level migration areas form a preset proportional relation, and each level migration area comprises a plurality of disk strips;
the system comprises a determining module, a determining module and a judging module, wherein the determining module is used for determining a target redundant array of independent disks, the target redundant array of independent disks comprises a target strip reserved area and a target area, the target strip reserved area is constructed based on the original strip reserved area and a target disk, the target area is constructed based on a plurality of level migration areas and the target disk, and the target disk is a disk inserted into the original redundant array of independent disks;
and the processing module is used for sequentially and concurrently migrating the disk stripes in each level migration area to the target stripe reservation area or the target area based on the logical block address.
20. A downgrade migration apparatus for a redundant array of independent disks, comprising:
the system comprises an acquisition module, a storage module and a storage module, wherein the acquisition module is used for determining an original redundant array of independent disks for performing degradation migration, the original redundant array of independent disks comprises a plurality of level migration areas, and each level migration area comprises a plurality of disk stripes;
the determining module is used for determining a target redundant array of independent disks, wherein the target redundant array of independent disks is obtained based on a target disk and a plurality of level migration areas, and the target disk is removed from the original redundant array of independent disks;
and the processing module is used for sequentially and concurrently migrating the disk strips in each level migration zone to the target redundant array of independent disks based on the logical block address.
21. A storage medium comprising a stored program, wherein the program when run performs the method of any one of the preceding claims 1 to 15.
22. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus; wherein:
A memory for storing a computer program;
a processor for performing the method of any one of claims 1 to 15 by running a program stored on a memory.
CN202310467823.4A 2023-04-27 2023-04-27 Upgrading migration method, degrading migration method and device for redundant array of independent disk Active CN116185311B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310467823.4A CN116185311B (en) 2023-04-27 2023-04-27 Upgrading migration method, degrading migration method and device for redundant array of independent disk

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310467823.4A CN116185311B (en) 2023-04-27 2023-04-27 Upgrading migration method, degrading migration method and device for redundant array of independent disk

Publications (2)

Publication Number Publication Date
CN116185311A true CN116185311A (en) 2023-05-30
CN116185311B CN116185311B (en) 2023-08-08

Family

ID=86434883

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310467823.4A Active CN116185311B (en) 2023-04-27 2023-04-27 Upgrading migration method, degrading migration method and device for redundant array of independent disk

Country Status (1)

Country Link
CN (1) CN116185311B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117055822A (en) * 2023-10-11 2023-11-14 苏州元脑智能科技有限公司 NVME SSD Raid card board power-carrying system and control method

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1991730A (en) * 2005-12-28 2007-07-04 英业达股份有限公司 Expanding system and method for redundant array of self-contained disk
CN101587425A (en) * 2009-06-16 2009-11-25 杭州华三通信技术有限公司 A kind of method and device that increases magnetic disc redundant array redundancy
CN101825994A (en) * 2010-04-16 2010-09-08 苏州壹世通科技有限公司 Firmware-based flash memory array management device and method independent of operating system
CN112114758A (en) * 2020-10-12 2020-12-22 苏州浪潮智能科技有限公司 Method, device and medium for expanding independent redundant disk array
CN112130768A (en) * 2020-09-18 2020-12-25 苏州浪潮智能科技有限公司 Disk array online capacity expansion method and device and computer readable storage medium
CN115206406A (en) * 2021-04-12 2022-10-18 伊姆西Ip控股有限责任公司 Method and device for managing redundant array of independent disks
CN115344205A (en) * 2022-08-15 2022-11-15 超聚变数字技术有限公司 Data reading and writing method and computing device for disk firmware upgrading process
CN115437578A (en) * 2022-11-04 2022-12-06 苏州浪潮智能科技有限公司 Data migration method, device, equipment and medium of disk array

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1991730A (en) * 2005-12-28 2007-07-04 英业达股份有限公司 Expanding system and method for redundant array of self-contained disk
CN101587425A (en) * 2009-06-16 2009-11-25 杭州华三通信技术有限公司 A kind of method and device that increases magnetic disc redundant array redundancy
CN101825994A (en) * 2010-04-16 2010-09-08 苏州壹世通科技有限公司 Firmware-based flash memory array management device and method independent of operating system
CN112130768A (en) * 2020-09-18 2020-12-25 苏州浪潮智能科技有限公司 Disk array online capacity expansion method and device and computer readable storage medium
CN112114758A (en) * 2020-10-12 2020-12-22 苏州浪潮智能科技有限公司 Method, device and medium for expanding independent redundant disk array
CN115206406A (en) * 2021-04-12 2022-10-18 伊姆西Ip控股有限责任公司 Method and device for managing redundant array of independent disks
CN115344205A (en) * 2022-08-15 2022-11-15 超聚变数字技术有限公司 Data reading and writing method and computing device for disk firmware upgrading process
CN115437578A (en) * 2022-11-04 2022-12-06 苏州浪潮智能科技有限公司 Data migration method, device, equipment and medium of disk array

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117055822A (en) * 2023-10-11 2023-11-14 苏州元脑智能科技有限公司 NVME SSD Raid card board power-carrying system and control method
CN117055822B (en) * 2023-10-11 2024-02-06 苏州元脑智能科技有限公司 NVME SSD Raid card board power-carrying system and control method

Also Published As

Publication number Publication date
CN116185311B (en) 2023-08-08

Similar Documents

Publication Publication Date Title
US7269667B2 (en) Disk array system and method for migrating from one storage system to another
CN103534688B (en) Data reconstruction method, memory device and storage system
CN107710169A (en) The access method and device of a kind of flash memory device
US10365845B1 (en) Mapped raid restripe for improved drive utilization
CN111124263B (en) Method, electronic device and computer program product for managing a plurality of discs
CN116185311B (en) Upgrading migration method, degrading migration method and device for redundant array of independent disk
US10324794B2 (en) Method for storage management and storage device
US11379326B2 (en) Data access method, apparatus and computer program product
CN116501259A (en) Disk group dual-activity synchronization method and device, computer equipment and storage medium
CN107526533B (en) Storage management method and equipment
US20150082014A1 (en) Virtual Storage Devices Formed by Selected Partitions of a Physical Storage Device
CN111124294B (en) Sector mapping information management method and device, storage medium and equipment
CN111124251B (en) Method, apparatus and computer readable medium for I/O control
CN117131014A (en) Database migration method, device, equipment and storage medium
CN115359834B (en) Disk arbitration region detection method, device, equipment and readable storage medium
CN112748865A (en) Method, electronic device and computer program product for storage management
CN109508140B (en) Storage resource management method and device, electronic equipment and system
CN107608633B (en) Storage management method and related device for storage equipment
CN109857519A (en) The processing method and relevant apparatus of virtual disk
US10360990B2 (en) Information processing device, information processing method, and program
CN115904795A (en) Data storage method and device in storage system
CN114489487A (en) Data storage protection method and system
US9262424B1 (en) Techniques for performing slice consistency checks
CN113722131A (en) Method and system for facilitating fast crash recovery in a storage device
CN117234436B (en) Method, device, storage system and product for expanding capacity of disk array

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant