CN108646982A - A kind of data self-repairing method and device based on UBIFS - Google Patents

A kind of data self-repairing method and device based on UBIFS Download PDF

Info

Publication number
CN108646982A
CN108646982A CN201810421109.0A CN201810421109A CN108646982A CN 108646982 A CN108646982 A CN 108646982A CN 201810421109 A CN201810421109 A CN 201810421109A CN 108646982 A CN108646982 A CN 108646982A
Authority
CN
China
Prior art keywords
file
subregion
verification
data
ubifs
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
CN201810421109.0A
Other languages
Chinese (zh)
Other versions
CN108646982B (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.)
Electric Power Research Institute of Guangdong Power Grid Co Ltd
Original Assignee
Electric Power Research Institute of Guangdong Power Grid 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 Electric Power Research Institute of Guangdong Power Grid Co Ltd filed Critical Electric Power Research Institute of Guangdong Power Grid Co Ltd
Priority to CN201810421109.0A priority Critical patent/CN108646982B/en
Publication of CN108646982A publication Critical patent/CN108646982A/en
Application granted granted Critical
Publication of CN108646982B publication Critical patent/CN108646982B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/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/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/1008Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices
    • G06F11/1048Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices using arrangements adapted for a specific error detection or correction feature
    • G06F11/106Correcting systematically all correctable errors, i.e. scrubbing
    • 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/1008Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices
    • G06F11/1068Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices in sector programmable memories, e.g. flash disk
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • G06F3/0619Improving the reliability of storage systems in relation to data integrity, e.g. data losses, bit errors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0644Management of space entities, e.g. partitions, extents, pools
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0652Erasing, e.g. deleting, data cleaning, moving of data to a wastebasket
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Quality & Reliability (AREA)
  • Computer Security & Cryptography (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention discloses a kind of data self-repairing methods and device being based on UBIFS (Unsorted Block Image File System, chaotic blocks mirror file system), wherein the method for the present invention includes:The subregion carry detection data for obtaining UBIFS determines that carry has damaged subregion extremely;The subregion of damage of carry exception wipe and carry again;It obtains the fileinfo to be verified stored in file verification list to verify file to be verified by check code verification mode, if verification failure, the file of verification failure is substituted for backup file corresponding with the file of verification failure.Solves UBIFS in actual use, due to unit exception power down, the stability of the mechanism of asynchronous refresh is unable to get guarantee, the technical issues of being susceptible to the case where failure of subregion carry is lost or occurred to critical file, and then cause system that can not run.

Description

A kind of data self-repairing method and device based on UBIFS
Technical field
The present invention relates to field of computer technology more particularly to a kind of data self-repairing methods and dress based on UBIFS It sets.
Background technology
In embedded systems, NANDFLASH is widely used due to the features such as at low cost, small, and NANDFLASH's itself has some special physical characteristics:Page block structure, first wipe write afterwards, erasable limitation.To ensure The reliability service of NANDFLASH needs to use special file system.
For Linux as one of most common embedded system, the flash memory file system overwhelming majority towards Linux is all base In log-structured File system design, log-structured file system is used asynchronous not by the way of local update Newer mode.UBIFS (chaotic blocks mirror file system) is a kind of flash file system of a new generation in linux system System, as the succession of JFFS2, UBIFS mainly solve existing for JFFS2 file system mounting time is long, memory consumption is big, The problem of poor expandability, wear leveling processing capacity difference.Although UBIFS overcomes weakness existing for JFFS2 and because of UBIFS sheet The reliability of body obtains everybody affirmative, but in actual use, due to unit exception power down, the machine of asynchronous refresh The stability of system is unable to get guarantee, is susceptible to the case where failure of subregion carry is lost or occurred to critical file, and then cause The technical issues of system can not be run.
Invention content
The present invention provides a kind of data self-repairing method and device based on UBIFS is being actually used for solving In, due to unit exception power down, the stability of the mechanism of asynchronous refresh is unable to get guarantee, is susceptible to critical file The technical issues of losing or the case where subregion carry failure occur, and then causing system that can not run.
The present invention provides a kind of data self-repairing method based on UBIFS, including:
S1:The subregion carry detection data for obtaining UBIFS, determines the damage subregion of carry exception;
S2:The subregion of damage of carry exception wipe and carry again;
S3:The fileinfo to be verified in file verification list is obtained, by check code verification mode, to file to be verified It is verified, if verification failure, the file of verification failure is substituted for backup file corresponding with the file of verification failure.
Preferably, step S2 is specifically included:
S21:According to the subregion carry detection data of the UBIFS got, statistics has damaged the quantity of subregion, if having damaged The quantity of subregion is more than 1, then exits reparation, if the quantity for having damaged subregion is less than or equal to 1, thens follow the steps S22;
S22:Judgement has damaged the quantity of subregion, if the quantity for having damaged subregion is equal to 1, by traversing verification mode, Locking has damaged subregion, and wipe and carry again to having damaged subregion, establishes data reparation subregion, then gets and deposit The Backup Data that has damaged subregion damage before of the storage in non-damaging subregion, and write the Backup Data before subregion damages has been damaged Enter data and repair subregion, then execute step S3, if the quantity for having damaged subregion is less than 1, directly executes step S3.
Preferably, step S3 is specifically included:
S31:Cyclic redundancy check is added to preset file, obtains the file to be verified of tape verifying code structure;
S32:Preset file verification listing file will be written by the file attribute for traversing the file to be verified got, Obtain file verification list;
S33:The fileinfo to be verified in file verification list is obtained, by check code verification mode, to file verification File to be verified in list is verified one by one, if verification failure, the file of verification failure is substituted for and is failed with verification The corresponding backup file of file.
Preferably, further include before step S2:
S10:Release the mapping relations of UBI subregions and MTD subregions.
Preferably, the subregion carry detection data of UBIFS specifically includes:APP subregion carries data, BACKUP subregion carries Data and DATA subregion carry data.
The present invention provides a kind of data automatic repariring equipment based on UBIFS, including:
Subarea detecting unit, the subregion carry detection data for obtaining UBIFS determine the damage point of carry exception Area;
Divisional reconstruction unit, for the subregion of damage to carry exception wipe and carry again;
File verification unit, for obtaining the fileinfo to be verified in file verification list, by verifying code check side Formula verifies file to be verified, if verification failure, the file of verification failure is substituted for the file phase with verification failure Corresponding backup file.
Preferably, divisional reconstruction unit specifically includes:
Subregion counts subelement, and for the subregion carry detection data according to the UBIFS got, statistics has damaged subregion Quantity exit reparations if the quantity for having damaged subregion is more than 1, if having damaged the quantity of subregion less than or equal to 1, transport Row divisional reconstruction subelement;
Divisional reconstruction subelement, for judging that the quantity for having damaged subregion is led to if the quantity for having damaged subregion is equal to 1 Cross traversal verification mode, locking has damaged subregion, and wipe and carry again to having damaged subregion, establishes data reparation and divides Then area gets the Backup Data damaged before subregion damage being stored in non-damaging subregion, and will damage subregion damage Backup Data write-in data before bad repair subregion, then operating file verification unit, if the quantity for having damaged subregion is less than 1, Then direct operating file verification unit.
Preferably, file verification unit specifically includes:
Check code addition subelement obtains waiting for for tape verifying code structure for cyclic redundancy check to be added to preset file Verify file;
It verifies file and counts subelement, it is preset for that will be written by the file attribute for the file to be verified that traversal is got File verification listing file, obtain file verification list;
File verification subelement, for obtaining the fileinfo to be verified in file verification list, by verifying code check Mode verifies the file to be verified in file verification list one by one, if verification failure, the file of verification failure is replaced Change backup file corresponding with the file of verification failure into.
Preferably, further include:
Map lifting unit, the mapping relations for releasing UBI subregions and MTD subregions.
Preferably, the subregion carry detection data of UBIFS specifically includes:APP subregion carries data, BACKUP subregion carries Data and DATA subregion carry data.
As can be seen from the above technical solutions, the present invention has the following advantages:
The present invention provides a kind of data self-repairing method based on UBIFS, including:S1:The subregion for obtaining UBIFS is hung Detection data is carried, determines that carry has damaged subregion extremely;S2:The subregion of damage of carry exception is wiped and is hung again It carries;S3:The fileinfo to be verified in file verification list is obtained, by check code verification mode, file to be verified is carried out The file of verification failure is substituted for backup file corresponding with the file of verification failure by verification if verification failure.
The present invention detects by UBIFS subregions and passes through check code automatically and file verification list carries out the automatic school of file The combination tested, it is automatic to repair by the caused subregion of file system mounted exception or file corruption, solve in actual use, by In the reason of the unit exception power down, the stability of the mechanism of asynchronous refresh is unable to get guarantee, is susceptible to critical file loss Or there is the case where subregion carry failure, and then the technical issues of cause system that can not run, improve the reliability of system.
Description of the drawings
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention without having to pay creative labor, may be used also for those of ordinary skill in the art To obtain other attached drawings according to these attached drawings.
Fig. 1 is that a kind of flow of one embodiment of the data self-repairing method based on UBIFS provided by the invention is shown It is intended to;
Fig. 2 is a kind of flow of another embodiment of the data self-repairing method based on UBIFS provided by the invention Schematic diagram;
Fig. 3 is a kind of structural schematic diagram of the data automatic repariring equipment based on UBIFS provided in an embodiment of the present invention;
Fig. 4 is the data of the file to be verified in a kind of data self-repairing method based on UBIFS provided by the invention Structural schematic diagram.
Specific implementation mode
An embodiment of the present invention provides a kind of data self-repairing method and device based on UBIFS, for actually making In, due to unit exception power down, the stability of the mechanism of asynchronous refresh is unable to get guarantee, can UBIFS be gone out The technical issues of showing the case where failure of subregion carry is lost or occurred to critical file, and then causing system that can not run.
In order to make the invention's purpose, features and advantages of the invention more obvious and easy to understand, below in conjunction with the present invention Attached drawing in embodiment, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that disclosed below Embodiment be only a part of the embodiment of the present invention, and not all embodiment.Based on the embodiments of the present invention, this field All other embodiment that those of ordinary skill is obtained without making creative work, belongs to protection of the present invention Range.
Referring to Fig. 1, an embodiment of the present invention provides a kind of data self-repairing method based on UBIFS, including:
101:The subregion carry detection data for obtaining UBIFS determines that carry has damaged subregion extremely.
It should be noted that writing the subregion that script file determines carry exception according to the df orders of Linux first.
102:The subregion of damage of carry exception wipe and carry again.
It should be noted that related tool (mtd_erase) can be erasable to abnormal subregion in mtdutils by calling Except block content is wiped, ubi related tools (ubiattach/ubimkvol) is then called to re-establish subregion and carry, and And use the content of file backup recovery this subregion on other subregions.
103:The fileinfo to be verified in file verification list is obtained, by check code verification mode, to text to be verified Part is verified, if verification failure, the file of verification failure is substituted for backup text corresponding with the file of verification failure Part.
It should be noted that the tail portion of vital document need to be increased to the region for having this document data field CRC check value, obtain To the file to be verified containing cyclic redundancy check, self-test when for being switched on, wherein the data structure of file to be verified such as Fig. 4 institutes Show, then the file attribute information of file to be verified is registered in file verification listing file, and by this document check list File is saved in each user partition, obtains the fileinfo to be verified in file verification list, by verifying code check side Formula, to the file to be verified in file verification list verified one by one when find file CRC check can not by when, using standby Part file replaces current file;
In addition, can both adding in the tail portion in file data area for cyclic redundancy check, can also add the head in file data area Portion is not construed as limiting herein;
The embodiment of the present invention detects by UBIFS subregions and passes through check code automatically and file verification list carries out file The combination of automatic Verification, automatic to repair by the caused subregion of file system mounted exception or file corruption, solving actually makes In, due to unit exception power down, the stability of the mechanism of asynchronous refresh is unable to get guarantee, can UBIFS be gone out It the technical issues of showing the case where failure of subregion carry is lost or occurred to critical file, and then causing system that can not run, improves The reliability of system.
It is a kind of retouching in detail for one embodiment of the data self-repairing method based on UBIFS provided by the invention above It states, is below a kind of detailed description of another embodiment of the data self-repairing method based on UBIFS provided by the invention.
Referring to Fig. 2, an embodiment of the present invention provides a kind of data self-repairing method based on UBIFS, including:
201:The subregion carry detection data for obtaining UBIFS determines that carry has damaged subregion extremely.
It should be noted that writing the subregion that script file determines carry exception according to the df orders of Linux first.
202:Release the mapping relations of UBI subregions and MTD subregions.
203:According to the subregion carry detection data of the UBIFS got, statistics has damaged the quantity N of subregion, if having damaged The quantity N of bad subregion is more than 1, then exits reparation, if the quantity N for having damaged subregion is less than or equal to 1, thens follow the steps 204.
204:Judge that the quantity N for having damaged subregion thens follow the steps 205, if if the quantity for having damaged subregion is equal to 1 The quantity N for damaging subregion is less than 1, then directly executes step 206.
205:By traversing verification mode, locking has damaged subregion, and wipe and carry again to having damaged subregion, It establishes data and repairs subregion, then get the Backup Data damaged before subregion damage being stored in non-damaging subregion, and The Backup Data write-in data before subregion damages will have been damaged and repaired subregion, then executed step 206.
It should be noted that related tool (mtd_erase) can be erasable to abnormal subregion in mtdutils by calling Except block content is wiped, ubi related tools (ubiattach/ubimkvol) is then called to re-establish subregion and carry, and And use the content of file backup recovery this subregion on other subregions.
206:Cyclic redundancy check is added to preset file, obtains the file to be verified of tape verifying code structure.
It should be noted that the region for having this document data field CRC check value need to be increased in the tail portion of vital document, obtain To the file to be verified containing cyclic redundancy check, self-test when for being switched on, wherein the data structure of file to be verified such as Fig. 4 institutes Show;
In addition, can both adding in the tail portion in file data area for cyclic redundancy check, can also add the head in file data area Portion is not construed as limiting herein.
207:Preset file verification listing file will be written by the file attribute for traversing the file to be verified got, Obtain file verification list.
It should be noted that the file attribute information of file to be verified is registered in file verification listing file, and will This document check list file is saved in each user partition
208:The fileinfo to be verified in file verification list is obtained, by check code verification mode, to file verification File to be verified in list is verified one by one, if verification failure, the file of verification failure is substituted for and is failed with verification The corresponding backup file of file.
It should be noted that the fileinfo to be verified in file verification list is obtained, it is right by check code verification mode File to be verified in file verification list verified one by one when find file CRC check can not by when, using store its Backup file in his normal subregion replaces the file of current verification error.
209:Judge whether the file to be verified that currently verifies is the last one in file verification list, if so, It completes this file verification and file repairs backed off after random reparation;If it is not, then returning to step 208.
The embodiment of the present invention detects by UBIFS subregions and passes through check code automatically and file verification list carries out file The combination of automatic Verification, automatic to repair by the caused subregion of file system mounted exception or file corruption, solving actually makes In, due to unit exception power down, the stability of the mechanism of asynchronous refresh is unable to get guarantee, can UBIFS be gone out It the technical issues of showing the case where failure of subregion carry is lost or occurred to critical file, and then causing system that can not run, improves The reliability of system.
It is a kind of retouching in detail for one embodiment of the data self-repairing method based on UBIFS provided by the invention above It states, is below a kind of detailed description of one embodiment of the data automatic repariring equipment based on UBIFS provided by the invention.
Referring to Fig. 3, an embodiment of the present invention provides a kind of data automatic repariring equipment based on UBIFS, including:
Subarea detecting unit 301, the subregion carry detection data for obtaining UBIFS determine that carry has damaged point extremely Area;
Divisional reconstruction unit 302, for the subregion of damage to carry exception wipe and carry again;
File verification unit 303, for obtaining the fileinfo to be verified in file verification list, by verifying code check Mode verifies file to be verified, if verification failure, the file of verification failure is substituted for the file with verification failure Corresponding backup file.
Further, divisional reconstruction unit specifically includes:
Subregion counts subelement 3021, and for the subregion carry detection data according to the UBIFS got, statistics has been damaged The quantity of subregion exits reparation if the quantity for having damaged subregion is more than 1, if the quantity for having damaged subregion is less than or equal to 1, Then run divisional reconstruction subelement 3022;
Divisional reconstruction subelement 3022, the quantity for judging to have damaged subregion, if the quantity for having damaged subregion is equal to 1, Then by traversing verification mode, locking has damaged subregion, and wipe and carry again to having damaged subregion, establishes data and repaiies Then subdivision area gets the Backup Data damaged before subregion damage being stored in non-damaging subregion, and will damage point Backup Data write-in data before area's damage repair subregion, then run check code and add subelement 3031, if having damaged subregion Quantity be less than 1, then direct operating file check code adds subelement 3031.
Further, file verification unit specifically includes:
Check code addition subelement 3031 obtains tape verifying code structure for cyclic redundancy check to be added to preset file File to be verified;
It verifies file and counts subelement 3032, for will be written by traversing the file attribute of the file to be verified got Preset file verification listing file, obtains file verification list;
File verification subelement 3033 passes through check code for obtaining the fileinfo to be verified in file verification list Verification mode verifies the file to be verified in file verification list one by one, if verification failure, by the text of verification failure Part is substituted for backup file corresponding with the file of verification failure.
Further, further include:
Map lifting unit 304, the mapping relations for releasing UBI subregions and MTD subregions.
Further, the subregion carry detection data of UBIFS specifically includes:APP subregion carries data, BACKUP subregions are hung Carry data and DATA subregion carry data.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description, The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In several embodiments provided herein, it should be understood that disclosed system, device and method can be with It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit It divides, only a kind of division of logic function, formula that in actual implementation, there may be another division manner, such as multiple units or component It can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown or The mutual coupling, direct-coupling or communication connection discussed can be the indirect coupling by some interfaces, device or unit It closes or communicates to connect, can be electrical, machinery or other forms.
The unit illustrated as separating component may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, you can be located at a place, or may be distributed over multiple In network element.Some or all of unit therein can be selected according to the actual needs to realize the mesh of this embodiment scheme 's.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, it can also It is that each unit physically exists alone, it can also be during two or more units be integrated in one unit.Above-mentioned integrated list The form that hardware had both may be used in member is realized, can also be realized in the form of SFU software functional unit.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product When, it can be stored in a computer read/write memory medium.Based on this understanding, technical scheme of the present invention is substantially The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words It embodies, which is stored in a storage medium, including some instructions are used so that a computer Equipment (can be personal computer, server or the network equipment etc.) executes the complete of each embodiment the method for the present invention Portion or part steps.And storage medium above-mentioned includes:USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD etc. are various can store journey The medium of sequence code.
The above, the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although with reference to before Stating embodiment, invention is explained in detail, it will be understood by those of ordinary skill in the art that:It still can be to preceding The technical solution recorded in each embodiment is stated to modify or equivalent replacement of some of the technical features;And these Modification or replacement, the spirit and scope for various embodiments of the present invention technical solution that it does not separate the essence of the corresponding technical solution.

Claims (10)

1. a kind of data self-repairing method based on UBIFS, which is characterized in that including:
S1:The subregion carry detection data for obtaining UBIFS, determines the damage subregion of carry exception;
S2:The subregion of damage of carry exception wipe and carry again;
S3:The fileinfo to be verified stored in file verification list is obtained, by check code verification mode, to file to be verified It is verified, if verification failure, the file of verification failure is substituted for backup file corresponding with the file of verification failure.
2. a kind of data self-repairing method based on UBIFS according to claim 1, which is characterized in that step S2 is specific Including:
S21:According to the subregion carry detection data of the UBIFS got, statistics has damaged the quantity of subregion, if having damaged subregion Quantity be more than 1, then exit reparations, if having damaged the quantity of subregion less than or equal to 1, then follow the steps S22;
S22:Judge that the quantity for having damaged subregion, by traversing verification mode, locks if the quantity for having damaged subregion is equal to 1 It has damaged subregion, and wipe and carry again to having damaged subregion, established data and repair subregion, then get and be stored in The Backup Data damaged before subregion damage in non-damaging subregion, and number is written by the Backup Data before subregion damages has been damaged According to subregion is repaired, step S3 is then executed, if the quantity for having damaged subregion is less than 1, directly executes step S3.
3. a kind of data self-repairing method based on UBIFS according to claim 2, which is characterized in that step S3 tools Body includes:
S31:Cyclic redundancy check is added to preset file, obtains the file to be verified of tape verifying code structure;
S32:Preset file verification listing file will be written by the file attribute for traversing the file to be verified got, obtains File verification list;
S33:The fileinfo to be verified in file verification list is obtained, by check code verification mode, to file verification list In file to be verified verified one by one, if verification failure, will verification failure file be substituted for verification failure text The corresponding backup file of part.
4. a kind of data self-repairing method based on UBIFS according to claim 1, which is characterized in that step S2 it Before further include:
S10:Release the mapping relations of UBI subregions and MTD subregions.
5. a kind of data self-repairing method based on UBIFS according to claim 1, which is characterized in that the subregion of UBIFS Carry detection data specifically includes:APP subregion carries data, BACKUP subregion carry data and DATA subregion carry data.
6. a kind of data automatic repariring equipment based on UBIFS, which is characterized in that including:
Subarea detecting unit, the subregion carry detection data for obtaining UBIFS, determines the damage subregion of carry exception;
Divisional reconstruction unit, for the subregion of damage to carry exception wipe and carry again;
File verification unit, it is right by check code verification mode for obtaining the fileinfo to be verified in file verification list File to be verified is verified, if verification failure, the file of verification failure is substituted for corresponding with the file of verification failure Backup file.
7. a kind of data automatic repariring equipment based on UBIFS according to claim 6, which is characterized in that divisional reconstruction Unit specifically includes:
Subregion counts subelement, and for the subregion carry detection data according to the UBIFS got, statistics has damaged the number of subregion Amount exits reparation if the quantity for having damaged subregion is more than 1, if the quantity for having damaged subregion is less than or equal to 1, operation point Repair subelement in area;
Divisional reconstruction subelement, the quantity for judging to have damaged subregion, if the quantity for having damaged subregion is equal to 1, by time Go through verification mode, locking has damaged subregion, and wipe and carry again to having damaged subregion, establishes data reparation subregion, Then get be stored in non-damaging subregion damaged subregion damage before Backup Data, and will damage subregion damage before Backup Data write-in data repair subregion, then operating file verification unit, if the quantity for having damaged subregion is less than 1, directly Connect operating file verification unit.
8. a kind of data automatic repariring equipment based on UBIFS according to claim 7, which is characterized in that file verification Unit specifically includes:
Check code addition subelement obtains the to be verified of tape verifying code structure for cyclic redundancy check to be added to preset file File;
It verifies file and counts subelement, for preset text will be written by the file attribute for traversing the file to be verified got Part check list file, obtains file verification list;
File verification subelement, for obtaining the fileinfo to be verified in file verification list, by check code verification mode, File to be verified in file verification list is verified one by one, if verification failure, the file of verification failure is substituted for Backup file corresponding with the file of verification failure.
9. a kind of data self-repairing method based on UBIFS according to claim 6, which is characterized in that further include:
Map lifting unit, the mapping relations for releasing UBI subregions and MTD subregions.
10. a kind of data self-repairing method based on UBIFS according to claim 6, which is characterized in that point of UBIFS Area's carry detection data specifically includes:APP subregion carries data, BACKUP subregion carry data and DATA subregion carry data.
CN201810421109.0A 2018-05-04 2018-05-04 Automatic data restoration method and device based on UBIFS Active CN108646982B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810421109.0A CN108646982B (en) 2018-05-04 2018-05-04 Automatic data restoration method and device based on UBIFS

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810421109.0A CN108646982B (en) 2018-05-04 2018-05-04 Automatic data restoration method and device based on UBIFS

Publications (2)

Publication Number Publication Date
CN108646982A true CN108646982A (en) 2018-10-12
CN108646982B CN108646982B (en) 2020-11-10

Family

ID=63749476

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810421109.0A Active CN108646982B (en) 2018-05-04 2018-05-04 Automatic data restoration method and device based on UBIFS

Country Status (1)

Country Link
CN (1) CN108646982B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110737481A (en) * 2019-09-25 2020-01-31 浙江万胜智能科技股份有限公司 Starting method of embedded LINUX operating system based on multiple backup bootstrap programs
CN111026447A (en) * 2019-11-29 2020-04-17 惠州华阳通用电子有限公司 Automatic mounting method for UBI equipment
CN111209138A (en) * 2018-11-22 2020-05-29 浙江宇视科技有限公司 Operation and maintenance method and device of data storage system
CN111813748A (en) * 2020-07-10 2020-10-23 济南浪潮数据技术有限公司 File system mounting method and device, electronic equipment and storage medium
CN112328269A (en) * 2020-11-26 2021-02-05 广东小天才科技有限公司 Software mounting method of ubifs mirror image, intelligent device, electronic device, and storage medium
CN112527561A (en) * 2020-12-09 2021-03-19 广州技象科技有限公司 Data backup method and device based on Internet of things cloud storage
CN112804071A (en) * 2019-11-13 2021-05-14 中兴通讯股份有限公司 On-line upgrading method, upgrading file providing method, equipment and storage medium
CN113138653A (en) * 2021-04-14 2021-07-20 福州富昌维控电子科技有限公司 Power failure data protection method and terminal
CN117271225A (en) * 2023-11-20 2023-12-22 安擎计算机信息股份有限公司 FRU information backup method, FRU information backup device and FRU information backup server

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120166709A1 (en) * 2010-12-23 2012-06-28 Chun Han Sung File system of flash memory
CN107943414A (en) * 2017-10-16 2018-04-20 积成电子股份有限公司 The file partition of built-in Linux and data read-write method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120166709A1 (en) * 2010-12-23 2012-06-28 Chun Han Sung File system of flash memory
CN107943414A (en) * 2017-10-16 2018-04-20 积成电子股份有限公司 The file partition of built-in Linux and data read-write method

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111209138A (en) * 2018-11-22 2020-05-29 浙江宇视科技有限公司 Operation and maintenance method and device of data storage system
CN110737481A (en) * 2019-09-25 2020-01-31 浙江万胜智能科技股份有限公司 Starting method of embedded LINUX operating system based on multiple backup bootstrap programs
CN112804071A (en) * 2019-11-13 2021-05-14 中兴通讯股份有限公司 On-line upgrading method, upgrading file providing method, equipment and storage medium
CN112804071B (en) * 2019-11-13 2024-09-06 南京中兴新软件有限责任公司 Online upgrade method, upgrade file providing method, device and storage medium
CN111026447B (en) * 2019-11-29 2022-05-17 惠州华阳通用电子有限公司 Automatic mounting method for UBI equipment
CN111026447A (en) * 2019-11-29 2020-04-17 惠州华阳通用电子有限公司 Automatic mounting method for UBI equipment
CN111813748A (en) * 2020-07-10 2020-10-23 济南浪潮数据技术有限公司 File system mounting method and device, electronic equipment and storage medium
CN111813748B (en) * 2020-07-10 2022-06-07 济南浪潮数据技术有限公司 File system mounting method and device, electronic equipment and storage medium
CN112328269A (en) * 2020-11-26 2021-02-05 广东小天才科技有限公司 Software mounting method of ubifs mirror image, intelligent device, electronic device, and storage medium
CN112328269B (en) * 2020-11-26 2024-03-15 广东小天才科技有限公司 Method for mounting ubifs mirror image software, intelligent device, electronic device and storage medium
CN112527561A (en) * 2020-12-09 2021-03-19 广州技象科技有限公司 Data backup method and device based on Internet of things cloud storage
CN113138653A (en) * 2021-04-14 2021-07-20 福州富昌维控电子科技有限公司 Power failure data protection method and terminal
CN113138653B (en) * 2021-04-14 2021-10-15 福州富昌维控电子科技有限公司 Power failure data protection method and terminal
CN117271225A (en) * 2023-11-20 2023-12-22 安擎计算机信息股份有限公司 FRU information backup method, FRU information backup device and FRU information backup server
CN117271225B (en) * 2023-11-20 2024-02-06 安擎计算机信息股份有限公司 FRU information backup method, FRU information backup device and FRU information backup server

Also Published As

Publication number Publication date
CN108646982B (en) 2020-11-10

Similar Documents

Publication Publication Date Title
CN108646982A (en) A kind of data self-repairing method and device based on UBIFS
CN107943414B (en) File system partition and data read-write method of embedded Linux
CN102184129B (en) Fault tolerance method and device for disk arrays
CN103970481A (en) Method and device for reconstructing memory array
JP2017201519A5 (en)
CN111158599B (en) Method, device and equipment for writing data and storage medium
CN107678420B (en) engine data online storage method
CN101567211A (en) Method for improving usability of disk and disk array controller
CN101281452A (en) Method for automatically rebuilding hard disk
CN110795273B (en) RAID write hole protection method, system and storage medium
CN106155943B (en) A kind of method and device of the power down protection of dual control storage equipment
CN103534688A (en) Data recovery method, storage equipment and storage system
US12050778B2 (en) Data restoration method and related device
CN103034567B (en) Find and repair the apparatus and method of corrupt data
US20160210210A1 (en) Solid-state storage system, apparatus and method of writing data
CN112542203A (en) Bad block repairing method and device for nonvolatile memory, storage medium and terminal
CN115599607B (en) Data recovery method and related device of RAID array
CN108665941A (en) Row restorative procedure, device and NAND memory device based on nand flash memory
CN109947364A (en) A kind of method for storing real-time data in FLASH/EEPROM
CN111176886B (en) Database mode switching method and device and electronic equipment
CN107544868B (en) Data recovery method and device
US9087019B2 (en) Disk storage system with rebuild sequence and method of operation thereof
CN111209146B (en) RAID card aging test method and system
CN108038024B (en) Reliable static planning file system for NandFlash
CN107239357B (en) Offline transaction record storing method, device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant