WO2024103967A1 - Raid控制器恢复元数据的方法、装置、设备及非易失性可读存储介质 - Google Patents

Raid控制器恢复元数据的方法、装置、设备及非易失性可读存储介质 Download PDF

Info

Publication number
WO2024103967A1
WO2024103967A1 PCT/CN2023/121185 CN2023121185W WO2024103967A1 WO 2024103967 A1 WO2024103967 A1 WO 2024103967A1 CN 2023121185 W CN2023121185 W CN 2023121185W WO 2024103967 A1 WO2024103967 A1 WO 2024103967A1
Authority
WO
WIPO (PCT)
Prior art keywords
controller
metadata
backup
raid
response
Prior art date
Application number
PCT/CN2023/121185
Other languages
English (en)
French (fr)
Inventor
朱红玉
夏方健
Original Assignee
苏州元脑智能科技有限公司
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 苏州元脑智能科技有限公司 filed Critical 苏州元脑智能科技有限公司
Publication of WO2024103967A1 publication Critical patent/WO2024103967A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1456Hardware arrangements for backup
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • G06F11/1469Backup restoration techniques
    • 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
    • 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/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0658Controller construction arrangements
    • 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

Definitions

  • the present application relates to the field of computers, and to a method, device, equipment and non-volatile readable storage medium for recovering metadata of a RAID controller.
  • the array To maintain high availability and prevent business interruption when hardware fails, the array often uses hardware redundancy.
  • the same array runs on more than two nodes. When two controllers are running normally, they process different businesses to ensure operational performance. When a node fails, the remaining controllers take over the business of the failed controller to ensure uninterrupted business operation. When there are four controllers, three of them can be damaged without affecting business.
  • quad-controller RAID Redundant Array of Independent Disks
  • dual-controller synchronization Both support three out of four controllers being damaged. The difference is that quad-controller synchronization allows three out of four controllers to be damaged at the same time, while dual-controller synchronization only allows four controllers to fail in sequence, and there must be enough synchronization time in between to establish a new synchronization relationship. In contrast, dual-controller synchronization provides higher operating efficiency and lower read and write latency.
  • RAID has metadata on all four controllers to support RAID formatting, reconstruction and other features. Metadata must be backed up, and a four-controller circular mirroring method is used here, that is, the controller synchronizes metadata to the next controller in turn; at the same time, the controller must reserve space to accommodate all metadata of the four controllers to ensure that the metadata can be taken over smoothly when three of the controllers fail.
  • the purpose of the embodiments of the present application is to propose a method, device, equipment and non-volatile readable storage medium for recovering metadata of a RAID controller.
  • the present application proposes a method for recovering metadata of a RAID controller, comprising the following steps:
  • controller recovery In response to controller recovery, the controller is recovered according to the set backup controller and the only controller of the stripe.
  • backing up other controllers according to a set backup controller and a unique controller of a stripe includes:
  • the controller in response to controller recovery, the controller is recovered according to the set backup controller and the only controller of the stripe, including:
  • setting the order of each controller in the RAID controller, and setting the backup controller of each controller according to the order includes:
  • the backup controller of the first controller in the four-controller RAID controller is set to be the second controller, the backup controller of the second controller is set to be the third controller, the backup controller of the third controller is set to be the fourth controller, and the backup controller of the fourth controller is set to be the first controller.
  • setting the order of each controller in the RAID controller, and setting the backup controller of each controller according to the order includes:
  • the backup controller of the m-th controller is set to the m+1-th controller, where m is a positive integer greater than or equal to 1 and less than or equal to M-1.
  • the backup controller of the m+1-th controller is set to the 1st controller.
  • selecting a preset number of strips in each controller, numbering each strip, and setting a unique controller for the numbered strips in each controller includes:
  • Each of the 16 strips of each controller is respectively set to have a unique belonging controller, wherein the strips with the same number in each controller have the same unique belonging controller.
  • a preset number of strips are selected in each controller, each strip is numbered, and a unique controller for the numbered strips in each controller is set, including:
  • Each of the P stripes of each controller is respectively set to have a unique belonging controller, wherein the stripes with the same number in each controller have the same unique belonging controller.
  • P is a positive integer greater than or equal to 16.
  • backing up other controllers according to a set backup controller and a unique controller of a stripe includes:
  • it also includes:
  • the controller n+1 scans the metadata, and cleans up the metadata that does not belong to the controller n+1.
  • backing up other controllers according to a set backup controller and a unique controller of a stripe includes:
  • it also includes:
  • Controller n scans metadata and performs metadata cleanup on metadata that does not belong to controller n;
  • recovering the controller according to the set backup controller and the only controller of the stripe includes:
  • it also includes:
  • Controller n scans metadata and performs metadata cleanup on metadata that does not belong to controller n;
  • the controller n+2 scans the metadata and cleans up the metadata that does not belong to the controller n+2.
  • the method before setting the order of each controller in the RAID controller and setting the backup controller of each controller according to the order, the method further includes:
  • clearing metadata that does not belong to each controller includes:
  • Each controller scans all metadata and cleans up metadata that does not belong to the controller and the completed status.
  • the scan is complete and RAID is back in service.
  • a device for recovering metadata of a RAID controller comprising:
  • a setting module configured to set the order of each controller in the RAID controller and set the backup controller of each controller according to the order;
  • a numbering module is configured to select a preset number of strips in each controller, number each strip, and set a unique controller to which the numbered strips in each controller belong;
  • a backup module configured to respond to a controller failure and back up other controllers according to a set backup controller and a unique controller of the stripe;
  • the recovery module is configured to respond to the controller recovery and recover the controller according to the set backup controller and the only controller of the stripe.
  • a computer device comprising:
  • the memory stores computer instructions executable on the processor, and the instructions implement the steps of any one of the above methods when executed by the processor.
  • a non-volatile readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any one of the above methods are implemented.
  • the present application has the following beneficial technical effects: the method for restoring metadata of a RAID controller provided in an embodiment of the present application sets the order of each controller in the RAID controller and sets the backup controller of each controller according to the order; selects a preset number of backup controllers in each controller; The technical solution of backing up the controller according to the set backup controller and the unique controller of the stripe in each controller; in response to controller failure, restoring the controller according to the set backup controller and the unique controller of the stripe in response to controller recovery can increase space utilization, increase metadata synchronization speed, and reduce the impact on the time of controller business suspension.
  • FIG1 is a schematic flow chart of a method for recovering metadata by a RAID controller according to an embodiment of the present application
  • FIG2 is a schematic diagram of a metadata space layout of a RAID according to an embodiment of the present application.
  • FIG3 is a schematic diagram of a metadata space layout after a controller failure in a RAID according to an embodiment of the present application
  • FIG4 is a schematic diagram of a device for recovering metadata of a RAID controller according to an embodiment of the present application
  • FIG5 is a schematic diagram of a computer device according to an embodiment of the present application.
  • FIG. 6 is a schematic diagram of a non-volatile readable storage medium according to an embodiment of the present application.
  • FIG1 shows a schematic flow chart of the method.
  • the method may include the following steps:
  • S1 sets the order of each controller in the RAID controller, and sets the backup controller of each controller according to the order.
  • This application is mainly used in a four-controller RAID system controller, and can also be used in a system including more controllers.
  • the agreed node node(n) identifies the nth controller
  • node(n+1) identifies the next controller of the controller. For example, when there are four controllers, the next controller of node4 is node1. When there are three controllers (node1 is offline), the next node of node4 is node2, and the same applies to node(n-1).
  • S2 selects a preset number of stripes in each controller, numbers each stripe, and sets a unique controller to which the numbered stripes belong in each controller.
  • four types of squares are agreed upon, and the four types of squares belong to the four controllers from left to right.
  • a metadata space layout diagram for RAID is proposed, and the four types of squares in the diagram describe the stripes belonging to the four controllers respectively.
  • the stripe belonging to a controller means that it will only be read and written on the controller to which it belongs. It is agreed that d0 belongs to node1 (controller 1, the first controller), and they are arranged in sequence.
  • the backup node of the metadata of the stripe belonging to node1 is node2, and the backup node of node4 is node1.
  • S3 responds to controller failure and backs up other controllers according to the set backup controller and the only controller of the stripe.
  • a controller fails, the stripes belonging to the controller are migrated to controller +1.
  • controller node1 fails, the stripes belonging to node1 (shown with left slashes) will be migrated to node2, and at the same time, the stripes backed up on the controller will be backed up on controller +1.
  • controller node1 fails, the stripes backed up on node1 (shown with squares) will be backed up again on node2, that is, the backup node of node4 is changed to node2, as shown in Figure 3.
  • S4 responds to the controller recovery by recovering the controller according to the set backup controller and the only controller of the stripe.
  • setting the order of each controller in the RAID controller, and setting the backup controller of each controller according to the order includes:
  • the backup controller of the third controller is the fourth controller
  • the backup controller of the fourth controller is the first controller. If there are more controllers, the backup controller of the last controller is the first controller, which can realize the orderly arrangement of the backup controllers of each controller, and it is easy to find the backup controller when the controller needs to be backed up.
  • a preset number of strips are selected in each controller, each strip is numbered, and the unique controller to which the numbered strips in each controller belong is set, including:
  • Each of the 16 stripes of each controller is set to a unique controller, where the stripes with the same number in each controller have the same unique controller. More stripes can be selected as needed, and the number of stripes in each controller is the same, and the stripes with the same number in each controller have the same unique controller, so that the stripes belonging to the controller can only be read and written on the controller to which they belong, achieving effective data distribution, increasing the synchronization speed of metadata when the controller fails, and reducing the impact on the time of controller business suspension.
  • backing up other controllers according to the set backup controller and the only controller of the stripe includes:
  • RAID recovery service By agreeing on the backup relationship of the backup controller, when data needs to be merged due to a controller failure, there is no need to calculate the controller's ownership relationship, and memory-level copy merging is achieved, which improves the data merging speed and reduces the impact of controller service suspension.
  • Controller n+1 scans metadata and cleans up metadata that does not belong to controller n+1.
  • the metadata of the controller's RAID is resynchronized, that is, as described above, the stripes belonging to the controller are migrated to controller +1, and the stripes backed up on the controller are backed up on controller +1. This process is the backup process when one of the four controllers fails.
  • backing up other controllers according to a set backup controller and a unique controller of a stripe includes:
  • This process is the backup process when another controller among the three controllers fails.
  • By agreeing on the backup relationship of the backup controller when data needs to be merged due to a controller failure, there is no need to calculate the controller's ownership relationship, and memory-level copy merging is achieved, which improves the data merging speed.
  • recovering the controller according to the set backup controller and the only controller of the stripe includes:
  • RAID recovery service After the controller is restored, the controller data can be quickly restored based on the ownership of the backup controller.
  • Controller n scans metadata and performs metadata cleanup on metadata that does not belong to controller n;
  • Controller n+1 scans metadata and cleans up metadata that does not belong to controller n+1.
  • the metadata of the controller's RAID is resynchronized, and the services that originally belonged to the controller but are now taken over by other controllers are restored to the controller.
  • This process is the process of restoring three controllers to four controllers. The metadata cleaning needs to be performed simultaneously, and the metadata that does not belong to the controller can be cleaned up. Data is deleted to improve storage space utilization.
  • recovering the controller according to the set backup controller and the only controller of the stripe includes:
  • RAID recovery service After the controller is restored, the controller data can be quickly restored based on the ownership of the backup controller.
  • Controller n scans metadata and performs metadata cleanup on metadata that does not belong to controller n;
  • Controller n+1 scans metadata and cleans up metadata that does not belong to controller n+1;
  • Controller n+2 scans metadata and cleans up metadata that does not belong to controller n+2. This process is the process of restoring two controllers to three controllers, in which metadata cleaning needs to be performed simultaneously, and data that does not belong to this controller can be deleted to improve storage space utilization.
  • the method before setting the order of each controller in the RAID controller and setting the backup controller of each controller according to the order, the method further includes:
  • clearing metadata that does not belong to each controller includes:
  • Each controller scans the full amount of metadata and cleans up the metadata and completed status that do not belong to the controller. After the scan is completed, RAID resumes business.
  • the above algorithm for controller failure and recovery must be used in conjunction with the initial configuration of metadata, that is, the metadata space is first distributed as described above, and the metadata must be initially configured according to the controller ownership when it is initially used. This is because the memory copy merge algorithm executed during controller failure and recovery will no longer care about the controller ownership issue.
  • the initial configuration of controller ownership means that when the RAID module enables the controller metadata, RAID needs to equate the metadata of the non-owned controller with the metadata completed status.
  • bit0 bit1
  • bit1 bit1
  • the controller needs to describe the completion of formatting with the setting bit bit0 that does not belong to this controller.
  • RAID metadata is enabled (configured when the task is started)
  • the above logic needs to be executed simultaneously for the controllers currently existing in the four-controller system.
  • the metadata enables the configuration algorithm and re-executes it according to the new ownership allocation of the surviving controller.
  • the method disclosed in the embodiment of the present application can also be implemented as a computer program executed by a CPU (Central Processing Unit), and the computer program can be stored in a non-volatile readable storage medium.
  • a CPU Central Processing Unit
  • the computer program is executed by the CPU, the above functions defined in the method disclosed in the embodiment of the present application are executed.
  • a second aspect of an embodiment of the present application provides a device for recovering metadata of a RAID controller.
  • the device 200 includes:
  • a setting module configured to set the order of each controller in the RAID controller and set the backup controller of each controller according to the order;
  • the numbering module is configured to select a preset number of strips in each controller, number each strip, and set each strip.
  • the numbered strips in a controller are uniquely owned by the controller;
  • a backup module configured to respond to a controller failure and back up other controllers according to a set backup controller and a unique controller of the stripe;
  • the recovery module is configured to respond to the controller recovery and recover the controller according to the set backup controller and the only controller of the stripe.
  • FIG5 shows a schematic diagram of an embodiment of the computer device provided by the present application.
  • the embodiment of the present application includes the following apparatus: at least one processor 21; and a memory 22, the memory 22 stores computer instructions 23 that can be run on the processor, and when the instructions are executed by the processor, the following method is implemented:
  • controller recovery In response to controller recovery, the controller is recovered according to the set backup controller and the only controller of the stripe.
  • setting the order of each controller in the RAID controller, and setting the backup controller of each controller according to the order includes:
  • the backup controller of the first controller in the four-controller RAID controller is set to be the second controller, the backup controller of the second controller is set to be the third controller, the backup controller of the third controller is set to be the fourth controller, and the backup controller of the fourth controller is set to be the first controller.
  • a preset number of strips are selected in each controller, each strip is numbered, and the unique controller to which the numbered strips in each controller belong is set, including:
  • Each of the 16 strips of each controller is respectively set to have a unique belonging controller, wherein the strips with the same number in each controller have the same unique belonging controller.
  • backing up other controllers according to a set backup controller and a unique controller of a stripe includes:
  • the controller n+1 scans the metadata, and cleans up the metadata that does not belong to the controller n+1.
  • backing up other controllers according to a set backup controller and a unique controller of a stripe includes:
  • recovering the controller according to the set backup controller and the only controller of the stripe includes:
  • Controller n scans metadata and performs metadata cleanup on metadata that does not belong to controller n;
  • the controller n+1 scans the metadata, and cleans up the metadata that does not belong to the controller n+1.
  • recovering the controller according to the set backup controller and the only controller of the stripe includes:
  • Controller n scans metadata and performs metadata cleanup on metadata that does not belong to controller n;
  • Controller n+1 scans metadata and cleans up metadata that does not belong to controller n+1;
  • the controller n+2 scans the metadata and cleans up the metadata that does not belong to the controller n+2.
  • the method before setting the order of each controller in the RAID controller and setting the backup controller of each controller according to the order, the method further includes:
  • clearing metadata that does not belong to each controller includes:
  • Each controller scans all metadata and cleans up metadata that does not belong to the controller and the completed status.
  • the scan is complete and RAID is back in service.
  • FIG6 shows a schematic diagram of an embodiment of the non-volatile readable storage medium provided by the present application.
  • the non-volatile readable storage medium 31 stores a computer program 32 that executes the above method when executed by a processor.
  • the method disclosed in the embodiment of the present application can also be implemented as a computer program executed by a processor, and the computer program can be stored in a non-volatile readable storage medium.
  • the computer program is executed by the processor, the above functions defined in the method disclosed in the embodiment of the present application are performed.
  • the above method steps and system units may also be implemented using a controller and a non-volatile readable storage medium configured to store a computer program that enables the controller to implement the above steps or unit functions.
  • the functions may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored as one or more instructions or codes on or transmitted via a non-volatile readable storage medium.
  • Non-volatile readable storage media include computer storage media and communication media, which communication media include any media that facilitates the transfer of a computer program from one location to another.
  • the storage medium may be any available medium that can be accessed by a general or special purpose computer.
  • the non-volatile readable storage medium may include RAM, ROM, EEPROM (Electrically Erasable Programmable Read-Only Memory), CD-ROM (Compact Disc Read-Only Memory) or other optical disk storage devices, magnetic disk storage devices or other magnetic storage devices, or It is any other medium that can be set to carry or store the required program code in the form of instructions or data structures and can be accessed by a general or special computer or a general or special processor.
  • any connection can be appropriately referred to as a non-volatile readable storage medium.
  • disks and optical disks include compact disks (CD, Compact Disc), laser disks, optical disks, digital versatile disks (DVD, Digital Versatile Disc), floppy disks, blue discs, wherein disks usually reproduce data magnetically, and optical disks reproduce data optically using lasers.
  • CD Compact Disc
  • DVD Digital Versatile Disc
  • floppy disks blue discs

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本申请提供了一种RAID控制器恢复元数据的方法、装置、设备及非易失性可读存储介质,方法包括:设定RAID控制器中的每个控制器的排序,并根据排序设定每个控制器的备份控制器;在每个控制器中选取预设数量的条带,并为每个条带进行编号,并设定每个控制器中编号后的条带的唯一归属控制器;响应于控制器故障,根据设定的备份控制器和条带的唯一归属控制器对其他控制器进行备份;响应于控制器恢复,根据设定的备份控制器和条带的唯一归属控制器对控制器进行恢复。通过使用本申请的方案,能够增加空间利用率,增加元数据的同步速度,减小对控制器业务停止的时间影响。本申请涉及计算机领域。

Description

RAID控制器恢复元数据的方法、装置、设备及非易失性可读存储介质
相关申请的交叉引用
本申请要求于2022年11月16日提交中国专利局,申请号为202211463228.5,申请名称为“RAID控制器恢复元数据的方法、装置、设备及介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机领域,并且涉及一种RAID控制器恢复元数据的方法、装置、设备及非易失性可读存储介质。
背景技术
阵列为维持其高可用性从而在硬件发生故障时不使业务停止,多采用硬件冗余的方式。同一个阵列在两个以上节点上运行,两个控制器运行正常时,相互处理不同的业务以保证运行性能,某个节点故障时,其余控制器接管故障控制器的业务以保证业务运行不中断。四个控制器时,允许其中三个控制器损坏而不影响业务。
四控RAID(Redundant Array of Independent Disks,独立冗余磁盘阵列)存储系统目前有两种主流的数据备份方式,即四控同步与双控同步两种,两者均支持四个控制器损坏三个控制器,不同的地方在于四控同步允许同时的四个控制损坏三个,而双控同步仅允许四个控制器依次故障,中间必须有足够的同步时间以建立新的同步关系。相对的,双控同步提供更高的运行效率与更低的读写时延。
数据备份主要部分是RAID所用的元数据,RAID在四个控制器上都有元数据用于支持RAID的格式化、重构以及其它特性。元数据必须是备份的,这里采用四控循环镜像的方式,即控制器依次向自己的后一个控制器同步元数据;同时,控制器必须预留容纳四个控制器全部元数据的空间保证其中三个控制器故障时可以顺利的接管元数据。
控制器故障时,四控同步因为不需要构建新的同步关系,因此无需数据复制。而循环镜像方案由于必须构建新的同步关系,因此必须将数据复制到新的节点上,该复制过程导致控制器故障时业务临时中止时间增长,控制器恢复时同理。
发明内容
有鉴于此,本申请实施例的目的在于提出一种RAID控制器恢复元数据的方法、装置、设备及非易失性可读存储介质,通过使用本申请的技术方案,能够增加空间利用率,增加元数据的同步速度,减小对控制器业务停止的时间影响。
基于上述目的,第一个方面,本申请提出了一种RAID控制器恢复元数据的方法,包括以下步骤:
设定RAID控制器中的每个控制器的排序,并根据排序设定每个控制器的备份控制器;
在每个控制器中选取预设数量的条带,并为每个条带进行编号,并设定每个控制器中编号后的条带的唯一归属控制器;
响应于控制器故障,根据设定的备份控制器和条带的唯一归属控制器对其他控制器进行备份;
响应于控制器恢复,根据设定的备份控制器和条带的唯一归属控制器对控制器进行恢复。
根据本申请的一个实施例,响应于控制器故障,根据设定的备份控制器和条带的唯一归属控制器对其他控制器进行备份,包括:
将备份控制器的元数据备份到备份控制器的后一个控制器中后将故障控制器的上一个控制器的元数据备份到备份控制器,或将故障控制器的上一个控制器的元数据备份到备份控制器中后将备份控制器中的元 数据备份到故障控制器的上一个控制器。
根据本申请的一个实施例,响应于控制器恢复,根据设定的备份控制器和条带的唯一归属控制器对控制器进行恢复,包括:
将备份控制器中的元数据拷贝到恢复的控制器中。
根据本申请的一个实施例,设定RAID控制器中的每个控制器的排序,并根据排序设定每个控制器的备份控制器包括:
设定四控RAID控制器中的第一控制器的备份控制器为第二控制器,第二控制器的备份控制器为第三控制器,第三控制器的备份控制器为第四控制器,第四控制器的备份控制器为第一控制器。
根据本申请的一个实施例,设定RAID控制器中的每个控制器的排序,并根据排序设定每个控制器的备份控制器,包括:
在RAID控制器中包括M个控制器的情况下,设定第m个控制器的备份控制器为第m+1个控制器,其中,m为大于或者等于1,且小于或者等于M-1的正整数,在m+1等于M的情况下,设定第m+1个控制器的备份控制器为第1个控制器。
根据本申请的一个实施例,在每个控制器中选取预设数量的条带,并为每个条带进行编号,并设定每个控制器中编号后的条带的唯一归属控制器包括:
分别在每个控制器中选取16个条带,每个控制器中的条带按照数字顺序进行编号;
分别将每个控制器的16个条带中的每一个设定唯一归属控制器,其中,每个控制器中编号相同的条带的唯一归属控制器相同。
根据本申请的一个实施例,在每个控制器中选取预设数量的条带,并为每个条带进行编号,并设定每个控制器中编号后的条带的唯一归属控制器,包括:
分别在每个控制器中选取P个条带,每个控制器中的条带按照数字顺序进行编号,其中,P为大于或者等于1的正整数;
分别将每个控制器的P个条带中的每一个设定唯一归属控制器,其中,每个控制器中编号相同的条带的唯一归属控制器相同。
根据本申请的一个实施例,P为大于或者等于16的正整数。
根据本申请的一个实施例,响应于控制器故障,根据设定的备份控制器和条带的唯一归属控制器对其他控制器进行备份包括:
响应于检测到四个控制器中的一个控制器n发生故障,在当前任务结束后停止业务;
拷贝控制器n+1的元数据到控制器n+2,并与控制器n+2的元数据做或运行算,将运算结果覆盖控制器n+2的元数据;
拷贝控制器n-1的元数据到控制器n+1,并与控制器n+1的元数据做或运行算,将运算结果覆盖控制器n+1的元数据;
RAID恢复业务。
根据本申请的一个实施例,还包括:
控制器n+1扫描元数据,将非归属于控制器n+1的元数据执行元数据的清理。
根据本申请的一个实施例,响应于控制器故障,根据设定的备份控制器和条带的唯一归属控制器对其他控制器进行备份包括:
响应于检测到三个控制器中的一个控制器n发生故障,在当前任务结束后停止业务;
拷贝控制器n-1的元数据到控制器n+1,并与控制器n+1的元数据做或运行算,将运算结果覆盖控制器n+1的元数据;
拷贝控制器n+1的元数据到控制器n-1,并覆盖控制器n-1的元数据;
RAID恢复业务。
根据本申请的一个实施例,响应于控制器恢复,根据设定的备份控制器和条带的唯一归属控制器对控制器进行恢复包括:
响应于检测到第四个控制器n恢复,在当前任务结束后停止业务;
拷贝控制器n+1的元数据到控制器n,并覆盖控制器n的元数据;
RAID恢复业务。
根据本申请的一个实施例,还包括:
控制器n扫描元数据,并将非归属于控制器n的元数据执行元数据的清理;
控制器n+1扫描元数据,并将非归属于控制器n+1的元数据执行元数据的清理。
根据本申请的一个实施例,响应于控制器恢复,根据设定的备份控制器和条带的唯一归属控制器对控制器进行恢复包括:
响应于检测到第三个控制器n恢复,在当前任务结束后停止业务;
拷贝控制器n+1的元数据到控制器n,并覆盖控制器n的元数据;
RAID恢复业务。
根据本申请的一个实施例,还包括:
控制器n扫描元数据,并将非归属于控制器n的元数据执行元数据的清理;
控制器n+1扫描元数据,将非归属于控制器n+1的元数据执行元数据的清理;
控制器n+2扫描元数据,将非归属于控制器n+2的元数据执行元数据的清理。
根据本申请的一个实施例,在设定RAID控制器中的每个控制器的排序,并根据排序设定每个控制器的备份控制器前还包括:
将每个控制器中不属于控制器的元数据进行清理。
根据本申请的一个实施例,将每个控制器中不属于控制器的元数据进行清理包括:
响应于控制器当前任务结束,停止业务;
拷贝每个控制器配置元数据描述需要进行的任务,以分割单位长度全量配置;
每个控制器扫描全量的元数据,将不归属于控制器的元数据与已完成状态进行清理。
扫描完成,RAID恢复业务。
第二个方面,还提供了一种RAID控制器恢复元数据的装置,装置包括:
设置模块,设置模块配置为设定RAID控制器中的每个控制器的排序,并根据排序设定每个控制器的备份控制器;
编号模块,编号模块配置为在每个控制器中选取预设数量的条带,并为每个条带进行编号,并设定每个控制器中编号后的条带的唯一归属控制器;
备份模块,备份模块配置为响应于控制器故障,根据设定的备份控制器和条带的唯一归属控制器对其他控制器进行备份;
恢复模块,恢复模块配置为响应于控制器恢复,根据设定的备份控制器和条带的唯一归属控制器对控制器进行恢复。
第三个方面,还提供了一种计算机设备,该计算机设备包括:
至少一个处理器;以及
存储器,存储器存储有可在处理器上运行的计算机指令,指令由处理器执行时实现上述任意一项方法的步骤。
第四个方面,还提供了一种非易失性可读存储介质,非易失性可读存储介质存储有计算机程序,计算机程序被处理器执行时实现上述任意一项方法的步骤。
本申请具有以下有益技术效果:本申请实施例提供的RAID控制器恢复元数据的方法,通过设定RAID控制器中的每个控制器的排序,并根据排序设定每个控制器的备份控制器;在每个控制器中选取预设数量 的条带,并为每个条带进行编号,并设定每个控制器中编号后的条带的唯一归属控制器;响应于控制器故障,根据设定的备份控制器和条带的唯一归属控制器对其他控制器进行备份;响应于控制器恢复,根据设定的备份控制器和条带的唯一归属控制器对控制器进行恢复的技术方案,能够增加空间利用率,增加元数据的同步速度,减小对控制器业务停止的时间影响。
附图说明
为了更清楚地说明本申请实施例或相关技术中的技术方案,下面将对实施例或相关技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的实施例。
图1为根据本申请一个实施例的RAID控制器恢复元数据的方法的示意性流程图;
图2为根据本申请一个实施例的RAID的元数据空间布局的示意图;
图3为根据本申请一个实施例的RAID中一个控制故障后的元数据空间布局的示意图;
图4为根据本申请一个实施例的RAID控制器恢复元数据的装置的示意图;
图5为根据本申请一个实施例的计算机设备的示意图;
图6为根据本申请一个实施例的非易失性可读存储介质的示意图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚明白,以下结合可选实施例,并参照附图,对本申请实施例详细说明。
基于上述目的,本申请的实施例的第一个方面,提出了一种RAID控制器恢复元数据的方法的一个实施例。图1示出的是该方法的示意性流程图。
如图1中所示,该方法可以包括以下步骤:
S1设定RAID控制器中的每个控制器的排序,并根据排序设定每个控制器的备份控制器。本申请主要用于四控RAID系统控制器中,也可以用于包括更多控制器的系统中,如图2所示,约定节点node(n)标识第n个控制器,node(n+1)标识控制器的下一个控制器,例如四控时node4的下一个控制器为node1,三控时(node1离线),node4的下一个节点是node2,node(n-1)同理。
S2在每个控制器中选取预设数量的条带,并为每个条带进行编号,并设定每个控制器中编号后的条带的唯一归属控制器。如图2所示,约定四种类型方格,四种方格从左到右分别归属于四个控制器,提出针对于RAID的元数据空间布局图,图示中四种类型的方格分别描述归属于四个控制的条带。归属于控制器的条带意味着其只会在归属的控制器上读写,约定其中d0归属于node1(控制器1,第一控制器),依次排布,其中归属于node1的条带的元数据的备份节点是node2,依次排布,node4的备份节点是node1。
S3响应于控制器故障,根据设定的备份控制器和条带的唯一归属控制器对其他控制器进行备份。控制器故障时,归属于控制器的条带迁移归属到控制器+1上。例如,控制器node1故障时,归属于node1的(图示左斜线的)将迁移归属到node2,同时,备份在控制器上的将备份在控制器+1上,例如,控制器node1故障时,备份在node1上的(图示方格的)将重新备份到node2上,即node4的备份节点变更为node2,如图3所不。
S4响应于控制器恢复,根据设定的备份控制器和条带的唯一归属控制器对控制器进行恢复。
通过使用本申请的技术方案,能够增加空间利用率,增加元数据的同步速度,减小对控制器业务停止的时间影响。
在本申请的一个可选实施例中,设定RAID控制器中的每个控制器的排序,并根据排序设定每个控制器的备份控制器包括:
设定四控RAID控制器中的第一控制器的备份控制器为第二控制器,第二控制器的备份控制器为第三控 制器,第三控制器的备份控制器为第四控制器,第四控制器的备份控制器为第一控制器。如果有更多个控制器则最后一个控制器的备份控制器是第一个控制器,能够实现每个控制器的备份控制器的有序排布,在控制器需要备份时容易找到其备份控制器。
在本申请的一个可选实施例中,在每个控制器中选取预设数量的条带,并为每个条带进行编号,并设定每个控制器中编号后的条带的唯一归属控制器包括:
分别在每个控制器中选取16个条带,每个控制器中的条带按照数字顺序进行编号;
分别将每个控制器的16个条带中的每一个设定唯一归属控制器,其中,每个控制器中编号相同的条带的唯一归属控制器相同。可以根据需要选用更多个条带,每个控制器中条带的数量相同,在各个控制器中编号相同的条带的唯一归属控制器相同,实现归属于控制器的条带只会在归属的控制器上进行读写,实现数据有效分布,在控制器故障时,增加元数据的同步速度,减小对控制器业务停止的时间影响。
在本申请的一个可选实施例中,响应于控制器故障,根据设定的备份控制器和条带的唯一归属控制器对其他控制器进行备份包括:
响应于检测到四个控制器中的一个控制器n发生故障,在当前任务结束后停止业务;
拷贝控制器n+1的元数据到控制器n+2,并与控制器n+2的元数据做或运行算,将运算结果覆盖控制器n+2的元数据;
拷贝控制器n-1的元数据到控制器n+1,并与控制器n+1的元数据做或运行算,将运算结果覆盖控制器n+1的元数据;
RAID恢复业务。通过对备份控制器的备份关系的约定,在控制器故障需要进行数据合并时,无需计算控制器的归属关系,实现内存级拷贝合并,提高数据合并速度,减少控制器业务停止的影响。
在本申请的一个可选实施例中,还包括:
控制器n+1扫描元数据,将非归属于控制器n+1的元数据执行元数据的清理。控制器故障时完成控制器的RAID的元数据的重新同步,即上文中说明的,归属于控制器的条带迁移归属到控制器+1上,备份在控制器上的将备份在控制器+1。该过程是四个控制器中的一个控制器故障时备份的过程。
在本申请的一个可选实施例中,响应于控制器故障,根据设定的备份控制器和条带的唯一归属控制器对其他控制器进行备份包括:
响应于检测到三个控制器中的一个控制器n发生故障,在当前任务结束后停止业务;
拷贝控制器n-1的元数据到控制器n+1,并与控制器n+1的元数据做或运行算,将运算结果覆盖控制器n+1的元数据;
拷贝控制器n+1的元数据到控制器n-1,并覆盖控制器n-1的元数据;
RAID恢复业务。该过程是三个控制器中又一个控制器故障时的备份过程。通过对备份控制器的备份关系的约定,在控制器故障需要进行数据合并时,无需计算控制器的归属关系,实现内存级拷贝合并,提高数据合并速度。
在本申请的一个可选实施例中,响应于控制器恢复,根据设定的备份控制器和条带的唯一归属控制器对控制器进行恢复包括:
响应于检测到第四个控制器n恢复,在当前任务结束后停止业务;
拷贝控制器n+1的元数据到控制器n,并覆盖控制器n的元数据;
RAID恢复业务。在控制器恢复后,能够根据备份控制器的归属关系实现控制器数据的快速恢复。
在本申请的一个可选实施例中,还包括:
控制器n扫描元数据,并将非归属于控制器n的元数据执行元数据的清理;
控制器n+1扫描元数据,并将非归属于控制器n+1的元数据执行元数据的清理。控制器恢复时完成控制器的RAID的元数据的重新同步,原本归属于控制器现在由其他控制器接管的业务将恢复到控制器上,该过程是三个控制器恢复成四个控制器的过程,其中元数据的清理需要同时进行,能够将不属于本控制器的数 据删除,提高存储空间利用率。
在本申请的一个可选实施例中,响应于控制器恢复,根据设定的备份控制器和条带的唯一归属控制器对控制器进行恢复包括:
响应于检测到第三个控制器n恢复,在当前任务结束后停止业务;
拷贝控制器n+1的元数据到控制器n,并覆盖控制器n的元数据;
RAID恢复业务。在控制器恢复后,能够根据备份控制器的归属关系实现控制器数据的快速恢复。
在本申请的一个可选实施例中,还包括:
控制器n扫描元数据,并将非归属于控制器n的元数据执行元数据的清理;
控制器n+1扫描元数据,将非归属于控制器n+1的元数据执行元数据的清理;
控制器n+2扫描元数据,将非归属于控制器n+2的元数据执行元数据的清理。该过程是两个控制器恢复成三个控制器的过程,其中元数据的清理需要同时进行,能够将不属于本控制器的数据删除,提高存储空间利用率。
在本申请的一个可选实施例中,在设定RAID控制器中的每个控制器的排序,并根据排序设定每个控制器的备份控制器前还包括:
将每个控制器中不属于控制器的元数据进行清理。
在本申请的一个可选实施例中,将每个控制器中不属于控制器的元数据进行清理包括:
响应于控制器当前任务结束,停止业务;
拷贝每个控制器配置元数据描述需要进行的任务,以分割单位长度全量配置;
每个控制器扫描全量的元数据,将不归属于控制器的元数据与已完成状态进行清理。扫描完成,RAID恢复业务。控制器故障与恢复是的上述算法必须配合元数据的初始配置使用,即元数据空间首先如上文中描述的分布,且元数据初始使用时必须按照控制器归属进行初始配置。这是因为控制器故障与恢复时执行的内存拷贝合并算法将不再关心控制器归属问题。控制器归属进行初始配置是指RAID模块启用控制器元数据时,RAID需要将非归属控制器的与元数据与元数据已完成状态等同。例如将元数据用于格式化,约定以bit0(比特)描述完成格式化,以bit1描述需要格式化,则控制器需要将不归属于本控制器的设置位bit0描述完成格式化。RAID元数据启用(所用任务启动时配置)时,对于四控系统中当前存在的控制器,需要同时执行上述逻辑。中途控制器故障时,元数据启用配置算法,根据存活的控制器的新的归属分配,重新执行。
通过使用本申请的技术方案,能够增加空间利用率,增加元数据的同步速度,减小对控制器业务停止的时间影响。
需要说明的是,本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,可以通过计算机程序来指令相关硬件来完成,上述的程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中存储介质可为磁碟、光盘、只读存储器(Read Only Memory,ROM)或随机存取存储器(Random Access Memory,RAM)等。上述计算机程序的实施例,可以达到与之对应的前述任意方法实施例相同或者相类似的效果。
此外,根据本申请实施例公开的方法还可以被实现为由CPU(Central Processing Unit,中央处理器)执行的计算机程序,该计算机程序可以存储在非易失性可读存储介质中。在该计算机程序被CPU执行时,执行本申请实施例公开的方法中限定的上述功能。
基于上述目的,本申请的实施例的第二个方面,提出了一种RAID控制器恢复元数据的装置,如图4所示,装置200包括:
设置模块,设置模块配置为设定RAID控制器中的每个控制器的排序,并根据排序设定每个控制器的备份控制器;
编号模块,编号模块配置为在每个控制器中选取预设数量的条带,并为每个条带进行编号,并设定每 个控制器中编号后的条带的唯一归属控制器;
备份模块,备份模块配置为响应于控制器故障,根据设定的备份控制器和条带的唯一归属控制器对其他控制器进行备份;
恢复模块,恢复模块配置为响应于控制器恢复,根据设定的备份控制器和条带的唯一归属控制器对控制器进行恢复。
基于上述目的,本申请实施例的第三个方面,提出了一种计算机设备。图5示出的是本申请提供的计算机设备的实施例的示意图。如图5所示,本申请实施例包括如下装置:至少一个处理器21;以及存储器22,存储器22存储有可在处理器上运行的计算机指令23,指令由处理器执行时实现以下方法:
设定RAID控制器中的每个控制器的排序,并根据排序设定每个控制器的备份控制器;
在每个控制器中选取预设数量的条带,并为每个条带进行编号,并设定每个控制器中编号后的条带的唯一归属控制器;
响应于控制器故障,根据设定的备份控制器和条带的唯一归属控制器对其他控制器进行备份;
响应于控制器恢复,根据设定的备份控制器和条带的唯一归属控制器对控制器进行恢复。
在本申请的一个可选实施例中,设定RAID控制器中的每个控制器的排序,并根据排序设定每个控制器的备份控制器包括:
设定四控RAID控制器中的第一控制器的备份控制器为第二控制器,第二控制器的备份控制器为第三控制器,第三控制器的备份控制器为第四控制器,第四控制器的备份控制器为第一控制器。
在本申请的一个可选实施例中,在每个控制器中选取预设数量的条带,并为每个条带进行编号,并设定每个控制器中编号后的条带的唯一归属控制器包括:
分别在每个控制器中选取16个条带,每个控制器中的条带按照数字顺序进行编号;
分别将每个控制器的16个条带中的每一个设定唯一归属控制器,其中,每个控制器中编号相同的条带的唯一归属控制器相同。
在本申请的一个可选实施例中,响应于控制器故障,根据设定的备份控制器和条带的唯一归属控制器对其他控制器进行备份包括:
响应于检测到四个控制器中的一个控制器n发生故障,在当前任务结束后停止业务;
拷贝控制器n+1的元数据到控制器n+2,并与控制器n+2的元数据做或运行算,将运算结果覆盖控制器n+2的元数据;
拷贝控制器n 1的元数据到控制器n+1,并与控制器n+1的元数据做或运行算,将运算结果覆盖控制器n+1的元数据;
RAID恢复业务。
在本申请的一个可选实施例中,还包括:
控制器n+1扫描元数据,将非归属于控制器n+1的元数据执行元数据的清理。
在本申请的一个可选实施例中,响应于控制器故障,根据设定的备份控制器和条带的唯一归属控制器对其他控制器进行备份包括:
响应于检测到三个控制器中的一个控制器n发生故障,在当前任务结束后停止业务;
拷贝控制器n 1的元数据到控制器n+1,并与控制器n+1的元数据做或运行算,将运算结果覆盖控制器n+1的元数据;
拷贝控制器n+1的元数据到控制器n 1,并覆盖控制器n 1的元数据;
RAID恢复业务。
在本申请的一个可选实施例中,响应于控制器恢复,根据设定的备份控制器和条带的唯一归属控制器对控制器进行恢复包括:
响应于检测到第四个控制器n恢复,在当前任务结束后停止业务;
拷贝控制器n+1的元数据到控制器n,并覆盖控制器n的元数据;
RAID恢复业务。
在本申请的一个可选实施例中,还包括:
控制器n扫描元数据,并将非归属于控制器n的元数据执行元数据的清理;
控制器n+1扫描元数据,并将非归属于控制器n+1的元数据执行元数据的清理。
在本申请的一个可选实施例中,响应于控制器恢复,根据设定的备份控制器和条带的唯一归属控制器对控制器进行恢复包括:
响应于检测到第三个控制器n恢复,在当前任务结束后停止业务;
拷贝控制器n+1的元数据到控制器n,并覆盖控制器n的元数据;
RAID恢复业务。
在本申请的一个可选实施例中,还包括:
控制器n扫描元数据,并将非归属于控制器n的元数据执行元数据的清理;
控制器n+1扫描元数据,将非归属于控制器n+1的元数据执行元数据的清理;
控制器n+2扫描元数据,将非归属于控制器n+2的元数据执行元数据的清理。
在本申请的一个可选实施例中,在设定RAID控制器中的每个控制器的排序,并根据排序设定每个控制器的备份控制器前还包括:
将每个控制器中不属于控制器的元数据进行清理。
在本申请的一个可选实施例中,将每个控制器中不属于控制器的元数据进行清理包括:
响应于控制器当前任务结束,停止业务;
拷贝每个控制器配置元数据描述需要进行的任务,以分割单位长度全量配置;
每个控制器扫描全量的元数据,将不归属于控制器的元数据与已完成状态进行清理。
扫描完成,RAID恢复业务。
基于上述目的,本申请实施例的第四个方面,提出了一种非易失性可读存储介质。图6示出的是本申请提供的非易失性可读存储介质的实施例的示意图。如图6所示,非易失性可读存储介质31存储有被处理器执行时执行如上方法的计算机程序32。
此外,根据本申请实施例公开的方法还可以被实现为由处理器执行的计算机程序,该计算机程序可以存储在非易失性可读存储介质中。在该计算机程序被处理器执行时,执行本申请实施例公开的方法中限定的上述功能。
此外,上述方法步骤以及系统单元也可以利用控制器以及被设置为存储使得控制器实现上述步骤或单元功能的计算机程序的非易失性可读存储介质实现。
本领域技术人员还将明白的是,结合这里的公开所描述的各种示例性逻辑块、模块、电路和算法步骤可以被实现为电子硬件、计算机软件或两者的组合。为了清楚地说明硬件和软件的这种可互换性,已经就各种示意性组件、方块、模块、电路和步骤的功能对其进行了一般性的描述。这种功能是被实现为软件还是被实现为硬件取决于应用以及施加给整个系统的设计约束。本领域技术人员可以针对每种应用以各种方式来实现的功能,但是这种实现决定不应被解释为导致脱离本申请实施例公开的范围。
在一个或多个示例性设计中,功能可以在硬件、软件、固件或其任意组合中实现。如果在软件中实现,则可以将功能作为一个或多个指令或代码存储在非易失性可读存储介质上或通过非易失性可读存储介质来传送。非易失性可读存储介质包括计算机存储介质和通信介质,该通信介质包括有助于将计算机程序从一个位置传送到另一个位置的任何介质。存储介质可以是能够被通用或专用计算机访问的任何可用介质。作为例子而非限制性的,该非易失性可读存储介质可以包括RAM、ROM、EEPROM(Electrically Erasable Programmable Read-Only Memory,可擦写的可编程只读存储器)、CD-ROM(Compact Disc Read-Only Memory,只读光盘存储介质)或其它光盘存储设备、磁盘存储设备或其它磁性存储设备,或者 是可以被设置为携带或存储形式为指令或数据结构的所需程序代码并且能够被通用或专用计算机或者通用或专用处理器访问的任何其它介质。此外,任何连接都可以适当地称为非易失性可读存储介质。例如,如果使用同轴线缆、光纤线缆、双绞线、数字用户线路(DSL,Digital Subscriber Line)或诸如红外线、无线电和微波的无线技术来从网站、服务器或其它远程源发送软件,则上述同轴线缆、光纤线缆、双绞线、DSL或诸如红外线、无线电和微波的无线技术均包括在介质的定义。如这里所使用的,磁盘和光盘包括压缩盘(CD,Compact Disc)、激光盘、光盘、数字多功能盘(DVD,Digital Versatile Disc)、软盘、蓝光盘,其中磁盘通常磁性地再现数据,而光盘利用激光光学地再现数据。上述内容的组合也应当包括在非易失性可读存储介质的范围内。
以上是本申请公开的示例性实施例,但是应当注意,在不背离权利要求限定的本申请实施例公开的范围的前提下,可以进行多种改变和修改。根据这里描述的公开实施例的方法权利要求的功能、步骤和/或动作不需以任何特定顺序执行。此外,尽管本申请实施例公开的元素可以以个体形式描述或要求,但除非明确限制为单数,也可以理解为多个。
应当理解的是,在本文中使用的,除非上下文清楚地支持例外情况,单数形式“一个”旨在也包括复数形式。还应当理解的是,在本文中使用的“和/或”是指包括一个或者一个以上相关联地列出的项目的任意和所有可能组合。
上述本申请实施例公开实施例序号仅仅为了描述,不代表实施例的优劣。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,程序可以存储于一种非易失性可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
所属领域的普通技术人员应当理解:以上任何实施例的讨论仅为示例性的,并非旨在暗示本申请实施例公开的范围(包括权利要求)被限于这些例子;在本申请实施例的思路下,以上实施例或者不同实施例中的技术特征之间也可以进行组合,并存在如上的本申请实施例的不同方面的许多其它变化,为了简明它们没有在细节中提供。因此,凡在本申请实施例的精神和原则之内,所做的任何省略、修改、等同替换、改进等,均应包含在本申请实施例的保护范围之内。

Claims (20)

  1. 一种RAID控制器恢复元数据的方法,其特征在于,包括以下步骤:
    设定RAID控制器中的每个控制器的排序,并根据排序设定每个控制器的备份控制器;
    在每个控制器中选取预设数量的条带,并为每个条带进行编号,并设定每个控制器中编号后的条带的唯一归属控制器;
    响应于控制器故障,根据设定的备份控制器和条带的唯一归属控制器对其他控制器进行备份;
    响应于控制器恢复,根据设定的备份控制器和条带的唯一归属控制器对控制器进行恢复。
  2. 根据权利要求1所述的方法,其特征在于,所述响应于控制器故障,根据设定的备份控制器和条带的唯一归属控制器对其他控制器进行备份,包括:
    将所述备份控制器的元数据备份到所述备份控制器的后一个控制器中后将故障控制器的上一个控制器的元数据备份到所述备份控制器,或将故障控制器的上一个控制器的元数据备份到所述备份控制器中后将所述备份控制器中的元数据备份到所述故障控制器的上一个控制器。
  3. 根据权利要求1所述的方法,其特征在于,所述响应于控制器恢复,根据设定的备份控制器和条带的唯一归属控制器对控制器进行恢复,包括:
    将所述备份控制器中的元数据拷贝到恢复的控制器中。
  4. 根据权利要求1所述的方法,其特征在于,设定RAID控制器中的每个控制器的排序,并根据排序设定每个控制器的备份控制器包括:
    设定四控RAID控制器中的第一控制器的备份控制器为第二控制器,第二控制器的备份控制器为第三控制器,第三控制器的备份控制器为第四控制器,第四控制器的备份控制器为第一控制器。
  5. 根据权利要求1所述的方法,其特征在于,所述设定RAID控制器中的每个控制器的排序,并根据排序设定每个控制器的备份控制器,包括:
    在所述RAID控制器中包括M个控制器的情况下,设定第m个控制器的备份控制器为第m+1个控制器,其中,m为大于或者等于1,且小于或者等于M-1的正整数,在所述m+1等于M的情况下,设定第m+1个控制器的备份控制器为第1个控制器。
  6. 根据权利要求1所述的方法,其特征在于,在每个控制器中选取预设数量的条带,并为每个条带进行编号,并设定每个控制器中编号后的条带的唯一归属控制器包括:
    分别在每个控制器中选取16个条带,每个控制器中的条带按照数字顺序进行编号;
    分别将每个控制器的16个条带中的每一个设定唯一归属控制器,其中,每个控制器中编号相同的条带的唯一归属控制器相同。
  7. 根据权利要求1所述的方法,其特征在于,所述在每个控制器中选取预设数量的条带,并为每个条带进行编号,并设定每个控制器中编号后的条带的唯一归属控制器,包括:
    分别在每个控制器中选取P个条带,每个控制器中的条带按照数字顺序进行编号,其中,P为大于或者等于1的正整数;
    分别将每个控制器的P个条带中的每一个设定唯一归属控制器,其中,每个控制器中编号相同的条带的唯一归属控制器相同。
  8. 根据权利要求7所述的方法,其特征在于,P为大于或者等于16的正整数。
  9. 根据权利要求1所述的方法,其特征在于,响应于控制器故障,根据设定的备份控制器和条带的唯一归属控制器对其他控制器进行备份包括:
    响应于检测到四个控制器中的一个控制器n发生故障,在当前任务结束后停止业务;
    拷贝控制器n+1的元数据到控制器n+2,并与控制器n+2的元数据做或运行算,将运算结果覆盖控制器n+2的元数据;
    拷贝控制器n-1的元数据到控制器n+1,并与控制器n+1的元数据做或运行算,将运算结果覆盖控制器 n+1的元数据;
    RAID恢复业务。
  10. 根据权利要求9所述的方法,其特征在于,还包括:
    控制器n+1扫描元数据,将非归属于控制器n+1的元数据执行元数据的清理。
  11. 根据权利要求1所述的方法,其特征在于,响应于控制器故障,根据设定的备份控制器和条带的唯一归属控制器对其他控制器进行备份包括:
    响应于检测到三个控制器中的一个控制器n发生故障,在当前任务结束后停止业务;
    拷贝控制器n-1的元数据到控制器n+1,并与控制器n+1的元数据做或运行算,将运算结果覆盖控制器n+1的元数据;
    拷贝控制器n+1的元数据到控制器n-1,并覆盖控制器n-1的元数据;
    RAID恢复业务。
  12. 根据权利要求1所述的方法,其特征在于,响应于控制器恢复,根据设定的备份控制器和条带的唯一归属控制器对控制器进行恢复包括:
    响应于检测到第四个控制器n恢复,在当前任务结束后停止业务;
    拷贝控制器n+1的元数据到控制器n,并覆盖控制器n的元数据;
    RAID恢复业务。
  13. 根据权利要求12所述的方法,其特征在于,还包括:
    控制器n扫描元数据,并将非归属于控制器n的元数据执行元数据的清理;
    控制器n+1扫描元数据,并将非归属于控制器n+1的元数据执行元数据的清理。
  14. 根据权利要求1所述的方法,其特征在于,响应于控制器恢复,根据设定的备份控制器和条带的唯一归属控制器对控制器进行恢复包括:
    响应于检测到第三个控制器n恢复,在当前任务结束后停止业务;
    拷贝控制器n+1的元数据到控制器n,并覆盖控制器n的元数据;
    RAID恢复业务。
  15. 根据权利要求14所述的方法,其特征在于,还包括:
    控制器n扫描元数据,并将非归属于控制器n的元数据执行元数据的清理;
    控制器n+1扫描元数据,将非归属于控制器n+1的元数据执行元数据的清理;
    控制器n+2扫描元数据,将非归属于控制器n+2的元数据执行元数据的清理。
  16. 根据权利要求1所述的方法,其特征在于,在设定RAID控制器中的每个控制器的排序,并根据排序设定每个控制器的备份控制器前还包括:
    将每个控制器中不属于控制器的元数据进行清理。
  17. 根据权利要求16所述的方法,其特征在于,将每个控制器中不属于控制器的元数据进行清理包括:
    响应于控制器当前任务结束,停止业务;
    拷贝每个控制器配置元数据描述需要进行的任务,以分割单位长度全量配置;
    每个控制器扫描全量的元数据,将不归属于控制器的元数据与已完成状态进行清理;
    扫描完成,RAID恢复业务。
  18. 一种RAID控制器恢复元数据的装置,其特征在于,所述装置包括:
    设置模块,所述设置模块配置为设定RAID控制器中的每个控制器的排序,并根据排序设定每个控制器的备份控制器;
    编号模块,所述编号模块配置为在每个控制器中选取预设数量的条带,并为每个条带进行编号,并设定每个控制器中编号后的条带的唯一归属控制器;
    备份模块,所述备份模块配置为响应于控制器故障,根据设定的备份控制器和条带的唯一归属控制器对其他控制器进行备份;
    恢复模块,所述恢复模块配置为响应于控制器恢复,根据设定的备份控制器和条带的唯一归属控制器对控制器进行恢复。
  19. 一种计算机设备,其特征在于,包括:
    至少一个处理器;以及
    存储器,所述存储器存储有可在所述处理器上运行的计算机指令,所述指令由所述处理器执行时实现权利要求1-17任意一项所述方法的步骤。
  20. 一种非易失性可读存储介质,所述非易失性可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1-17任意一项所述方法的步骤。
