CN1466030A - Method for preventing destroying file system in abnormal power cutting off - Google Patents
Method for preventing destroying file system in abnormal power cutting off Download PDFInfo
- Publication number
- CN1466030A CN1466030A CNA021234515A CN02123451A CN1466030A CN 1466030 A CN1466030 A CN 1466030A CN A021234515 A CNA021234515 A CN A021234515A CN 02123451 A CN02123451 A CN 02123451A CN 1466030 A CN1466030 A CN 1466030A
- Authority
- CN
- China
- Prior art keywords
- file system
- memory block
- abnormal power
- power cutting
- data
- 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
Links
Images
Landscapes
- Techniques For Improving Reliability Of Storages (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention is a saving method to protect file system when the computer is abnormally cut-off. It includes at least the following steps: separate the file system memory region into first memory region and second region, make cross backup on the files in the two memory regions, and the system makes cross access on the files in the two memory regions. The system, based on double-backup theory, through cross backup and access, realizes the protection of file system.
Description
Technical field
The present invention relates to the vandal-proof method of a kind of computer file system, the vandal-proof method of especially a kind of file system in abnormal power cutting off belongs to field of computer technology.
Background technology
Along with computing machine is further popularized, information stores, exchange all need the file of electronic format.And existing P C is when using the hard disk storage medium storage file, utilize file system to come file is carried out index, just there is a problem in this: system exception outage when to the fixed disk file write operation, that will cause fixed disk file structural failure or imperfect, even whole file system is destroyed, can not visit.Bring many inconvenience to people's work like this.
Summary of the invention
The object of the present invention is to provide a kind of method of preventing destroying file system in abnormal power cutting off; even can guarantee system exception outage when the file write operation; file system itself can be not destroyed yet, just can normally return to original state at revised file yet.
For this reason, the invention provides following technical scheme and realize above-mentioned purpose: a kind of method of preventing destroying file system in abnormal power cutting off, which comprises at least following steps: the file system storage section territory is divided into first memory block and second memory block, two memory block files intersection backups, system carries out interleaving access for the file of two memory blocks.
When file system starts, at first carry out file system integrity and judge, check whether file system is destroyed; If file system is destroyed, then visit the current file of another memory block; If file system does not have destroyed, then directly visit this memory block file.
First memory block and second memory block must have can distinguish the new and old sign of data, and for example regional accessed number of times is used to distinguish latest data; Must there be calibration tails first memory block and second memory block, and whether be used for judgment data complete.
Further, first memory block and second memory block must have can distinguish the new and old sign of data, according to sign, can carry out data check to new or old area respectively and detect, and the result is for being, and uses this zone, changes memory mark into this area identification; The detection check correctness then detects another regional verification correctness for not, for being, then uses this zone, is this area identification with memory mark; For not, then use this default data, zone, be this area identification with memory mark.
First memory block and second memory block are to keep 2 times of clear areas to hope storage data on hard disk, thereby carry out double copies.
The present invention utilizes file system double copies mode, if file system is destroyed, next time is when starting, visit complete not ruined file backup system last time, solved for a long time, the hard disc data storage is to the dependence of file system structure, prevent abnormal power-down for equipment such as will realizing hard disk, the file system collapse provides a good solution route.
Description of drawings
Fig. 1 is Stored Procedure figure of the present invention;
Fig. 2 reads process flow diagram for the present invention.
Embodiment
The present invention is the method for preventing destroying file system in abnormal power cutting off, which comprises at least following steps: the file system storage section territory is divided into first memory block and second memory block, two memory block files intersection backups, system carries out interleaving access for the file of two memory blocks.First memory block and second memory block are to keep 2 times of clear areas to hope storage data on hard disk, thereby carry out double copies.
When file system starts, at first carry out file system integrity and judge, check whether file system is destroyed; If file system is destroyed, then visit the current file of another memory block; If file system does not have destroyed, then directly visit this memory block file.
Particularly, an embedded Linux system for example as memory device, is to realize system's ease for use with hard disk, design to satisfy system and can shut down at any time; Guarantee system reliability, at no time can be destroyed, design whole linux system and start with read-only mode, the virtual ramdisk mode of internal memory is used in interim storage, so just can guarantee the integrality of hard disc data.But the configuration that some application are always arranged needs to preserve, the configuration of the newly-installed NIC address of picture, apply changes etc., preserve in order to realize data, one subregion must be set can be write, in order to the storage data, if but system exception outage when the fixed disk file write operation, that will cause fixed disk file structural failure or imperfect, even total system is destroyed, cisco unity malfunction.
For this reason, the present invention designs and has used two hard disk areas, after when starting, judging integrality, copies data is in ramdisk, be mapped as a catalogue, store and read and write as normal system, in the time will preserving data, copies data is to hard disk memory region from the ramdisk of corresponding catalogue mapping.The result has just realized the protection of abnormal power-down fixed disk file system.
Particularly, first memory block and second memory block comprise the number of operations recording areas respectively, are used to write down the accessed number of times of this regional record, distinguish the new and old of data; Whether complete first memory block and second memory block also comprise CRC test value recording areas respectively, be used to write down this zone through the mark of file system after CRC check, and whether system can directly complete by this marker for judgment regional document system.The back-up storage of data of the present invention as shown in Figure 1.Storage organization is as shown in table 1, keeps 2 times of clear areas to hope storage data on hard disk, is divided into first storage area and second storage area (double copies).Each zone all has two 32 figure places thereafter: the accessed number of times in this zone of expression; These regional data of expression comprise the CRC check value of access times.Table 1
First storage area | number | CRC?flag | Second storage area | number | CRC?flag |
Wherein: number is the access times in a district, two districts;
CRC flag is the CRC check value that get in a district, two.
Referring to Fig. 2, further, first memory block and second memory block comprise the number of operations recording areas respectively, are used to write down the accessed number of times in this zone, during the system read operation, can at first judge the size of this number of times, can carry out the CRC correctness for the big or little zone of number of times respectively and detect, the result is for being, and uses this zone, with memory mark is this area identification, and number of times is increased by one; Detecting the CRC correctness for not, then detect another regional CRC correctness, for being, then use this zone, is this area identification with memory mark; For not, then use this default data, zone, be this area identification with memory mark.
Above embodiment is only unrestricted in order to explanation the present invention, although the present invention is had been described in detail with reference to above preferred embodiment, those of ordinary skill in the art is to be understood that, can make amendment, be out of shape the present invention or be equal to replacement, and not breaking away from the spirit and scope of the present invention, it all should be encompassed in the middle of the claim scope of the present invention.
Claims (10)
1, a kind of method of preventing destroying file system in abnormal power cutting off, it is characterized in that: which comprises at least following steps: the file system storage section territory is divided into first memory block and second memory block, two memory block files intersection backups, system carries out interleaving access for the file of two memory blocks.
2, the method for preventing destroying file system in abnormal power cutting off according to claim 1 is characterized in that: when file system starts, at first carry out file system integrity and judge, check whether file system is destroyed; If file system is destroyed, then visit the current file of another memory block; If file system does not have destroyed, then directly visit this memory block file.
3, the method for preventing destroying file system in abnormal power cutting off according to claim 1 is characterized in that: first memory block and second memory block are provided with can distinguish the new and old sign of data.
4, the method for preventing destroying file system in abnormal power cutting off according to claim 1 is characterized in that: distinguish data new and old be designated the accessed number of times in zone.
5, the method for preventing destroying file system in abnormal power cutting off according to claim 1, it is characterized in that: first memory block and second memory block also comprise the data check district respectively, be used to write down this area data proof test value, whether system can directly complete by this marker for judgment regional document system.
6, the method for preventing destroying file system in abnormal power cutting off according to claim 5 is characterized in that: data check is a Cyclic Redundancy Check.
7, the method for preventing destroying file system in abnormal power cutting off according to claim 1, it is characterized in that: system at first according to the new and old sign of first memory block and second memory block, discerns, and the result is for being, then use this zone, change memory mark into this area identification; The detection check correctness then detects another regional verification correctness for not, for being, then uses this zone, is this area identification with memory mark; For not, then use this default data, zone, be this area identification with memory mark.
8, according to the method for claim 1 or 2 or 3 or 4 or 5 or 6 or 7 described preventing destroying file system in abnormal power cutting off, it is characterized in that: data check is the verification that comprises file or access times or partial data.
9, according to the method for claim 1 or 2 or 3 or 5 or 7 described preventing destroying file system in abnormal power cutting off, it is characterized in that: first memory block and second memory block are to keep 2 times of clear areas to hope storage data on hard disk, thereby carry out double copies.
10, according to the method for claim 1 or 2 or 3 or 5 or 7 described preventing destroying file system in abnormal power cutting off, it is characterized in that: first memory block adopts interim storage to use the internal memory virtual mode.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB021234515A CN100346266C (en) | 2002-06-28 | 2002-06-28 | Method for preventing destroying file system in abnormal power cutting off |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB021234515A CN100346266C (en) | 2002-06-28 | 2002-06-28 | Method for preventing destroying file system in abnormal power cutting off |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1466030A true CN1466030A (en) | 2004-01-07 |
CN100346266C CN100346266C (en) | 2007-10-31 |
Family
ID=34142329
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB021234515A Expired - Lifetime CN100346266C (en) | 2002-06-28 | 2002-06-28 | Method for preventing destroying file system in abnormal power cutting off |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN100346266C (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100377100C (en) * | 2004-09-13 | 2008-03-26 | 日本电气英富醍株式会社 | Recovery of duplex data system after power failure |
CN100437421C (en) * | 2005-10-21 | 2008-11-26 | 神基科技股份有限公司 | Method and system of preventing system damage |
CN102110032A (en) * | 2011-02-23 | 2011-06-29 | 杭州海康威视数字技术股份有限公司 | Method and device for improving reliability of configuration file |
US8274367B2 (en) | 2007-03-08 | 2012-09-25 | Fujitsu Limited | RFID system and RFID tag |
CN105310708A (en) * | 2015-09-30 | 2016-02-10 | 李光磊 | Whole body diagnostic device for bone surgical diseases |
CN105426268A (en) * | 2015-11-16 | 2016-03-23 | 北京四方继保自动化股份有限公司 | Method for preventing damage of file system during outage of relay protection device |
CN107643882A (en) * | 2017-09-29 | 2018-01-30 | 昂纳信息技术(深圳)有限公司 | The storage and restoration methods of a kind of data reliability, system and storage device |
CN109521960A (en) * | 2018-11-02 | 2019-03-26 | 格力电器(合肥)有限公司 | Data read-write method, device and system |
CN112256492A (en) * | 2020-12-22 | 2021-01-22 | 深圳市科力锐科技有限公司 | Block device backup method, device and storage medium |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
AU5449986A (en) * | 1985-03-25 | 1986-10-02 | Westinghouse Electric Corporation | Mass data recorder with dual memory system |
US6073220A (en) * | 1997-09-03 | 2000-06-06 | Duocor, Inc. | Apparatus and method for providing a transparent disk drive back-up |
US6260124B1 (en) * | 1998-08-13 | 2001-07-10 | International Business Machines Corporation | System and method for dynamically resynchronizing backup data |
JP2002123406A (en) * | 2000-10-17 | 2002-04-26 | Pfu Ltd | High reliability system |
-
2002
- 2002-06-28 CN CNB021234515A patent/CN100346266C/en not_active Expired - Lifetime
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100377100C (en) * | 2004-09-13 | 2008-03-26 | 日本电气英富醍株式会社 | Recovery of duplex data system after power failure |
US7724643B2 (en) | 2004-09-13 | 2010-05-25 | Nec Infrontia Corporation | Recovery of duplex data system after power failure |
CN100437421C (en) * | 2005-10-21 | 2008-11-26 | 神基科技股份有限公司 | Method and system of preventing system damage |
US8274367B2 (en) | 2007-03-08 | 2012-09-25 | Fujitsu Limited | RFID system and RFID tag |
CN102110032A (en) * | 2011-02-23 | 2011-06-29 | 杭州海康威视数字技术股份有限公司 | Method and device for improving reliability of configuration file |
CN105310708A (en) * | 2015-09-30 | 2016-02-10 | 李光磊 | Whole body diagnostic device for bone surgical diseases |
CN105426268A (en) * | 2015-11-16 | 2016-03-23 | 北京四方继保自动化股份有限公司 | Method for preventing damage of file system during outage of relay protection device |
CN105426268B (en) * | 2015-11-16 | 2018-06-26 | 北京四方继保自动化股份有限公司 | A kind of method of file system corruption when preventing the protective relaying device from powering off |
CN107643882A (en) * | 2017-09-29 | 2018-01-30 | 昂纳信息技术(深圳)有限公司 | The storage and restoration methods of a kind of data reliability, system and storage device |
CN109521960A (en) * | 2018-11-02 | 2019-03-26 | 格力电器(合肥)有限公司 | Data read-write method, device and system |
CN112256492A (en) * | 2020-12-22 | 2021-01-22 | 深圳市科力锐科技有限公司 | Block device backup method, device and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN100346266C (en) | 2007-10-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5089958A (en) | Fault tolerant computer backup system | |
CN103577121B (en) | A kind of highly reliable linear file access method based on Nand Flash | |
JP5162535B2 (en) | Method and memory system using memory system | |
JP3699166B2 (en) | Method for monitoring data loss in hierarchical data storage | |
US6766491B2 (en) | Parity mirroring between controllers in an active-active controller pair | |
EP0473301B1 (en) | System and method for determining the sector status in a disk data storage device | |
CN103309775B (en) | A kind of fault-tolerance approach of high-reliability disk array | |
US7174420B2 (en) | Transaction-safe FAT file system | |
CN102737715B (en) | For the method for power fail safeguard of data of NOR flash memory | |
CN101446921B (en) | Dynamic storage method of Flash memory | |
CN103577574A (en) | High-reliability linear file system based on nand flash | |
CN100346266C (en) | Method for preventing destroying file system in abnormal power cutting off | |
CN100530121C (en) | Snap backup method | |
CN101364218A (en) | Hard disk video recorder file systems and checking method thereof | |
EP0321251B1 (en) | Method for managing information concerning defects on storage media | |
CN104516792A (en) | Data backup method and device | |
CN101169705B (en) | Method for implementing file class mirror-image under multiple hard disk based on nude file system | |
CN104007936A (en) | Data access method and device | |
JPH02297770A (en) | Optical disk device | |
US20040128582A1 (en) | Method and apparatus for dynamic bad disk sector recovery | |
CN104318960A (en) | Method and device for repairing hard disk bad track | |
CN1317650C (en) | Method for automatically recovering BIOS based on hard disk protective space | |
WO2001031444A3 (en) | Method for preventing repeating non-recoverable read errors at same physical location on data storage media | |
CN114327292A (en) | File management method, system, electronic device and storage medium | |
JP2002318732A (en) | Device and method for processing file in case of recovery |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CX01 | Expiry of patent term | ||
CX01 | Expiry of patent term |
Granted publication date: 20071031 |