CN105446832A - Master boot sector data recovery method and apparatus - Google Patents

Master boot sector data recovery method and apparatus Download PDF

Info

Publication number
CN105446832A
CN105446832A CN201510764466.3A CN201510764466A CN105446832A CN 105446832 A CN105446832 A CN 105446832A CN 201510764466 A CN201510764466 A CN 201510764466A CN 105446832 A CN105446832 A CN 105446832A
Authority
CN
China
Prior art keywords
master boot
boot sector
data
storage space
reserved storage
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
CN201510764466.3A
Other languages
Chinese (zh)
Other versions
CN105446832B (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.)
Huawei Cloud Computing Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201510764466.3A priority Critical patent/CN105446832B/en
Publication of CN105446832A publication Critical patent/CN105446832A/en
Priority to PCT/CN2016/080145 priority patent/WO2017080140A1/en
Application granted granted Critical
Publication of CN105446832B publication Critical patent/CN105446832B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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
    • 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/1417Boot up procedures
    • 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
    • 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/4401Bootstrapping
    • G06F9/4406Loading of operating system

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Computer Security & Cryptography (AREA)

Abstract

Embodiments of the present invention disclose a master boot sector data recovery method and apparatus. The method comprises: detecting whether a master boot sector stores a first set identifier; if the master boot sector does not store the first set identifier, detecting whether a reservation storage space stores backup data of the master boot sector; if the reservation storage space stores the backup data of the master boot sector, determining that data of the master boot sector are destroyed; and recovering the data of the master boot sector according to the backup data in the reservation storage space. According to the scheme, when the data of the master boot sector are detected to be destroyed, the data of the master boot sector can be recovered in time, thereby ensuring normal user service processing.

Description

The data reconstruction method of Master boot sector and device
Technical field
The present invention relates to field of computer technology, particularly relate to a kind of data reconstruction method and device of Master boot sector.
Background technology
Main Boot Record (MasterBootRecord, MBR), also known as Master boot sector, the first sector must read when being and accessing disk after computing machine or virtual machine activation.Master boot sector records the relevant information of disk itself and the size and location information of each subregion of disk, is the important entrance of data.
If its data are destroyed, the Data Structures information on disk will be lost, and computing machine or virtual machine cannot normally run, and then cannot normal process customer service.In actual applications, due to odjective cause or artificial origin, in computing machine or virtual machine operational process, the data in Master boot sector still can be destroyed.
During due to computing machine or virtual machine activation, need the data copy of Master boot sector in internal memory, therefore, when in computing machine or virtual machine operational process, the data of Master boot sector are destroyed, computing machine or virtual machine can not detect in time, only restart at computing machine or virtual machine, just can know that the data of Master boot sector are destroyed when cannot normally run, thus cause computing machine or virtual machine cannot recover the data of Master boot sector in time.Normally run in order to ensure computing machine or virtual machine, the data recovering in time to be destroyed in Master boot sector are extremely important, but at present, not yet have the data reconstruction method of Master boot sector.
Summary of the invention
The application provides a kind of data reconstruction method and device of Master boot sector, in order to realize the data recovering Master boot sector when the data of Master boot sector are destroyed in time.
On the one hand, the embodiment of the application provides a kind of data reconstruction method of Master boot sector, method comprises: detect Master boot sector and whether preserve the first setting identification, and the first setting identification can be setting character, setting symbol, end mark etc., can regularly or irregularly carry out during detection; If be checked through Master boot sector not preserve the first setting identification, then detect the Backup Data whether reserved storage space preserves Master boot sector further; If detect, reserved storage space preserves the Backup Data of Master boot sector, then determine that the data of Master boot sector are destroyed; And the data of Master boot sector are recovered according to the Backup Data of reserved storage space.The program when detecting that the data of Master boot sector are destroyed, can be recovered the data of Master boot sector, guaranteeing normal process customer service in time
In a possible design, said method also comprises: if Master boot sector preserves the first setting identification, then whether the data of comparison Master boot sector are identical with Backup Data up-to-date in reserved storage space; If the data of Master boot sector are different from Backup Data up-to-date in reserved storage space, then in reserved storage space, back up the data of Master boot sector, backup mode can be incremental backup or full backup, obtains the Backup Data of a Master boot sector.If the data of Master boot sector are identical with Backup Data up-to-date in reserved storage space, then the data of Master boot sector are not backed up in reserved storage space.The up-to-date Backup Data of Master boot sector can be only preserved in reserved storage space, also the Backup Data that not homogeneous (such as the backup of each setting cycle once) backs up can be preserved, preservation from second sector of reserved storage space, when reserved storage space whole occupied time, up-to-date a Backup Data is replaced the oldest a Backup Data, thus realizes the Backup Data preserving each setting cycle of Master boot sector in reserved storage space circulation.
In a kind of possible design, the above-mentioned Backup Data according to reserved storage space recovers the data of Master boot sector, specifically comprise: obtain the first Backup Data from reserved storage space, the first Backup Data is the Backup Data that up-to-date Backup Data or user determine; The first Backup Data obtained is replaced the data of Master boot sector.Once determine that the data of Master boot sector are destroyed, the last Backup Data can be obtained from reserved storage space, recover the data of Master boot sector according to the Backup Data of the last time; If reserved storage space preserves many parts of Backup Datas, can a Backup Data (not necessarily the last Backup Data) be selected to recover the data of Master boot sector in many parts of Backup Datas.
In a kind of possible design, said method also comprises: if reserved storage space does not preserve the Backup Data of Master boot sector, then determine that Master boot sector not yet uses, not according to the data of the date restoring Master boot sector in reserved storage space.Because Master boot sector not yet uses, no matter whether pre-stored space preserves data, all without the need to recovering Master boot sector.
In a kind of possible design, said method also comprises: in the memory device at Master boot sector place, add the second setting identification; Monitor the second setting identification whether to be rewritten; If the second setting identification is rewritten, then determine that memory device is used with by least two operating systems; Send memory device and use alarm with, so that user triggers preset instructions, preset instructions instruction detects Master boot sector and whether preserves the first setting identification.After determining that memory device is used with, memory device can be sent and use alarm with, thus remind person skilled to process at once, avoid more serious consequence to occur.
On the other hand, the embodiment of the application also provides a kind of data reconstruction method of Master boot sector, and method comprises: in the memory device at Master boot sector place, add the second setting identification; Monitor the second setting identification whether to be rewritten; If the second setting identification is rewritten, then determine that memory device is used with by least two operating systems; Send memory device and use alarm with, so that user triggers following action: do not preserve the first setting identification if detect in Master boot sector and reserved storage space preserves the Backup Data of Master boot sector, then recover the data of Master boot sector according to the Backup Data of reserved storage space.After determining that memory device is used with, memory device can be sent and use alarm with, thus remind person skilled to process at once, avoid more serious consequence to occur.
On the other hand, the embodiment of the application also provides a kind of Data Recapture Unit of Master boot sector, and device comprises: first detection module, whether preserves the first setting identification for detecting Master boot sector; Second detection module, if do not preserve the first setting identification for Master boot sector, then detects the Backup Data whether reserved storage space preserves Master boot sector; First determination module, if the Backup Data preserving Master boot sector for reserved storage space, then determines that the data of Master boot sector are destroyed; , recover module, for recovering the data of Master boot sector according to the Backup Data of reserved storage space.The program when detecting that the data of Master boot sector are destroyed, can be recovered the data of Master boot sector, guaranteeing normal process customer service in time.
In a kind of possible design, said apparatus also comprises: comparing module, if preserve the first setting identification for Master boot sector, then whether the data of comparison Master boot sector are identical with Backup Data up-to-date in reserved storage space; Backup module, if different from Backup Data up-to-date in reserved storage space for the data of Master boot sector, then backs up the data of Master boot sector, obtains the Backup Data of Master boot sector in reserved storage space.
In a kind of possible design, above-mentioned backup module, also for: if the data of Master boot sector are identical with Backup Data up-to-date in reserved storage space, then the data of Master boot sector are not backed up in reserved storage space.
In a kind of possible design, above-mentioned recovery module, for recovering the data of Master boot sector according to the Backup Data of reserved storage space, specifically for: obtain the first Backup Data from reserved storage space, the first Backup Data is the Backup Data that up-to-date Backup Data or user determine; The first Backup Data obtained is replaced the data of Master boot sector.
In a kind of possible design, above-mentioned first determination module, also for: if reserved storage space does not preserve the Backup Data of Master boot sector, then determine that Master boot sector not yet uses, not according to the data of the date restoring Master boot sector in reserved storage space.
In a kind of possible design, said apparatus also comprises: add module, for adding the second setting identification in the memory device at Master boot sector place; Whether monitoring module, rewritten for monitoring the second setting identification; Second determination module, if rewritten for the second setting identification, then determines that memory device is used with by least two operating systems; Alarm module, uses alarm with for sending memory device, so that user triggers preset instructions, preset instructions instruction detects Master boot sector and whether preserves the first setting identification.
On the other hand, the embodiment of the application also provides a kind of Data Recapture Unit of Master boot sector, and device comprises: add module, for adding the second setting identification in the memory device at Master boot sector place; Whether monitoring module, rewritten for monitoring the second setting identification; Determination module, if rewritten for the second setting identification, then determines that memory device is used with by least two operating systems; Alarm module, alarm is used with for sending memory device, so that user triggers following action: do not preserve the first setting identification if detect in Master boot sector and reserved storage space preserves the Backup Data of Master boot sector, then recover the data of Master boot sector according to the Backup Data of reserved storage space.The program, after determining that memory device is used with, can send memory device and use alarm with, thus reminds person skilled to process at once, avoids more serious consequence to occur.
The application provides a kind of data reconstruction method and device of Master boot sector, detects Master boot sector and whether preserves the first setting identification; If described Master boot sector does not preserve described first setting identification, then detect the Backup Data whether reserved storage space preserves described Master boot sector; If described reserved storage space preserves the Backup Data of described Master boot sector, then determine that the data of described Master boot sector are destroyed; The data of described Master boot sector are recovered according to the Backup Data of described reserved storage space.In the program, whether periodic detection Master boot sector preserves the Backup Data whether the first setting identification and reserved storage space preserve Master boot sector, if but Master boot sector does not preserve the Backup Data that the first setting identification reserved storage space preserves Master boot sector, then determine that the data of Master boot sector are destroyed, and the data of Master boot sector are recovered in time according to the Backup Data of the Master boot sector of reserved storage space preservation, thus can when detecting that the data of Master boot sector are destroyed, the data of timely recovery Master boot sector, guarantee normal process customer service.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, for those of ordinary skills, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the process flow diagram of the data reconstruction method of a kind of Master boot sector of the embodiment of the present invention;
Fig. 2 is the structural representation of the existing subregion of disk in the embodiment of the present invention;
Fig. 3 is the process flow diagram of the data method of another kind of Master boot sector in the embodiment of the present invention;
Fig. 4 is the process flow diagram of the data reconstruction method of another Master boot sector of the embodiment of the present invention;
Fig. 5 is the process flow diagram of the data reconstruction method of another Master boot sector of the embodiment of the present invention;
Fig. 6 is the structural representation of the Data Recapture Unit of a kind of Master boot sector in the embodiment of the present invention;
Fig. 7 is the structural representation of the Data Recapture Unit of another kind of Master boot sector in the embodiment of the present invention;
Fig. 8 is the structural representation of the Data Recapture Unit of another Master boot sector in the embodiment of the present invention;
Fig. 9 is the structural representation of the Data Recapture Unit of a kind of Master boot sector in the embodiment of the present invention.
Embodiment
Technical scheme in the present invention is understood better in order to make those skilled in the art person, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.
In order to realize the data recovering Master boot sector when the data of Master boot sector are destroyed in time, the embodiment of the present invention provides a kind of data reconstruction method of Master boot sector, the method can be, but not limited to be applied in computing machine or virtual machine, the flow process of the method as shown in Figure 1, performs step as follows:
S11: detect Master boot sector and whether preserve the first setting identification.
In the normal situation of the data of Master boot sector, first setting identification is kept in Master boot sector, once the data of Master boot sector are destroyed, first setting identification is just destroyed, therefore, periodic detection Master boot sector whether can preserve the first setting identification, also can detect Master boot sector aperiodically and whether preserve the first setting identification, thus determine whether the data of Master boot sector are destroyed according to whether preserving the first setting identification in Master boot sector.
Alternatively, detect Master boot sector with setting cycle and whether preserve the first setting identification, this setting cycle can set according to actual needs, such as, is set as 1 hour, 2 hours, 2.5 hours, 3 hours etc.; First setting identification also can set according to actual needs, can be setting character, setting symbol, end mark etc.
S12: if Master boot sector does not preserve the first setting identification, then detect the Backup Data whether reserved storage space preserves Master boot sector.
Master boot sector does not preserve the first setting identification, two kinds of situations may be there are, one is that Master boot sector not yet uses, Master boot sector never preserved data, another kind is that the data of Master boot sector are destroyed, in order to be confirmed to be which kind of situation, also need to check whether reserved storage space preserves the Backup Data of Master boot sector further, and then confirm whether the data of Master boot sector are destroyed.
S13: if reserved storage space preserves the Backup Data of Master boot sector, then determine that the data of Master boot sector are destroyed.
If reserved storage space preserves the Backup Data of Master boot sector, illustrate that Master boot sector is brought into use, but there is no again the first setting identification, so just can determine that the data of Master boot sector are destroyed.
S14: the data recovering Master boot sector according to the Backup Data of reserved storage space.
After determining that the data of Master boot sector are destroyed, the Backup Data of timely acquisition reserved storage space recovers the data of Master boot sector, the mode recovered has a variety of, and the concrete Backup Data of reserved storage space directly can being kept in Master boot sector realizes.
In the program, whether periodic detection Master boot sector preserves the Backup Data whether the first setting identification and reserved storage space preserve Master boot sector, if but Master boot sector does not preserve the Backup Data that the first setting identification reserved storage space preserves Master boot sector, then determine that the data of Master boot sector are destroyed, and the data of Master boot sector are recovered in time according to the Backup Data of the Master boot sector of reserved storage space preservation, thus can when detecting that the data of Master boot sector are destroyed, the data of timely recovery Master boot sector, guarantee normal process customer service.
Optionally, after S11, if Master boot sector preserves the first setting identification, then in reserved storage space, back up the data of Master boot sector, obtain the Backup Data of Master boot sector.
If Master boot sector preserves the first setting identification, illustrate that the data of boot sector are normal, at this moment can back up in the data of reserved storage space to Master boot sector, all the data of Master boot sector are once backed up when determining that Master boot sector preserves the first setting identification at every turn, when can guarantee that the data of Master boot sector are destroyed, recover the data of Master boot sector as much as possible with up-to-date Backup Data.
Reserved storage space can obtain by again carrying out subregion to disk, also can adopt the existing subregion in disk, below to adopt the existing subregion of disk to be described, is illustrated in figure 2 the existing partitioned organization figure of a disk.Wherein, before disk, 4K is challenge lock region, end is reserved storage space, and the size of reserved storage space is disk size * 8 – 8, and unit is sector, such as, the disk of 10G, its reserved storage space size is 10*8 – 8=72 (sector), and the disk of virtual machine is the subregion distributing to virtual machine use, visible at virtual machine, and 4K challenge lock and reserved storage space are all to virtual machine hides.The first sector of reserved storage space is metadata sector, do not preserve the Backup Data of Master boot sector, be used for the details of Backup Data of minute book disk Master boot sector, comprise quantity, the current nearest alternate sector etc. of the Backup Data that whether this disk preserves the Backup Data of Master boot sector, most multipotency is preserved.Second sector of reserved storage space is used for last sector, as backup space, depositing the Backup Data of Master boot sector.
In reserved storage space, back up the data of Master boot sector, obtain the Backup Data of Master boot sector, detailed process is: whether the data of comparison Master boot sector are identical with Backup Data up-to-date in reserved storage space; If the data of Master boot sector are different from Backup Data up-to-date in reserved storage space, then in reserved storage space, back up the data of Master boot sector, backup mode can be incremental backup or full backup, obtains the Backup Data of a Master boot sector.If the data of Master boot sector are identical with Backup Data up-to-date in reserved storage space, then the data of Master boot sector are not backed up in reserved storage space.
The up-to-date Backup Data of Master boot sector can be only preserved in reserved storage space, also the Backup Data that not homogeneous (such as the backup of each setting cycle once) backs up can be preserved, preservation from second sector of reserved storage space, when reserved storage space whole occupied time, up-to-date a Backup Data is replaced the oldest a Backup Data, thus realizes the Backup Data preserving each setting cycle of Master boot sector in reserved storage space circulation.
Correspondingly, recover the data of Master boot sector in above-mentioned S14 according to the Backup Data of reserved storage space, detailed process is: obtain the first Backup Data from reserved storage space, and the first Backup Data is the Backup Data that up-to-date Backup Data or user determine; The first Backup Data obtained is replaced the data of Master boot sector.
Alternatively, once determine that the data of Master boot sector are destroyed, the last Backup Data can be obtained from reserved storage space, recover the data of Master boot sector according to the Backup Data of the last time.
Alternatively, if reserved storage space preserves many parts of Backup Datas, can a Backup Data (not necessarily the last Backup Data) be selected to recover the data of Master boot sector in many parts of Backup Datas.
The specific implementation recovering the data of Master boot sector is: the data of the Backup Data obtained being replaced Master boot sector, thus realizes the data recovering Master boot sector.
The embodiment of the present invention also provides the data reconstruction method of another kind of Master boot sector, and the method is applied in virtual machine, and the operating system of virtual machine is FusionSphere cloud operating system, and the flow process of the method as shown in Figure 3, specifically comprises the following steps:
S30: flow process starts.
S31: detect Master boot sector with setting cycle and whether preserve end mark, if Master boot sector is not preserved terminate mark, perform S32; If Master boot sector is preserved terminate mark, perform S36.
Master boot sector data under normal circumstances, terminating mark is kept in Master boot sector, once the data of Master boot sector are destroyed, terminate mark just destroyed, therefore periodic detection Master boot sector whether can preserve the first setting identification, thus determine whether the data of Master boot sector are destroyed according to whether preserving the first setting identification in Master boot sector.
S32: detect the Backup Data whether reserved storage space preserves Master boot sector, if reserved storage space preserves the Backup Data of Master boot sector, performs S33; If reserved storage space does not preserve the Backup Data of Master boot sector, perform S35.
Master boot sector is not preserved and is terminated mark, two kinds of situations may be there are, one is that Master boot sector not yet uses, Master boot sector never preserved data, another kind is that the data of Master boot sector are destroyed, in order to be confirmed to be which kind of situation, also need to check whether reserved storage space preserves the Backup Data of Master boot sector further, and then confirm whether the data of Master boot sector are destroyed.
S33: determine that the data of Master boot sector are destroyed, perform S34.
If reserved storage space preserves the Backup Data of Master boot sector, illustrate that Master boot sector is brought into use, but do not terminate again mark, so just can determine that the data of Master boot sector are destroyed.
S34: obtain the first Backup Data from reserved storage space, replaces the data of Master boot sector by the first Backup Data obtained.
First Backup Data is the Backup Data that up-to-date Backup Data or user determine.
S35: Master boot sector not yet uses, not according to the data of the date restoring Master boot sector in reserved storage space.
Now may there be data in reserved storage space, also may there is no data.
S36: whether the data of comparison Master boot sector are identical with Backup Data up-to-date in reserved storage space, if the data of Master boot sector are different from Backup Data up-to-date in reserved storage space, performs S37; If the data of Master boot sector are identical with Backup Data up-to-date in reserved storage space, perform S38.
S37: the data backing up Master boot sector in reserved storage space, obtains the Backup Data of Master boot sector.
S38: the data of Master boot sector are not backed up in reserved storage space.
In the program, whether periodic detection Master boot sector is preserved and is terminated mark and whether reserved storage space preserves the Backup Data of Master boot sector, if but Master boot sector is not preserved terminate mark the Backup Data of reserved storage space preservation Master boot sector, then determine that the data of Master boot sector are destroyed, and the data of Master boot sector are recovered in time according to the Backup Data of the Master boot sector of reserved storage space preservation, thus can when detecting that the data of Master boot sector are destroyed, the data of timely recovery Master boot sector, guarantee normal process customer service.
The embodiment of the present invention provides the data reconstruction method of another Master boot sector, and the flow process of the method as shown in Figure 4.In the reason that the data of Master boot sector are destroyed, a reason is had to be cause because the maloperation of person skilled causes the memory device at Master boot sector place to be used with by two operating systems simultaneously, can monitor in real time memory device for this reason, occur with the situation avoiding memory device mixed.The method, on the basis of method as shown in Figure 1, also comprises the steps:
S15: add the second setting identification in the memory device at Master boot sector place.
Specifically front 4 sector formattings of memory device can be write the second setting identification, front 4 sectors of memory device are not Master boot sector places, and the second setting identification is different from the first setting identification, second setting identification can set according to actual needs, such as can be set as the specific coding of FusionSphere cloud operating system, be used to FusionSphere cloud operating system by carry in order to identification storage; Or be set as the specific coding of Vmware, used to VMware cloud operating system by carry in order to identification storage.
S16: monitor the second setting identification and whether rewritten.
S17: if the second setting identification is rewritten, then determine that memory device is used with by least two operating systems.
S18: send memory device and use alarm with, so that user triggers preset instructions, preset instructions instruction performs S11.
In the program, if memory device is only used by an operating system, so the second setting identification does not allow to rewrite, only have this memory device to be used by another operating system simultaneously, whether the second setting identification just can be rewritten, therefore can be rewritten and determine whether memory device is used with by monitoring the second setting identification.After determining that memory device is mixed by least two operating systems, memory device can be sent and use alarm with, thus remind person skilled to process at once, avoid more serious consequence to occur.
The embodiment of the present invention also provides the data reconstruction method of another Master boot sector, and the method can be, but not limited to be applied in virtual machine, and the flow process of the method as shown in Figure 5, specifically comprises the steps:
S51: add the second setting identification in the memory device at Master boot sector place.
S52: monitor the second setting identification and whether rewritten.
S53: if the second setting identification is rewritten, then determine that memory device is used with by least two operating systems.
S54: send memory device and use alarm with, so that user triggers following action: do not preserve the first setting identification if detect in Master boot sector and reserved storage space preserves the Backup Data of Master boot sector, then recover the data of Master boot sector according to the Backup Data of reserved storage space.
In the program, if memory device is only used by an operating system, so the second setting identification does not allow to rewrite, only have this memory device to be used by another operating system simultaneously, whether the second setting identification just can be rewritten, therefore can be rewritten and determine whether memory device is used with by monitoring the second setting identification.After determining that memory device is mixed by least two operating systems, memory device can be sent and use alarm with, thus remind person skilled to process at once, avoid more serious consequence to occur.
Based on same inventive concept, the embodiment of the present invention provides a kind of Data Recapture Unit of Master boot sector, this device can be, but not limited to be arranged in computing machine or virtual machine, the structure of this device as shown in Figure 6, specifically comprises first detection module 61, second detection module 62, first determination module 63 and recovers module 64.Wherein:
Whether first detection module 61, preserve the first setting identification for detecting Master boot sector;
Second detection module 62, if do not preserve the first setting identification for Master boot sector, then detects the Backup Data whether reserved storage space preserves Master boot sector;
First determination module 63, if the Backup Data preserving Master boot sector for reserved storage space, then determines that the data of Master boot sector are destroyed;
Recover module 64, for recovering the data of Master boot sector according to the Backup Data of reserved storage space.
In the program, whether periodic detection Master boot sector preserves the Backup Data whether the first setting identification and reserved storage space preserve Master boot sector, if but Master boot sector does not preserve the Backup Data that the first setting identification reserved storage space preserves Master boot sector, then determine that the data of Master boot sector are destroyed, and the data of Master boot sector are recovered in time according to the Backup Data of the Master boot sector of reserved storage space preservation, thus can when detecting that the data of Master boot sector are destroyed, the data of timely recovery Master boot sector, guarantee normal process customer service.
The embodiment of the present application also provides the Data Recapture Unit of another kind of Master boot sector, and the structure of this device as shown in Figure 7, the basis of device as shown in Figure 6 also comprises comparing module 65 and backup module 66, wherein:
Comparing module 65, if preserve the first setting identification for Master boot sector, then whether the data of comparison Master boot sector are identical with Backup Data up-to-date in reserved storage space;
Backup module 66, if different from Backup Data up-to-date in reserved storage space for the data of Master boot sector, then backs up the data of Master boot sector, obtains the Backup Data of Master boot sector in reserved storage space.
Optionally, above-mentioned backup module 66, also for:
If the data of Master boot sector are identical with Backup Data up-to-date in reserved storage space, then the data of Master boot sector are not backed up in reserved storage space.
Concrete, above-mentioned recovery module 64, for recovering the data of Master boot sector according to the Backup Data of reserved storage space, specifically for:
Obtain the first Backup Data from reserved storage space, the first Backup Data is the Backup Data that up-to-date Backup Data or user determine;
The first Backup Data obtained is replaced the data of Master boot sector.
Concrete, above-mentioned first determination module 63, also for:
If reserved storage space does not preserve the Backup Data of Master boot sector, then determine that Master boot sector not yet uses, not according to the data of the date restoring Master boot sector in reserved storage space.
The embodiment of the present application also provides the Data Recapture Unit of another Master boot sector, and the structure of this device also comprises as shown in Figure 8 on the basis of device as shown in Figure 6 adds module 67, monitoring module 68, second determination module 69 and alarm module 70, wherein:
Add module 67, for adding the second setting identification in the memory device at Master boot sector place;
Whether monitoring module 68, rewritten for monitoring the second setting identification;
Second determination module 69, if rewritten for the second setting identification, then determines that memory device is used with by least two operating systems;
Alarm module 70, uses alarm with for sending memory device, so that user triggers preset instructions, preset instructions instruction turns to first detection module 61.
Based on same inventive concept, the embodiment of the present invention provides a kind of Data Recapture Unit of Master boot sector, this device can be, but not limited to be arranged in computing machine or virtual machine, the structure of this device as shown in Figure 9, specifically comprise and add module 91, monitoring module 92, determination module 93 and alarm module 94, wherein:
Add module 91, for adding the second setting identification in the memory device at Master boot sector place;
Whether monitoring module 92, rewritten for monitoring the second setting identification;
Determination module 93, if rewritten for the second setting identification, then determines that memory device is used with by least two operating systems;
Alarm module 94, alarm is used with for sending memory device, so that user triggers following action: do not preserve the first setting identification if detect in Master boot sector and reserved storage space preserves the Backup Data of Master boot sector, then recover the data of Master boot sector according to the Backup Data of reserved storage space.
In the program, if memory device is only used by an operating system, so the second setting identification does not allow to rewrite, only have this memory device to be used by another operating system simultaneously, whether the second setting identification just can be rewritten, therefore can be rewritten and determine whether memory device is used with by monitoring the second setting identification.After determining that memory device is mixed by least two operating systems, memory device can be sent and use alarm with, thus remind person skilled to process at once, avoid more serious consequence to occur.
The present invention describes with reference to according to the process flow diagram of the method for the embodiment of the present invention, equipment (system) and computer program and/or block scheme.Should understand can by the combination of the flow process in each flow process in computer program instructions realization flow figure and/or block scheme and/or square frame and process flow diagram and/or block scheme and/or square frame.These computer program instructions can being provided to the processor of multi-purpose computer, special purpose computer, Embedded Processor or other programmable data processing device to produce a machine, making the instruction performed by the processor of computing machine or other programmable data processing device produce device for realizing the function of specifying in process flow diagram flow process or multiple flow process and/or block scheme square frame or multiple square frame.
These computer program instructions also can be stored in can in the computer-readable memory that works in a specific way of vectoring computer or other programmable data processing device, the instruction making to be stored in this computer-readable memory produces the manufacture comprising command device, and this command device realizes the function of specifying in process flow diagram flow process or multiple flow process and/or block scheme square frame or multiple square frame.
These computer program instructions also can be loaded in computing machine or other programmable data processing device, make on computing machine or other programmable devices, to perform sequence of operations step to produce computer implemented process, thus the instruction performed on computing machine or other programmable devices is provided for the step realizing the function of specifying in process flow diagram flow process or multiple flow process and/or block scheme square frame or multiple square frame.
Although describe optional embodiment of the present invention, those skilled in the art once obtain the basic creative concept of cicada, then can make other change and amendment to these embodiments.So claims are intended to be interpreted as comprising embodiment and falling into all changes and the amendment of the scope of the invention.
Obviously, those skilled in the art can carry out various change and modification to the embodiment of the present invention and not depart from the spirit and scope of the embodiment of the present invention.Like this, if these amendments of the embodiment of the present invention and modification belong within the scope of the claims in the present invention and equivalent technologies thereof, then the present invention is also intended to comprise these change and modification.

Claims (14)

1. a data reconstruction method for Master boot sector, is characterized in that, described method comprises:
Detect Master boot sector and whether preserve the first setting identification;
If described Master boot sector does not preserve described first setting identification, then detect the Backup Data whether reserved storage space preserves described Master boot sector;
If described reserved storage space preserves the Backup Data of described Master boot sector, then determine that the data of described Master boot sector are destroyed;
The data of described Master boot sector are recovered according to the Backup Data of described reserved storage space.
2. the method for claim 1, is characterized in that, described method also comprises:
If described Master boot sector preserves described first setting identification, then whether the data of Master boot sector described in comparison are identical with Backup Data up-to-date in described reserved storage space;
If the data of described Master boot sector are different from Backup Data up-to-date in described reserved storage space, then in described reserved storage space, back up the data of described Master boot sector, obtain the Backup Data of described Master boot sector.
3. method as claimed in claim 2, it is characterized in that, described method also comprises:
If the data of described Master boot sector are identical with Backup Data up-to-date in described reserved storage space, then the data of described Master boot sector are not backed up in described reserved storage space.
4. the method as described in as arbitrary in claim 1-3, is characterized in that, recover the data of described Master boot sector, specifically comprise according to the Backup Data of described reserved storage space:
Obtain the first Backup Data from described reserved storage space, described first Backup Data is the Backup Data that up-to-date Backup Data or user determine;
Described first Backup Data obtained is replaced the data of described Master boot sector.
5. the method as described in as arbitrary in claim 1-4, it is characterized in that, described method also comprises:
If described reserved storage space does not preserve the Backup Data of described Master boot sector, then determine that described Master boot sector not yet uses, not the data of Master boot sector according to the date restoring in described reserved storage space.
6. the method as described in as arbitrary in claim 1-5, it is characterized in that, described method also comprises:
The second setting identification is added in the memory device at described Master boot sector place;
Monitor described second setting identification whether to be rewritten;
If described second setting identification is rewritten, then determine that described memory device is used with by least two operating systems;
Send memory device and use alarm with, so that user triggers preset instructions, described preset instructions instruction detects described Master boot sector and whether preserves the first setting identification.
7. a data reconstruction method for Master boot sector, is characterized in that, described method comprises:
The second setting identification is added in the memory device at Master boot sector place;
Monitor described second setting identification whether to be rewritten;
If described second setting identification is rewritten, then determine that described memory device is used with by least two operating systems;
Send memory device and use alarm with, so that user triggers following action: do not preserve the first setting identification if detect in described Master boot sector and the reserved storage space Backup Data of preserving described Master boot sector, then recover the data of described Master boot sector according to the Backup Data of described reserved storage space.
8. a Data Recapture Unit for Master boot sector, is characterized in that, described device comprises:
Whether first detection module, preserve the first setting identification for detecting Master boot sector;
Second detection module, if do not preserve described first setting identification for described Master boot sector, then detects the Backup Data whether reserved storage space preserves described Master boot sector;
First determination module, if the Backup Data preserving described Master boot sector for described reserved storage space, then determines that the data of described Master boot sector are destroyed;
Recover module, for recovering the data of described Master boot sector according to the Backup Data of described reserved storage space.
9. device as claimed in claim 8, it is characterized in that, described device also comprises:
Comparing module, if preserve described first setting identification for described Master boot sector, then whether the data of Master boot sector described in comparison are identical with Backup Data up-to-date in described reserved storage space;
Backup module, if different from Backup Data up-to-date in described reserved storage space for the data of described Master boot sector, then back up the data of described Master boot sector, obtains the Backup Data of described Master boot sector in described reserved storage space.
10. device as claimed in claim 9, is characterized in that, described backup module, also for:
If the data of described Master boot sector are identical with Backup Data up-to-date in described reserved storage space, then the data of described Master boot sector are not backed up in described reserved storage space.
11. as arbitrary in claim 8-10 as described in device, it is characterized in that, described recovery module, for recovering the data of described Master boot sector according to the Backup Data of described reserved storage space, specifically for:
Obtain the first Backup Data from described reserved storage space, described first Backup Data is the Backup Data that up-to-date Backup Data or user determine;
Described first Backup Data obtained is replaced the data of described Master boot sector.
12. as arbitrary in claim 8-11 as described in device, it is characterized in that, described first determination module, also for:
If described reserved storage space does not preserve the Backup Data of described Master boot sector, then determine that described Master boot sector not yet uses, not the data of Master boot sector according to the date restoring in described reserved storage space.
13. as arbitrary in claim 8-12 as described in device, it is characterized in that, described device also comprises:
Add module, for adding the second setting identification in the memory device at described Master boot sector place;
Whether monitoring module, rewritten for monitoring described second setting identification;
Second determination module, if rewritten for described second setting identification, then determines that described memory device is used with by least two operating systems;
Alarm module, uses alarm with for sending memory device, so that user triggers preset instructions, described preset instructions instruction detects described Master boot sector and whether preserves the first setting identification.
The Data Recapture Unit of 14. 1 kinds of Master boot sector, is characterized in that, described device comprises:
Add module, for adding the second setting identification in the memory device at Master boot sector place;
Whether monitoring module, rewritten for monitoring described second setting identification;
Determination module, if rewritten for described second setting identification, then determines that described memory device is used with by least two operating systems;
Alarm module, alarm is used with for sending memory device, so that user triggers following action: do not preserve the first setting identification if detect in described Master boot sector and the reserved storage space Backup Data of preserving described Master boot sector, then recover the data of described Master boot sector according to the Backup Data of described reserved storage space.
CN201510764466.3A 2015-11-10 2015-11-10 The data reconstruction method and device of master boot sector Active CN105446832B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201510764466.3A CN105446832B (en) 2015-11-10 2015-11-10 The data reconstruction method and device of master boot sector
PCT/CN2016/080145 WO2017080140A1 (en) 2015-11-10 2016-04-25 Method and apparatus for recovering data of master boot sector

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510764466.3A CN105446832B (en) 2015-11-10 2015-11-10 The data reconstruction method and device of master boot sector

