CN111581022B - Data recovery method and system - Google Patents

Data recovery method and system Download PDF

Info

Publication number
CN111581022B
CN111581022B CN202010362839.5A CN202010362839A CN111581022B CN 111581022 B CN111581022 B CN 111581022B CN 202010362839 A CN202010362839 A CN 202010362839A CN 111581022 B CN111581022 B CN 111581022B
Authority
CN
China
Prior art keywords
information
storage
data
mapping
storage device
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
CN202010362839.5A
Other languages
Chinese (zh)
Other versions
CN111581022A (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.)
Jiangsu Xinsheng Intelligent Technology Co ltd
Original Assignee
Jiangsu Xinsheng 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 Jiangsu Xinsheng Intelligent Technology Co ltd filed Critical Jiangsu Xinsheng Intelligent Technology Co ltd
Priority to CN202010362839.5A priority Critical patent/CN111581022B/en
Publication of CN111581022A publication Critical patent/CN111581022A/en
Priority to PCT/CN2021/091349 priority patent/WO2021219122A1/en
Application granted granted Critical
Publication of CN111581022B publication Critical patent/CN111581022B/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/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • G06F11/1469Backup restoration techniques
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • 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

The invention discloses a data recovery method and a data recovery system, which avoid the risk of secondary damage of internal recovery of a storage device, and avoid the risk of data loss when a block serial number is lost by using a mode of combining serial number information and mapping information. The method comprises the following steps: when the storage equipment fails, the host equipment acquires mapping information and serial number information of the storage equipment, wherein the mapping information is used for representing the mapping relation between a physical address and a logical address of the storage equipment, and the serial number information is used for representing the old-new relation of data in the storage equipment; the host device constructs a mapping table of the storage device according to the mapping information and the serial number information; and the host device reads the data in the storage device according to the mapping table.

Description

Data recovery method and system
Technical Field
The present invention relates to the field of data recovery, and in particular, to a data recovery method and system.
Background
Solid state disks are rapidly applied due to their advantages of high performance, low energy consumption, strong shock resistance, etc., and have a large share in the storage device market and are continuously increasing. However, when a fault occurs in a better electronic product, the solid state disk is not an exception, and the phenomenon that the disk cannot be identified by a computer due to the fault of the solid state disk occurs in the using process. The hard disk usually stores important data of users, and when the hard disk fails, how to recover the data of the failed hard disk becomes more important. The failures of a solid state disk can be generally summarized as hardware failures and firmware failures. If the hardware fails, a professional company can be found to replace the damaged device for replacement and recovery. The method aims at the data recovery of firmware faults, namely the problems mainly caused by firmware execution abnormity, mapping table item abnormity or internal system data abnormity. For the firmware fault type recovery data, the mapping table item information is reconstructed mainly by means of self-description information of the solid state disk when the solid state disk stores the data, and the data stored in the solid state disk is read according to the reconstructed new mapping table. Most solid state disks adopt a preset debugging mode, and after the hard disks are in failure, the damaged equipment is forced to enter the debugging mode for reconstruction and recovery by using a specific program.
The recovery mode comprises two types of solid state disk internal repair and host repair: the method comprises the steps that restoration is carried out inside a solid state disk, internal restoration is adopted for a hard disk which does not have enough memory space for storing mapping table items inside, the restored table items are required to be written into a Flash memory (Nand Flash), and the operation of writing the restored mapping table item data can bring the risk of secondary damage to the hard disk; and the data recovery tool at the host side acquires the old and new relations of the data blocks and the mapping relation from the physical address to the logical address through the front-end interface of the hard disk. And restoring the mapping relation of the whole disk at the host side. Specifically, because NAND Flash cannot be rewritten, a physical location where data is stored and a Logical Block Address (LBA) cannot be directly in one-to-one correspondence, a mapping table must be provided to record a mapping relationship between the LBA and the physical location, and meanwhile, a plurality of physical locations corresponding to the same LBA exist in a used hard disk, and only the latest data is data required by a user, so that when data is written in the solid state disk, sufficient self-description information and data old-new relationship information are stored to effectively recover the data. Most space of a data block in the solid state disk stores data, a part of space is reserved for storing P2L (a reverse mapping relation from a physical position to an LBA), and GHP (logical address space is divided by taking GHP as granularity, mapping table item management is performed, Global Host Page) and block SN (sequence number, used for judging a new-old relation of data) are stored in a backup (Spare) space of a data Page. The data recovery method is to scan the data blocks, sequence the data blocks according to the SN, recover the old block first and then recover the new block, and even if the LBA is repeated, the mapping relationship of the new block will cover the old mapping relationship. The mapping table is thus restored and the data is then read according to the mapping table.
The internal recovery of the existing solid state disk may bring the risk of secondary damage to the hard disk; the host side uses a data recovery tool for recovery, and has the risk that when block SN information is lost, the new and old relations of the block data cannot be judged, and one block usually has hundreds of MB, so that a large amount of data can be lost if the block without SN information is abandoned.
Disclosure of Invention
The invention aims to provide a data recovery method and a data recovery system, which avoid the risk of secondary damage of internal recovery of storage equipment, and avoid the risk of data loss when a block serial number is lost by using a mode of combining serial number information and mapping information.
A first aspect of the present invention provides a data recovery method, including:
when the storage equipment fails, the host equipment acquires mapping information and serial number information of the storage equipment, wherein the mapping information is used for representing the mapping relation between the physical address and the logical address of the storage space, and the serial number information is used for representing the old-new relation of data in the storage equipment;
the host device constructs a mapping table of the storage device according to the mapping information and the serial number information;
and the host device reads the data in the storage device according to the mapping table.
Further, the sequence number information includes a block sequence number and/or a page sequence number, the block sequence number is used for indicating the old and new relationship of the data on the storage space of the storage device, and the page sequence number is used for indicating the old and new relationship of the data of the storage space.
Further, the host device constructs a mapping table of the storage device according to the mapping information and the serial number information, including:
the host equipment determines the mapping relation between the physical address and the logical address of the storage space according to the mapping information;
when the serial number information comprises a block serial number, the host equipment judges the old and new relation of the data in the storage space according to the block serial number, and determines target data;
when the serial number information does not include the block serial number but includes the page serial number, the host equipment analyzes the page serial number to obtain the block serial number, judges the old and new relation of the data in the storage space according to the block serial number and determines the target data;
and the host equipment constructs a mapping table of the storage equipment according to the mapping relation between the physical address and the logical address of the storage space and the target data.
Further, the acquiring, by the host device, the mapping information and the serial number information of the storage device includes:
the host equipment acquires serial number information from a backup area of a data page of the storage equipment;
the host equipment acquires mapping information from a storage space of the storage equipment;
or the like, or, alternatively,
the host equipment acquires mapping information from a mapping information page of a storage space of the storage equipment;
or the like, or, alternatively,
when the host device does not acquire the mapping information, the host device acquires mapping table management information from the backup area of the data page and acquires the mapping information according to the mapping table management information.
Further, before the host device obtains the mapping information and the serial number information of the storage device, the method further includes:
the host equipment sends a repair command to the storage equipment or short-circuits the initial disk mode pin to enable the storage equipment to enter an initial disk state;
the host device sends a repair program to the storage device;
the storage equipment runs a repair program and enters a read-only mode;
the host equipment acquires storage information of the storage equipment;
and the host equipment constructs a storage space according to the storage information.
A second aspect of the present invention provides a data recovery system, including:
a host device and a storage device;
the host device is used for acquiring mapping information and serial number information of the storage device when the storage device fails, wherein the mapping information is used for representing the mapping relation between the physical address and the logical address of the storage space, and the serial number information is used for representing the old-new relation of data in the storage device;
the host equipment is also used for constructing a mapping table of the storage equipment according to the mapping information and the serial number information;
and the host device is also used for reading the data in the storage device according to the mapping table.
Further, the sequence number information includes a block sequence number and/or a page sequence number, the block sequence number is used for indicating the old and new relationship of the data on the storage space of the storage device, and the page sequence number is used for indicating the old and new relationship of the data on the storage device.
Further, in the above-mentioned case,
the host equipment is also used for determining the mapping relation between the physical address and the logical address of the storage space according to the mapping information;
the host equipment is also used for judging the old and new relations of the data in the storage space according to the block serial number when the serial number information comprises the block serial number, and determining target data;
the host equipment is also used for analyzing the page sequence number to obtain the block sequence number when the sequence number information does not comprise the block sequence number but comprises the page sequence number, judging the old-new relation of the data in the storage space according to the block sequence number and determining the target data;
and the host equipment is also used for constructing and obtaining a mapping table of the storage equipment according to the mapping relation between the storage space and the logical address space of the storage equipment and the target data.
Further, in the above-mentioned case,
the host equipment is also used for acquiring serial number information from a backup area of a data page of the storage equipment;
the host device is also used for acquiring mapping information from the storage space of the storage device;
or the like, or, alternatively,
the host device is also used for acquiring mapping information from a mapping information page of a storage space of the storage device;
or the like, or a combination thereof,
and the host equipment is also used for acquiring the mapping table management information from the backup area of the data page when the mapping information is not acquired, and acquiring the mapping information according to the mapping table management information.
Further, in the above-mentioned case,
the host device is also used for sending a repair command to the storage device or short-circuiting the initial disk mode pin so that the storage device enters an initial disk state;
the host equipment is also used for sending the repair program to the storage equipment;
the storage device is also used for running the repair program and entering a read-only mode;
the host equipment is also used for acquiring the storage information of the storage equipment;
and the host equipment is also used for constructing a storage space according to the storage information.
A third aspect of the present invention provides a storage medium for implementing the data recovery method of the above first aspect.
Therefore, in the invention, when the storage device fails, the host device acquires the mapping information and the serial number information of the storage device, the mapping information is used for representing the mapping relation between the physical address and the logical address of the storage device, the serial number information is used for representing the old-new relation of data in the storage device, the mapping table of the storage device is constructed according to the mapping information and the serial number information, and the host device reads the data in the storage device according to the mapping table. Compared with the internal recovery of the existing storage equipment, the recovery of the host equipment side avoids the risk of secondary damage; compared with the existing recovery method of the host side by using a data recovery tool, the method of the invention combines the sequence number information and the mapping information, thereby avoiding the risk of data loss when the block sequence number is lost.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed in the prior art and the embodiments 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 to obtain other drawings without creative efforts.
FIG. 1 is a flow chart illustrating a data recovery method according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart diagram illustrating a data recovery method according to another embodiment of the present invention;
FIG. 3 is an interaction diagram of a data recovery method according to another embodiment of the present invention;
fig. 4 is a schematic structural diagram of an embodiment of a data recovery system provided in the present invention.
Detailed Description
The core of the invention is to provide a data recovery method and a data recovery system, which avoid the risk of secondary damage of the internal recovery of the storage equipment, and avoid the risk of data loss when the block serial number is lost by using a mode of combining the serial number information and the mapping information.
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, an embodiment of the invention provides a data recovery method, including:
101. when the storage equipment fails, the host equipment acquires mapping information and serial number information of the storage equipment;
in this embodiment, when a storage device fails, a host device activates an initial disk state (ROM) of the storage device, so that the host device can obtain mapping information and serial number information of the storage device, where the mapping information is used to indicate a mapping relationship between a physical address and a logical address of the storage device, and the serial number information is used to indicate a new-old relationship of data in the storage device.
Optionally, the sequence number information includes a block sequence number and/or a page sequence number, where the block sequence number is used to indicate a new-old relationship of data on a storage space of the storage device; the page sequence number is used to indicate the new and old relationship of data on the storage space.
102. The host equipment constructs a mapping table of the storage space according to the mapping information and the serial number information;
in this embodiment, the host device can determine the mapping relationship between the physical address and the logical address of the storage device according to the mapping information, and then determine the old-new relationship of the data on the storage device through the serial number information, thereby constructing a mapping table of the storage device at the host device side.
103. And the host device reads the data in the storage device according to the mapping table.
In this embodiment, the host device reads data in the storage device according to the mapping table.
In the embodiment of the invention, when the storage equipment has a fault, the host equipment acquires the mapping information and the serial number information of the storage equipment, the mapping information is used for representing the mapping relation between the logical address space and the storage space of the storage space, and the column number information is used for representing the old-new relation of data in the storage equipment, so that the mapping table of the storage equipment can be constructed according to the mapping information and the serial number information, and the data in the storage equipment can be read according to the mapping table. Compared with the internal recovery of the existing storage equipment, the recovery of the host equipment side avoids the risk of secondary damage; compared with the existing recovery method that the host side uses the data recovery tool, the serial number information in the invention uses the mode of combining the serial number information and the mapping information, thereby avoiding the risk of data loss when the block serial number is lost.
Referring to fig. 2, an embodiment of the invention provides a data recovery method, including:
201. when the storage equipment fails, the host equipment acquires mapping information and serial number information of the storage equipment;
in this embodiment, when a storage device fails, a host device activates an initial disk state (ROM) of the storage device, so that the host device can obtain mapping information and serial number information of the storage device, where the mapping information is used to indicate a mapping relationship between a physical address and a logical address of the storage device, the serial number information includes a block serial number and/or a page sequence number, and the block serial number is used to indicate a new-old relationship of data in a storage space of the storage device; the range of page sequence numbers is larger to represent the old and new relationships of data on the storage device.
202. The host equipment determines the mapping relation between the physical address and the logical address of the storage equipment according to the mapping information;
in this embodiment, since the mapping information indicates a mapping relationship between the logical address space and the storage space of the storage space, the host device can determine the mapping relationship between the storage space of the storage space and the logical address space according to the mapping information.
203. When the serial number information comprises a block serial number, judging the old and new relation of data in the storage space according to the block serial number, and determining target data;
in this embodiment, when the sequence number information includes a block sequence number, to improve the efficiency of data recovery, the new-old relationship of the upper data in the storage space of the storage device is directly determined according to the block sequence number, and the target data is determined. The block sequence number is generally a 32-bit integer, and is sequentially incremented from 0, and the larger the value is, the newer the data is.
204. When the serial number information does not include the block serial number but includes the page serial number, analyzing the page serial number to obtain the block serial number, judging the old and new relation of the data in the storage space according to the block serial number, and determining the target data;
in this embodiment, when the sequence number information does not include a block sequence number, but includes a page sequence number, the block sequence number cannot be used at this time, the block sequence number needs to be extracted from the page sequence number, the page sequence number is generally set to be a 64-bit integer, the higher 32 bits are the block sequence number, the lower 32 bits are the blocks starting from 0, each page is incremented by 1, when the page sequence number is used, the block sequence number with the higher 32 bits of the page sequence number is taken first, and when the block sequence number is not equal, the data freshness can be judged according to the block sequence number; the lower 32 bits of the page sequence number are taken when the block sequence numbers are equal, and the data is newer if the lower 32 bits are large. And after the block serial number is obtained, judging the old-new relation of the upper data of the storage space of the storage device according to the block serial number, and determining the target data.
205. Constructing a mapping table of the storage equipment according to the mapping relation between the physical address and the logical address of the storage space and the target data;
in this embodiment, the host device can determine the mapping relationship between the physical address and the logical address of the storage device according to the mapping information, and then determine the old-new relationship of the data in the storage space through the serial number information, thereby constructing a mapping table of the storage device at the host device side.
206. And the host device reads the data in the storage device according to the mapping table.
In this embodiment, the host device reads data in the storage device according to the mapping table.
In the embodiment of the present invention, it is specifically described how to determine the new and old relationships of data according to the block sequence number and the page sequence number. The effect of simultaneously satisfying both the block sequence number and the page sequence number is achieved, and the data recovery efficiency is high when only the block sequence number is used; when a block sequence number is lost, the page sequence number can be used to determine the old and new relationship of the data.
Optionally, in some embodiments of the present invention, the method further includes:
when the storage equipment receives the data, the storage equipment stores the data into a storage space of the storage space to generate a block serial number and mapping information;
the storage device stores the mapping information to a mapping information page of a backup area of a storage space or a data page;
the storage device stores the block sequence number to a backup area of the mapping information page;
the storage device generates a page sequence number according to the block sequence number and stores the page sequence number to a backup area of the data page;
the storage device generates mapping table management information according to the data of the data page, and stores the mapping table management information to a backup area of the data page.
In the embodiment of the present invention, how to generate the block sequence number, the page sequence number, and the mapping information when the storage device stores data is specifically described. The mapping information may be stored in a mapping information page of a storage space or a backup area of the data page, or mapping table management information may be generated and stored in the backup area of the data page, so that the mapping information may be acquired in various ways.
Optionally, in some embodiments of the present invention, the obtaining, by the host device, the mapping information and the serial number information of the storage device includes:
the host equipment acquires serial number information from a backup area of a data page of the storage equipment;
the host equipment acquires mapping information from a storage space of the storage equipment;
or the like, or, alternatively,
the method comprises the steps that the host equipment obtains mapping information from a mapping information page of a storage space of the storage equipment;
or the like, or, alternatively,
when the host device does not acquire the mapping information, the host device acquires the mapping table management information from the backup area of the data page and acquires the mapping information according to the mapping table management information.
In the embodiment of the present invention, it is specifically described that the host device may obtain the block sequence number and the page sequence number from the backup area of the data page, and may obtain the mapping information through the storage space, the mapping information page of the backup area of the data page, or the mapping table management information.
Referring to fig. 3, an interaction diagram of a data recovery method according to an embodiment of the present invention includes:
301. when the storage device fails, the host device sends a repair command to the storage device or short-circuits an initial disk mode pin, so that the storage device enters an initial disk state (ROM);
302. the host device sends a repair program to the storage device;
303. the storage equipment runs a repair program and enters a read-only mode;
304. the host equipment acquires storage information of the storage equipment;
305. the host equipment constructs a host storage space according to the storage information;
306. the host equipment acquires mapping information and serial number information of the storage equipment;
please refer to step 201 of the embodiment shown in fig. 2 for details.
307. The host equipment determines the mapping relation between the physical address and the logical address of the storage equipment according to the mapping information;
refer to step 202 of the embodiment shown in FIG. 2 for details.
308. When the serial number information comprises a block serial number, judging the old and new relation of data in the storage space according to the block serial number, and determining target data;
please refer to step 203 of the embodiment shown in fig. 2 for details.
309. When the serial number information does not include the block serial number but includes the page serial number, analyzing the page serial number to obtain the block serial number, judging the old and new relation of the data in the storage space according to the block serial number, and determining the target data;
refer to step 204 of the embodiment shown in FIG. 2 for details.
310. According to the mapping relation between the physical address and the logical address of the storage space and the target data, constructing a mapping table of the storage device;
please refer to step 205 of the embodiment shown in fig. 2 for details.
311. And the host device reads the data in the storage device according to the mapping table.
Refer to step 206 of the embodiment shown in FIG. 2 for details.
In the above embodiments, the data recovery method is described in detail, and a data recovery system to which the data recovery method is applied is described in detail below.
Referring to fig. 4, an embodiment of the invention provides a data recovery system, including:
a host device 401 and a storage device 402;
the host device 401 is configured to, when the storage device 402 fails, obtain mapping information and serial number information of the storage device 402, where the mapping information is used to indicate a mapping relationship between a physical address and a logical address of a storage space, and the serial number information is used to indicate a new-old relationship of data in the storage device;
the host device 401 is further configured to construct a mapping table of the storage space according to the mapping information and the serial number information;
the host device 401 is further configured to read data of the storage device 402 according to the mapping table.
In this embodiment of the present invention, when the storage device 402 fails, the host device 401 obtains mapping information and serial number information of the storage device, where the mapping information is used to represent a mapping relationship between a logical address space and a storage space of the storage space, the serial number information includes a block serial number and a page sequence number, the block serial number is used to represent a new-old relationship of data on the storage space of the storage space, the page sequence number is used to represent a new-old relationship of data on the storage space corresponding to the block serial number, the host device 401 constructs a mapping table of the storage device according to the mapping information and the serial number information, and the host device 401 reads the data of the storage device 402 according to the mapping table. Compared with the internal recovery of the existing storage equipment, the recovery of the host equipment side avoids the risk of secondary damage; compared with the existing recovery method that the host side uses the data recovery tool, the serial number information in the invention uses the mode of combining the serial number information and the mapping information, thereby avoiding the risk of data loss when the block serial number is lost.
Alternatively, as shown in fig. 4, in some embodiments of the invention,
the host device 401 is further configured to determine a mapping relationship between a physical address and a logical address of the storage space according to the mapping information;
the host device 401 is further configured to, when the sequence number information includes a block sequence number, determine, according to the block sequence number, a new-old relationship of data in the storage space, and determine target data;
the host device 401 is further configured to, when the sequence number information does not include a block sequence number but includes a page sequence number, analyze the page sequence number to obtain the block sequence number, determine, according to the block sequence number, a new-old relationship of data in the storage space, and determine target data;
the host device 401 is further configured to construct a mapping table of the storage device according to the mapping relationship between the storage space of the storage device and the logical address space and the target data.
In the embodiment of the present invention, it is specifically described how the host device 401 determines the new and old relationships of data according to the block sequence number and the page sequence number. The effect of simultaneously satisfying both the block serial number and the page serial number is achieved, and the data recovery efficiency is high when only the block serial number is used; when a block sequence number is lost, the page sequence number may be used to determine the old and new relationship of the data.
Alternatively, as shown in fig. 4, in some embodiments of the invention,
the storage device 402 is further configured to, when receiving data, store the data in a storage space of the storage space, and generate a block sequence number and mapping information;
a storage device 402, further configured to store mapping information to a mapping information page of a backup area of a storage space or a data page;
the storage device 402 is further configured to store the block sequence number to the backup area of the mapping information page;
the storage device 402 is further configured to generate a page sequence number according to the block sequence number, and store the page sequence number in a backup area of the data page;
the storage device 402 is further configured to generate mapping table management information according to the data of the data page, and store the mapping table management information in the backup area of the data page.
In the embodiment of the present invention, how the storage device 402 generates the block sequence number, the page sequence number, and the mapping information during data storage is specifically described. The mapping information may be stored in a mapping information page of a storage space or a backup area of the data page, or mapping table management information may be generated and stored in the backup area of the data page, so that the mapping information may be acquired in various ways.
Alternatively, as shown in FIG. 4, some embodiments of the invention
The host device 401 is further configured to obtain a block sequence number and a page sequence number from a backup area of a data page of the storage device 402;
the host device 401 is further configured to obtain mapping information from a storage space of the storage device 402;
or the like, or, alternatively,
the host device 401 is further configured to obtain mapping information from a mapping information page of a backup area of data pages of the storage device 402;
or the like, or, alternatively,
the host device 401 is further configured to, when the mapping information is not obtained, obtain mapping table management information from a backup area of a data page of the storage device 402, and obtain the mapping information according to the mapping table management information.
In this embodiment of the present invention, it is specifically described that the host device 401 may obtain the block sequence number and the page sequence number from the backup area of the data page, and may obtain the mapping information through the storage space, the mapping information page of the backup area of the data page, or the mapping table management information.
Alternatively, as shown in FIG. 4, some embodiments of the invention
The host device 401 is further configured to send a repair command to the storage device or short an initial disk mode pin, so that the storage device enters an initial disk mode (ROM);
the host device 401, further configured to send a repair program to the storage device 402;
the storage device 402 is also used for running a repair program and entering a read-only mode;
the host device 401 is further configured to obtain storage information of the storage device 402;
the host device 401 is further configured to construct a storage space according to the storage information.
In the embodiment of the present invention, it is specifically described how the host device 401 puts the storage device 402 into the read-only mode, and how the host device 401 constructs a host storage space according to the storage information of the storage device 402, so as to store the data acquired from the storage device 402.
An embodiment of the present invention provides a storage medium, which is specifically used to implement the data recovery method in the embodiment shown in fig. 1.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
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 identical elements in a process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (7)

1. A method for data recovery, comprising:
when storage equipment fails, the host equipment acquires mapping information and serial number information of the storage equipment, wherein the mapping information is used for representing the mapping relation between a physical address and a logical address of a storage space, and the serial number information is used for representing the old-new relation of data in the storage equipment;
the host device constructs a mapping table of the storage device according to the mapping information and the serial number information; the host device reads the data in the storage device according to the mapping table;
the sequence number information comprises a block sequence number and/or a page sequence number, the block sequence number is used for representing the old-new relationship of the data on the storage space of the storage device, and the page sequence number is used for representing the old-new relationship of the data on the storage space;
the host equipment determines the mapping relation between the physical address and the logical address of the storage space according to the mapping information;
when the serial number information comprises a block serial number, the host equipment judges the old-new relation of the data in the storage space according to the block serial number, and determines target data;
when the serial number information does not include a block serial number but includes a page serial number, the host device analyzes the page serial number to obtain a block serial number, judges the old-new relationship of the data in the storage space according to the block serial number, and determines target data;
and the host equipment constructs a mapping table of the storage equipment according to the mapping relation between the physical address and the logical address of the storage space and the target data.
2. The method of claim 1, wherein the obtaining, by the host device, mapping information and serial number information of the storage device comprises:
the host device acquires serial number information from a backup area of a data page of the storage device;
the host device acquires mapping information from a storage space of the storage device;
or the like, or, alternatively,
the host device acquires mapping information from a mapping information page of a storage space of the storage device;
or the like, or, alternatively,
when the host device does not acquire mapping information, the host device acquires mapping table management information from a backup area of the data page, and acquires the mapping information according to the mapping table management information.
3. The method according to any one of claims 1-2, wherein before the host device obtains the mapping information and the serial number information of the storage device, the method further comprises:
the host device sends a repair command to the storage device or short-circuits an initial disk mode pin, so that the storage device enters an initial disk state;
the host device sends a repair program to the storage device;
the storage device runs the repair program and enters a read-only mode;
the host device acquires storage information of the storage device;
and the host equipment constructs a storage space according to the storage information.
4. A data recovery system, comprising: a host device and a storage device;
the host device is configured to obtain mapping information and serial number information of the storage device when the storage device fails, where the mapping information is used to indicate a mapping relationship between a physical address and a logical address of a storage space, and the serial number information is used to indicate a new-old relationship of data in the storage device;
the host device is further used for constructing a mapping table of the storage device according to the mapping information and the serial number information;
the host device is further configured to read data in the storage device according to the mapping table;
the sequence number information comprises a block sequence number and/or a page sequence number, the block sequence number is used for representing the old-new relationship of the data on the storage space of the storage device, and the page sequence number is used for representing the old-new relationship of the data on the storage space;
the host device is further configured to determine a mapping relationship between a physical address and a logical address of the storage space according to the mapping information;
the host device is further configured to, when the sequence number information includes a block sequence number, determine, according to the block sequence number, a new-old relationship of data in the storage space, and determine target data;
the host device is further configured to, when the sequence number information does not include a block sequence number but includes a page sequence number, analyze the page sequence number to obtain a block sequence number, determine, according to the block sequence number, a new-old relationship of data in the storage space, and determine target data;
the host device is further configured to construct a mapping table of the storage device according to the mapping relationship between the storage space of the storage device and the logical address space and the target data.
5. The system of claim 4,
the host device is further configured to obtain serial number information from a backup area of a data page of the storage device;
the host device is further configured to obtain mapping information from a storage space of the storage device;
or the like, or, alternatively,
the host device is further configured to obtain mapping information from a mapping information page of a storage space of the storage device;
or the like, or, alternatively,
the host device is further configured to, when the mapping information is not obtained, obtain mapping table management information from a backup area of the data page, and obtain the mapping information according to the mapping table management information.
6. The system according to any one of claims 4-5,
the host device is further configured to send a repair command to the storage device or short-circuit an initial disk mode pin, so that the storage device enters an initial disk state;
the host device is further used for sending a repair program to the storage device;
the storage device is also used for running the repair program and entering a read-only mode;
the host device is further configured to obtain storage information of the storage device;
the host device is further used for constructing a storage space according to the storage information.
7. A storage medium characterized in that,
the storage medium is for implementing the data recovery method of claim 1.
CN202010362839.5A 2020-04-30 2020-04-30 Data recovery method and system Active CN111581022B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010362839.5A CN111581022B (en) 2020-04-30 2020-04-30 Data recovery method and system
PCT/CN2021/091349 WO2021219122A1 (en) 2020-04-30 2021-04-30 Data recovery method, system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010362839.5A CN111581022B (en) 2020-04-30 2020-04-30 Data recovery method and system

Publications (2)

Publication Number Publication Date
CN111581022A CN111581022A (en) 2020-08-25
CN111581022B true CN111581022B (en) 2022-07-08

Family

ID=72113267

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010362839.5A Active CN111581022B (en) 2020-04-30 2020-04-30 Data recovery method and system

Country Status (2)

Country Link
CN (1) CN111581022B (en)
WO (1) WO2021219122A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111581022B (en) * 2020-04-30 2022-07-08 江苏芯盛智能科技有限公司 Data recovery method and system
CN116069678A (en) * 2021-10-29 2023-05-05 华为技术有限公司 Data processing method and related device
CN116701038B (en) * 2023-06-25 2024-04-02 深圳市东方聚成科技有限公司 Control method and control system for quickly recovering storage data of memory
CN117687845B (en) * 2024-02-04 2024-06-11 成都佰维存储科技有限公司 Power-on recovery method and device, readable storage medium and electronic equipment

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107391027A (en) * 2016-05-03 2017-11-24 三星电子株式会社 Redundant Array of Inexpensive Disc storage device and its management method

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101890767B1 (en) * 2011-07-01 2018-09-28 시게이트 테크놀로지 인터내셔날 Method for managing address mapping information and storage device applying the same
US8819367B1 (en) * 2011-12-19 2014-08-26 Western Digital Technologies, Inc. Accelerated translation power recovery
US9244833B2 (en) * 2012-05-30 2016-01-26 Silicon Motion, Inc. Data-storage device and flash memory control method
CN102866956B (en) * 2012-09-14 2015-02-18 上海宝存信息科技有限公司 System and method for data real-time tracking and storage based on solid-state storage medium
CN104461391B (en) * 2014-12-05 2019-08-02 上海宝存信息科技有限公司 A kind of storage device metadata management approach and system
TWI579696B (en) * 2015-11-06 2017-04-21 群聯電子股份有限公司 Method and system for data rebuilding and memory control circuit unit thereof
TWI639917B (en) * 2017-04-25 2018-11-01 慧榮科技股份有限公司 Data storage devices and methods for rebuilding a mapping table thereof
KR102435890B1 (en) * 2017-08-17 2022-08-25 삼성전자주식회사 Address mapping method and operation method of storage device
CN109582599B (en) * 2017-09-29 2023-12-22 上海宝存信息科技有限公司 Data storage device and non-volatile memory operation method
CN108170614B (en) * 2018-01-19 2022-01-11 湖南国科微电子股份有限公司 Method and device for avoiding repeated recovery of data and solid state disk
CN111581022B (en) * 2020-04-30 2022-07-08 江苏芯盛智能科技有限公司 Data recovery method and system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107391027A (en) * 2016-05-03 2017-11-24 三星电子株式会社 Redundant Array of Inexpensive Disc storage device and its management method

