[go: up one dir, main page]

CN109582499B - Management metadata restoration method and device - Google Patents

Management metadata restoration method and device Download PDF

Info

Publication number
CN109582499B
CN109582499B CN201811425331.4A CN201811425331A CN109582499B CN 109582499 B CN109582499 B CN 109582499B CN 201811425331 A CN201811425331 A CN 201811425331A CN 109582499 B CN109582499 B CN 109582499B
Authority
CN
China
Prior art keywords
address segment
backup
management metadata
repair
read
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.)
Active
Application number
CN201811425331.4A
Other languages
Chinese (zh)
Other versions
CN109582499A (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.)
Macrosan Technologies Co Ltd
Original Assignee
Macrosan Technologies 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 Macrosan Technologies Co Ltd filed Critical Macrosan Technologies Co Ltd
Priority to CN201811425331.4A priority Critical patent/CN109582499B/en
Publication of CN109582499A publication Critical patent/CN109582499A/en
Application granted granted Critical
Publication of CN109582499B publication Critical patent/CN109582499B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1435Saving, restoring, recovering or retrying at system level using file system or storage system metadata

Landscapes

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

Abstract

本申请提供一种管理元数据修复方法及装置,方法包括:在接收到当前读取的管理元数据无法使业务正常运行的通知时,依据当前所用读策略确定新的读策略,通过该读策略重新读取管理元数据,将重新读取的管理元数据发送给业务;在接收到重新读取的管理元数据能够使业务正常运行的通知时,依据该读策略确定修复方向,并确定出修复范围;根据修复范围确定主地址段和备份地址段,依据修复方向,对主地址段和备份地址段中的管理元数据进行修复。当由于磁盘发生静默错误导致管理元数据错误业务无法运行时,通过切换读策略找回数据,当找回的数据能够使业务正常运行时,通过新的读策略确定修复方向进行修复,使得发生静默错误的数据得到修复。

Figure 201811425331

The present application provides a method and device for restoring management metadata. The method includes: when receiving a notification that the currently read management metadata cannot make the business run normally, determining a new reading strategy according to the currently used reading strategy, and using the reading strategy Re-read the management metadata, and send the re-read management metadata to the business; when receiving a notification that the re-read management metadata can make the business run normally, determine the repair direction according to the read strategy, and determine the repair direction Scope; the primary address segment and the backup address segment are determined according to the restoration range, and the management metadata in the primary address segment and the backup address segment are restored according to the restoration direction. When the management metadata error service cannot be run due to a silent error on the disk, the data is retrieved by switching the read strategy. When the retrieved data can make the business run normally, the new read strategy is used to determine the repair direction for repair, so that the silent occurrence occurs. Incorrect data was fixed.

Figure 201811425331

Description

Management metadata repairing method and device
Technical Field
The present application relates to the field of data storage technologies, and in particular, to a method and an apparatus for managing metadata repair.
Background
With the emergence of big data application, it is very important to the storage management of mass data. At present, a RAID (Redundant Arrays of Independent Drives) is created by using a plurality of disks on a storage device, and a LUN (Logical Unit Number) is created on the RAID, and data protection is realized by a double active, copy, and snapshot service on the LUN level. Whether the LUN is created on RAID or the LUN enables data protection services, storage of management metadata is involved, and when user data is read and written, accurate reading and writing of the management metadata is involved.
However, when the management metadata is written into the disk, a silent error may occur in the disk due to factors such as disk firmware BUG and disk vibration, that is, when the management metadata is written into the disk, an IO write success may occur when the disk returns, but the error data is actually stored in the disk or the written sectors are not equal to each other. Because the disk returns the successful IO writing, the data state can be identified to be valid, so that the wrong data can be read during reading, and no scheme for repairing the data aiming at the silent error of the disk exists at present, so that the data reliability is lower.
Disclosure of Invention
In view of this, the present application provides a method and an apparatus for managing metadata repair to solve the problem of low data reliability when a silent error occurs in a disk.
According to a first aspect of embodiments of the present application, there is provided a method for managing metadata repair, the method including:
when receiving a notification that the currently read management metadata can not enable the service to normally run, determining a new reading strategy according to the currently used reading strategy, re-reading the management metadata through the reading strategy, and sending the re-read management metadata to the service; when receiving a notification that the re-read management metadata can enable the service to run normally, determining a repair direction according to the read strategy and determining a repair range;
and determining a main address field and a backup address field according to the repair range, and repairing the management metadata in the main address field and the backup address field according to the repair direction.
According to a second aspect of embodiments of the present application, there is provided an apparatus for managing metadata repair, the apparatus including:
a retrieve data unit, configured to determine a new read policy according to a currently used read policy when receiving a notification that the currently read management metadata cannot enable the service to operate normally, re-read the management metadata through the read policy, and send the re-read management metadata to the service;
the determining unit is used for determining the repairing direction according to the reading strategy and determining the repairing range when receiving the notification that the re-read management metadata can enable the service to normally run;
and the repair unit is used for determining a main address field and a backup address field according to the repair range and repairing the management metadata in the main address field and the backup address field according to the repair direction.
By applying the embodiment of the application, when the notification that the currently read management metadata can not enable the service to normally operate is received, the new reading strategy is determined according to the currently used reading strategy, the management metadata is read again through the new reading strategy, the newly read management metadata is sent to the service, when the notification that the newly read management metadata can enable the service to normally operate is received, the repairing direction is determined according to the reading strategy, the repairing range is determined, finally, the main address field and the backup address field are determined according to the repairing range, and the management metadata in the main address field and the backup address field are repaired according to the repairing direction.
Based on the above description, when a silent error occurs in the disk, which causes a management metadata error, and a service cannot run, the data is retrieved by switching a new read strategy, and when the retrieved data enables the service to run normally, a repair direction can be determined by the new read strategy for repair, so that the management metadata with the silent error is repaired, and the data security is improved.
Drawings
FIG. 1 is a flow diagram illustrating an embodiment of a method for managing metadata fixes according to an exemplary embodiment of the present application;
FIG. 2 is a diagram illustrating a hardware configuration of a storage device according to an exemplary embodiment of the present application;
fig. 3 is a block diagram illustrating an embodiment of a management metadata repair apparatus according to an exemplary embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
At present, in the process of writing management metadata into a disk, if a silent error occurs in the disk, the data with the written error is written or the written sectors are not aligned, but the disk still returns a message of successful IO writing, so that the service cannot normally run when the management metadata with the silent error is read subsequently.
In order to solve the above problems, the present application provides a method for repairing management metadata, wherein when a notification that a currently read management metadata cannot enable a service to normally operate is received, a new read policy is determined according to the currently used read policy, the management metadata is read again through the new read policy and is sent to the service, when the notification that the newly read management metadata can enable the service to normally operate is received, a repair direction is determined according to the read policy and a repair range is determined, and finally, a main address field and a backup address field are determined according to the repair range and are repaired according to the repair direction.
Based on the above description, when a silent error occurs in the disk, which causes a management metadata error, and a service cannot run, the data is retrieved by switching a new read strategy, and when the retrieved data enables the service to run normally, a repair direction can be determined by the new read strategy for repair, so that the management metadata with the silent error is repaired, and the data security is improved.
The technical solution of the present application is explained in detail by the following specific examples.
Fig. 1 is a flowchart illustrating an embodiment of a method for managing metadata repair according to an exemplary embodiment of the present application, where the method for managing metadata repair may be applied to a storage device. As shown in fig. 1, the management metadata repair method includes the steps of:
step 101: when receiving a notice that the currently read management metadata can not enable the service to normally run, determining a new reading strategy according to the currently used reading strategy, re-reading the management metadata through the reading strategy, and sending the re-read management metadata to the service.
In an embodiment, the notification that the currently read management metadata cannot enable the service to operate normally may be a notification sent by a front-end server running the service, or may be a notification generated by triggering a certain button by an administrator when the service running in the storage device itself is abnormal.
In one embodiment, for a process of determining a new read policy according to a currently used read policy, if the currently used read policy is a priority main data area, determining a priority backup data area as the new read policy; and if the currently used read strategy is the priority backup data area, determining the priority main data area as a new read strategy.
The preset reading strategy on the storage device comprises the following steps: a priority main data area (hereinafter abbreviated as MF), and a priority backup data area (hereinafter abbreviated as BF). The MF indicates that the data state of the main address field and the data state of the backup address field are both effective, the main address field is read preferentially, and the backup address field is read only when the data state of the main address field is invalid and the data state of the backup address field is effective, or the main address field fails to be read and the data state of the backup address field is effective; BF indicates that when the data state of the main address field and the data state of the backup address field are both valid, the backup address field is read preferentially, and the main address field is read only when the data state of the backup address field is invalid and the data state of the main address field is valid, or when the data state of the main address field is valid due to reading failure of the backup address field.
In an embodiment, for the process of re-reading the management metadata through the read policy, the storage device may notify the service of the identifier of the read policy, and the service carries the received identifier of the read policy and the read address field into the read command for re-reading, and then sends the read command to the RAID; the RAID searches a main address field (MAM-Sx) which has intersection with the read address field and a backup address field (MAB-Sy) corresponding to the main address field from a preset backup table, and then reads the management metadata from the searched main address field or backup address field according to a read strategy carried by the read command.
The backup table records the data states of the main address field and the data states of the backup address field and the backup address field. The main address field belongs to the main data area, visible to the service, the backup address field belongs to the backup data area, invisible to the service, and the backup address field corresponding to the main address field and the main address field is used for storing the same management metadata. In order to avoid that the management metadata stored in the main address field is inaccessible due to RAID failure, the backup address fields corresponding to the main address field and the main address field are located on different RAIDs and have the same size, and therefore the backup table may further include a RAID identifier of the RAID where the main address field is located and a RAID identifier of the RAID where the backup address field is located.
It will be understood by those skilled in the art that the primary address segment or the backup address segment may be composed of a start address and an end address, or a start address and a segment size, which is not limited in the present application.
Specifically, assume that the read policy identifier carried by the read command received by the RAID is MF:
1, the data states of MAM-Sx and MAB-Sy are both valid: directly reading the MAM-Sx, if the reading fails, reading the MAB-Sy again, and if any reading succeeds, returning a reading success notice;
2, the data state of MAM-Sx is valid, the data state of MAB-Sy is invalid: directly reading the MAM-Sx, if the reading is successful, returning a reading success notice, otherwise, returning a reading failure notice;
3, the data state of MAM-Sx is invalid, the data state of MAB-Sy is valid: directly reading the MAB-Sy, if the reading is successful, returning a reading success notice, otherwise, returning a reading failure notice;
4, data states of both MAM-Sx and MAB-Sy are invalid: the read failure notification is returned directly.
Secondly, assuming that the reading strategy carried by the reading command is identified as BF:
1, the data states of MAM-Sx and MAB-Sy are both valid: directly reading the MAB-Sy, if the reading fails, reading the MAM-Sx again, and if any reading succeeds, returning a reading success notice;
2, the data state of MAM-Sx is valid, the data state of MAB-Sy is invalid: directly reading the MAM-Sx, if the reading is successful, returning a reading success notice, otherwise, returning a reading failure notice;
3, the data state of MAM-Sx is invalid, the data state of MAB-Sy is valid: directly reading the MAB-Sy, if the reading is successful, returning a reading success notice, otherwise, returning a reading failure notice;
4, data states of both MAM-Sx and MAB-Sy are invalid: the read failure notification is returned directly.
Step 102: and when receiving a notification that the re-read management metadata can enable the service to normally run, determining a repair direction according to the read strategy and determining a repair range.
In an embodiment, the notification that the newly read management metadata enables the service to normally operate may be a notification sent by a front-end server running the service, or may be a notification generated by triggering a certain button by an administrator when the service running in the storage device itself returns to normal.
In an embodiment, for the process of determining the repair direction according to the read policy, if the read policy is the priority main data area, the repair direction is to repair the management metadata (hereinafter abbreviated as MtB) of the backup data area using the management metadata of the main data area; if the read policy is the priority backup data area, the repair direction is to repair the management metadata of the main data area using the management metadata of the backup data area (hereinafter referred to as BtM).
If the management metadata retrieved by the MF can enable the service to normally operate, which indicates that the disk where the main data area is located has no silent error, the main data area can be used to repair the backup data area; if the management metadata retrieved by BF can make the service normally run, which indicates that the disk where the backup data area is located has no silent error, the backup data area can be used to repair the main data area.
In an embodiment, for the process of determining the repair range, all the main address fields in the main data area, in which the management metadata is stored, may be determined as the repair range, a section including the read address field may be determined as the repair range, or a space allocated to the service and used for storing the management metadata may be determined as the repair range.
If the re-read management metadata can enable the service to normally operate, it indicates that a silent error exists on a disk sector corresponding to a main data area or a backup data area which is allocated for the service and used for storing the management metadata, and data repair is required.
Step 103: and determining a main address field and a backup address field according to the repair range, and repairing the management metadata in the main address field and the backup address field according to the repair direction.
In one embodiment, for a process of determining a primary address segment and a backup address segment according to a repair range, the primary address segment contained in the repair range and the backup address segment corresponding to the primary address segment are acquired from a backup table. The description of the backup table may refer to the related description of step 101, which is not described herein again.
In an embodiment, for a process of repairing management metadata in a main address field and a backup address field according to a repairing direction, if the repairing direction is to repair the management metadata (MtB) of the backup data area by using the management metadata of the main data area, when a data state of the main address field is valid, the management metadata in the backup address field corresponding to the main address field is repaired by using the management metadata in the main address field; if the repair direction is to repair the management metadata of the main data area using the management metadata of the backup data area (BtM), the management metadata in the main address field corresponding to the backup address field is repaired using the management metadata in the backup address field when the data status of the backup address field is valid.
Because each record in the backup table is the corresponding relation between the main address field and the backup address field, there may be multiple records in the main address field and the backup address field determined according to the repair range, and the main address field in each record is included in the repair range, so that when repairing, the repair is performed in sequence for each record.
It is worth to be noted that, after the management metadata in the backup address field corresponding to the main address field is repaired by using the management metadata in the main address field, if the data state of the backup address field is invalid, the backup address field is modified to be valid; after the management metadata in the main address field corresponding to the backup address field is repaired by using the management metadata in the backup address field, if the data state of the main address field is invalid, the data state is modified to be valid.
Further, if the repair direction is MtB but the data state of the main address segment is invalid, the repair is not performed, and the data state of the backup address segment corresponding to the main address segment is directly modified to be invalid; if the repair direction is BtM but the data state of the backup address segment is invalid, the data state of the main address segment corresponding to the backup address segment is directly modified to be invalid without repairing.
Specifically, assuming that the repair direction is MtB, the primary address segment in one record obtained from the backup table is MAM-Sx, and the backup address segment is MAB-Sy:
if the data state of MAM-Sx is valid, the data state of MAB-Sy is valid: the management metadata in the MAB-Sy is directly repaired by using the management metadata in the MAM-Sx;
if the data state of MAM-Sx is valid, the data state of MAB-Sy is invalid: the management metadata in the MAB-Sy is directly repaired by using the management metadata in the MAM-Sx, and the data state of the MAB-Sy is modified from invalid to valid;
if the data state of MAM-Sx is invalid, the data state of MAB-Sy is valid: the data state of the MAB-Sy is changed from valid to invalid without repair;
if the data state of MAM-Sx is invalid, the data state of MAB-Sy is invalid: the record is skipped directly without repair.
Secondly, assuming that the repair direction is BtM, the primary address segment obtained from the backup table is MAM-Sx, and the corresponding backup address segment is MAB-Sy:
if the data state of MAM-Sx is valid, the data state of MAB-Sy is valid: the management metadata in the MAM-Sx is directly repaired by using the management metadata in the MAB-Sy;
if the data state of MAM-Sx is valid, the data state of MAB-Sy is invalid: the data state of the MAM-Sx is changed from valid to invalid without repairing;
if the data state of MAM-Sx is invalid, the data state of MAB-Sy is valid: the management metadata in the MAM-Sx is directly repaired by using the management metadata in the MAB-Sy, and the data state of the MAM-Sx is changed from invalid to valid;
if the data states of both MAM-Sx and MAB-Sy are invalid: the record is skipped directly without repair.
In the embodiment of the application, when receiving a notification that the currently read management metadata cannot enable a service to normally operate, the storage device determines a new read policy according to the currently used read policy, re-reads the management metadata through the new read policy, and sends the re-read management metadata to the service, and when receiving the notification that the re-read management metadata can enable the service to normally operate, determines a repair direction according to the read policy, determines a repair range, and finally determines a main address field and a backup address field according to the repair range, and repairs the management metadata in the main address field and the backup address field according to the repair direction.
Based on the above description, when a silent error occurs in the disk, which causes a management metadata error, and a service cannot run, the data is retrieved by switching a new read strategy, and when the retrieved data enables the service to run normally, a repair direction can be determined by the new read strategy for repair, so that the management metadata with the silent error is repaired, and the data security is improved.
Fig. 2 is a hardware block diagram of a storage device according to an exemplary embodiment of the present application, where the storage device includes: a communication interface 201, a processor 202, a machine-readable storage medium 203, and a bus 204; wherein the communication interface 201, the processor 202 and the machine-readable storage medium 203 communicate with each other via a bus 204. The processor 202 may execute the above-described management metadata repair method by reading and executing machine-executable instructions in the machine-readable storage medium 202 corresponding to control logic for managing the metadata repair method, and the details of the method are described in the above embodiments and will not be described herein again.
The machine-readable storage medium 203 referred to herein may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and the like. For example, the machine-readable storage medium may be: volatile memory, non-volatile memory, or similar storage media. In particular, the machine-readable storage medium 203 may be a RAM (random Access Memory), a flash Memory, a storage drive (e.g., a hard drive), any type of storage disk (e.g., an optical disk, a DVD, etc.), or similar storage medium, or a combination thereof.
Fig. 3 is a block diagram of an embodiment of a management metadata recovery apparatus according to an exemplary embodiment of the present application, where the management metadata recovery apparatus may be applied to a storage device, as shown in fig. 3, and the management metadata recovery apparatus includes:
a retrieve data unit 310, configured to determine a new read policy according to a currently used read policy when receiving a notification that the currently read management metadata cannot enable the service to operate normally, re-read the management metadata through the read policy, and send the re-read management metadata to the service;
a determining unit 320, configured to determine, when receiving a notification that the re-read management metadata enables normal operation of the service, a repair direction according to the read policy, and determine a repair range;
and the repair unit 330 is configured to determine a main address segment and a backup address segment according to the repair range, and repair the management metadata in the main address segment and the backup address segment according to the repair direction.
In an optional implementation manner, the determining unit 320 is specifically configured to, in the process of determining the repair direction according to the read policy, if the read policy is the priority main data area, repair the management metadata of the backup data area using the management metadata of the main data area in the repair direction; and if the read strategy is the priority backup data area, the repair direction is to repair the management metadata of the main data area by using the management metadata of the backup data area.
In an optional implementation manner, the repair unit 330 is specifically configured to, in a process of determining a main address segment and a backup address segment according to the repair range, obtain the main address segment included in the repair range and the backup address segment corresponding to the main address segment from a preset backup table, where the backup table includes data states of the main address segment and data states of the backup address segment and the backup address segment, and the main address segment and the backup address segment corresponding to the main address segment have the same size and are located on different RAID disks.
In an optional implementation manner, the repair unit 330 is specifically configured to, in a process of repairing the management metadata in the main address segment and the backup address segment according to the repair direction, if the repair direction is to repair the management metadata in the backup data segment using the management metadata in the main data segment, repair the management metadata in the backup address segment corresponding to the main address segment using the management metadata in the main address segment when the data state of the main address segment is valid; and if the repair direction is to repair the management metadata of the main data area by using the management metadata of the backup data area, when the data state of the backup address field is effective, repairing the management metadata in the main address field corresponding to the backup address field by using the management metadata in the backup address field.
In an alternative implementation, the apparatus further comprises (not shown in fig. 3):
the data state modifying unit is used for modifying the data state of the backup address segment into effective if the data state of the backup address segment is invalid after the management metadata in the backup address segment corresponding to the main address segment is repaired by the management metadata in the main address segment; and after the management metadata in the main address field corresponding to the backup address field is repaired by using the management metadata in the backup address field, if the data state of the main address field is invalid, the data state is modified to be valid.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (8)