Publications (2)

Publication Number Publication Date
CN105446832A true CN105446832A (en) 2016-03-30
CN105446832B CN105446832B (en) 2019-02-05

Family

ID=55557065

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510764466.3A Active CN105446832B (en) 2015-11-10 2015-11-10 The data reconstruction method and device of master boot sector

Country Status (2)

Country Link
CN (1) CN105446832B (en)
WO (1) WO2017080140A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017080140A1 (en) * 2015-11-10 2017-05-18 华为技术有限公司 Method and apparatus for recovering data of master boot sector

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1330322A (en) * 2001-04-29 2002-01-09 北京瑞星科技股份有限公司 Method for protecting and restoring data on hard disk
US20030014622A1 (en) * 2001-07-03 2003-01-16 Jean-Francois Larvoire System and method to enable a legacy BIOS system to boot from a disk that includes EFI GPT partitions
CN103294572A (en) * 2012-03-04 2013-09-11 三星电子株式会社 Electronic device to restore MBR, and method thereof
CN103534690A (en) * 2011-05-23 2014-01-22 日本电气英富醍株式会社 Computer and computer control method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100437498C (en) * 2005-11-07 2008-11-26 珠海金山软件股份有限公司 Method for preventing and resolving data from lossing
CN105446832B (en) * 2015-11-10 2019-02-05 华为技术有限公司 The data reconstruction method and device of master boot sector

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1330322A (en) * 2001-04-29 2002-01-09 北京瑞星科技股份有限公司 Method for protecting and restoring data on hard disk
US20030014622A1 (en) * 2001-07-03 2003-01-16 Jean-Francois Larvoire System and method to enable a legacy BIOS system to boot from a disk that includes EFI GPT partitions
CN103534690A (en) * 2011-05-23 2014-01-22 日本电气英富醍株式会社 Computer and computer control method
CN103294572A (en) * 2012-03-04 2013-09-11 三星电子株式会社 Electronic device to restore MBR, and method thereof

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017080140A1 (en) * 2015-11-10 2017-05-18 华为技术有限公司 Method and apparatus for recovering data of master boot sector