Also Published As

Publication number Publication date
WO2021219122A1 (en) 2021-11-04
CN111581022A (en) 2020-08-25

Similar Documents

Publication Publication Date Title
CN111581022B (en) Data recovery method and system
CN110187999B (en) Address mapping data backup method and device
CN110399310B (en) Method and device for recovering storage space
US7992061B2 (en) Method for testing reliability of solid-state storage medium
CN109508148B (en) Metadata reconstruction method and device and computer readable storage medium
CN103049354B (en) Data recovery method, data restore device and storage system
US10572335B2 (en) Metadata recovery method and apparatus
CN112631516B (en) FLASH file management system with service life management function
CN111045870B (en) Method, device and medium for saving and restoring metadata
CN109582488B (en) Error prevention method and related device for solid state disk
CN114237984A (en) Recovery method and system of Trim data under abnormal power failure and solid state disk
US20150100719A1 (en) Data backup method and device thereof
CN110704257A (en) Solid state disk, quality monitoring method and device thereof and computer readable storage medium
CN106909514B (en) Method and device for positioning snapshot disk address
CN111813604B (en) Data recovery method, system and related device of fault storage equipment
CN106933707B (en) Data recovery method and system of data storage device based on raid technology
CN115309591B (en) Recovery method and related device of full flash memory system
CN113742127B (en) Failure recovery method of bare flash file system
CN109375869A (en) Realize the method and system, storage medium of data reliable read write
CN112131040B (en) Wear balance management method and system for power-down backup area of smart card
CN114840358A (en) Data restoration method, device and medium based on virtual disk
CN113626253A (en) Data recovery method, device, equipment and medium for failed solid-state memory
CN110688257A (en) Method, device and equipment for repairing local metadata of full flash memory array
CN107301133B (en) Method and device for constructing lost FTL table
CN112084097A (en) Disk warning method and device

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