CN102831033A - Recovery method and recovery device for file system data - Google Patents

Recovery method and recovery device for file system data Download PDF

Info

Publication number
CN102831033A
CN102831033A CN2012102609975A CN201210260997A CN102831033A CN 102831033 A CN102831033 A CN 102831033A CN 2012102609975 A CN2012102609975 A CN 2012102609975A CN 201210260997 A CN201210260997 A CN 201210260997A CN 102831033 A CN102831033 A CN 102831033A
Authority
CN
China
Prior art keywords
ubi
equipment
file system
data
internal memory
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.)
Pending
Application number
CN2012102609975A
Other languages
Chinese (zh)
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.)
Shenzhen Coship Electronics Co Ltd
Original Assignee
Shenzhen Coship Electronics 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 Shenzhen Coship Electronics Co Ltd filed Critical Shenzhen Coship Electronics Co Ltd
Priority to CN2012102609975A priority Critical patent/CN102831033A/en
Publication of CN102831033A publication Critical patent/CN102831033A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention discloses a recovery method for file system data. The recovery method comprises the following steps: unloading data in a read-only partition of a UBI (Unsorted Block Image) device to an internal memory when the partition mounted with the UBI file system of the UBI device is read-only; separating the UBI device form an MTD (Memory Technology Device), and formatting the UBI device; re-associating the formatted UBI device to the MTD device, configuring the size of the partitions of the formatted UBI device, and mounting the UBI file system to acquire the reconfigured UBI device; storing the data inside the internal memory to the reconfigured UBI device, and recovering the data to the UBI file system. The purpose of the invention is to provide the recovery method and the recovery device for the file system data, which can recover the read-only UBI file system to a writable operation.

Description

The restoration methods of file system data and recovery device
Technical field
The present invention relates to field of computer technology, relate in particular to a kind of restoration methods and recovery device of file system data.
Background technology
Behind the linux-2.6.27; Kernel has added a kind of read-write novel Flash File System UBI (Unsorted Block Images); This document system is compared to traditional linux embedded file system; Comparatively superior performance is arranged, low like memory consumption, readwrite performance is high, the profit and loss ability of equalization is strong etc.But the UBI file system also has some defectives, most importantly file system maybe certain in particular cases the UBI filesystem information be damaged, the UBI file system becomes read-only, data can not be write.For example, under the state that the UBI file system data reaches capacity, abnormal power-down when write data just, it is read-only then might to cause the UBI file system to become, and makes troubles to the user.
Summary of the invention
Embodiment of the invention technical matters to be solved is, a kind of restoration methods and recovery device of file system data is provided, but can read-only UBI file system recovery be become write operation.
In order to solve the problems of the technologies described above, the embodiment of the invention provides a kind of restoration methods of file system data, comprising:
When the subregion of the UBI equipment that detects carry UBI file system when being read-only, with said be that data conversion storage in the subregion of read-only UBI equipment is in internal memory;
Said UBI equipment is separated from memory techniques equipment MTD, and said UBI equipment is formatd;
UBI equipment after the said format is associated with said MTD equipment again, disposes the partition size of the UBI equipment after the said format, and carry UBI file system, the UBI equipment after obtaining reshuffling;
Data in the said internal memory are deposited in the UBI equipment after said the reshuffling, so that said data are returned in the UBI file system.
Wherein, when said subregion when the UBI equipment that detects carry UBI file system is read-only, with said be data conversion storage in the subregion of read-only UBI equipment in the internal memory before, comprising:
Detect the subregion of the UBI equipment of carry UBI file system;
When the subregion of the UBI equipment that detects carry UBI file system when being read-only, carry out said with said be the step of data conversion storage in the internal memory in the subregion of read-only UBI equipment;
When the subregion of the UBI equipment that detects carry UBI file system for can write the time, continue to carry out the step of said detection UBI file system.
Wherein, when said subregion when the UBI equipment that detects carry UBI file system is read-only, in internal memory, comprise for the data conversion storage in the subregion of read-only UBI equipment said:
Detecting said internal memory can the space and the size of said UBI file system data;
When said internal memory free space is not less than said UBI file system data big or small, said UBI file system data is kept in the said internal memory;
When said internal memory free space during, data designated in the said UBI file system data is kept in the said internal memory less than said UBI file system data big or small.
Wherein, said said UBI equipment is separated from memory techniques equipment MTD, and before said UBI equipment formatd, comprising:
Detect the size of said UBI equipment;
According to the size of detected said UBI equipment, so that dispose the partition size of the UBI equipment after the said format.
Correspondingly, the embodiment of the invention also provides a kind of recovery device of file system data, comprising:
The unloading module is used for when the subregion of the UBI equipment that detects carry UBI file system when being read-only, with said be that data conversion storage in the subregion of read-only UBI equipment is in internal memory;
Formatting module separates said UBI equipment from memory techniques equipment MTD, and said UBI equipment is formatd;
Configuration module, the UBI equipment after the format that is used for said formatting module is obtained is associated with said MTD equipment again, disposes the partition size of the UBI equipment after the said format, and carry UBI file system, the UBI equipment after obtaining reshuffling;
Recover module, in the UBI equipment after being used for data with said internal memory and being deposited into said configuration module and reshuffling, so that said data are returned in the UBI file system.
Wherein, comprising:
First detection module is used to detect the subregion of the UBI equipment of carry UBI file system;
First execution module when subregion that is used for detecting the UBI equipment of carry UBI file system when first detection module is read-only, is carried out said unloading module and is the step of the data conversion storage in the subregion of read-only UBI equipment in the internal memory with said;
Second execution module, the subregion of UBI equipment that is used for detecting carry UBI file system when first detection module continues to carry out the step that said first detection module detects the UBI file system for can write the time.
Wherein, said unloading module comprises:
Second detection module is used to detect the size of said internal memory free space and said UBI file system data;
First judge module is used for when the detected said internal memory free space of said second detection module is not less than said UBI file system data big or small, said UBI file system data being kept in the said internal memory;
Second judge module is used for when the detected said internal memory free space of said second detection module during less than said UBI file system data big or small data designated in the said UBI file system data being kept in the said internal memory.
Wherein, comprising:
The 3rd detection module is used to detect the size of said UBI equipment, so that according to the size of the detected UBI equipment of said the 3rd detection module, disposes the partition size of the UBI equipment after the said format.
Embodiment of the present invention embodiment has following beneficial effect:
The restoration methods of the file system data of the embodiment of the invention is when the subregion of the UBI equipment that detects carry UBI file system when being read-only; With said be that data conversion storage in the subregion of read-only UBI equipment is in internal memory; Said UBI equipment is separated from memory techniques equipment MTD, and said UBI equipment is formatd; UBI equipment after the said format is associated with said MTD equipment again, disposes the partition size of the UBI equipment after the said format, and carry UBI file system, the UBI equipment after obtaining reshuffling; Data in the said internal memory are deposited in the UBI equipment after said the reshuffling, so that said data are returned in the UBI file system, but can read-only UBI file system recovery be become write operation.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art; To do to introduce simply to the accompanying drawing of required use in embodiment or the description of the Prior Art below; Obviously, the accompanying drawing in describing below only is some embodiments of the present invention, for those of ordinary skills; Under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the first embodiment process flow diagram of the restoration methods of file system data provided by the invention;
Fig. 2 is the second embodiment process flow diagram of the restoration methods of file system data provided by the invention;
Fig. 3 is the 3rd an embodiment process flow diagram of the restoration methods of file system data provided by the invention;
Fig. 4 is the 4th an embodiment process flow diagram of the restoration methods of file system data provided by the invention;
Fig. 5 is the first example structure synoptic diagram of the recovery device of file system data provided by the invention;
Fig. 6 is the second example structure synoptic diagram of the recovery device of file system data provided by the invention;
Fig. 7 is the structural representation of Fig. 5 transfer storing module;
Fig. 8 is the 4th an example structure synoptic diagram of the recovery device of file system data provided by the invention.
Embodiment
To combine the accompanying drawing in the embodiment of the invention below, the technical scheme in the embodiment of the invention is carried out clear, intactly description, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills are not making the every other embodiment that is obtained under the creative work prerequisite, all belong to the scope of the present invention's protection.
Seeing also Fig. 1, is the first embodiment process flow diagram of the restoration methods of file system data provided by the invention, and this method comprises:
S101, when the subregion of the UBI equipment that detects carry UBI file system when being read-only, with said be that data conversion storage in the subregion of read-only UBI equipment is in internal memory;
Concrete, before the S101 step, also comprise the subregion of the UBI equipment that detects carry UBI file system, whether the subregion that detects the UBI equipment of carry UBI file system is read-only.Concrete detection method is: write in this subregion of an empty file to UBI equipment, if write success, the subregion that then can judge this UBI equipment is for writing, if can't write, the subregion that then can judge this UBI equipment is read-only.When the subregion of the UBI equipment that detects carry UBI file system when being read-only; Then start the recovery flow process of UBI file system data; This document system data is reverted to and can write, at first, with said be that data conversion storage in the subregion of read-only UBI equipment is in internal memory.
Because UBI file system data size possibly exceed the size of data that current system available internal memory space can be preserved,, also can select to preserve the part significant data, rather than preserve all data according to the memory headroom size as improvement to this step.Therefore, when the subregion of the UBI equipment that detects carry UBI file system when being read-only, in internal memory, also comprise for the data conversion storage in the subregion of read-only UBI equipment among the step S101 said:
Detecting said internal memory can the space and the size of said UBI file system data;
When said internal memory free space is not less than said UBI file system data big or small, said UBI file system data is kept in the said internal memory;
When said internal memory free space during, data designated in the said UBI file system data is kept in the said internal memory less than said UBI file system data big or small.
Need to prove that significant data can be the preassigned data of user.For example, the user is when making this UBI file system, and the data that can preserve according to this subregion are carried out classifying importance to the influence of aspects such as system's operation, user's operation to data, and important file name is listed among the specific file a.When the preservation data were in internal memory, if Insufficient memory, the file of then only preserving the needs copy of describing in a file got final product.
Need to prove that it is that the read-only carry of also can selecting is what can write that the UBI file system can be selected carry, present embodiment selects carry for can write this situation to the UBI file system; When soon certain UBI equipment carry is the UBI file system that can write; Whether the UBI file system that then need detect carry is to write, and when detecting the UBI file system for can write the time, system normally moves; When detecting the UBI file system and can not write, get into the recovery pattern.
Further, when the UBI file system selects carry for can write the time, still; Occur after data are destroyed, can't the self-regeneration meeting taking the self-protection measure unusually in the UBI file system; For protecting the UBI file system data, do not allow Any user to carry out write operation, thereby become this read-only characteristic not by further destruction; At this moment, then get into the recovery pattern.S102 separates said UBI equipment from memory techniques equipment MTD, and said UBI equipment is formatd;
Concrete; When the subregion of the UBI equipment that detects carry UBI file system when being read-only; With said be data conversion storage in the subregion of read-only UBI equipment in the internal memory after because UBI equipment itself is to be associated in memory techniques equipment (Memory Technology Device is on MTD); Through the ubidetach order said UBI equipment is separated from MTD, and said UBI equipment is formatd through the ubiformat order.
S103 is associated with said MTD equipment again with the UBI equipment after the said format, disposes the partition size of the UBI equipment after the said format, and carry UBI file system, the UBI equipment after obtaining reshuffling;
Concrete; Said UBI equipment is being separated from memory techniques equipment MTD; And after said UBI equipment formatd; Through the ubiattach order UBI equipment after the said format is associated with said MTD equipment again, and passes through the partition size of the UBI equipment after the said format of ubimkvol command configuration, the partition size of the UBI equipment after the format of configuration is the partition size smaller or equal to the UBI equipment before the format.For example, the partition size of the UBI equipment after the format that can dispose is the system recovery size of this UBI equipment before, to avoid destroying the data of other subregions.Therefore, in step S102, said UBI equipment is separated from memory techniques equipment MTD, and before said UBI equipment formatd, comprising:
Detect the size of said UBI equipment;
According to the size of detected said UBI equipment, so that dispose the partition size of the UBI equipment after the said format.
And through carry UBI file system in the UBI equipment of mount order after format; As can be through the test catalogue being appointed as the mode of UBI file system; The test catalogue is associated with corresponding MTD equipment accomplishes carry, the UBI equipment after obtaining reshuffling.This is because under linux, will use file system all to need carry, and all corresponding device file of each file system is mounted to this corresponding file system equipment under certain catalogue, just can operate this document system through this catalogue.
S104 is deposited into the data in the said internal memory in the UBI equipment after said the reshuffling, so that said data are returned in the UBI file system.
Concrete; UBI equipment after the said format is associated with said MTD equipment again, is disposing the partition size of the UBI equipment after the said format, and carry UBI file system; Behind the UBI equipment after obtaining reshuffling; Through the mode of written document, just the data in the said internal memory are deposited in the UBI equipment after said the reshuffling, so that said data are returned in the UBI file system.
Seeing also Fig. 2, is the second embodiment process flow diagram of the restoration methods of file system data provided by the invention, and this method comprises:
S201, the subregion of the UBI equipment of detection carry UBI file system;
Concrete, detect the subregion of the UBI equipment of carry UBI file system, whether be read-only with the subregion of the UBI equipment of judging carry UBI file system.Concrete detection method is: write in this subregion of an empty file to UBI equipment, if write success, the subregion that then can judge this UBI equipment is for writing, if can't write, the subregion that then can judge this UBI equipment is read-only.
S202, when the subregion of the UBI equipment that detects carry UBI file system when being read-only, carry out said with said be the step of data conversion storage in the internal memory in the subregion of read-only UBI equipment;
Concrete; When the subregion of the UBI equipment that detects carry UBI file system when being read-only; Then start the recovery flow process of UBI file system data, this document system data reverted to and can write, carry out said with said be the step of data conversion storage in the internal memory in the subregion of read-only UBI equipment.
S203, when the subregion of the UBI equipment that detects carry UBI file system for can write the time, continue to carry out the step of said detection UBI file system.
Concrete, when the subregion of the UBI equipment that detects carry UBI file system for can write the time, continue to carry out the step of said detection UBI file system.
Identical among follow-up step S101 to S104 and first embodiment, repeat no more at this.
Seeing also Fig. 3, is the 3rd embodiment process flow diagram of the restoration methods of file system data provided by the invention, and this method comprises:
S301, detecting said internal memory can the space and the size of said UBI file system data;
Concrete; Because UBI file system data size possibly exceed the size of data that current system available internal memory space can be preserved; Therefore; Need detecting said internal memory can the space and the size of said UBI file system data, to judge whether and can deposit said UBI file system data in said internal memory.
S302 when said internal memory free space is not less than said UBI file system data big or small, is kept at said UBI file system data in the said internal memory;
Concrete, when said internal memory free space is not less than said UBI file system data big or small, at this moment, can said UBI file system data be kept in the said internal memory.
S303 when said internal memory free space during less than said UBI file system data big or small, is kept at data designated in the said UBI file system data in the said internal memory.
Concrete, when said internal memory free space during, then can't all data of said UBI file system be kept in the said internal memory less than said UBI file system data big or small.At this moment, can select to preserve the part significant data according to the memory headroom size, this significant data can be the preassigned data of user.For example, the user is when making this UBI file system, and the data that can preserve according to this subregion are carried out classifying importance to the influence of aspects such as system's operation, user's operation to data, and important file name is listed among the specific file a.When the preservation data were in internal memory, if Insufficient memory, the file of then only preserving the needs copy of describing in a file got final product.
Identical among follow-up step S102 to S104 and first embodiment, repeat no more at this.
Seeing also Fig. 4, is the 4th embodiment process flow diagram of the restoration methods of file system data provided by the invention, and this method comprises:
S401, when the subregion of the UBI equipment that detects carry UBI file system when being read-only, with said be that data conversion storage in the subregion of read-only UBI equipment is in internal memory;
S402 detects the size of said UBI equipment;
Concrete, when the subregion of the UBI equipment that detects carry UBI file system when being read-only, detect the size of said UBI equipment, so that dispose the partition size of the UBI equipment after the said format.
S403 is according to the size of detected said UBI equipment, so that dispose the partition size of the UBI equipment after the said format.
Concrete; Said UBI equipment is being separated from memory techniques equipment MTD; And after said UBI equipment formatd, the UBI equipment after the said format is associated with said MTD equipment again after, need be according to the size of detected said UBI equipment; So that dispose the partition size of the UBI equipment after the said format, the partition size of the UBI equipment after the format of configuration is the size smaller or equal to the UBI equipment before the format.For example, the partition size of the UBI equipment after the format that can dispose is the system recovery size of this UBI equipment before, to avoid destroying the data of other subregions.
Identical among follow-up step S102 to S104 and first embodiment, repeat no more at this.
The restoration methods of the file system data of embodiment of the present invention embodiment; When the subregion of the UBI equipment that detects carry UBI file system when being read-only, with said be data conversion storage in the subregion of read-only UBI equipment in internal memory, said UBI equipment is separated from memory techniques equipment MTD; And said UBI equipment formatd; UBI equipment after the said format is associated with said MTD equipment again, disposes the partition size of the UBI equipment after the said format, and carry UBI file system; UBI equipment after obtaining reshuffling; Data in the said internal memory are deposited in the UBI equipment after said the reshuffling, so that said data are returned in the UBI file system, but can read-only UBI file system recovery be become write operation.
Seeing also Fig. 5, is the first example structure synoptic diagram of the recovery device of file system data provided by the invention, and the recovery dress of this document system data comprises:
Unloading module 40 is used for when the subregion of the UBI equipment that detects carry UBI file system when being read-only, with said be that data conversion storage in the subregion of read-only UBI equipment is in internal memory;
Concrete; When the subregion of the UBI equipment that detects carry UBI file system when being read-only; Through unloading module 40 with said be that data conversion storage in the subregion of read-only UBI equipment is in internal memory; So that start the recovery flow process of UBI file system data, this UBI file system data reverted to and can write.
Because UBI file system data size possibly exceed the size of data that current system available internal memory space can be preserved; As improvement to this step; Unloading module 40 also can according to the memory headroom size said be to select to preserve the part significant data in the data in the subregion of read-only UBI equipment, rather than preserve all data.
Formatting module 60 separates said UBI equipment from memory techniques equipment MTD, and said UBI equipment is formatd;
Concrete; Said unloading module 40 with said be data conversion storage in the subregion of read-only UBI equipment in the internal memory after; Because UBI equipment itself is associated on the MTD equipment; Through the ubidetach order said UBI equipment is separated from MTD, and said UBI equipment is separated from memory techniques equipment MTD, and said UBI equipment is formatd through formatting module 60.
Configuration module 70, the UBI equipment after the format that is used for said formatting module 60 is obtained is associated with said MTD equipment again, disposes the partition size of the UBI equipment after the said format, and carry UBI file system, the UBI equipment after obtaining reshuffling;
Concrete; At said formatting module 60 said UBI equipment is separated from memory techniques equipment MTD; And after said UBI equipment formatd, the UBI equipment after the format that said formatting module 60 is obtained through configuration module 70 was associated with said MTD equipment again, disposed the partition size of the UBI equipment after the said format; And carry UBI file system; UBI equipment after obtaining reshuffling, wherein, the partition size of the UBI equipment after the format of configuration is the partition size smaller or equal to the UBI equipment before the format.The partition size of the UBI equipment after the format that for example, can dispose is the system recovery size of this UBI equipment before.
Recover module 80, in the UBI equipment after being used for data with said internal memory and being deposited into said configuration module and reshuffling, so that said data are returned in the UBI file system.
Concrete, behind the UBI equipment after said configuration module 70 obtains reshuffling, through recovering in the UBI equipment after module 80 is deposited into the data in the said internal memory said configuration module and reshuffles, so that said data are returned in the UBI file system.
See also Fig. 6; It is the second example structure synoptic diagram of the recovery device of file system data provided by the invention; As shown in Figure 6; The recovery device of said file system data comprises among above-mentioned Fig. 5: unloading module 40, formatting module 60, configuration module 70, recovery module 80, and in the embodiment of the invention, the recovery device of said file system data further comprises:
First detection module 10 is used to detect the subregion of the UBI equipment of carry UBI file system;
Whether concrete, first detection module 10 is used to detect the subregion of the UBI equipment of carry UBI file system, be read-only with the subregion of the UBI equipment of judging carry UBI file system.Concrete detection method is: write in this subregion of an empty file to UBI equipment, if write success, the subregion that then can judge this UBI equipment is for writing, if can't write, the subregion that then can judge this UBI equipment is read-only.
First execution module 20 when the subregion that is used for detecting the UBI equipment of carry UBI file system when first detection module 10 is read-only, is carried out said unloading module 40 and is the step of the data conversion storage in the subregion of read-only UBI equipment in the internal memory with said;
Concrete, when the subregion that detects the UBI equipment of carry UBI file system when first detection module 10 is read-only, through first execution module 20 carry out said unloading module 40 with said be the step of data conversion storage in the internal memory in the subregion of read-only UBI equipment.
Second execution module 30, the subregion of UBI equipment that is used for detecting carry UBI file system when first detection module 10 continues to carry out the step that said first detection module detects the UBI file system for can write the time.
Concrete, the subregion of UBI equipment that detects carry UBI file system when first detection module 10 continues to carry out the step of said detection UBI file system for can write the time through second execution module 30.
Seeing also Fig. 7, is the structural representation of Fig. 5 transfer storing module, comprising:
Second detection module 401 is used to detect the size of said internal memory free space and said UBI file system data;
Concrete; Because UBI file system data size possibly exceed the size of data that current system available internal memory space can be preserved; Therefore; Detecting said internal memory through second detection module 401 can the space and the size of said UBI file system data, to judge whether and can deposit said UBI file system data in said internal memory.
First judge module 402 is used for when said second detection module, 401 detected said internal memory free spaces are not less than said UBI file system data big or small, said UBI file system data being kept in the said internal memory;
Concrete; When said second detection module, 401 detected said internal memory free spaces are not less than said UBI file system data big or small; Can said UBI file system data be kept in the said internal memory, said UBI file system data be kept in the said internal memory through first judge module 402.
Second judge module 403 is used for when the detected said internal memory free space of said second detection module during less than said UBI file system data big or small data designated in the said UBI file system data being kept in the said internal memory.
Concrete, when said second detection module, 401 detected said internal memory free spaces during, then can't all data of said UBI file system be kept in the said internal memory less than said UBI file system data big or small.At this moment, can select to preserve the part significant data according to said memory headroom size, this significant data can be the preassigned data of user, through second judge module 403 data designated in the said UBI file system data is kept in the said internal memory.
See also Fig. 8; It is the 4th example structure synoptic diagram of the recovery device of file system data provided by the invention; As shown in Figure 8; The recovery device of said file system data comprises among above-mentioned Fig. 5: unloading module 40, formatting module 60, configuration module 70, recovery module 80, and in the embodiment of the invention, the recovery device of said file system data further comprises:
The 3rd detection module 50 is used to detect the size of said UBI equipment, so that according to the size of said the 3rd detection module 50 detected UBI equipment, disposes the partition size of the UBI equipment after the said format.
Concrete; When the subregion that detects the UBI equipment of carry UBI file system when first detection module 10 is read-only; Need further to detect the size of said UBI equipment; Detect the size of said UBI equipment through the 3rd detection module 50,, dispose the partition size of the UBI equipment after the said format so that the UBI equipment after the format that configuration module 70 obtains said formatting module 60 is associated with said MTD equipment again.
When the subregion of the UBI equipment of the embodiment of the invention through detecting carry UBI file system is read-only; With said be that data conversion storage in the subregion of read-only UBI equipment is in internal memory; Said UBI equipment is separated from memory techniques equipment MTD, and said UBI equipment is formatd, the UBI equipment after the said format is associated with said MTD equipment again; Dispose the partition size of the UBI equipment after the said format; And carry UBI file system, the UBI equipment after obtaining reshuffling is deposited into the data in the said internal memory in the UBI equipment after said the reshuffling; So that said data are returned in the UBI file system, but can read-only UBI file system recovery be become write operation.
One of ordinary skill in the art will appreciate that all or part of flow process that realizes in the foregoing description method; Be to instruct relevant hardware to accomplish through computer program; Described program can be stored in the computer read/write memory medium; This program can comprise the flow process like the embodiment of above-mentioned each side method when carrying out.Wherein, described storage medium can be magnetic disc, CD, read-only storage memory body (Read-Only Memory, ROM) or at random store memory body (Random Access Memory, RAM) etc.
Above disclosedly be merely a kind of preferred embodiment of the present invention; Certainly can not limit the present invention's interest field with this; One of ordinary skill in the art will appreciate that all or part of flow process that realizes the foregoing description; And, still belong to the scope that invention is contained according to the equivalent variations that claim of the present invention is done.

Claims (8)

1. the restoration methods of a file system data is characterized in that, comprising:
When the subregion of the UBI equipment that detects carry UBI file system when being read-only, with said be that data conversion storage in the subregion of read-only UBI equipment is in internal memory;
Said UBI equipment is separated from memory techniques equipment MTD, and said UBI equipment is formatd;
UBI equipment after the said format is associated with said MTD equipment again, disposes the partition size of the UBI equipment after the said format, and carry UBI file system, the UBI equipment after obtaining reshuffling;
Data in the said internal memory are deposited in the UBI equipment after said the reshuffling, so that said data are returned in the UBI file system.
2. the method for claim 1 is characterized in that, when said subregion when the UBI equipment that detects carry UBI file system is read-only, with said be data conversion storage in the subregion of read-only UBI equipment in the internal memory before, comprising:
Detect the subregion of the UBI equipment of carry UBI file system;
When the subregion of the UBI equipment that detects carry UBI file system when being read-only, carry out said with said be the step of data conversion storage in the internal memory in the subregion of read-only UBI equipment;
When the subregion of the UBI equipment that detects carry UBI file system for can write the time, continue to carry out the step of said detection UBI file system.
3. the method for claim 1 is characterized in that, when said subregion when the UBI equipment that detects carry UBI file system is read-only, in internal memory, comprises for the data conversion storage in the subregion of read-only UBI equipment said:
Detecting said internal memory can the space and the size of said UBI file system data;
When said internal memory free space is not less than said UBI file system data big or small, said UBI file system data is kept in the said internal memory;
When said internal memory free space during, data designated in the said UBI file system data is kept in the said internal memory less than said UBI file system data big or small.
4. the method for claim 1 is characterized in that, said said UBI equipment is separated from memory techniques equipment MTD, and before said UBI equipment formatd, comprising:
Detect the size of said UBI equipment;
According to the size of detected said UBI equipment, so that dispose the partition size of the UBI equipment after the said format.
5. the recovery device of a file system data is characterized in that, comprising:
The unloading module is used for when the subregion of the UBI equipment that detects carry UBI file system when being read-only, with said be that data conversion storage in the subregion of read-only UBI equipment is in internal memory;
Formatting module separates said UBI equipment from memory techniques equipment MTD, and said UBI equipment is formatd;
Configuration module, the UBI equipment after the format that is used for said formatting module is obtained is associated with said MTD equipment again, disposes the partition size of the UBI equipment after the said format, and carry UBI file system, the UBI equipment after obtaining reshuffling;
Recover module, in the UBI equipment after being used for data with said internal memory and being deposited into said configuration module and reshuffling, so that said data are returned in the UBI file system.
6. device as claimed in claim 5 is characterized in that, comprising:
First detection module is used to detect the subregion of the UBI equipment of carry UBI file system;
First execution module when subregion that is used for detecting the UBI equipment of carry UBI file system when first detection module is read-only, is carried out said unloading module and is the step of the data conversion storage in the subregion of read-only UBI equipment in the internal memory with said;
Second execution module, the subregion of UBI equipment that is used for detecting carry UBI file system when first detection module continues to carry out the step that said first detection module detects the UBI file system for can write the time.
7. device as claimed in claim 5 is characterized in that, said unloading module comprises:
Second detection module is used to detect the size of said internal memory free space and said UBI file system data;
First judge module is used for when the detected said internal memory free space of said second detection module is not less than said UBI file system data big or small, said UBI file system data being kept in the said internal memory;
Second judge module is used for when the detected said internal memory free space of said second detection module during less than said UBI file system data big or small data designated in the said UBI file system data being kept in the said internal memory.
8. device as claimed in claim 5 is characterized in that, comprising:
The 3rd detection module is used to detect the size of said UBI equipment, so that according to the size of the detected UBI equipment of said the 3rd detection module, disposes the partition size of the UBI equipment after the said format.
CN2012102609975A 2012-07-26 2012-07-26 Recovery method and recovery device for file system data Pending CN102831033A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2012102609975A CN102831033A (en) 2012-07-26 2012-07-26 Recovery method and recovery device for file system data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2012102609975A CN102831033A (en) 2012-07-26 2012-07-26 Recovery method and recovery device for file system data

Publications (1)

Publication Number Publication Date
CN102831033A true CN102831033A (en) 2012-12-19

Family

ID=47334182

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2012102609975A Pending CN102831033A (en) 2012-07-26 2012-07-26 Recovery method and recovery device for file system data

Country Status (1)

Country Link
CN (1) CN102831033A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103761170A (en) * 2014-01-27 2014-04-30 北京奇虎科技有限公司 System file recovery method, device and system
CN105138433A (en) * 2015-09-30 2015-12-09 华立仪表集团股份有限公司 Backup method for UBIFS file system in embedded type Linux operating system
CN105955722A (en) * 2016-04-20 2016-09-21 合肥师范学院 UBI device partition rapid loading method in embedded system
CN106598487A (en) * 2016-11-21 2017-04-26 深圳市中博睿存科技有限公司 Data destruction method and device
CN108038035A (en) * 2017-12-08 2018-05-15 郑州云海信息技术有限公司 A kind of detection method and relevant apparatus of flash reading and writing state
CN111026447A (en) * 2019-11-29 2020-04-17 惠州华阳通用电子有限公司 Automatic mounting method for UBI equipment
CN117130541A (en) * 2023-03-02 2023-11-28 荣耀终端有限公司 Storage space configuration method and related equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101013397A (en) * 2007-02-08 2007-08-08 深圳万利达电子工业有限公司 Method for implementing nandflsh file system
US20110145486A1 (en) * 2009-12-16 2011-06-16 Tsutomu Owa Memory management device and method
CN102298555A (en) * 2011-08-22 2011-12-28 宜兴市华星特种陶瓷科技有限公司 Modular flash management system based on Not AND (NAND) technology
CN102495812A (en) * 2011-12-15 2012-06-13 江苏中科梦兰电子科技有限公司 Hard disk data protection and recovery method of Linux platform

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101013397A (en) * 2007-02-08 2007-08-08 深圳万利达电子工业有限公司 Method for implementing nandflsh file system
US20110145486A1 (en) * 2009-12-16 2011-06-16 Tsutomu Owa Memory management device and method
CN102298555A (en) * 2011-08-22 2011-12-28 宜兴市华星特种陶瓷科技有限公司 Modular flash management system based on Not AND (NAND) technology
CN102495812A (en) * 2011-12-15 2012-06-13 江苏中科梦兰电子科技有限公司 Hard disk data protection and recovery method of Linux platform

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103761170A (en) * 2014-01-27 2014-04-30 北京奇虎科技有限公司 System file recovery method, device and system
CN103761170B (en) * 2014-01-27 2017-04-12 北京奇虎科技有限公司 system file recovery method, device and system
CN105138433A (en) * 2015-09-30 2015-12-09 华立仪表集团股份有限公司 Backup method for UBIFS file system in embedded type Linux operating system
CN105955722A (en) * 2016-04-20 2016-09-21 合肥师范学院 UBI device partition rapid loading method in embedded system
CN106598487A (en) * 2016-11-21 2017-04-26 深圳市中博睿存科技有限公司 Data destruction method and device
CN108038035A (en) * 2017-12-08 2018-05-15 郑州云海信息技术有限公司 A kind of detection method and relevant apparatus of flash reading and writing state
CN111026447A (en) * 2019-11-29 2020-04-17 惠州华阳通用电子有限公司 Automatic mounting method for UBI equipment
CN111026447B (en) * 2019-11-29 2022-05-17 惠州华阳通用电子有限公司 Automatic mounting method for UBI equipment
CN117130541A (en) * 2023-03-02 2023-11-28 荣耀终端有限公司 Storage space configuration method and related equipment
CN117130541B (en) * 2023-03-02 2024-06-04 荣耀终端有限公司 Storage space configuration method and related equipment

Similar Documents

Publication Publication Date Title
CN102831033A (en) Recovery method and recovery device for file system data
CN102063943B (en) Nand flash memory parameter automatic detecting system
CN104077197B (en) System recovery method, device, solid state hard disc and electronic equipment
KR101570179B1 (en) - Cache synchronization method and system for fast power-off
US20080140736A1 (en) Hardware-Initiated Automated Back-Up of Data from an Internal Memory of a Hand-Portable Electronic Device
CN102314383B (en) Failure recovery method and device for data index
US20110119662A1 (en) Method for updating firmware of embedded system
CN110399310A (en) A kind of recovery method and device of memory space
CN104461390A (en) Method and device for writing data into imbricate magnetic recording SMR hard disk
JP2012503250A5 (en)
CN108874309B (en) Method and device for managing physical blocks in solid state disk
CN101963891A (en) Method and device for data storage and processing, solid-state drive system and data processing system
CN103279406A (en) Method and device for isolating internal memories
CN103955433A (en) Shingled magnetic recording hard disk, and method and device for writing data in shingled magnetic recording hard disk
CN103914397B (en) Flash memory device and its management method
CN106293782A (en) A kind of method for upgrading system and terminal
CN103605484A (en) Data storage method and storage server
CN109923514A (en) Storage operation to data
CN102135943B (en) Storing and accessing method of flash memory data and device thereof
US20180074731A1 (en) Tape backup and restore in a disk storage environment with intelligent data placement
CN104932830B (en) Information processing method and electronic equipment
CN203260027U (en) Backup device and data backup system
US8990528B2 (en) Method for fast format of a fully allocated volume when copied from a space efficient volume
CN103617053A (en) Method and device for upgrading software
CN105653208A (en) Data storage system and data read-write method based on same

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20121219