CN115509800A - Metadata verification method, system, computer equipment and storage medium - Google Patents

Metadata verification method, system, computer equipment and storage medium Download PDF

Info

Publication number
CN115509800A
CN115509800A CN202211455849.9A CN202211455849A CN115509800A CN 115509800 A CN115509800 A CN 115509800A CN 202211455849 A CN202211455849 A CN 202211455849A CN 115509800 A CN115509800 A CN 115509800A
Authority
CN
China
Prior art keywords
metadata
check
primary
discrete
verification
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202211455849.9A
Other languages
Chinese (zh)
Other versions
CN115509800B (en
Inventor
费卫宏
白建
王萌萌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202211455849.9A priority Critical patent/CN115509800B/en
Publication of CN115509800A publication Critical patent/CN115509800A/en
Application granted granted Critical
Publication of CN115509800B publication Critical patent/CN115509800B/en
Priority to PCT/CN2023/115981 priority patent/WO2024109236A1/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1004Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's to protect a block of data words, e.g. CRC or checksum
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2284Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing by power-on test, e.g. power-on self test [POST]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/26Functional testing

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention relates to the technical field of storage, and particularly discloses a metadata verification method, a metadata verification system, a computer device and a storage medium, wherein the method comprises the following steps: responding to the electrification of a hard disk, blocking all metadata of the hard disk, and calculating a primary initial check value of each piece of metadata to obtain a primary initial check set; calculating the primary initial check set to obtain a secondary initial check set; starting a first timer, and setting a discrete check period; triggering metadata discrete verification logic according to the discrete verification period to perform discrete verification on the metadata based on the secondary initial verification set; in response to the discrete verification of the metadata passing, triggering metadata patrol logic to patrol the metadata based on the primary initial verification set. By the scheme of the invention, the metadata can be checked in the running process of the hard disk, and abnormal metadata can be found in time, so that the completeness and the correctness of the data are ensured.

Description

Metadata verification method, system, computer equipment and storage medium
Technical Field
The present invention relates to the field of storage technologies, and in particular, to a metadata verification method, a metadata verification system, a computer device, and a storage medium.
Background
In the operation process of an SSD (Solid State Disk or Solid State Drive, SSD for short), for the key data that needs to be frequently accessed, the key data is loaded into a DRAM (Dynamic Random Access Memory), and when the key data needs to be used, the Memory is directly accessed, which is very fast and convenient. In the current SSD device, the data volume of metadata in the read-write flow is large and is always stored in the memory during the operation of the device. With the long-time stable operation of the SSD device, the temperature of the SSD device is continuously in a high state, and at this time, the metadata is read from the memory, which may have the following problems:
in software, due to software misoperation or address out-of-range access, metadata in a memory is tampered, but a metadata user cannot perceive the metadata, wrong data is used, and SSD operation is abnormal, and at the moment, it is difficult to determine whether the metadata is wrong when being generated or is mistakenly modified by software in the operation process or is caused by other logic problems, so that the problems cannot be quickly positioned and solved.
In terms of hardware, under severe environments such as high temperature, long-time operation, electromagnetic interference and the like, data in the memory can be changed with small probability. Under the premise, if the SSD cannot sense the data, the data is still used for user data read-write processing, and the most serious condition may cause the data that the user needs to store to be lost and not be read out. Moreover, after a problem occurs in the SSD device, the development engineer cannot determine which link caused the problem, and there is no means to determine whether the problem is a business process problem caused by metadata anomaly.
Disclosure of Invention
In view of this, the present invention provides a metadata verification method, system, computer device and storage medium, which check metadata during the operation of a hard disk, so as to find abnormal metadata in time, thereby ensuring the completeness and correctness of data; and by adopting the modes of discrete verification and graded verification, the occupancy rate of the CPU in the verification process is reduced, and the influence on the running speed of the main service of the hard disk is avoided.
Based on the above object, an aspect of the embodiments of the present invention provides a metadata verification method, which specifically includes the following steps:
responding to the electrification of a hard disk, partitioning all metadata of the hard disk, and calculating a primary initial check value of each piece of metadata to obtain a primary initial check set;
calculating the primary initial check set to obtain a secondary initial check set;
starting a first timer, and setting a discrete check period;
triggering metadata discrete check logic according to the discrete check period to perform discrete check on the metadata based on the secondary initial check set;
in response to the discrete verification of the metadata passing, triggering metadata tour inspection logic to tour inspect the metadata based on the primary initial verification set.
In some embodiments, the method further comprises:
in response to the discrete check of the metadata failing, notifying a host of the occurrence of the metadata asynchronous event and disabling the metadata tour inspection logic.
In some embodiments, the discrete check logic comprises:
turning off the first timer;
and carrying out discrete checking on the metadata based on the secondary initial checking set in each discrete checking period.
In some embodiments, the metadata tour logic includes:
starting a second timer, and setting a polling period;
sequentially calculating the primary check value of each piece of metadata according to the routing inspection period, and checking the primary check value obtained by each calculation based on the primary initial check value corresponding to the initial check set;
and closing the second timer in response to the metadata verification of all the blocks being completed.
In some embodiments, the method further comprises:
and after the second timer is closed, starting the first timer, and exiting the metadata polling logic.
In some embodiments, the metadata tour logic includes:
starting a second timer, and setting a polling period;
acquiring the current metadata of the hard disk in sequence according to the routing inspection period and the divided blocks, and calculating the primary check value of each piece of metadata in sequence;
after each primary check value of one piece of metadata is calculated, comparing the calculated primary check value with a primary initial check value corresponding to the initial check set;
if the comparison result is consistent, the steps of sequentially calculating the primary check value of each piece of metadata according to the routing inspection period are returned to calculate the primary check value of the next piece of metadata.
In some embodiments, the method further comprises:
and if the comparison result is inconsistent, closing the second timer and forbidding the metadata polling logic.
In some embodiments, the method further comprises:
and if the comparison result is inconsistent, notifying the host of the occurrence of the metadata asynchronous event, closing the second timer and disabling the metadata polling logic.
In some embodiments, the method further comprises:
if the comparison result is inconsistent, recording the information that the secondary check set at the current moment is inconsistent with the secondary initial check set to a log, closing the second timer and forbidding the metadata patrol logic.
In some embodiments, the method further comprises:
and in response to the completion of the metadata polling of all the blocks, closing the second timer, opening the first timer, and exiting the metadata polling logic.
In some embodiments, the metadata discretization check logic comprises:
turning off the first timer;
acquiring a primary check set of metadata of the hard disk at the current running time, and calculating the primary check set at the current running time to obtain a secondary check set at the current running time;
comparing the secondary check set at the current moment with the secondary initial check set;
and if the secondary check set at the current moment is consistent with the secondary initial check set, the discrete check of the metadata is passed.
In some embodiments, the method further comprises:
if the secondary check set at the current moment is inconsistent with the secondary initial check set, the discrete check of the metadata is failed.
In some embodiments, the method further comprises:
and recording information that the secondary check set at the current moment is inconsistent with the secondary initial check set to a log in response to the discrete check of the metadata failing.
In some embodiments, the method further comprises:
and responding to the failure of the discrete verification of the metadata, notifying a host of the occurrence of the metadata asynchronous event, recording information that the secondary verification set at the current moment is inconsistent with the secondary initial verification set to a log, and forbidding the metadata polling logic.
In some embodiments, calculating a primary initial check value for each piece of metadata includes:
and calculating a primary initial check value of each piece of metadata based on the cyclic redundancy check.
In some embodiments, calculating the primary initial check set to obtain a secondary initial check set includes:
and performing cyclic redundancy check calculation on the primary initial check set to obtain a secondary initial check set.
In some embodiments, the method further comprises:
and in the running process of the hard disk, in response to the updating of the metadata, recalculating a primary initial check value based on the updated metadata, and updating the primary initial check set and the secondary initial check set based on the recalculated primary initial check value.
In another aspect of the embodiments of the present invention, a metadata verification system is further provided, including:
the first computing module is configured to respond to the electrification of a hard disk, block all metadata of the hard disk, and compute a primary initial check value of each piece of metadata to obtain a primary initial check set;
the second calculation module is configured to calculate the primary initial check set to obtain a secondary initial check set;
the starting module is configured to start a first timer and set a discrete check period;
a discrete checking module configured to trigger metadata discrete checking logic according to the discrete checking period to perform discrete checking on the metadata based on the secondary initial checking set;
a patrol module configured to trigger metadata patrol logic to patrol the metadata based on the primary initial set of checks in response to the discrete checks of the metadata passing.
In another aspect of the embodiments of the present invention, there is also provided a computer device, including: at least one processor; and a memory storing a computer program executable on the processor, the computer program when executed by the processor implementing the steps of the method as above.
In a further aspect of the embodiments of the present invention, a computer-readable storage medium is also provided, in which a computer program for implementing the above method steps is stored when the computer program is executed by a processor.
The invention has at least the following beneficial technical effects: the metadata is checked in the running process of the hard disk, so that abnormal metadata can be found in time, and the completeness and the correctness of the data are ensured; and by adopting the modes of discrete verification and graded verification, the occupancy rate of the CPU in the verification process is reduced, and the influence on the running speed of the main service of the hard disk is avoided.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by using the drawings without creative efforts.
FIG. 1 is a block diagram of an embodiment of a metadata verification method provided by the present invention;
FIG. 2 is a diagram illustrating an embodiment of a metadata verification system according to the present invention;
FIG. 3 is a schematic diagram of an embodiment of a computer apparatus provided in the present invention;
fig. 4 is a schematic structural diagram of an embodiment of a computer-readable storage medium provided in the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention are described in further detail with reference to the accompanying drawings.
It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are used for distinguishing two entities with the same name but different names or different parameters, and it should be noted that "first" and "second" are only used for convenience of expression and should not be construed as a limitation to the embodiments of the present invention, and no description is given in the following embodiments.
In view of the foregoing, a first aspect of the embodiments of the present invention provides an embodiment of a metadata verification method. As shown in fig. 1, it includes the following steps:
s10, responding to the electrification of a hard disk, partitioning all metadata of the hard disk, and calculating a primary initial check value of each piece of metadata to obtain a primary initial check set;
s20, calculating the primary initial check set to obtain a secondary initial check set;
s30, starting a first timer, and setting a discrete check period;
s40, triggering metadata discrete check logic according to the discrete check period to perform discrete check on the metadata based on the secondary initial check set;
and S50, in response to the passing of the discrete verification of the metadata, triggering metadata polling logic to poll the metadata based on the primary initial verification set.
Specifically, in an initialization stage of hard disk power up, when metadata is generated, a whole block of metadata is processed in a blocking manner, each block of metadata is subjected to Check calculation, for example, CRC (Cyclic Redundancy Check) calculation, and a calculation result is stored in a global array, where an array subscript indicates a number of corresponding blocks of metadata, an array value indicates a first-level initial Check value of the block of metadata, and the array is referred to as a first-level initial Check set. Since the smaller the size of each piece of metadata is, the smaller the discrete consumption time during verification is, the smaller the influence on the performance of the hard disk is, but the more the space consumption is brought, and therefore, the size of each divided piece of metadata is balanced according to actual situations.
After the initial check values of all metadata are calculated, a primary initial check set is calculated to perform check calculation, such as CRC calculation, namely the generated global array is checked, calculated and stored, and the value is called a secondary initial check value; when the software actively updates the metadata every time, only the primary initial check set array value corresponding to the block where the current data is located needs to be recalculated, and then the corresponding secondary initial check value is updated.
In the running process of the hard disk, triggering the metadata discrete verification logic by using a first timer, and closing the first timer after the triggering of the metadata discrete verification logic; if the metadata discrete verification passes, triggering metadata polling logic; if the metadata discrete verification fails, the metadata asynchronous event is reported to the host, so that the metadata is abnormal in a timely manner, and the abnormality is reported to the host, so that developers and maintenance personnel can acquire metadata abnormal information in time, and the failure removal efficiency in the hard disk operation process can be improved.
The metadata discrete check logic may be implemented as follows: and calculating a primary check set of the current metadata and a secondary check set of the primary check set, comparing the calculated secondary check set of the current metadata with the secondary initial check set, if the comparison result is consistent, the check is passed, and if the comparison result is inconsistent, the check is not passed.
The metadata tour logic may be implemented by: and starting a second timer, triggering the verification of each block of metadata based on the second timer, namely performing the verification of one block of metadata in each polling period, if the verification is passed, continuously verifying the next block of metadata, and if the verification is not passed, reporting the metadata asynchronous event to the host. The specific process of each polling period is as follows:
and calculating a primary check value of the current metadata, comparing the primary check value with a primary initial check value corresponding to the primary initial check set, if the comparison result is consistent, the check is passed, and if the comparison result is inconsistent, the check is not passed.
In the embodiment of the invention, the metadata is checked in the running process of the hard disk, so that abnormal metadata is found in time, and the completeness and the correctness of the data are ensured; in addition, by adopting the modes of discrete verification and graded verification, the occupancy rate of a CPU in the verification process is reduced, and the influence on the running speed of main services of the hard disk is avoided; and the failure removal efficiency in the hard disk operation process is improved by timely discovering the metadata abnormity.
In some embodiments, the method further comprises:
in response to a discrete check of the metadata failing, notifying a host of the occurrence of a metadata asynchronous event and disabling the metadata tour logic.
In some embodiments, the discrete check logic comprises:
closing the first timer;
and performing discrete verification on the metadata based on the secondary initial verification set in each discrete verification period.
In some embodiments, the metadata tour logic includes:
starting a second timer, and setting a polling period;
sequentially calculating the primary check value of each piece of metadata according to the routing inspection period, and checking the primary check value obtained by each calculation based on the primary initial check value corresponding to the initial check set;
and closing the second timer in response to the completion of the metadata verification of all the blocks.
In some embodiments, the method further comprises:
and after the second timer is closed, starting the first timer, and exiting the metadata polling logic.
In some embodiments, the metadata tour logic includes:
starting a second timer, and setting a polling period;
acquiring the current metadata of the hard disk in sequence according to the routing inspection period and the divided blocks, and calculating the primary check value of each piece of metadata in sequence;
after each primary check value of one piece of metadata is calculated, comparing the calculated primary check value with a primary initial check value corresponding to the initial check set;
if the comparison result is consistent, the step of sequentially calculating the primary check value of each piece of metadata according to the routing inspection cycle is returned to calculate the primary check value of the next piece of metadata.
In some embodiments, the method further comprises:
and if the comparison result is inconsistent, closing the second timer and forbidding the metadata polling logic.
In some embodiments, the method further comprises:
if the comparison result is inconsistent, reporting the occurrence of the metadata asynchronous event to the host, closing the second timer and forbidding the metadata polling logic.
In some embodiments, the method further comprises:
if the comparison result is inconsistent, recording the information that the secondary check set at the current moment is inconsistent with the secondary initial check set to a log, closing the second timer and forbidding the metadata patrol logic.
In some embodiments, the method further comprises:
and in response to the completion of the metadata polling of all the blocks, closing the second timer, opening the first timer, and exiting the metadata polling logic.
In one embodiment, the metadata tour logic is implemented as follows:
s11, starting a second timer, setting polling periods, and starting the second timer to verify metadata of one block in each polling period until the metadata of all blocks are verified;
s12, acquiring metadata of a block needing to be checked currently in the hard disk according to the polling period and the divided blocks, and calculating a primary check value of the metadata of the block;
s13, comparing the calculated primary check value with a primary initial check value corresponding to the initial check set;
s14, if the comparison result is consistent, returning to the step S12, and calculating a primary check value of the next piece of metadata;
and S15, if the comparison result is inconsistent, reporting the occurrence of the metadata asynchronous event to the host, recording the information of inconsistent comparison to a log, and closing the second timer. Disabling metadata tour inspection logic;
and S16, in response to the completion of the metadata polling of all the blocks, closing the second timer, starting the first timer and exiting the metadata polling logic.
By the scheme, the metadata can be checked in the hard disk operation process, and abnormal metadata can be found in time, so that the completeness and correctness of the data are ensured; the occupancy rate of the CPU in the verification process is reduced, and the running speed of main services of the hard disk is prevented from being influenced; and the failure removal efficiency in the hard disk operation process is improved by timely finding the metadata abnormity.
In some embodiments, the metadata discretization check logic comprises:
closing the first timer;
acquiring a primary check set of metadata of the hard disk at the current running time, and calculating the primary check set at the current running time to obtain a secondary check set at the current running time;
comparing the secondary check set at the current moment with the secondary initial check set;
and if the secondary check set at the current moment is consistent with the secondary initial check set, the discrete check of the metadata is passed.
In some embodiments, the method further comprises:
and if the secondary check set at the current moment is inconsistent with the secondary initial check set, the discrete check of the metadata is not passed.
In some embodiments, the method further comprises:
and recording information that the secondary check set at the current moment is inconsistent with the secondary initial check set to a log in response to the discrete check of the metadata failing.
In some embodiments, the method further comprises:
and responding to the failure of the discrete verification of the metadata, notifying a host of the occurrence of a metadata asynchronous event, recording information that the secondary verification set at the current moment is inconsistent with the secondary initial verification set to a log, and disabling the metadata polling logic.
In some embodiments, calculating a primary initial check value for each piece of metadata includes:
and calculating a primary initial check value of each piece of metadata based on the cyclic redundancy check.
In some embodiments, calculating the primary initial check set to obtain a secondary initial check set includes:
and performing cyclic redundancy check calculation on the primary initial check set to obtain a secondary initial check set.
In a specific embodiment, the metadata discrete check logic is implemented as follows:
s21, after triggering the metadata discrete check logic, closing a first timer;
s22, acquiring a primary check set of metadata of the hard disk at the current running time, and calculating the primary check set at the current running time to obtain a secondary check set at the current running time;
s23, comparing the secondary check set at the current moment with the secondary initial check set;
s24, if the secondary check set at the current moment is consistent with the secondary initial check set, the discrete check of the metadata is passed;
s25, if the secondary check set at the current moment is inconsistent with the secondary initial check set, the discrete check of the metadata is not passed;
s26, responding to the fact that the discrete verification of the metadata does not pass, notifying the host computer that the metadata asynchronous event occurs, recording information that a secondary verification set at the current moment is inconsistent with a secondary initial verification set to a log, and forbidding metadata routing inspection logic.
By the scheme, the metadata can be checked in the hard disk operation process, and abnormal metadata can be found in time, so that the completeness and correctness of the data are ensured; in addition, by adopting the modes of discrete verification and graded verification, the occupancy rate of a CPU in the verification process is reduced, and the influence on the running speed of main services of the hard disk is avoided; and the failure removal efficiency in the hard disk operation process is improved by timely discovering the metadata abnormity.
In some embodiments, the method further comprises:
and in the running process of the hard disk, in response to the updating of the metadata, recalculating a primary initial check value based on the updated metadata, and updating the primary initial check set and the secondary initial check set based on the recalculated primary initial check value.
The following description is given of embodiments of the present invention by way of an example.
S110, in the hard disk initialization stage, when generating metadata, performing blocking processing on the whole metadata, calculating CRC (cyclic redundancy check) of each metadata block, and storing the CRC in a global array, wherein the subscript of the array indicates the data of the corresponding block, the value of the array indicates the CRC of the data block, and the array is called a primary CRC set, namely a primary initial check set;
s111, after calculating the CRC of all metadata, calculating the CRC of the first-level CRC set, namely calculating and storing the CRC of the array generated in the step S110, wherein the value is called a second-level CRC value, namely a second-level initial check set;
s112, when the equipment runs, triggering a metadata discrete verification process by using a first timer;
s113, closing the first timer after triggering the metadata discrete verification process;
s114, calculating the CRC (second-level CRC) value of the current first-level CRC set, and comparing the second-level CRC value with the second-level CRC value finally calculated in the step S111;
s115, if the verification in the step S114 is passed, the metadata polling logic is triggered through the marking bit, the data polling is started, the second timer is started, and the step S117 is executed;
s116, if the check in the step S114 is not passed, reporting an asynchronous event to a host, recording LOG (LOG), and then forbidding the routing inspection process;
s117, the second timer triggers the metadata check of each block, that is, calculates the CRC check value of a block of metadata, and compares the CRC check value with the corresponding CRC value stored in the primary CRC set stored in step S110;
s118, the step S117 passes the verification, the metadata of the next block is verified, namely the metadata deviates to the next data unit, the CPU is released, and the next data unit is checked after the triggering of the second timer;
s119, after all data are checked, closing the second timer, opening the first timer, and exiting the metadata discrete routing inspection logic;
and S120, if the verification is not passed in the step S117, reporting an asynchronous event to a host, recording LOG, closing the second timer, and then forbidding the routing inspection process.
In the embodiment of the invention, the metadata is checked in the running process of the hard disk, so that abnormal metadata is found in time, and the completeness and the correctness of the data are ensured; in addition, by adopting the modes of discrete verification and graded verification, the occupancy rate of a CPU in the verification process is reduced, and the influence on the running speed of main services of the hard disk is avoided; and the failure removal efficiency in the hard disk operation process is improved by timely finding the metadata abnormity.
Based on the same inventive concept, according to another aspect of the present invention, as shown in fig. 2, an embodiment of the present invention further provides a metadata verification system, including:
a first calculating module 110, where the first calculating module 110 is configured to respond to power-up of a hard disk, block all metadata of the hard disk, and calculate a primary initial check value of each piece of metadata to obtain a primary initial check set;
a second calculating module 120, where the second calculating module 120 is configured to calculate the primary initial check set to obtain a secondary initial check set;
a starting module 130, wherein the starting module 130 is configured to start a first timer and set a discrete check period;
a discrete checking module 140, wherein the discrete checking module 140 is configured to trigger metadata discrete checking logic according to the discrete checking period to perform discrete checking on the metadata based on the secondary initial checking set;
a patrol module 150, the patrol module 150 configured to trigger metadata patrol logic to patrol the metadata based on the primary initial parity set in response to the discrete parity of the metadata passing.
In the embodiment of the invention, the metadata is checked in the running process of the hard disk, so that abnormal metadata is found in time, and the completeness and the correctness of the data are ensured; and by adopting the modes of discrete verification and graded verification, the occupancy rate of the CPU in the verification process is reduced, and the influence on the running speed of the main service of the hard disk is avoided.
The various illustrative logical blocks, modules, and circuits described in connection with the disclosure herein may be implemented or performed with the following components designed to perform the functions herein: a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination of these components. A general purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP, and/or any other such configuration.
The steps of a method or algorithm described in connection with the disclosure herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC. The ASIC may reside in a user terminal. In the alternative, the processor and the storage medium may reside as discrete components in a user terminal.
Based on the same inventive concept, according to another aspect of the present invention, as shown in fig. 3, the embodiment of the present invention further provides a computer device 30, in which the computer device 30 comprises a processor 310 and a memory 320, the memory 320 stores a computer program 321 that can run on the processor, and the processor 310 executes the program to perform the steps of the method.
The memory, which is a non-volatile computer-readable storage medium, may be used to store a non-volatile software program, a non-volatile computer-executable program, and modules, such as program instructions/modules corresponding to the metadata verification method in the embodiments of the present application. The processor executes various functional applications and data processing of the system by running nonvolatile software programs, instructions and modules stored in the memory, that is, implements the metadata verification method of the above-described method embodiment.
The memory may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the system, and the like. Further, the memory may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, the memory optionally includes memory located remotely from the processor, and such remote memory may be coupled to the local module via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
Based on the same inventive concept, according to another aspect of the present invention, as shown in fig. 4, an embodiment of the present invention further provides a computer-readable storage medium 40, where the computer-readable storage medium 40 stores a computer program 410, which when executed by a processor, performs the above method.
Finally, it should be noted that, as understood by those skilled in the art, all or part of the processes in the methods of the embodiments described above may be implemented by instructing relevant hardware by a computer program, and the program may be stored in a computer-readable storage medium, and when executed, may include the processes of the embodiments of the methods described above. The storage medium of the program may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a Random Access Memory (RAM), or the like. The embodiments of the computer program may achieve the same or similar effects as any of the above-described method embodiments.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the disclosed embodiments of the present invention.
The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the present disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. The numbers of the embodiments disclosed in the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments. Furthermore, although elements of the disclosed embodiments of the invention may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant only to be exemplary, and is not intended to intimate that the scope of the disclosure, including the claims, is limited to these examples; within the idea of an embodiment of the invention, also technical features in the above embodiment or in different embodiments may be combined and there are many other variations of the different aspects of the embodiments of the invention as described above, which are not provided in detail for the sake of brevity. Therefore, any omissions, modifications, substitutions, improvements, and the like that may be made without departing from the spirit and principles of the embodiments of the present invention are intended to be included within the scope of the embodiments of the present invention.

Claims (20)

1. A metadata verification method, comprising:
responding to the electrification of a hard disk, partitioning all metadata of the hard disk, and calculating a primary initial check value of each piece of metadata to obtain a primary initial check set;
calculating the primary initial check set to obtain a secondary initial check set;
starting a first timer, and setting a discrete check period;
triggering metadata discrete verification logic according to the discrete verification period to perform discrete verification on the metadata based on the secondary initial verification set;
in response to the discrete verification of the metadata passing, triggering metadata tour inspection logic to tour inspect the metadata based on the primary initial verification set.
2. The method of claim 1, further comprising:
in response to a discrete check of the metadata failing, notifying a host of the occurrence of a metadata asynchronous event and disabling the metadata tour logic.
3. The method of claim 1, wherein the discrete check logic comprises:
closing the first timer;
and performing discrete verification on the metadata based on the secondary initial verification set in each discrete verification period.
4. The method of claim 1, wherein the metadata tour logic comprises:
starting a second timer, and setting a polling period;
sequentially calculating the primary check value of each piece of metadata according to the routing inspection period, and checking the primary check value obtained by each calculation based on the primary initial check value corresponding to the initial check set;
and closing the second timer in response to the metadata verification of all the blocks being completed.
5. The method of claim 4, further comprising:
and after the second timer is closed, starting the first timer, and exiting the metadata polling logic.
6. The method of claim 1, wherein the metadata tour logic comprises:
starting a second timer, and setting a polling period;
sequentially acquiring the current metadata of the hard disk according to the polling period and the divided blocks, and sequentially calculating a primary check value of each piece of metadata;
after each primary check value of one piece of metadata is calculated, comparing the calculated primary check value with a primary initial check value corresponding to the initial check set;
if the comparison result is consistent, the steps of sequentially calculating the primary check value of each piece of metadata according to the routing inspection period are returned to calculate the primary check value of the next piece of metadata.
7. The method of claim 6, further comprising:
and if the comparison result is inconsistent, closing the second timer and forbidding the metadata polling logic.
8. The method of claim 6, further comprising:
and if the comparison result is inconsistent, notifying the host of the occurrence of the metadata asynchronous event, closing the second timer and disabling the metadata polling logic.
9. The method of claim 6, further comprising:
if the comparison result is inconsistent, recording the information that the secondary check set at the current moment is inconsistent with the secondary initial check set to a log, closing the second timer and forbidding the metadata patrol logic.
10. The method of claim 6, further comprising:
and in response to the completion of the metadata polling of all the blocks, closing the second timer, opening the first timer, and exiting the metadata polling logic.
11. The method of claim 1, wherein the metadata discretization check logic comprises:
closing the first timer;
acquiring a primary check set of metadata of the hard disk at the current running time, and calculating the primary check set at the current running time to obtain a secondary check set at the current running time;
comparing the secondary check set at the current moment with the secondary initial check set;
and if the secondary check set at the current moment is consistent with the secondary initial check set, the discrete check of the metadata is passed.
12. The method of claim 11, further comprising:
and if the secondary check set at the current moment is inconsistent with the secondary initial check set, the discrete check of the metadata is not passed.
13. The method of claim 11, further comprising:
and recording information that the secondary check set at the current moment is inconsistent with the secondary initial check set to a log in response to the failure of the discrete check of the metadata.
14. The method of claim 11, further comprising:
and responding to the failure of the discrete verification of the metadata, notifying a host of the occurrence of a metadata asynchronous event, recording information that the secondary verification set at the current moment is inconsistent with the secondary initial verification set to a log, and disabling the metadata polling logic.
15. The method of claim 1, wherein computing a primary initial parity value for each piece of metadata comprises:
and calculating a primary initial check value of each piece of metadata based on the cyclic redundancy check.
16. The method of claim 1, wherein computing the primary initial check set to obtain a secondary initial check set comprises:
and performing cyclic redundancy check calculation on the primary initial check set to obtain a secondary initial check set.
17. The method of claim 1, further comprising:
and in the running process of the hard disk, in response to the updating of the metadata, recalculating a primary initial check value based on the updated metadata, and updating the primary initial check set and the secondary initial check set based on the recalculated primary initial check value.
18. A metadata verification system, comprising:
the first computing module is configured to respond to the electrification of a hard disk, block all metadata of the hard disk, and compute a primary initial check value of each piece of metadata to obtain a primary initial check set;
the second calculation module is configured to calculate the primary initial check set to obtain a secondary initial check set;
the starting module is configured to start a first timer and set a discrete check period;
a discrete checking module configured to trigger metadata discrete checking logic according to the discrete checking period to perform discrete checking on the metadata based on the secondary initial checking set;
a patrol module configured to trigger metadata patrol logic to patrol the metadata based on the primary initial set of checks in response to the discrete checks of the metadata passing.
19. A computer device, comprising:
at least one processor; and
memory storing a computer program operable on the processor, wherein the processor executes the program to perform the steps of the method according to any of claims 1 to 17.
20. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 17.
CN202211455849.9A 2022-11-21 2022-11-21 Metadata verification method, system, computer equipment and storage medium Active CN115509800B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202211455849.9A CN115509800B (en) 2022-11-21 2022-11-21 Metadata verification method, system, computer equipment and storage medium
PCT/CN2023/115981 WO2024109236A1 (en) 2022-11-21 2023-08-30 Metadata check method and system, and computer device and non-volatile readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211455849.9A CN115509800B (en) 2022-11-21 2022-11-21 Metadata verification method, system, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115509800A true CN115509800A (en) 2022-12-23
CN115509800B CN115509800B (en) 2023-03-31

Family

ID=84513665

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211455849.9A Active CN115509800B (en) 2022-11-21 2022-11-21 Metadata verification method, system, computer equipment and storage medium

Country Status (2)

Country Link
CN (1) CN115509800B (en)
WO (1) WO2024109236A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024109236A1 (en) * 2022-11-21 2024-05-30 苏州元脑智能科技有限公司 Metadata check method and system, and computer device and non-volatile readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102946379A (en) * 2012-10-16 2013-02-27 无锡江南计算技术研究所 Multi-layer digest file generation method and file correctness verification method for massively parallel system
CN110851539A (en) * 2019-10-25 2020-02-28 东软集团股份有限公司 Metadata verification method and device, readable storage medium and electronic equipment
CN111782623A (en) * 2020-05-21 2020-10-16 北京交通大学 File checking and repairing method in HDFS storage platform
CN115145943A (en) * 2022-09-06 2022-10-04 北京麦聪软件有限公司 Multi-data-source metadata rapid comparison method, system, device and storage medium
CN115268780A (en) * 2022-07-25 2022-11-01 北京计算机技术及应用研究所 Dynamically refreshed missile-borne computer anti-single event upset software reinforcement method

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10310774B2 (en) * 2015-12-24 2019-06-04 Intel Corporation Techniques for data storage protection and integrity checking
CN109753788B (en) * 2017-11-03 2024-04-19 厦门雅迅网络股份有限公司 Integrity checking method and computer readable storage medium during kernel operation
US10725855B2 (en) * 2018-10-22 2020-07-28 EMC IP Holding Company LLC Storage system with data integrity verification performed in conjunction with internal data movement
CN115509800B (en) * 2022-11-21 2023-03-31 苏州浪潮智能科技有限公司 Metadata verification method, system, computer equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102946379A (en) * 2012-10-16 2013-02-27 无锡江南计算技术研究所 Multi-layer digest file generation method and file correctness verification method for massively parallel system
CN110851539A (en) * 2019-10-25 2020-02-28 东软集团股份有限公司 Metadata verification method and device, readable storage medium and electronic equipment
CN111782623A (en) * 2020-05-21 2020-10-16 北京交通大学 File checking and repairing method in HDFS storage platform
CN115268780A (en) * 2022-07-25 2022-11-01 北京计算机技术及应用研究所 Dynamically refreshed missile-borne computer anti-single event upset software reinforcement method
CN115145943A (en) * 2022-09-06 2022-10-04 北京麦聪软件有限公司 Multi-data-source metadata rapid comparison method, system, device and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024109236A1 (en) * 2022-11-21 2024-05-30 苏州元脑智能科技有限公司 Metadata check method and system, and computer device and non-volatile readable storage medium

Also Published As

Publication number Publication date
CN115509800B (en) 2023-03-31
WO2024109236A1 (en) 2024-05-30

Similar Documents

Publication Publication Date Title
US9672085B2 (en) Adaptive fault diagnosis
US11061756B2 (en) Enabling symptom verification
US7774651B2 (en) System and method to detect errors and predict potential failures
JP5926491B2 (en) Method for security maintenance in a network and computer readable medium having computer readable instructions of a computer program causing a processor to perform the method for security maintenance
US8108724B2 (en) Field replaceable unit failure determination
US20100262858A1 (en) Invariants-Based Learning Method and System for Failure Diagnosis in Large Scale Computing Systems
CN111327490A (en) Byzantine fault-tolerant detection method of block chain and related device
CN115509800B (en) Metadata verification method, system, computer equipment and storage medium
CN112256593B (en) Program processing method and device, computer equipment and readable storage medium
CN111104238A (en) CE-based memory diagnosis method, device and medium
US20200127882A1 (en) Identification of cause of failure of computing elements in a computing environment
CN110908910B (en) Block chain-based test monitoring method and device and readable storage medium
CN117607595A (en) Device improvement method, apparatus, device, storage medium, and program product
JP2006268775A (en) Software operation modeling device and software operation monitoring device
CN117076301A (en) System performance test method and device and electronic equipment
US20210034505A1 (en) Modified executables
US12105851B2 (en) Secure data center update and monitoring
CN115562918A (en) Computer system fault testing method and device, electronic equipment and readable medium
CN111475400A (en) Verification method of service platform and related equipment
AU2014200806B1 (en) Adaptive fault diagnosis
US10846162B2 (en) Secure forking of error telemetry data to independent processing units
US10735246B2 (en) Monitoring an object to prevent an occurrence of an issue
WO2020109252A1 (en) Test system and method for data analytics
Otsuka et al. Learning from before and after recovery to detect latent misconfiguration
Müller Availability analysis of the ONOS architecture

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