1.一种管理元数据修复方法,其特征在于,所述方法包括:1. A method for restoring management metadata, wherein the method comprises: 在接收到当前读取的管理元数据无法使业务正常运行的通知时,依据当前所用读策略确定新的读策略,通过该读策略重新读取管理元数据,并将重新读取的管理元数据发送给所述业务;When receiving a notification that the currently read management metadata cannot make the business run normally, determine a new read strategy according to the currently used read strategy, re-read the management metadata through the read strategy, and re-read the management metadata sent to said business; 在接收到重新读取的管理元数据能够使所述业务正常运行的通知时,依据该读策略确定修复方向,并确定出修复范围,其中,若该读策略为优先主数据区,则修复方向为使用主数据区的管理元数据修复备份数据区的管理元数据;若该读策略为优先备份数据区,则修复方向为使用备份数据区的管理元数据修复主数据区的管理元数据;When receiving the notification that the re-read management metadata can make the service run normally, determine the repair direction according to the read strategy, and determine the repair scope, wherein, if the read strategy is the priority main data area, the repair direction To use the management metadata of the main data area to restore the management metadata of the backup data area; if the read strategy is to give priority to the backup data area, the restoration direction is to use the management metadata of the backup data area to restore the management metadata of the main data area; 根据所述修复范围确定该修复范围包括的主地址段以及该主地址段对应的备份地址段,所述主地址段与对应的备份地址段的大小相同、用于存储相同的管理元数据,且主地址段对业务可见,备地址段对业务不可见;依据所述修复方向,对所述主地址段和所述备份地址段中的管理元数据进行修复。A primary address segment included in the restoration range and a backup address segment corresponding to the primary address segment are determined according to the restoration range, where the primary address segment and the corresponding backup address segment have the same size and are used to store the same management metadata, and The primary address segment is visible to the service, and the backup address segment is invisible to the service; according to the restoration direction, the management metadata in the primary address segment and the backup address segment is restored. 2.根据权利要求1所述的方法,其特征在于,根据所述修复范围确定主地址段和备份地址段,包括:2. The method according to claim 1, wherein determining a primary address segment and a backup address segment according to the repair scope, comprising: 从预设的备份表中获取包含在所述修复范围内的主地址段和该主地址段对应的备份地址段,所述备份表包含主地址段和主地址段的数据状态、备份地址段和备份地址段的数据状态,所述主地址段与所述主地址段对应的备份地址段位于不同的磁盘阵列RAID上。The primary address segment included in the repair range and the backup address segment corresponding to the primary address segment are obtained from a preset backup table, where the backup table includes the data status of the primary address segment and the primary address segment, the backup address segment and The data state of the backup address segment, where the primary address segment and the backup address segment corresponding to the primary address segment are located on different disk array RAIDs. 3.根据权利要求2所述的方法,其特征在于,依据所述修复方向,对所述主地址段和所述备份地址段中的管理元数据进行修复,包括:3. The method according to claim 2, wherein, according to the repair direction, repairing the management metadata in the primary address segment and the backup address segment comprises: 若所述修复方向为使用主数据区的管理元数据修复备份数据区的管理元数据,则在所述主地址段的数据状态有效时,利用所述主地址段中的管理元数据修复所述主地址段对应的备份地址段中的管理元数据;If the repair direction is to use the management metadata of the main data area to repair the management metadata of the backup data area, then when the data state of the main address segment is valid, use the management metadata in the main address segment to repair the Management metadata in the backup address segment corresponding to the primary address segment; 若所述修复方向为使用备份数据区的管理元数据修复主数据区的管理元数据,则在所述备份地址段的数据状态有效时,利用所述备份地址段中的管理元数据修复所述备份地址段对应的主地址段中的管理元数据。If the restoration direction is to use the management metadata of the backup data area to restore the management metadata of the main data area, then when the data state of the backup address segment is valid, use the management metadata in the backup address segment to restore the Management metadata in the primary address segment corresponding to the backup address segment. 4.根据权利要求3所述的方法,其特征在于,所述方法进一步包括:4. The method of claim 3, wherein the method further comprises: 在利用所述主地址段中的管理元数据修复所述主地址段对应的备份地址段中的管理元数据之后,若该备份地址段的数据状态无效,则将其修改为有效;After using the management metadata in the primary address segment to repair the management metadata in the backup address segment corresponding to the primary address segment, if the data state of the backup address segment is invalid, modify it to be valid; 在利用所述备份地址段中的管理元数据修复所述备份地址段对应的主地址段中的管理元数据之后,若该主地址段的数据状态无效,则将其修改为有效。After the management metadata in the primary address segment corresponding to the backup address segment is repaired by using the management metadata in the backup address segment, if the data state of the primary address segment is invalid, it is modified to be valid. 5.一种管理元数据修复装置,其特征在于,所述装置包括:5. An apparatus for restoring management metadata, wherein the apparatus comprises: 找回数据单元,用于在接收到当前读取的管理元数据无法使业务正常运行的通知时,依据当前所用读策略确定新的读策略,通过该读策略重新读取管理元数据,并将重新读取的管理元数据发送给业务;The data unit is retrieved, which is used to determine a new read strategy according to the currently used read strategy when receiving a notification that the currently read management metadata cannot make the business run normally, re-read the management metadata through the read strategy, and use the read strategy. The re-read management metadata is sent to the business; 确定单元,用于在接收到重新读取的管理元数据能够使业务正常运行的通知时,依据该读策略确定修复方向,并确定出修复范围,其中,若该读策略为优先主数据区,则修复方向为使用主数据区的管理元数据修复备份数据区的管理元数据;若该读策略为优先备份数据区,则修复方向为使用备份数据区的管理元数据修复主数据区的管理元数据;The determining unit is used to determine the repair direction according to the read strategy and determine the repair range when receiving the notification that the re-read management metadata can make the business operate normally, wherein, if the read strategy is the priority main data area, The repair direction is to use the management metadata of the main data area to repair the management metadata of the backup data area; if the read strategy is to give priority to the backup data area, the repair direction is to use the management metadata of the backup data area to repair the management metadata of the main data area. data; 修复单元,用于根据所述修复范围确定该修复范围包括的主地址段以及该主地址段对应的备份地址段,所述主地址段与对应的备份地址段的大小相同、用于存储相同的管理元数据,且主地址段对业务可见,备地址段对业务不可见;依据所述修复方向,对所述主地址段和所述备份地址段中的管理元数据进行修复。The repair unit is configured to determine, according to the repair range, a main address segment included in the repair range and a backup address segment corresponding to the main address segment, where the main address segment and the corresponding backup address segment have the same size and are used to store the same Management metadata, and the primary address segment is visible to the service, and the backup address segment is invisible to the service; according to the restoration direction, the management metadata in the primary address segment and the backup address segment is restored. 6.根据权利要求5所述的装置,其特征在于,所述修复单元,具体用于在根据所述修复范围确定主地址段和备份地址段过程中,从预设的备份表中获取包含在所述修复范围内的主地址段和该主地址段对应的备份地址段,所述备份表包含主地址段和主地址段的数据状态、备份地址段和备份地址段的数据状态,所述主地址段与所述主地址段对应的备份地址段位于不同的磁盘阵列RAID上。6 . The apparatus according to claim 5 , wherein the repair unit is specifically configured to, in the process of determining the main address segment and the backup address segment according to the repair range, obtain from a preset backup table the data contained in the address segment. 7 . The primary address segment within the repair range and the backup address segment corresponding to the primary address segment, the backup table includes the data status of the primary address segment and the primary address segment, the backup address segment and the data status of the backup address segment, and the primary address segment and the backup address segment. The address segment and the backup address segment corresponding to the primary address segment are located on different disk array RAIDs. 7.根据权利要求6所述的装置,其特征在于,所述修复单元,具体用于在依据所述修复方向,对所述主地址段和所述备份地址段中的管理元数据进行修复过程中,若所述修复方向为使用主数据区的管理元数据修复备份数据区的管理元数据,则在所述主地址段的数据状态有效时,利用所述主地址段中的管理元数据修复所述主地址段对应的备份地址段中的管理元数据;若所述修复方向为使用备份数据区的管理元数据修复主数据区的管理元数据,则在所述备份地址段的数据状态有效时,利用所述备份地址段中的管理元数据修复所述备份地址段对应的主地址段中的管理元数据。7 . The apparatus according to claim 6 , wherein the repair unit is specifically configured to perform a repair process on the management metadata in the primary address segment and the backup address segment according to the repair direction. 8 . , if the repair direction is to use the management metadata of the main data area to repair the management metadata of the backup data area, then when the data state of the main address segment is valid, use the management metadata in the main address segment to repair The management metadata in the backup address segment corresponding to the primary address segment; if the restoration direction is to use the management metadata of the backup data area to restore the management metadata of the primary data area, the data status in the backup address segment is valid At the time, the management metadata in the primary address segment corresponding to the backup address segment is repaired by using the management metadata in the backup address segment. 8.根据权利要求7所述的装置,其特征在于,所述装置进一步包括:8. The apparatus of claim 7, wherein the apparatus further comprises: 数据状态修改单元,用于在利用所述主地址段中的管理元数据修复所述主地址段对应的备份地址段中的管理元数据之后,若该备份地址段的数据状态无效,则将其修改为有效;在利用所述备份地址段中的管理元数据修复所述备份地址段对应的主地址段中的管理元数据之后,若该主地址段的数据状态无效,则将其修改为有效。The data state modification unit is configured to, after using the management metadata in the main address segment to repair the management metadata in the backup address segment corresponding to the primary address segment, if the data state of the backup address segment is invalid, then Modify to be valid; after using the management metadata in the backup address segment to repair the management metadata in the primary address segment corresponding to the backup address segment, if the data state of the primary address segment is invalid, then modify it to be valid .
CN201811425331.4A 2018-11-27 2018-11-27 Management metadata restoration method and device Active CN109582499B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811425331.4A CN109582499B (en) 2018-11-27 2018-11-27 Management metadata restoration method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811425331.4A CN109582499B (en) 2018-11-27 2018-11-27 Management metadata restoration method and device

Publications (2)

Publication Number Publication Date
CN109582499A CN109582499A (en) 2019-04-05
CN109582499B true CN109582499B (en) 2021-08-06

Family

ID=65924904

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811425331.4A Active CN109582499B (en) 2018-11-27 2018-11-27 Management metadata restoration method and device

Country Status (1)

Country Link
CN (1) CN109582499B (en)

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012106931A1 (en) * 2011-07-26 2012-08-16 华为技术有限公司 Memory error recovery method for application program
US8892941B2 (en) * 2012-06-27 2014-11-18 International Business Machines Corporation Recovering a volume table and data sets from a corrupted volume
WO2015077955A1 (en) * 2013-11-28 2015-06-04 华为技术有限公司 Method, apparatus and system of data writing
US9740574B2 (en) * 2014-05-09 2017-08-22 Commvault Systems, Inc. Load balancing across multiple data paths
CN104113439A (en) * 2014-08-02 2014-10-22 成都致云科技有限公司 Automatic data recovery method of cloud storage system
CN105893879A (en) * 2016-03-30 2016-08-24 苏州美天网络科技有限公司 Encryption backup method for hard disk data
CN106708665A (en) * 2016-12-20 2017-05-24 华为技术有限公司 Metadata restoration method and device
CN106959912B (en) * 2017-03-07 2020-03-24 杭州宏杉科技股份有限公司 Disk detection method and device

Also Published As

Publication number Publication date
CN109582499A (en) 2019-04-05

Similar Documents

Publication Publication Date Title
US10108367B2 (en) Method for a source storage device sending data to a backup storage device for storage, and storage device
US8055631B2 (en) Reducing data loss and unavailability by integrating multiple levels of a storage hierarchy
JP6064608B2 (en) Storage device, backup program, and backup method
US6618794B1 (en) System for generating a point-in-time copy of data in a data storage system
US8289641B1 (en) Partial data storage device failures and improved storage resiliency
JP5947327B2 (en) Device, storage medium and method for file system backup for multiple storage medium devices
US20090070627A1 (en) System and article of manufacture for transparent file restore
US20130103902A1 (en) Method and apparatus for implementing protection of redundant array of independent disks in file system
CN101681237B (en) Encryption device and encryption method
CN111913664B (en) Data writing method and device
US10572335B2 (en) Metadata recovery method and apparatus
US10346051B2 (en) Storage media performance management
CN105354109B (en) The backup method and device of video monitoring index data
WO2017041670A1 (en) Data recovery method and apparatus
JP2006059347A (en) Storage system using journaling
JP2016057876A (en) Information processing apparatus, input / output control program, and input / output control method
CN109582499B (en) Management metadata restoration method and device
US20060259812A1 (en) Data protection method
US20130031320A1 (en) Control device, control method and storage apparatus
KR20030073982A (en) Coherence preservation method of duplicated data in raid subsystems
US10146452B2 (en) Maintaining intelligent write ordering with asynchronous data replication
US20080028163A1 (en) Method and apparatus for repurposing compute resources to implement, or not implement, storage access protocols
JP2002278706A (en) Disk array device
US20220100392A1 (en) Systems and methods of maintaining fault tolerance for new writes in degraded erasure coded distributed storage
CN108694067A (en) Method and apparatus for memory space management for multiple virtual machines

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