CN107894932A - The method and its system of data consistency before and after holding system reboot - Google Patents

The method and its system of data consistency before and after holding system reboot Download PDF

Info

Publication number
CN107894932A
CN107894932A CN201610864064.5A CN201610864064A CN107894932A CN 107894932 A CN107894932 A CN 107894932A CN 201610864064 A CN201610864064 A CN 201610864064A CN 107894932 A CN107894932 A CN 107894932A
Authority
CN
China
Prior art keywords
block device
internal memory
memory
physical memory
memory block
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
CN201610864064.5A
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.)
Xiamen Yaxon Networks Co Ltd
Original Assignee
Xiamen Yaxon Networks 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 Xiamen Yaxon Networks Co Ltd filed Critical Xiamen Yaxon Networks Co Ltd
Priority to CN201610864064.5A priority Critical patent/CN107894932A/en
Publication of CN107894932A publication Critical patent/CN107894932A/en
Pending legal-status Critical Current

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/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1441Resetting or repowering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Abstract

The invention discloses the method and its system of data consistency before and after a kind of holding system reboot, method includes:The total physical memory of system is divided into the reserved physical memory and system control internal memory of default size;System control internal memory is dimensioned to boot kernel parameter;Using the reserved physical memory as internal memory block device, and write corresponding block device driver;After system restarting, block device driver corresponding to the reserved physical memory is loaded;If the internal memory block device formats the internal memory block device without formatting;The memory block equipment is mounted to default catalogue.By setting reserved physical memory, some interim useful informations can be safely saved on internal memory, without frequently wiping other external memory devices;Feasible system restarts the uniformity of front and rear internal storage data, and improves the flexibility to message file operation.

Description

The method and its system of data consistency before and after holding system reboot
Technical field
The present invention relates to a kind of side of data consistency before and after technical field of data storage, more particularly to holding system reboot Method and its system.
Background technology
Current many embedded products are required for preserving some temporary information files, or timing is sent to message file Remote server.The save location of these temporary files is probably on impermanent memory memory or permanent memory memory. Message file is stored on impermanent memory memory and some drawbacks be present, if software watchdog, which resets, causes system reboot Or these message files can be lost during due to other reasonses system reboot.Message file is stored on permanent memory memory There is also some drawbacks, it is necessary to frequent flash memory part, so as to shorten the service life of memory device.In order to solve above disadvantage End, some embedded technology schemes are used in system initialisation phase, such as Chinese patent in Publication No. CN102193847A Open file, reserved memory will not be included into internal storage management system, then by directly operating and not reserved by system administration The physical address deposited enters row information storage, but this scheme has the ineffective activity of operation, it has not been convenient to the operation to message file.
The content of the invention
The technical problems to be solved by the invention are:It is proposed it is a kind of keep system reboot before and after data consistency method and Its system, prevent from causing file to be lost due to system, and improve the flexibility to message file operation.
In order to solve the above-mentioned technical problem, the technical solution adopted by the present invention is:One kind keeps data before and after system reboot The method of uniformity, including:
The total physical memory of system is divided into the reserved physical memory and system control internal memory of default size;
System control internal memory is dimensioned to boot kernel parameter;
Using the reserved physical memory as internal memory block device, and write corresponding block device driver;
After system restarting, block device driver corresponding to the reserved physical memory is loaded;
If the internal memory block device formats the internal memory block device without formatting;
The memory block equipment is mounted to default catalogue.
The invention further relates to a kind of system of data consistency before and after holding system reboot, including:
Division module, for being divided into the total physical memory of system in the reserved physical memory and system control of default size Deposit;
Setup module, for system control internal memory to be dimensioned into boot kernel parameter;
Module is write, for using the reserved physical memory as internal memory block device, and writes corresponding Block Device Driver Program;
Load-on module, after being restarted for system, load block device driver corresponding to the reserved physical memory;
Formatting module, it is used for, if the internal memory block device formats the internal memory block device without formatting;
Carry module, for the memory block equipment to be mounted into default catalogue.
The beneficial effects of the present invention are:, can be some interim useful information safety by setting reserved physical memory Ground is saved on internal memory, and without frequently wiping other external memory devices, the performance and can that can improve system extends outside The service life of memory device;Meanwhile memory block equipment corresponding to reserved physical memory is mounted to assigned catalogue, i.e., not by File system is established on the internal memory block device of system control, both message file can be temporarily held in volatile dynamic storage The message file before once system reboot can above be retained after system reboot again not lose, and improve and message file is grasped The flexibility of work;Preservation message file is applicable not only to apply also for preserving other interim vital documents.
Brief description of the drawings
Fig. 1 is the method flow diagram of data consistency before and after a kind of holding system reboot of the present invention;
Fig. 2 is the method flow diagram of the embodiment of the present invention one;
Fig. 3 be the present invention it is a kind of keep system reboot before and after data consistency system structural representation;
Fig. 4 is the system structure diagram of the embodiment of the present invention two.
Label declaration:
1st, division module;2nd, setup module;3rd, module is write;4th, load-on module;5th, formatting module;6th, carry module; 7th, preserving module.
Embodiment
To describe the technology contents of the present invention, the objects and the effects in detail, below in conjunction with embodiment and coordinate attached Figure is explained in detail.
The design of most critical of the present invention is:Reserved physical memory is set, and is mounted to default catalogue.
Referring to Fig. 1, it is a kind of keep system reboot before and after data consistency method, including:
The total physical memory of system is divided into the reserved physical memory and system control internal memory of default size;
System control internal memory is dimensioned to boot kernel parameter;
Using the reserved physical memory as internal memory block device, and write corresponding block device driver;
After system restarting, block device driver corresponding to the reserved physical memory is loaded;
If the internal memory block device formats the internal memory block device without formatting;
The memory block equipment is mounted to default catalogue.
It was found from foregoing description, the beneficial effects of the present invention are:By setting reserved physical memory, some can be faced When useful information be safely saved on internal memory, without frequently wiping other external memory devices;Before feasible system is restarted The uniformity of internal storage data afterwards, and improve the flexibility to message file operation.
Further, after described " the memory block equipment is mounted into default catalogue ", further comprise:
Message file is saved in the default catalogue.
Seen from the above description, message file is saved in mount directory, after system reboot, in mount directory it can be seen that Existing complete file before restarting.
Further, the system is Linux system.
Refer to Fig. 3, the present invention also proposes a kind of system for keeping data consistency before and after system reboot, including:
Division module, for being divided into the total physical memory of system in the reserved physical memory and system control of default size Deposit;
Setup module, for system control internal memory to be dimensioned into boot kernel parameter;
Module is write, for using the reserved physical memory as internal memory block device, and writes corresponding Block Device Driver Program;
Load-on module, after being restarted for system, load block device driver corresponding to the reserved physical memory;
Formatting module, it is used for, if the internal memory block device formats the internal memory block device without formatting;
Carry module, for the memory block equipment to be mounted into default catalogue.
Further, in addition to:
Preserving module, for message file to be saved in into the default catalogue.
Further, the system is Linux system.
Embodiment one
Fig. 2 is refer to, embodiments of the invention one are:A kind of method of data consistency before and after holding system reboot, can Applied to Linux system, comprise the following steps:
S1:The total physical memory of system is divided into the reserved physical memory and system control internal memory of default size;It is for example, false If the size of the total physical memory of system is x, by the y that is sized to of reserved physical memory, then it is z=that system, which controls the size of internal memory, x-y;Reserved physical memory is not controlled then by system.
S2:System control internal memory is dimensioned to boot kernel parameter;Specifically, boot codes can be changed, are being drawn The size that system is controlled internal memory when leading kernel mirror image passes to kernel as systematic parameter, for example, setting mem=z.
S3:Using the reserved physical memory as internal memory block device, and write corresponding block device driver;Block device Driver is used for the internal memory block device for controlling corresponding reserved physical memory, there is provided the operate interface of internal memory block device.
S4:After system restarting, block device driver corresponding to the reserved physical memory is loaded.
S5:Judge whether the internal memory block device is formatted, if it is not, performing step S6.
S6:Format the internal memory block device.If not formatted, illustrate it is that power supply electrifying starts, now reserve interior The internal storage data of counterfoil, it is necessary to reformat reserved internal memory block device, otherwise illustrates that electricity is restarted in non-power, without lattice to be empty Formula internal memory block device.
S7:The memory block equipment is mounted to default catalogue;For example, be mounted to/ram_log mount points on.
S8:Message file is saved in the default catalogue;After restarting systems, step S4 is performed.
During system operation, if restarting systems, it is not as long as being reloaded after system restarting The block device driver of the internal memory block device of system control is simultaneously mounted to assigned catalogue, before mount directory is it can be seen that restart Existing complete file, realize that Linux system restarts the uniformity of front and rear internal storage data.
Embodiment two
Fig. 4 is refer to, the present embodiment is data consistency before and after a kind of holding system reboot for corresponding to above-described embodiment System, including:
Division module 1, for the total physical memory of system to be divided into reserved physical memory and the system control of default size Internal memory;
Setup module 2, for system control internal memory to be dimensioned into boot kernel parameter;
Module 3 is write, for using the reserved physical memory as internal memory block device, and writes corresponding Block Device Driver Program;
Load-on module 4, after being restarted for system, load Block Device Driver journey corresponding to the reserved physical memory Sequence;
Formatting module 5, is used for, if the internal memory block device formats the internal memory block device without formatting;
Carry module 6, for the memory block equipment to be mounted into default catalogue.
Further, in addition to:
Preserving module 7, for message file to be saved in into the default catalogue.
Further, the system is Linux system.
In summary, it is provided by the invention it is a kind of keep system reboot before and after data consistency method and its system, lead to The reserved physical memory of setting is crossed, some interim useful informations can be safely saved on internal memory, without frequently wiping it His external memory device, the performance and can that can improve system extend the service life of external memory device;Meanwhile by reserved thing Memory block equipment corresponding to reason internal memory is mounted to assigned catalogue, i.e., is not establishing file system on the internal memory block device by system control System, can not only be temporarily held in message file on volatile dynamic storage but also can retain after system reboot and be once Message file before system is restarted is not lost, and improves the flexibility to message file operation;It is applicable not only to preserve information text Part applies also for preserving other interim vital documents.
Embodiments of the invention are the foregoing is only, are not intended to limit the scope of the invention, it is every to utilize this hair The equivalents that bright specification and accompanying drawing content are made, or the technical field of correlation is directly or indirectly used in, similarly include In the scope of patent protection of the present invention.

Claims (6)

1. a kind of method of data consistency before and after holding system reboot, it is characterised in that including:
The total physical memory of system is divided into the reserved physical memory and system control internal memory of default size;
System control internal memory is dimensioned to boot kernel parameter;
Using the reserved physical memory as internal memory block device, and write corresponding block device driver;
After system restarting, block device driver corresponding to the reserved physical memory is loaded;
If the internal memory block device formats the internal memory block device without formatting;
The memory block equipment is mounted to default catalogue.
2. the method for data consistency before and after holding system reboot according to claim 1, it is characterised in that described " by The memory block equipment is mounted to default catalogue " after, further comprise:
Message file is saved in the default catalogue.
3. the method for data consistency before and after the holding system reboot according to claim any one of 1-2, it is characterised in that The system is Linux system.
A kind of 4. system of data consistency before and after holding system reboot, it is characterised in that including:
Division module, for the total physical memory of system to be divided into the reserved physical memory and system control internal memory of default size;
Setup module, for system control internal memory to be dimensioned into boot kernel parameter;
Module is write, for using the reserved physical memory as internal memory block device, and writes corresponding block device driver;
Load-on module, after being restarted for system, load block device driver corresponding to the reserved physical memory;
Formatting module, it is used for, if the internal memory block device formats the internal memory block device without formatting;
Carry module, for the memory block equipment to be mounted into default catalogue.
5. the system of data consistency before and after holding system reboot according to claim 4, it is characterised in that also include:
Preserving module, for message file to be saved in into the default catalogue.
6. the system of data consistency before and after the holding system reboot according to claim any one of 4-5, it is characterised in that The system is Linux system.
CN201610864064.5A 2016-09-29 2016-09-29 The method and its system of data consistency before and after holding system reboot Pending CN107894932A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610864064.5A CN107894932A (en) 2016-09-29 2016-09-29 The method and its system of data consistency before and after holding system reboot

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610864064.5A CN107894932A (en) 2016-09-29 2016-09-29 The method and its system of data consistency before and after holding system reboot

Publications (1)

Publication Number Publication Date
CN107894932A true CN107894932A (en) 2018-04-10

Family

ID=61802420

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610864064.5A Pending CN107894932A (en) 2016-09-29 2016-09-29 The method and its system of data consistency before and after holding system reboot

Country Status (1)

Country Link
CN (1) CN107894932A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109271206A (en) * 2018-08-24 2019-01-25 晶晨半导体(上海)股份有限公司 A kind of memory compression and store method that exception is live
WO2020119213A1 (en) * 2018-12-11 2020-06-18 海信视像科技股份有限公司 Methods for generating and loading mirror file, and device
CN113660103A (en) * 2020-05-12 2021-11-16 大唐移动通信设备有限公司 Startup information recording method and device, electronic equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6591389B1 (en) * 1999-01-29 2003-07-08 Lucent Technologies Inc. Testing system for circuit board self-test
CN1479209A (en) * 2003-07-25 2004-03-03 北京港湾网络有限公司 Method of maintaining stored information by synchronous dynamic random access memory
US20070083792A1 (en) * 2005-10-11 2007-04-12 Mcdermott Andrew System and method for error detection and reporting
CN101071396A (en) * 2007-06-22 2007-11-14 中兴通讯股份有限公司 Method for setting system reset reason monitoring information and monitoring method
CN101526911A (en) * 2009-03-26 2009-09-09 成都市华为赛门铁克科技有限公司 Information storage means and device when system crashes
CN102184145A (en) * 2011-05-13 2011-09-14 杭州华三通信技术有限公司 Zero restart-data loss method and logic storage resource management unit
CN102193847A (en) * 2011-06-24 2011-09-21 杭州华三通信技术有限公司 No-lose method of restart data and reserved memory management module

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6591389B1 (en) * 1999-01-29 2003-07-08 Lucent Technologies Inc. Testing system for circuit board self-test
CN1479209A (en) * 2003-07-25 2004-03-03 北京港湾网络有限公司 Method of maintaining stored information by synchronous dynamic random access memory
US20070083792A1 (en) * 2005-10-11 2007-04-12 Mcdermott Andrew System and method for error detection and reporting
CN101071396A (en) * 2007-06-22 2007-11-14 中兴通讯股份有限公司 Method for setting system reset reason monitoring information and monitoring method
CN101526911A (en) * 2009-03-26 2009-09-09 成都市华为赛门铁克科技有限公司 Information storage means and device when system crashes
CN102184145A (en) * 2011-05-13 2011-09-14 杭州华三通信技术有限公司 Zero restart-data loss method and logic storage resource management unit
CN102193847A (en) * 2011-06-24 2011-09-21 杭州华三通信技术有限公司 No-lose method of restart data and reserved memory management module

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109271206A (en) * 2018-08-24 2019-01-25 晶晨半导体(上海)股份有限公司 A kind of memory compression and store method that exception is live
WO2020119213A1 (en) * 2018-12-11 2020-06-18 海信视像科技股份有限公司 Methods for generating and loading mirror file, and device
CN113660103A (en) * 2020-05-12 2021-11-16 大唐移动通信设备有限公司 Startup information recording method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US9342423B2 (en) Selective restoration of data from non-volatile storage to volatile memory
US8028177B2 (en) Method for changing power states of a computer
US10754558B2 (en) Vehicular device
EP2998861A1 (en) Implementing and deleting method and device for intelligent terminal multi-operation system
EP1703380A3 (en) Method of updating firmware in computer server systems
CN103970557B (en) The method and storage device of storage device activation system
CN102799452B (en) system software upgrading method and device
CN107894932A (en) The method and its system of data consistency before and after holding system reboot
CN103646063B (en) A kind of spaceborne high speed document management system
CN103365696A (en) BIOS (Basic Input Output System) image file obtaining method and device
KR20170068373A (en) Electronic system with memory data protection mechanism and method of operation thereof
CN103336736B (en) System log acquisition method and device
KR20110098567A (en) Method and apparatus for generating minimal boot image
US20120036381A1 (en) Information processing device, power control method, and program
CN112328170B (en) Cloud hard disk capacity expansion method and device, computer equipment and storage medium
CN104731794A (en) Cold-hot data fragmenting, mining and storing method
CN105739982B (en) A kind of method and device of system suspend mode
CN112703483A (en) Power-off and power-on method and device for vehicle-mounted system
CN103425605A (en) Solid-state disk power failure protection and quick start method and system
US20210365361A1 (en) Method and apparatus for designing dual-mirror shared conf partition file
CN110597533A (en) FPGA board card program updating system and method
CN103020201B (en) A kind of system that stores simplifies configuration storage pool and the method for organization and administration automatically
CN103927145A (en) System hibernating and awakening method and device based on hybrid memory
CN113685284B (en) Electric fuel pump control method, device, equipment and storage medium
CN103425436A (en) Terminal equipment and virtual storage unit management method

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180410