Also Published As

Publication number Publication date
CN105446832B (en) 2019-02-05
WO2017080140A1 (en) 2017-05-18

Similar Documents

Publication Publication Date Title
EP2840495B1 (en) Container-based processing method and apparatus
US11397648B2 (en) Virtual machine recovery method and virtual machine management device
CN102981931B (en) Backup method and device for virtual machine
CN109189546B (en) Method and device for making online snapshot of virtual machine
US20070208918A1 (en) Method and apparatus for providing virtual machine backup
EP3008600A2 (en) Virtual machine backup from storage snapshot
CN104636375A (en) Method and device for automatically backing up application data and restoring application data according to needs
CN104216793A (en) Application program backing up and restoring method and device
CN105022678A (en) Data backup method and apparatus for virtual machine
CN105224422A (en) A kind of data back up method and equipment
US20230086666A1 (en) System and method for backup scheduling
CN105760251B (en) A kind of method and apparatus of Backup Data
CN105183799B (en) Authority management method and client
CN116737466B (en) Backup processing method, device, system, electronic equipment and readable storage medium
CN109358988A (en) A kind of restoration methods, device, system and the readable storage medium storing program for executing of cloud Backup Data
EP3201754A1 (en) Improved apparatus and method for performing snapshots of block-level storage devices
US20160110122A1 (en) Data archiving system and method
CN105446832A (en) Master boot sector data recovery method and apparatus
US20160162365A1 (en) Storing difference information in a backup system
CN109710377B (en) Method for recovering kvm virtual machine from faulty distributed storage
US20180329787A1 (en) Direct access to backup copy
CN115080309A (en) Data backup system, method, storage medium, and electronic device
CN103729233A (en) Multiple virtual machines management method and device
US9703655B1 (en) Recovery after data loss in a reliable distributed computing system
CN108509252B (en) Virtual machine starting device and method and host

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220211

Address after: 550025 Huawei cloud data center, jiaoxinggong Road, Qianzhong Avenue, Gui'an New District, Guiyang City, Guizhou Province

Patentee after: Huawei Cloud Computing Technology Co.,Ltd.

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd.