CN112667162A - RAID recovery method and device - Google Patents

RAID recovery method and device Download PDF

Info

Publication number
CN112667162A
CN112667162A CN202011576711.5A CN202011576711A CN112667162A CN 112667162 A CN112667162 A CN 112667162A CN 202011576711 A CN202011576711 A CN 202011576711A CN 112667162 A CN112667162 A CN 112667162A
Authority
CN
China
Prior art keywords
raid
log
target
creation
created
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
CN202011576711.5A
Other languages
Chinese (zh)
Other versions
CN112667162B (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.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua 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 Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202011576711.5A priority Critical patent/CN112667162B/en
Publication of CN112667162A publication Critical patent/CN112667162A/en
Application granted granted Critical
Publication of CN112667162B publication Critical patent/CN112667162B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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

  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the application relates to the technical field of data storage and data recovery, and provides a RAID recovery method and device. The method comprises the following steps: acquiring a rollback log of a target RAID (redundant array of independent disks) according to the UUID and the creation time of the target RAID, wherein the rollback log of the target RAID is generated according to at least one stored RAID creation log; the creation log of each RAID comprises all or part of the creation time, UUID, grade and serial number of the used disk of the corresponding RAID; obtaining the environmental parameters of the target RAID according to the rollback log of the target RAID; and recovering the target RAID according to the environment parameters of the target RAID, thereby solving the problem that the specified RAID cannot be recovered because the environment parameters are covered due to the multiple creation of the RAID.

Description

RAID recovery method and device
Technical Field
The present application relates to the field of data storage and data recovery technologies, and in particular, to a RAID recovery method and apparatus.
Background
A Redundant Array of Independent Disks (RAID) is a disk group (logical disk) formed by combining a plurality of Independent Disks (physical Disks) in different ways for data backup. RAID storage performance is higher relative to a single disk.
In the current RAID recovery method, a user is required to input environment parameters such as a disk sequence used by RAID, RAID level, RAID rotation direction, and RAID stripe size to perform RAID recovery. If the environmental parameters are lost or incomplete, the recovery of the RAID will be affected, and further, data stored in the physical disk based on the RAID cannot be normally acquired by a user, and it is difficult to ensure the data storage security of the RAID. If different RAIDs are created on the hard disk for a plurality of times, only the environment parameters of the last created RAID are reserved in the super block at the specified position of the disk, and the environment parameters before the last time are overwritten, so that only the last created RAID can be restored, and the data stored on the RAID before the last time is lost.
Disclosure of Invention
The embodiment of the application provides a RAID recovery method and device, which are used for realizing that any one appointed RAID in the RAID which is created for many times before can be recovered after different RAIDs are created for many times in a hard disk.
In a first aspect, an embodiment of the present application provides a RAID recovery method, including:
acquiring a rollback log of a target Redundant Array of Independent Disks (RAID) according to a Universal Unique Identifier (UUID) and creation time of the target RAID, wherein the rollback log of the target RAID is generated according to at least one stored RAID creation log; the creation log of each RAID comprises all or part of the creation time, UUID, grade and serial number of the used disk of the corresponding RAID;
obtaining an environmental parameter of the target RAID according to the rollback log of the target RAID;
and recovering the target RAID according to the environmental parameters of the target RAID.
According to the method and the device, the rollback log of the target RAID is obtained according to the UUID and the creation time of the target RAID, wherein the rollback log of the target RAID is generated according to the creation log of at least one stored RAID, and because the creation log of each RAID comprises all or part of the creation time, the UUID, the grade and the serial number of a used disk of the corresponding RAID, the environment parameters of the corresponding RAID are not covered or lost, and therefore the environment parameters of the target RAID when the target RAID is created can be obtained according to the rollback log of the target RAID; and recovering the target RAID according to the environmental parameters of the target RAID, so that after different RAIDs are created in the hard disk for multiple times, any one appointed RAID in the RAIDs created for multiple times can be recovered.
In some embodiments of the present application, the rollback log of the target RAID is generated by:
according to the UUID and the creation time of the target RAID, matching with the UUID and the creation time in the created log of at least one stored RAID to obtain a target RAID created log set;
and integrating the created logs in the created log set of the target RAID to generate a rollback log of the target RAID.
According to the embodiment of the application, the created logs of each RAID are stored, and are matched with the environmental parameters in the created logs of each RAID according to the UUID and the creation time of the target RAID, so that a target RAID created log set can be obtained; the created logs in the created log set of the target RAID are integrated to generate the rollback log of the target RAID, so that the rollback log of the target RAID comprises all environmental parameters in the created log of the target RAID, the accuracy of the generated rollback log of the target RAID is improved, and the accuracy of target RAID recovery is further improved.
In some embodiments of the present application, before obtaining the rollback log of the target RAID, the method further includes:
and creating at least one RAID, and generating and storing a created log of the at least one RAID.
According to the embodiment of the application, when each RAID is created, the creation log of the corresponding RAID is generated and stored, so that the environment parameters of the corresponding RAID are not covered or lost.
In some embodiments of the present application, the creation log of at least one RAID is stored in at least one of a creation log area, a system log area, a designated storage device, and a configuration file of all or part of the disks used by at least one RAID.
According to the embodiment of the application, when one storage area for storing the RAID created logs is damaged, the RAID created logs can be acquired from other storage areas, and the log storage safety is improved.
In a second aspect, an embodiment of the present application provides a RAID recovery apparatus, including:
the acquisition module is used for acquiring a rollback log of a target RAID according to the UUID and the creation time of the RAID, wherein the rollback log of the target RAID is generated according to at least one stored RAID creation log; the creation log of each RAID comprises all or part of the creation time, UUID, grade and serial number of the used disk of the corresponding RAID;
the generating module is used for obtaining the environmental parameters of the target RAID according to the rollback log of the target RAID;
and the recovery module is used for recovering the target RAID according to the environmental parameters of the target RAID.
In some embodiments of the present application, the obtaining module is specifically configured to:
according to the UUID and the creation time of the target RAID, matching with the UUID and the creation time in the created log of at least one stored RAID to obtain a target RAID created log set;
and integrating the created logs in the created log set of the target RAID to generate a rollback log of the target RAID.
In some embodiments of the present application, the apparatus further comprises a creation module configured to create at least one RAID, generate a creation log of the at least one RAID, and store the creation log.
In some embodiments of the present application, the creation log of at least one RAID is stored in at least one of a creation log area, a system log area, a designated storage device, and a configuration file of all or part of the disks used by at least one RAID.
In a third aspect, an embodiment of the present application provides a RAID recovery apparatus, including:
a memory for storing a computer program;
and the processor is used for realizing the RAID recovery method of the embodiment of the application when executing the computer program.
In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, where computer-executable instructions are stored in the computer-readable storage medium, and the computer-executable instructions are used to enable a computer to execute the RAID recovery method according to the embodiment of the present application.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to these drawings without inventive exercise.
Fig. 1 is a schematic diagram illustrating a storage manner of creating a log of a RAID according to an embodiment of the present application;
fig. 2 is a flowchart of a rollback log generation method for RAID according to an embodiment of the present application;
fig. 3 is a schematic diagram of parameter matching provided in an embodiment of the present application;
fig. 4 is a flowchart of a RAID recovery method according to an embodiment of the present application;
fig. 5 is a functional structure diagram of a RAID recovery apparatus according to an embodiment of the present application;
fig. 6 is a hardware structure diagram of a RAID recovery apparatus according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be described in further detail with reference to the accompanying drawings, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
All other embodiments, which can be derived by a person skilled in the art from the exemplary embodiments shown in the present application without inventive effort, shall fall within the scope of protection of the present application. Moreover, while the disclosure herein has been presented in terms of exemplary one or more examples, it is to be understood that each aspect of the disclosure can be utilized independently and separately from other aspects of the disclosure to provide a complete disclosure.
It should be understood that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used are interchangeable under appropriate circumstances and can be implemented in sequences other than those illustrated or otherwise described herein with respect to the embodiments of the application, for example.
Furthermore, the terms "comprises" and "comprising," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a product or device that comprises a list of elements is not necessarily limited to those elements explicitly listed, but may include other elements not expressly listed or inherent to such product or device.
The term "module," as used herein, refers to any known or later developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware and/or software code that is capable of performing the functionality associated with that element.
When the RAID is created in the hard disk, a super block is generated at the appointed position of the disk, and the super block comprises the disk sequence used by the RAID, the RAID level, the RAID rotation direction, the RAID UUID and other environment parameters. The following gives a relevant explanation of the environmental parameters:
disk sequence used by RAID: the combination mode of a plurality of independent disks used for expressing RAID can be expressed by a disk serial number;
RAID level: seven levels of RAID0, RAID1, RAID2, RAID3, RAID4, RAID5 and RAID6 are set as standard RAID levels by organizations such as SNIA and Berkeley, and the standard RAID can be combined to meet the storage requirements with higher requirements on performance, safety and reliability;
RAID rotation direction: the RAID has four distribution modes, namely, left symmetry, left asymmetry, right symmetry and right asymmetry, wherein the left/right refers to how the check information is distributed, and the symmetry/asymmetry refers to how the data is distributed; "leftward" means that the parity starts from the last disk, each stripe moves the parity to a position close to the first disk (rewinding if necessary), "rightward" means that the parity starts from the first disk, each stripe moves the parity to a position close to the last disk (rewinding if necessary), "asymmetric" means that the data blocks of a given stripe are placed in a simple sequential manner, skipping stripes if necessary, and always starting from the data block of the first stripe on the first disk, and "symmetric" means that the data blocks are distributed in a sequential order of disks, and rewinding back to the first disk if necessary;
RAID UUID: UUID is an abbreviation of universal Unique Identifier (universal Unique Identifier) and is used to uniquely identify RAID, and UUID of RAID created each time is different.
Because the super block contains the environment parameters of the RAID, when the RAID is recovered, the creation state of the RAID can be recovered based on the environment parameters in the super block. Another method for recovering the RAID is to acquire an environment parameter of the RAID according to a corresponding relationship between a Universal Unique Identifier (UUID) of the RAID in a preset file and a RAID level, and further recover a creation state of the RAID. Both of the above methods can only restore the RAID created last time. If a new RAID is created in the hard disk after the RAID fails, the new RAID modifies the environmental parameters in the super block, the environmental parameters of the RAID created last time are covered, the creation state of the RAID created last time cannot be recovered, and the data stored in the RAID is completely lost.
In order to solve the foregoing problems, embodiments of the present application provide a RAID recovery method and apparatus. After the RAID is established for multiple times in the hard disk, the method can roll back to the established state of the specified RAID according to the established log of the stored RAID, thereby solving the problem that the specified RAID cannot be recovered due to the loss or damage of environmental parameters caused by the multiple establishment of the RAID.
In some embodiments of the present application, RAID may be created in a hard disk for multiple times according to user requirements or an effective period of RAID, and the RAID created each time may be the same or different. When each RAID is created, besides generating a super block containing RAID environment parameters at a specified position of a disk, at least one RAID creation log is generated, and the generated at least one RAID creation log is stored in the creation log area of all or part of the disks used by the corresponding RAID. The log creating area can be divided according to the disk space required by log creating, and the log creating of each RAID comprises part or all of the creating time, UUID, level and used disk serial number of the corresponding RAID, so that when the environment parameters of the RAID are covered, the rollback log of at least one RAID can be generated according to the creating log of at least one RAID stored in the log creating area of all or part of the disks, and the environment parameters of the corresponding RAID can be acquired from the rollback log.
For example, as shown in fig. 1, when the first RAID is created, a disk A, B is used, the disks A, B store creating logs of the first RAID, the creating log area of the disk a stores the creating log of the first RAID including the creating time (e.g. 2020/11/1) of the first RAID, the first UUID, the RAID0, and the serial number of the used disk a, and the creating log area of the disk B stores the creating log of the first RAID including the creating time (e.g. 2020/11/1) of the first RAID, the first UUID, the RAID0, and the serial number of the used disk B; when the second RAID is created, the disk A, B, C is used, the created log of the second RAID is stored in the disk A, B, C, the created log of the second RAID stored in the created log area of the disk a includes the creation time (e.g., 2020/11/3) of the second RAID, the second UUID, the RAID4, the serial number of the disk a used, the created log of the second RAID stored in the created log area of the disk B includes the creation time (e.g., 2020/11/3) of the second RAID, the second UUID, the RAID4, the serial number of the disk B used, and the created log of the second RAID stored in the created log area of the disk C includes the creation time (e.g., 2020/11/3) of the second RAID, the second UUID, the RAID4, and the serial number of the disk C used; at this time, the disk A, B stores a first RAID creation log and a second RAID creation log, respectively, and the disk C stores the first RAID creation log and the second RAID creation log. A rollback log for the first RAID is generated from the created log for the first RAID stored in disk A, B, and a rollback log for the second RAID is generated from the created log for the second RAID stored in disk A, B, C.
It should be noted that, if the second RAID is the last RAID created, the super block at the specified location of the disk A, B, C only contains the environment parameter of the second RAID, and the environment parameter of the first RAID is replaced by the environment parameter of the second RAID. Because the super block only stores the environment parameters of the second RAID, the second RAID can be recovered based on the super block, and if the specified first RAID needs to be recovered, the recovery can be carried out according to the rollback log of the first RAID.
Fig. 2 is a flowchart of a method for generating a rollback log of a specified RAID according to an embodiment of the present application. As shown in fig. 2, the process mainly includes the following steps:
s201: and according to the UUID and the creation time of the appointed RAID, matching the UUID and the creation time in the creation log of at least one RAID stored in the creation log area of all or part of the disks used by the RAID to obtain a creation log set of the appointed RAID.
In this step, based on information (for example, UUID and creation time of RAID) in the creation log of each RAID stored in each disk, the user can know which RAID was created in the hard disk, and thus select a specified RAID from the created plurality of RAIDs to recover. For example, a user designates to restore a first RAID, and according to the UUID and creation time of the first RAID, the UUID and creation time in a creation log of at least one RAID stored in a creation log area of all or part of disks used by the RAID are matched, so that a creation log set of the first RAID is obtained.
S202: and integrating the created logs in the created log set of the designated RAID according to the serial number of the disk used by the designated RAID to generate the rollback log of the designated RAID.
For example, taking a given RAID as the first RAID, as shown in fig. 3, the disks used by the first RAID are a disk a and a disk B, and the disks used by the second RAID are a disk a, a disk B, and a disk C; the created log area of the disk A, B stores a created log of a first RAID and a created log of a second RAID, respectively, and the created log area of the disk C stores a created log of a second RAID. According to the UUID (first UUID) and the creation time (2020/11/3) of the first RAID, matching is performed with the UUID and the creation time in the creation log of each RAID stored on each disk, for example, the UUID and the creation time of the first RAID match with the UUID and the creation time in the creation log of the first RAID stored in the creation log area of the disk A, B (the matching is indicated by a dotted line in the figure), the creation log of the first RAID in the disk A, B is obtained, a creation log set of the first RAID is obtained, the creation logs in the creation log set of the first RAID are integrated according to the serial number of the disk A, B used by the first RAID, and a rollback log of the first RAID is generated.
It is noted that embodiments of the present application are applicable to restoring a second RAID (created last time) in addition to the designated first RAID.
It should be noted that the embodiment of the present application does not impose a limitation on the matching order, for example, the matching may be performed in order according to the serial number of the disk.
It is worth noting that the embodiment of the present application does not impose a limiting requirement on the storage mode of the created logs of the RAID in each disk, and the created logs of the RAID may be stored in the order of the creation time of the RAID. For example, the disk used by the first RAID is A, B, the creation time is 2020/11/3, the disk used by the second RAID is A, B, C, the creation time is 2020/11/7, the disk used by the third RAID is C, D, the creation time is 2020/11/7, and the created log of the first RAID and the created log of the second RAID are sequentially stored in the disk a; the disk B sequentially stores a first RAID creation log and a second RAID creation log; the disk C stores the created log of the second RAID and the created log of the third RAID in sequence, and the disk B stores the created log of the third RAID in sequence. The data can also be stored according to RAID levels, for example, the disk used by the first RAID is a, B, the RAID level is RAID5, the disk used by the second RAID is a, B, C, the RAID level is RAID3, and the created log of the second RAID and the created log of the first RAID are stored in the disk A, B in sequence.
It should be noted that, on the premise of not departing from the principle of the RAID recovery method provided in the embodiment of the present application, the embodiment of the present application does not describe the storage area of the created log of the RAID by limitation, for example, the created log generated by creating the RAID each time may also be stored in at least one of a system log area, a specified storage device, and a configuration file. Therefore, when one storage area for storing the RAID created log is damaged, the RAID created log can be acquired from other storage areas, and the security of log storage is improved. The designated storage device may be another disk except for the disk used by RAID, for example, 4 disks in a hard disk, 3 disks are used when creating RAID, and the remaining 1 disk may be used to store the creation log.
It should be noted that the generated rollback log of the RAID may be stored in at least one of a next area where the log area is created (may be referred to as the rollback log area), a system log area, a designated storage device, and a configuration file.
Since the designated rollback log of the first RAID is generated based on the creation log of the first RAID stored in the creation log area of each disk used by the first RAID, each creation log includes part or all of the creation time, UUID, rank, and serial number of the used disk of the RAID, the rollback log of the first RAID includes part or all of the creation time, UUID, rank, and serial number of the used disk of the first RAID.
In order that those skilled in the art will better understand the disclosure, the following detailed description will be given with reference to the accompanying drawings.
Fig. 4 is a flowchart of a RAID recovery method according to an embodiment of the present application. As shown in the figure, the method can be implemented by software, or by a combination of software and hardware, and mainly includes the following steps:
s401: and acquiring a rollback log of the target RAID according to the UUID and the creation time of the target RAID, wherein the rollback log of the target RAID is generated according to at least one stored RAID creation log.
In this step, the target RAID fails, and data stored in the target RAID needs to be read based on user needs, so that the target RAID needs to be recovered. The target RAID refers to any one of RAIDs created in the hard disk multiple times and designated by the user. According to the created log of at least one RAID stored in each disk, a user can obtain which RAIDs can be recovered, further designate a target RAID to be recovered, query the rollback log area of each disk according to the UUID and the creation time of the target RAID, match the rollback log area with the rollback log of at least one RAID in each disk, and acquire the rollback log of the target RAID.
S402: and obtaining the environmental parameters of the target RAID according to the rollback log of the target RAID.
In the step, because the rollback log of the target RAID is generated according to the created log of the target RAID stored in the created log area of each disk used by the target RAID, the rollback log of the target RAID includes all or part of the creation time, UUID, rank, and serial number of the used disk of the target RAID, and according to the rollback log of the target RAID, the environment parameter of the target RAID is obtained, and it is not necessary for a user to manually input the environment parameters such as the sequence, the level, the rotation direction, and the stripe size of the disk used by the target RAID to perform RAID recovery, so that user involvement is reduced, and the recovery efficiency of the specified RAID is improved.
S403: and recovering the target RAID according to the environmental parameters of the target RAID.
In this step, the target RIID is recovered according to the environment parameters such as the serial number of the disk used by the target RAID, the RAID level, the RAID rotation direction, the stripe size and the like.
It should be noted that the process of recovering the target RAID according to the environmental parameters of the target RAID is consistent with the process of creating RAID in the hard disk.
In the above embodiment of the application, when a RAID is created in a hard disk each time, a creation log of the RAID is stored, where the creation log of each RAID includes all or part of creation time, UUID, rank, and serial number of a used disk of a corresponding RAID, and a rollback log of the corresponding RAID is generated according to the creation log of the stored RAID. When RAID is recovered, a rollback log of a target RAID is obtained according to the UUID and the creation time of the target RAID, and the target RAID is recovered according to the rollback log.
Based on the same technical concept, the embodiment of the application provides a RAID recovery apparatus, and the apparatus can implement the RAID recovery method in the above embodiment.
Referring to fig. 5, the apparatus includes an obtaining module 501, a generating module 502, and a recovering module 503.
An obtaining module 501, configured to obtain a rollback log of a target RAID according to a UUID and creation time of the target RAID, where the rollback log of the target RAID is generated according to a stored creation log of at least one RAID; the creation log of each RAID comprises all or part of the creation time, UUID, grade and serial number of the used disk of the corresponding RAID;
a generating module 502, configured to obtain an environmental parameter of the target RAID according to the rollback log of the target RAID;
and a recovery module 503, configured to recover the target RAID according to the environment parameter of the target RAID.
In some embodiments of the present application, the obtaining module is specifically configured to:
according to the UUID and the creation time of the target RAID, matching with the UUID and the creation time in the created log of at least one stored RAID to obtain a target RAID created log set;
and integrating the created logs in the created log set of the target RAID to generate a rollback log of the target RAID.
In some embodiments of the present application, the apparatus further includes a creation module configured to create at least one RAID, generate a creation log of the at least one RAID, and store the creation log.
In some embodiments of the present application, the creation log of at least one RAID is stored in at least one of a creation log area, a system log area, a designated storage device, and a configuration file of all or part of the disks used by at least one RAID.
It should be noted that, the RAID recovery apparatus provided in the embodiment of the present application can implement the RAID recovery method steps implemented in the foregoing method embodiment, and can achieve the same technical effects, and details of the same parts and beneficial effects as those in the method embodiment are not described herein again.
Based on the same technical concept, the embodiment of the application provides a RAID recovery apparatus, and the apparatus can implement the RAID recovery method in the above embodiment.
Referring to fig. 6, the apparatus includes a processor 601. The processor 601 may also be a controller. The processor 601 is configured to perform the functions referred to in fig. 2, 4. The apparatus may also include a memory 602, the memory 602 for coupling with the processor 601, which stores the necessary program instructions and data for the device. Wherein, the processor 601 is connected to the memory 602, the memory 602 is used for storing computer executable instructions, and the processor 601 is used for executing the instructions stored in the memory 602 to complete the steps of the above method for executing corresponding functions.
In the embodiments of the present application, for concepts, explanations, details, and other steps related to the technical solutions provided by the embodiments of the present application, reference is made to the descriptions of the foregoing methods or other embodiments, and details are not described herein.
It should be noted that the processor referred to in the embodiments of the present application may be a Central Processing Unit (CPU), a general purpose processor, a Digital Signal Processor (DSP), an application-specific integrated circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic devices, a transistor logic device, a hardware component, or any combination thereof. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. A processor may also be a combination of computing functions, e.g., comprising one or more microprocessors, a DSP and a microprocessor, or the like. Wherein the memory may be integrated in the processor or may be provided separately from the processor.
The embodiment of the present application further provides a computer-readable storage medium, where computer-executable instructions are stored, and the computer-executable instructions are used to enable a computer to execute the method in the foregoing embodiment.
The embodiments of the present application also provide a computer program product for storing a computer program, where the computer program is used to execute the method of the foregoing embodiments.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (10)

1. A RAID recovery method comprising:
acquiring a rollback log of a target RAID (redundant array of independent disks) according to a universal unique identifier UUID (universally unique identifier) and creation time of the target RAID, wherein the rollback log of the target RAID is generated according to at least one stored RAID creation log; the creation log of each RAID comprises all or part of the creation time, UUID, grade and serial number of the used disk of the corresponding RAID;
obtaining the environmental parameters of the target RAID according to the rollback log of the target RAID;
and recovering the target RAID according to the environmental parameters of the target RAID.
2. The method of claim 1, wherein the rollback log for the target RAID is generated by:
according to the UUID and the creation time of the target RAID, matching with the stored UUID and the creation time in the creation log of the at least one RAID to obtain a target RAID creation log set;
and integrating the created logs in the target RAID created log set to generate a rollback log of the target RAID.
3. The method of claim 1, wherein prior to obtaining the rollback log for the target RAID, the method further comprises:
creating at least one RAID, and generating and storing a created log of the at least one RAID.
4. The method of any of claims 1-3, wherein the created log for the at least one RAID is stored in at least one of a created log area, a system log area, a designated storage device, a configuration file for all or a portion of the disks used by the at least one RAID.
5. A RAID recovery apparatus comprising:
the system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring a rollback log of a target RAID (redundant array of independent disks) according to a universal unique identifier UUID and creation time of the target RAID, and the rollback log of the target RAID is generated according to at least one stored creation log of the RAID; the creation log of each RAID comprises all or part of the creation time, UUID, grade and serial number of the used disk of the corresponding RAID;
the generating module is used for obtaining the environmental parameters of the target RAID according to the rollback log of the target RAID;
and the recovery module is used for recovering the target RAID according to the environmental parameters of the target RAID.
6. The apparatus of claim 5, wherein the acquisition module is specifically configured to:
according to the UUID and the creation time of the target RAID, matching with the stored UUID and the creation time in the creation log of the at least one RAID to obtain a target RAID creation log set;
and integrating the created logs in the target RAID created log set to generate a rollback log of the target RAID.
7. The apparatus of claim 5, wherein the apparatus further comprises a creation module to create at least one RAID, generate a creation log of the at least one RAID, and store.
8. The apparatus of any of claims 5-7, wherein the created log for the at least one RAID is stored in at least one of a created log area, a system log area, a designated storage device, a configuration file for all or a portion of the disks used by the at least one RAID.
9. A RAID recovery apparatus comprising:
a memory for storing a computer program;
a processor for implementing the method of any one of claims 1-4 when executing the computer program.
10. A computer-readable storage medium having computer-executable instructions stored thereon for causing a computer to perform the method of any one of claims 1-4.
CN202011576711.5A 2020-12-28 2020-12-28 RAID recovery method and device Active CN112667162B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011576711.5A CN112667162B (en) 2020-12-28 2020-12-28 RAID recovery method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011576711.5A CN112667162B (en) 2020-12-28 2020-12-28 RAID recovery method and device

Publications (2)

Publication Number Publication Date
CN112667162A true CN112667162A (en) 2021-04-16
CN112667162B CN112667162B (en) 2023-04-28

Family

ID=75410692

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011576711.5A Active CN112667162B (en) 2020-12-28 2020-12-28 RAID recovery method and device

Country Status (1)

Country Link
CN (1) CN112667162B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101512491A (en) * 2005-04-15 2009-08-19 英特尔公司 Power-safe disk storage apparatus, systems, and methods
US20180137017A1 (en) * 2016-11-17 2018-05-17 International Business Machines Corporation Copying data from multiple point-in-time copies to a log storage to use to roll-back a source storage
CN110008064A (en) * 2019-04-10 2019-07-12 苏州浪潮智能科技有限公司 A kind of RAID restoration methods, device, equipment and medium
US20190332477A1 (en) * 2018-04-28 2019-10-31 EMC IP Holding Company LLC Method, device and computer readable storage medium for writing to disk array

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101512491A (en) * 2005-04-15 2009-08-19 英特尔公司 Power-safe disk storage apparatus, systems, and methods
US20180137017A1 (en) * 2016-11-17 2018-05-17 International Business Machines Corporation Copying data from multiple point-in-time copies to a log storage to use to roll-back a source storage
US20190332477A1 (en) * 2018-04-28 2019-10-31 EMC IP Holding Company LLC Method, device and computer readable storage medium for writing to disk array
CN110008064A (en) * 2019-04-10 2019-07-12 苏州浪潮智能科技有限公司 A kind of RAID restoration methods, device, equipment and medium

Also Published As

Publication number Publication date
CN112667162B (en) 2023-04-28

Similar Documents

Publication Publication Date Title
US11163472B2 (en) Method and system for managing storage system
US11526408B2 (en) Data recovery in a virtual storage system
US11550514B2 (en) Efficient transfers between tiers of a virtual storage system
US20210373761A1 (en) Leveraging Distinct Storage Tiers In A Virtual Storage System
US11586365B2 (en) Applying a rate limit across a plurality of storage systems
JP6294518B2 (en) Synchronous mirroring in non-volatile memory systems
US8171379B2 (en) Methods, systems and media for data recovery using global parity for multiple independent RAID levels
US9495370B1 (en) Data recovery point review in a continuous data protection system
CN109725831B (en) Method, system and computer readable medium for managing storage system
US20130124559A1 (en) Method and system for inserting data records into files
US20200142790A1 (en) Automatic data healing using a storage controller
WO2016109732A1 (en) Architecture for implementing erasure coding
CN107515726B (en) Method and system for managing storage devices
US9740440B2 (en) Separating a hybrid asymmetric mix of a RAID 1 mirror and a parity-based RAID array
US5859965A (en) Method and apparatus for maintaining data consistency in raid
US20230014785A1 (en) Data Storage In A Cloud-Based Storage System
US10592344B1 (en) Generation and verification of erasure encoded fragments
WO2016082156A1 (en) Metadata recovery method and apparatus
EP3983878B1 (en) Ensuring sufficient available storage capacity for data resynchronization/reconstruction in a hyper-converged infrastructure
CN113886143B (en) Virtual machine continuous data protection method and device and data recovery method and device
WO2015055033A1 (en) Metadata protection method and device
CN107957918A (en) Data reconstruction method and device
WO2018113322A1 (en) Method and device for reading data
US10114715B2 (en) Providing data integrity in a non-reliable storage behavior
CN114020527A (en) Snapshot recovery method and device, computer equipment and storage medium

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