PCT/CN2023/121185 2022-11-16 2023-09-25 Raid控制器恢复元数据的方法、装置、设备及非易失性可读存储介质 WO2024103967A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211463228.5A CN115543692B (zh) 2022-11-16 2022-11-16 Raid控制器恢复元数据的方法、装置、设备及介质
CN202211463228.5 2022-11-16

Publications (1)

Publication Number Publication Date
WO2024103967A1 true WO2024103967A1 (zh) 2024-05-23

Family

ID=84719929

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/121185 WO2024103967A1 (zh) 2022-11-16 2023-09-25 Raid控制器恢复元数据的方法、装置、设备及非易失性可读存储介质

Country Status (2)

Country Link
CN (1) CN115543692B (zh)
WO (1) WO2024103967A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115543692B (zh) * 2022-11-16 2023-03-28 苏州浪潮智能科技有限公司 Raid控制器恢复元数据的方法、装置、设备及介质
CN116701049B (zh) * 2023-08-09 2023-11-14 苏州浪潮智能科技有限公司 一种有归属卷配置方法、装置、设备及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009053946A (ja) * 2007-08-27 2009-03-12 Toshiba Corp 二重化コントーラ構成ブロックデバイス制御装置
CN102681794A (zh) * 2012-04-23 2012-09-19 浪潮(北京)电子信息产业有限公司 基于双控制器实现磁盘冗余阵列保护的方法及系统
CN103488435A (zh) * 2013-09-24 2014-01-01 华为技术有限公司 Raid子系统及其数据读写方法
CN115268784A (zh) * 2022-07-26 2022-11-01 苏州浪潮智能科技有限公司 基于四控存储系统的raid校验写保护方法及系统
CN115543692A (zh) * 2022-11-16 2022-12-30 苏州浪潮智能科技有限公司 Raid控制器恢复元数据的方法、装置、设备及介质

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9600375B2 (en) * 2015-01-14 2017-03-21 International Business Machines Corporation Synchronized flashcopy backup restore of a RAID protected array
CN114281591A (zh) * 2021-12-30 2022-04-05 郑州云海信息技术有限公司 存储节点故障处理方法、装置、设备及存储介质
CN115129507A (zh) * 2022-06-29 2022-09-30 苏州浪潮智能科技有限公司 实现快速raid阵列重组的方法、装置、设备、介质
CN114995771B (zh) * 2022-08-02 2022-12-13 苏州浪潮智能科技有限公司 独立磁盘冗余阵列格式化调度方法、装置、设备及介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009053946A (ja) * 2007-08-27 2009-03-12 Toshiba Corp 二重化コントーラ構成ブロックデバイス制御装置
CN102681794A (zh) * 2012-04-23 2012-09-19 浪潮(北京)电子信息产业有限公司 基于双控制器实现磁盘冗余阵列保护的方法及系统
CN103488435A (zh) * 2013-09-24 2014-01-01 华为技术有限公司 Raid子系统及其数据读写方法
CN115268784A (zh) * 2022-07-26 2022-11-01 苏州浪潮智能科技有限公司 基于四控存储系统的raid校验写保护方法及系统
CN115543692A (zh) * 2022-11-16 2022-12-30 苏州浪潮智能科技有限公司 Raid控制器恢复元数据的方法、装置、设备及介质

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"Master Thesis", 15 May 2010, EAST CHINA UNIVERSITY OF SCIENCE AND TECHNOLOGY, CN, ISSN: 1674-0246, article BU, KAI: "Research and Design of Solid-State Storage Array System Based on RAID Technology", pages: 1 - 71, XP009554804 *

Also Published As

Publication number Publication date
CN115543692B (zh) 2023-03-28
CN115543692A (zh) 2022-12-30

Similar Documents

Publication Publication Date Title
US10346253B2 (en) Threshold based incremental flashcopy backup of a raid protected array
WO2024103967A1 (zh) Raid控制器恢复元数据的方法、装置、设备及非易失性可读存储介质
US9600375B2 (en) Synchronized flashcopy backup restore of a RAID protected array
US9678686B2 (en) Managing sequentiality of tracks for asynchronous PPRC tracks on secondary
US8554734B1 (en) Continuous data protection journaling in data storage systems
JP5285610B2 (ja) グローバルホットスペアディスクが存在するときに、故障したドライブを復元、及びコピーバックする最適化された方法
CN102652423A (zh) 用于集群选择和协作复制的集群族
US20100030754A1 (en) Data Backup Method
US20070109883A1 (en) Apparatus and method to reconfigure a storage array
JPH07239799A (ja) 遠隔データ・シャドーイングを提供する方法および遠隔データ二重化システム
JP2004118837A (ja) 耐故障性の記憶サブシステムにデータを格納するための方法、記憶サブシステムおよびそのシステムのためのデータ編成管理プログラム
JP4939205B2 (ja) データ記憶システムに配置された記憶アレイを再構成するための装置及び方法
JP2005276196A (ja) ドライブ故障に続いてドライブリカバリを行うためのシステムおよび方法
CN101661413B (zh) 计算机系统、存储系统以及结构管理方法
US9513996B2 (en) Information processing apparatus, computer-readable recording medium having stored program for controlling information processing apparatus, and method for controlling information processing apparatus
WO2013118189A1 (en) Storage device replacement method, and storage sub-system adopting storage device replacement method
CN102999399A (zh) 一种jbod阵列自动恢复存储的方法和装置
CN115454727A (zh) 一种数据恢复方法、装置、设备及可读存储介质
US7506201B2 (en) System and method of repair management for RAID arrays
US10664346B2 (en) Parity log with by-pass
JPH07261945A (ja) ディスクアレイ装置およびディスクアレイの区分け方法
JPH1115604A (ja) データ多重化方法
JP2005055995A (ja) ストレージ制御方法、および、冗長化機能を有するサーバシステム
JP4272465B2 (ja) バックアップデータ復旧方法、並びに、ネットワーク蓄積装置及びネットワーク蓄積プログラム
CN114089923A (zh) 一种双活存储系统及其数据处理方法