CN105446832B - The data reconstruction method and device of master boot sector - Google Patents
The data reconstruction method and device of master boot sector Download PDFInfo
- Publication number
- CN105446832B CN105446832B CN201510764466.3A CN201510764466A CN105446832B CN 105446832 B CN105446832 B CN 105446832B CN 201510764466 A CN201510764466 A CN 201510764466A CN 105446832 B CN105446832 B CN 105446832B
- Authority
- CN
- China
- Prior art keywords
- boot sector
- master boot
- data
- storage space
- backup 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 55
- 238000001514 detection method Methods 0.000 claims abstract description 26
- 238000012544 monitoring process Methods 0.000 claims description 15
- 238000011084 recovery Methods 0.000 claims description 8
- 230000006399 behavior Effects 0.000 claims 1
- 238000007689 inspection Methods 0.000 claims 1
- 230000014759 maintenance of location Effects 0.000 claims 1
- 238000010586 diagram Methods 0.000 description 11
- 238000013461 design Methods 0.000 description 9
- 230000008569 process Effects 0.000 description 9
- 230000000737 periodic effect Effects 0.000 description 6
- 238000004590 computer program Methods 0.000 description 5
- 230000004048 modification Effects 0.000 description 5
- 238000012986 modification Methods 0.000 description 5
- 238000012545 processing Methods 0.000 description 5
- 241001269238 Data Species 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 235000013399 edible fruits Nutrition 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
- 238000004321 preservation Methods 0.000 description 1
- 230000000717 retained effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
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
The embodiment of the invention discloses a kind of data reconstruction method of master boot sector and devices, this method comprises: whether detection master boot sector saves the first setting identification;If the master boot sector does not save first setting identification, the Backup Data whether reserved storage space saves the master boot sector is detected;If the reserved storage space saves the Backup Data of the master boot sector, it is determined that the data of the master boot sector are destroyed;Restore the data of the master boot sector according to the Backup Data of the reserved storage space.The program can restore the data of master boot sector, it is ensured that normally handle customer service when the data for detecting master boot sector are destroyed in time.
Description
Technical field
The present invention relates to the data reconstruction methods and device of field of computer technology more particularly to a kind of master boot sector.
Background technique
Master boot record (Master Boot Record, MBR), also known as master boot sector, are computer or virtual machine
The first sector read is had to when accessing disk after starting.Master boot sector record disk itself relevant information 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 be will be lost, computer or virtual machine
It is unable to operate normally, and then can not normally handle customer service.In practical applications, due to odjective cause or artificial origin,
In computer or virtual machine operational process, the data in master boot sector still can be destroyed.
When starting due to computer or virtual machine, need the data copy by master boot sector into memory, therefore,
Computer or virtual machine can not be timely when perhaps the data of master boot sector are destroyed in virtual machine operational process for computer
It detected, the data quilt of master boot sector only can be just known when computer or virtual machine are restarted, are unable to operate normally
It destroys, the data of master boot sector can not be restored in time so as to cause computer or virtual machine.In order to ensure computer or
Virtual machine operates normally, and the data for restoring to be destroyed in master boot sector in time are extremely important, but currently, there has been no main boots
The data reconstruction method of sector.
Summary of the invention
The application provides the data reconstruction method and device of a kind of master boot sector, to realize the number in master boot sector
According to the data for restoring master boot sector when being destroyed in time.
On the one hand, embodiments herein provides a kind of data reconstruction method of master boot sector, and method includes: detection master
Whether boot sector saves the first setting identification, and the first setting identification can be setting character, setting symbol, end of identification etc.
It can periodically or non-periodically be carried out when Deng, detection;If checking master boot sector does not save the first setting identification, further examine
Survey the Backup Data whether reserved storage space saves master boot sector;If detecting, reserved storage space saves master boot sector
Backup Data, it is determined that the data of master boot sector are destroyed;And master is restored according to the Backup Data of reserved storage space and is drawn
Lead the data of sector.The program can restore master boot sector when the data for detecting master boot sector are destroyed in time
Data, it is ensured that normally handle customer service
In a possible design, the above method further include: if master boot sector saves the first setting identification, compare
Whether newest Backup Data is identical in the data and reserved storage space of master boot sector;If data of master boot sector and pre-
Stay newest Backup Data in memory space different, then in reserved storage space backup master boot sector data, backup side
Formula can be incremental backup or full backup, obtain the Backup Data of a master boot sector.If the data of master boot sector
It is identical as Backup Data newest in reserved storage space, then the data of master boot sector are not carried out in reserved storage space
Backup.The newest Backup Data of master boot sector can be only saved in reserved storage space, it is (such as each that not homogeneous can also be saved
A setting period backup is primary) Backup Data of backup, it is saved from second sector of reserved storage space, when reserved storage
When space is all occupied, newest a Backup Data is replaced into oldest a Backup Data, is being retained in advance to realize
Store up the Backup Data that space cycle saves each setting period of master boot sector.
In a kind of possible design, the above-mentioned data for restoring master boot sector according to the Backup Data of reserved storage space,
It specifically includes: obtaining the first Backup Data from reserved storage space, the first Backup Data is newest Backup Data or user
Determining Backup Data;The data for the first Backup Data replacement master boot sector that will acquire.Once it is determined that master boot sector
Data are destroyed, and the last Backup Data can be obtained from reserved storage space, extensive according to the last Backup Data
The data of multiple master boot sector;If reserved storage space saves more parts of Backup Datas, portion can be selected standby in more parts of Backup Datas
Part data (being not necessarily the last Backup Data) restore the data of master boot sector.
In a kind of possible design, the above method further include: if reserved storage space does not save the backup of master boot sector
Data, it is determined that master boot sector not yet uses, and does not restore the data of master boot sector according to the data in reserved storage space.
Since master boot sector not yet uses, no matter whether pre-stored space saves data, all without restoring master boot sector.
In a kind of possible design, the above method further include: add second in the storage equipment where master boot sector
Setting identification;Monitor whether the second setting identification is written over;If the second setting identification is written over, it is determined that storage equipment is by least
Two operating systems are mixed;The mixed alarm of storage equipment is issued, so that user triggers preset instructions, preset instructions instruction detection master
Whether boot sector saves the first setting identification.After determining that storage equipment is used with, the mixed alarm of storage equipment can be issued,
To remind related technical personnel to handle at once, more serious consequence is avoided to occur.
On the other hand, embodiments herein also provides a kind of data reconstruction method of master boot sector, method include:
The second setting identification is added in storage equipment where master boot sector;Monitor whether the second setting identification is written over;If second
Setting identification is written over, it is determined that storage equipment is used with by least two operating systems;The mixed alarm of storage equipment is issued, so as to
The following movement of user's triggering: the first setting identification and reserved storage space guarantor are not preserved in master boot sector if detecting
There is the Backup Data of master boot sector, then restores the data of master boot sector according to the Backup Data of reserved storage space.?
After determining that storing equipment is used with, the mixed alarm of storage equipment can be issued, to remind at related technical personnel's horse back
Reason, avoids more serious consequence from occurring.
On the other hand, embodiments herein also provides a kind of Data Recapture Unit of master boot sector, and device includes:
One detection module, for detecting whether master boot sector saves the first setting identification;Second detection module, if being fanned for main boot
Qu Wei saves the first setting identification, then detects the Backup Data whether reserved storage space saves master boot sector;First determines
Module, if saving the Backup Data of master boot sector for reserved storage space, it is determined that the data of master boot sector are broken
It is bad;, recovery module, for according to the Backup Data of reserved storage space restore master boot sector data.The program can be
When detecting that the data of master boot sector are destroyed, restore the data of master boot sector in time, it is ensured that normally handle customer service.
In a kind of possible design, above-mentioned apparatus further include: comparison module, if saving the first setting for master boot sector
Whether identical mark, then compare newest Backup Data in the data and reserved storage space of master boot sector;Backup module is used
If the data in master boot sector are different from Backup Data newest in reserved storage space, backed up in reserved storage space
The data of master boot sector obtain the Backup Data of master boot sector.
In a kind of possible design, above-mentioned backup module is also used to: if the data and reserved storage space of master boot sector
In newest Backup Data it is identical, 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 is drawn for restoring master according to the Backup Data of reserved storage space
The data for leading sector, are specifically used for: obtaining the first Backup Data from reserved storage space, the first Backup Data is newest backup
The Backup Data that data or user determine;The data for the first Backup Data replacement master boot sector that will acquire.
In a kind of possible design, above-mentioned first determining module is also used to: if reserved storage space does not save main boot fan
The Backup Data in area, it is determined that master boot sector not yet uses, and does not restore main boot fan according to the data in reserved storage space
The data in area.
In a kind of possible design, above-mentioned apparatus further include: adding module, for being set in the storage where master boot sector
Standby the second setting identification of middle addition;Monitoring module, for monitoring whether the second setting identification is written over;Second determining module is used
If being written in the second setting identification, it is determined that storage equipment is used with by least two operating systems;Alarm module, for issuing
The mixed alarm of equipment is stored, so that user triggers preset instructions, whether preset instructions instruction detection master boot sector saves first
Setting identification.
On the other hand, embodiments herein also provides a kind of Data Recapture Unit of master boot sector, and device includes: to add
Add module, for adding the second setting identification in the storage equipment where master boot sector;Monitoring module, for monitoring second
Whether setting identification is written over;Determining module, if being written over for the second setting identification, it is determined that storage equipment is by least two
Operating system is mixed;Alarm module, for issuing the mixed alarm of storage equipment, so that user triggers following movement: if detecting
The first setting identification is not preserved in master boot sector and reserved storage space preserves the Backup Data of master boot sector,
Then restore the data of master boot sector according to the Backup Data of reserved storage space.The program is determining that storage equipment is used with
Afterwards, the mixed alarm of storage equipment can be issued, so that related technical personnel be reminded to handle at once, avoid it is more serious after
Fruit occurs.
The application provides the data reconstruction method and device of a kind of master boot sector, and whether detection master boot sector saves the
One setting identification;If the master boot sector does not save first setting identification, detect whether reserved storage space saves
The Backup Data of the master boot sector;If the reserved storage space saves the Backup Data of the master boot sector, really
The data of the fixed master boot sector are destroyed;Restore the master boot sector according to the Backup Data of the reserved storage space
Data.In the program, whether periodic detection master boot sector saves the first setting identification and whether reserved storage space protects
The Backup Data of master boot sector is deposited, if master boot sector does not save the first setting identification but reserved storage space saves master and draws
Lead the Backup Data of sector, it is determined that the data of master boot sector are destroyed, and the master saved in time according to reserved storage space
The Backup Data of boot sector restores the data of master boot sector, so as to be destroyed in the data for detecting master boot sector
When, restore the data of master boot sector in time, it is ensured that normally handle customer service.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, for those of ordinary skill in the art
Speech, without any creative labor, is also possible to obtain other drawings based on these drawings.
Fig. 1 is a kind of flow chart of the data reconstruction method of master boot sector of the embodiment of the present invention;
Fig. 2 is the structural schematic diagram of the existing subregion of disk in the embodiment of the present invention;
Fig. 3 is the flow chart of the data method of another master boot sector in the embodiment of the present invention;
Fig. 4 is the flow chart of the data reconstruction method of another master boot sector of the embodiment of the present invention;
Fig. 5 is the flow chart of the data reconstruction method of another master boot sector of the embodiment of the present invention;
Fig. 6 is a kind of structural schematic diagram of the Data Recapture Unit of master boot sector in the embodiment of the present invention;
Fig. 7 is the structural schematic diagram of the Data Recapture Unit of another master boot sector in the embodiment of the present invention;
Fig. 8 is the structural schematic diagram of the Data Recapture Unit of another master boot sector in the embodiment of the present invention;
Fig. 9 is a kind of structural schematic diagram of the Data Recapture Unit of master boot sector in the embodiment of the present invention.
Specific embodiment
Technical solution in order to enable those skilled in the art to better understand the present invention, below in conjunction with of the invention real
The attached drawing in example is applied, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described implementation
Example is only a part of the embodiment of the present invention, instead of all the embodiments.
In order to realize that the data for restoring master boot sector in time when the data of master boot sector are destroyed, the present invention are implemented
Example provides a kind of data reconstruction method of master boot sector, and this method can be, but not limited to apply in computer or virtual machine
In, the process of this method is as shown in Figure 1, execute that steps are as follows:
S11: whether detection master boot sector saves the first setting identification.
In the normal situation of data of master boot sector, the first setting identification is stored in master boot sector, and one
The data of denier master boot sector are destroyed, and the first setting identification is just destroyed, therefore, can with periodic detection master boot sector whether
The first setting identification is saved, can also aperiodically detect whether master boot sector saves the first setting identification, thus according to master
Whether first setting identification is saved in boot sector to determine whether the data of master boot sector are destroyed.
Optionally, to set whether cycle detection master boot sector saves the first setting identification, which can root
It is set according to actual needs, for example, being set as 1 hour, 2 hours, 2.5 hours, 3 hours etc.;First setting identification can also
To be set according to actual needs, setting character, setting symbol, end of identification etc. can be.
S12: if master boot sector does not save the first setting identification, detect whether reserved storage space saves main boot fan
The Backup Data in area.
Master boot sector does not save the first setting identification, it is understood that there may be two kinds of situations, one is master boot sector not yet to make
With master boot sector never saved data, and it is to confirm that another kind is that the data of master boot sector are destroyed for which kind of feelings
Condition, it is also necessary to further check whether reserved storage space saves the Backup Data of master boot sector, and then confirm main boot fan
Whether the data in area are destroyed.
S13: if reserved storage space saves the Backup Data of master boot sector, it is determined that the data of master boot sector are broken
It is bad.
If reserved storage space saves the Backup Data of master boot sector, illustrate that master boot sector has begun use, but
It is and does not have the first setting identification, then is assured that the data of master boot sector have been destroyed.
S14: restore the data of master boot sector according to the Backup Data of reserved storage space.
After the data for determining master boot sector are destroyed, the Backup Data of reserved storage space is obtained in time to restore main
The data of boot sector, there are many kinds of the modes of recovery, specifically can directly save the Backup Data of reserved storage space
It is realized in master boot sector.
In the program, whether periodic detection master boot sector saves the first setting identification and whether reserved storage space protects
The Backup Data of master boot sector is deposited, if master boot sector does not save the first setting identification but reserved storage space saves master and draws
Lead the Backup Data of sector, it is determined that the data of master boot sector are destroyed, and the master saved in time according to reserved storage space
The Backup Data of boot sector restores the data of master boot sector, so as to be destroyed in the data for detecting master boot sector
When, restore the data of master boot sector in time, it is ensured that normally handle customer service.
Optionally, it after S11, if master boot sector saves the first setting identification, is backed up in reserved storage space
The data of master boot sector obtain the Backup Data of master boot sector.
If master boot sector saves the first setting identification, illustrate boot sector data be it is normal, at this moment can be pre-
Memory space is stayed to back up the data of master boot sector, it is right when master boot sector saves the first setting identification to determine every time
The data of master boot sector are once backed up, it can be ensured that when the data of master boot sector are destroyed, as much as possible with newest
Backup Data restore master boot sector data.
Reserved storage space can be obtained by carrying out subregion to disk again, can also be using existing point in disk
Area is illustrated by taking the existing subregion using disk as an example below, is illustrated in figure 2 the existing partitioned organization figure an of disk.
Wherein, 4K is challenge lock region before disk, and end is reserved storage space, and the size of reserved storage space is disk size * 8-
8, unit is sector, for example, the disk of 10G, reserved storage space size is 10*8-8=72 (sector), the magnetic of virtual machine
Disk is allocated to the subregion that virtual machine uses, in virtual machine as it can be seen that and 4K challenge lock and reserved storage space are hidden to virtual machine
Hiding.The first sector of reserved storage space is metadata sector, does not save the Backup Data of master boot sector, is used to minute book disk
The details of the Backup Data of master boot sector, the Backup Data for whether saving master boot sector including this disk, most multipotency
The quantity of the Backup Data of preservation, current nearest alternate sector etc..Second sector of reserved storage space is to last one
Sector is used to regard backup space, stores the Backup Data of master boot sector.
The data of backup master boot sector in reserved storage space obtain the Backup Data of master boot sector, specific mistake
Journey are as follows: whether identical compare newest Backup Data in the data and reserved storage space of master boot sector;If master boot sector
Data it is different from Backup Data newest in reserved storage space, then in reserved storage space backup master boot sector number
According to backup mode can be incremental backup or full backup, obtain the Backup Data of a master boot sector.If main boot is fanned
The data in area are identical as Backup Data newest in reserved storage space, then not to master boot sector in reserved storage space
Data are backed up.
The newest Backup Data of master boot sector can be only saved in reserved storage space, not homogeneous (example can also be saved
Once such as each setting period backup) Backup Data of backup, saves from second sector of reserved storage space, when reserved
When memory space is all occupied, newest a Backup Data is replaced into oldest a Backup Data, to realize pre-
Retain the Backup Data that storage space cycle saves each setting period of master boot sector.
Correspondingly, restore the data of master boot sector, specific mistake in above-mentioned S14 according to the Backup Data of reserved storage space
Journey are as follows: obtain the first Backup Data from reserved storage space, the first Backup Data is that newest Backup Data or user determine
Backup Data;The data for the first Backup Data replacement master boot sector that will acquire.
Optionally, it once it is determined that the data of master boot sector are destroyed, can be obtained from reserved storage space the last
Backup Data, restore the data of master boot sector according to the last Backup Data.
Optionally, if reserved storage space saves more parts of Backup Datas, a backup number can be selected in more parts of Backup Datas
Restore the data of master boot sector according to (being not necessarily the last Backup Data).
Restore the specific implementation of the data of master boot sector are as follows: the Backup Data replacement master boot sector that will acquire
Data, to realize the data for restoring master boot sector.
The embodiment of the present invention also provides the data reconstruction method of another master boot sector, and this method is applied in virtual machine
In, the operating system of virtual machine is FusionSphere cloud operating system, the process of this method as shown in figure 3, specifically include with
Lower step:
S30: process starts.
S31: to set whether cycle detection master boot sector saves end of identification, if master boot sector does not save end mark
Know, executes S32;If master boot sector saves end of identification, S36 is executed.
Master boot sector data under normal circumstances, end of identification is stored in master boot sector, once master draw
The data for leading sector are destroyed, and end of identification is just destroyed, therefore whether can be saved first with periodic detection master boot sector and be set
Calibration is known, to determine whether the data of master boot sector are broken according to the first setting identification whether is saved in master boot sector
It is bad.
S32: whether detection reserved storage space saves the Backup Data of master boot sector, if reserved storage space saves master
The Backup Data of boot sector executes S33;If reserved storage space does not save the Backup Data of master boot sector, S35 is executed.
Master boot sector does not save end of identification, it is understood that there may be two kinds of situations, one is master boot sector not yet to use, main
Boot sector never saved data, and another kind is that the data of master boot sector are destroyed, and is which kind of situation to confirm, also needs
It further to check whether reserved storage space saves the Backup Data of master boot sector, and then confirm the data of master boot sector
Whether it is destroyed.
S33: determining that the data of master boot sector are destroyed, and executes S34.
If reserved storage space saves the Backup Data of master boot sector, illustrate that master boot sector has begun use, but
It is and is not over mark, then is assured that the data of master boot sector have been destroyed.
S34: obtaining the first Backup Data from reserved storage space, the first Backup Data replacement master boot sector that will acquire
Data.
First Backup Data is newest Backup Data or the Backup Data that user determines.
S35: master boot sector not yet uses, and does not restore the number of master boot sector according to the data in reserved storage space
According to.
There may be data in reserved storage space at this time, it is also possible to there is no data.
Whether identical S36: comparing newest Backup Data in the data and reserved storage space of master boot sector, if master draws
The data for leading sector are different from Backup Data newest in reserved storage space, execute S37;If data of master boot sector and pre-
It stays newest Backup Data in memory space identical, executes S38.
S37: the data of backup master boot sector in reserved storage space obtain 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 saves end of identification and whether reserved storage space saves master
The Backup Data of boot sector, if master boot sector does not save end of identification but reserved storage space saves master boot sector
Backup Data, it is determined that the data of master boot sector are destroyed, and the master boot sector saved in time according to reserved storage space
Backup Data restore master boot sector data, when so as to be destroyed in the data for detecting master boot sector, in time
Restore the data of master boot sector, it is ensured that normally handle customer service.
The embodiment of the present invention provides the data reconstruction method of another master boot sector, and the process of this method is as shown in Figure 4.
In the reason of data of master boot sector are destroyed, have one the reason is that because related technical personnel maloperation cause master draw
Caused by storage equipment where leading sector is used with by two operating systems simultaneously, needle can carry out storage equipment for that reason
Real time monitoring occurs to avoid the mixed situation of storage equipment.This method further includes on the basis of method as shown in Figure 1
Following steps:
S15: the second setting identification is added in the storage equipment where master boot sector.
It can will specifically store preceding 4 sector formattings of equipment and the second setting identification is written, store first 4 of equipment
Sector is not master boot sector place, and the second setting identification is different from the first setting identification, and the second setting identification can root
It is set according to actual needs, for example, it can be set to being the specific coding of FusionSphere cloud operating system, is deposited to identify
It stores up equipment and is used by carry to FusionSphere cloud operating system;Or it is set as the specific coding of Vmware, to identify
It stores equipment and is used by carry to VMware cloud operating system.
S16: whether the second setting identification of monitoring is written over.
S17: if the second setting identification is written over, it is determined that storage equipment is used with by least two operating systems.
S18: issuing the mixed alarm of storage equipment, so that user triggers preset instructions, preset instructions instruction executes S11.
In the program, if storage equipment is only used by an operating system, then the second setting identification is not allow to rewrite
, only the storage equipment is used by another operating system simultaneously, and the second setting identification can be just written over, therefore can be passed through
Monitor whether the second setting identification is written over to determine whether storage equipment is used with.Determining storage equipment by least two operations
After system is mixed, the mixed alarm of storage equipment can be issued and avoided more so that related technical personnel be reminded to handle at once
Serious consequence occurs.
The embodiment of the present invention also provides the data reconstruction method of another master boot sector, and this method can be, but not limited to answer
In virtual machine, the process of this method is as shown in figure 5, specifically comprise the following steps:
S51: the second setting identification is added in the storage equipment where master boot sector.
S52: whether the second setting identification of monitoring is written over.
S53: if the second setting identification is written over, it is determined that storage equipment is used with by least two operating systems.
S54: issuing the mixed alarm of storage equipment, so that user triggers following movement: not having if detecting in master boot sector
Have and preserve the first setting identification and reserved storage space preserves the Backup Data of master boot sector, then according to reserved storage
The Backup Data in space restores the data of master boot sector.
In the program, if storage equipment is only used by an operating system, then the second setting identification is not allow to rewrite
, only the storage equipment is used by another operating system simultaneously, and the second setting identification can be just written over, therefore can be passed through
Monitor whether the second setting identification is written over to determine whether storage equipment is used with.Determining storage equipment by least two operations
After system is mixed, the mixed alarm of storage equipment can be issued and avoided more so that related technical personnel be reminded to handle at once
Serious consequence occurs.
Based on the same inventive concept, the embodiment of the present invention provides a kind of Data Recapture Unit of master boot sector, the device
It can be, but not limited to be arranged in computer or virtual machine, the structure of the device is as shown in fig. 6, specifically include the first detection mould
Block 61, the second detection module 62, the first determining module 63 and recovery module 64.Wherein:
First detection module 61, for detecting whether master boot sector saves the first setting identification;
Second detection module 62 detects reserved storage space if not saving the first setting identification for master boot sector
Whether the Backup Data of master boot sector is saved;
First determining module 63, if saving the Backup Data of master boot sector for reserved storage space, it is determined that master draws
The data for leading sector are destroyed;
Recovery module 64, for restoring the data of master boot sector according to the Backup Data of reserved storage space.
In the program, whether periodic detection master boot sector saves the first setting identification and whether reserved storage space protects
The Backup Data of master boot sector is deposited, if master boot sector does not save the first setting identification but reserved storage space saves master and draws
Lead the Backup Data of sector, it is determined that the data of master boot sector are destroyed, and the master saved in time according to reserved storage space
The Backup Data of boot sector restores the data of master boot sector, so as to be destroyed in the data for detecting master boot sector
When, restore the data of master boot sector in time, it is ensured that normally handle customer service.
The embodiment of the present application also provides the Data Recapture Unit of another master boot sector, the structure of the device such as Fig. 7 institute
Show, further include comparison module 65 and backup module 66 on the basis of device as shown in FIG. 6, in which:
Comparison module 65, if saving the first setting identification for master boot sector, compare the data of master boot sector with
Whether newest Backup Data is identical in reserved storage space;
Backup module 66, if the data for master boot sector are different from Backup Data newest in reserved storage space,
Then in reserved storage space backup master boot sector data, obtain the Backup Data of master boot sector.
Optionally, above-mentioned backup module 66, is also used to:
If the data of master boot sector are identical as Backup Data newest in reserved storage space, in reserved storage space
In the data of master boot sector are not backed up.
Specifically, above-mentioned recovery module 64, for restoring master boot sector according to the Backup Data of reserved storage space
Data are specifically used for:
The first Backup Data is obtained from reserved storage space, the first Backup Data is that newest Backup Data or user are true
Fixed Backup Data;
The data for the first Backup Data replacement master boot sector that will acquire.
Specifically, above-mentioned first determining module 63, is also used to:
If reserved storage space does not save the Backup Data of master boot sector, it is determined that master boot sector not yet uses, no
Restore the data of master boot sector according to the data in reserved storage space.
The embodiment of the present application also provides the Data Recapture Unit of another master boot sector, the structure of the device such as Fig. 8 institute
Show to further include adding module 67, monitoring module 68, the second determining module 69 and alarm mould on the basis of device as shown in FIG. 6
Block 70, in which:
Adding module 67, for adding the second setting identification in the storage equipment where master boot sector;
Monitoring module 68, for monitoring whether the second setting identification is written over;
Second determining module 69, if being written over for the second setting identification, it is determined that storage equipment is by least two operations
System is mixed;
Alarm module 70, for issuing the mixed alarm of storage equipment, so that user triggers preset instructions, preset instructions instruction
Turn to first detection module 61.
Based on the same inventive concept, the embodiment of the present invention provides a kind of Data Recapture Unit of master boot sector, the device
It can be, but not limited to be arranged in computer or virtual machine, the structure of the device is as shown in figure 9, specifically include adding module
91, monitoring module 92, determining module 93 and alarm module 94, in which:
Adding module 91, for adding the second setting identification in the storage equipment where master boot sector;
Monitoring module 92, for monitoring whether the second setting identification is written over;
Determining module 93, if being written over for the second setting identification, it is determined that storage equipment is by least two operating systems
It is mixed;
Alarm module 94, for issuing the mixed alarm of storage equipment, so that user triggers following movement: if detecting, master draws
It leads and does not preserve the first setting identification in sector and reserved storage space preserves the Backup Data of master boot sector, then root
Restore the data of master boot sector according to the Backup Data of reserved storage space.
In the program, if storage equipment is only used by an operating system, then the second setting identification is not allow to rewrite
, only the storage equipment is used by another operating system simultaneously, and the second setting identification can be just written over, therefore can be passed through
Monitor whether the second setting identification is written over to determine whether storage equipment is used with.Determining storage equipment by least two operations
After system is mixed, the mixed alarm of storage equipment can be issued and avoided more so that related technical personnel be reminded to handle at once
Serious consequence occurs.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product
Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions
The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs
Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real
The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
Although alternative embodiment of the invention has been described, created once a person skilled in the art knows basic
Property concept, then additional changes and modifications may be made to these embodiments.So the following claims are intended to be interpreted as include can
It selects embodiment and falls into all change and modification of the scope of the invention.
Obviously, those skilled in the art can carry out various modification and variations without departing from this hair to the embodiment of the present invention
The spirit and scope of bright embodiment.In this way, if these modifications and variations of the embodiment of the present invention belong to the claims in the present invention
And its within the scope of equivalent technologies, then the present invention is also intended to include these modifications and variations.
Claims (10)
1. a kind of data reconstruction method of master boot sector, which is characterized in that the described method includes:
Whether detection master boot sector saves the first setting identification;
If the master boot sector does not save first setting identification, detects reserved storage space and whether save the master and draw
Lead the Backup Data of sector;
If the reserved storage space saves the Backup Data of the master boot sector, it is determined that the data of the master boot sector
It is destroyed;
Restore the data of the master boot sector according to the Backup Data of the reserved storage space;
Wherein, the method also includes:
The second setting identification is added in the storage equipment where the master boot sector;
Monitor whether second setting identification is written over;
If second setting identification is written over, it is determined that the storage equipment is used with by least two operating systems;
The mixed alarm of storage equipment is issued, so that user triggers preset instructions, the preset instructions instruction detects the main boot
Whether sector saves the first setting identification.
2. the method as described in claim 1, which is characterized in that the method also includes:
If the master boot sector saves first setting identification, the data for comparing the master boot sector are reserved with described
Whether newest Backup Data is identical in memory space;
If the data of the master boot sector are different from newest Backup Data in the reserved storage space, described reserved
The data that the master boot sector is backed up in memory space obtain the Backup Data of the master boot sector.
3. method according to claim 2, which is characterized in that the method also includes:
If the data of the master boot sector are identical as newest Backup Data in the reserved storage space, described reserved
The data of the master boot sector are not backed up in memory space.
4. method a method according to any one of claims 1-3, which is characterized in that the Backup Data according to the reserved storage space is extensive
The data of the multiple master boot sector, specifically include:
The first Backup Data is obtained from the reserved storage space, first Backup Data is newest Backup Data or use
The Backup Data that family determines;
First Backup Data that will acquire replaces the data of the master boot sector.
5. method a method according to any one of claims 1-3, which is characterized in that the method also includes:
If the reserved storage space does not save the Backup Data of the master boot sector, it is determined that the master boot sector is not yet
It uses, does not restore the data of the master boot sector according to the data in the reserved storage space.
6. a kind of Data Recapture Unit of master boot sector, which is characterized in that described device includes:
First detection module, for detecting whether master boot sector saves the first setting identification;
It is empty to detect reserved storage if not saving first setting identification for the master boot sector for second detection module
Between whether save the Backup Data of the master boot sector;
First determining module, if saving the Backup Data of the master boot sector for the reserved storage space, it is determined that institute
The data for stating master boot sector are destroyed;
Recovery module, for restoring the data of the master boot sector according to the Backup Data of the reserved storage space;
Wherein, described device further include:
Adding module, for adding the second setting identification in the storage equipment where the master boot sector;
Monitoring module, for monitoring whether second setting identification is written over;
Second determining module, if being written over for second setting identification, it is determined that the storage equipment is by least two behaviour
It is mixed to make system;
Alarm module, for issuing the mixed alarm of storage equipment, so that user triggers preset instructions, the preset instructions instruction inspection
Survey whether the master boot sector saves the first setting identification.
7. device as claimed in claim 6, which is characterized in that described device further include:
Comparison module compares the master boot sector if saving first setting identification for the master boot sector
Whether data and newest Backup Data in the reserved storage space are identical;
Backup module, if not for newest Backup Data in the data and the reserved storage space of the master boot sector
Together, then the data that the master boot sector is backed up in the reserved storage space obtain the backup number of the master boot sector
According to.
8. device as claimed in claim 7, which is characterized in that the backup module is also used to:
If the data of the master boot sector are identical as newest Backup Data in the reserved storage space, described reserved
The data of the master boot sector are not backed up in memory space.
9. such as device as claimed in claim 6 to 8, which is characterized in that the recovery module, for according to the pre- retention
The Backup Data in storage space restores the data of the master boot sector, is specifically used for:
The first Backup Data is obtained from the reserved storage space, first Backup Data is newest Backup Data or use
The Backup Data that family determines;
First Backup Data that will acquire replaces the data of the master boot sector.
10. such as device as claimed in claim 6 to 8, which is characterized in that first determining module is also used to:
If the reserved storage space does not save the Backup Data of the master boot sector, it is determined that the master boot sector is not yet
It uses, does not restore the data of the master boot sector according to the data in the reserved storage space.
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 CN105446832A (en) | 2016-03-30 |
CN105446832B true 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) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105446832B (en) * | 2015-11-10 | 2019-02-05 | 华为技术有限公司 | The data reconstruction method and device of master boot sector |
CN114816847A (en) * | 2022-04-07 | 2022-07-29 | 联想开天科技有限公司 | Data recovery method and device |
Citations (3)
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 |
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 (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1274009A3 (en) * | 2001-07-03 | 2003-12-03 | Hewlett-Packard Company | System and method to enable a legacy BIOS system to boot from a disk that includes EFI GPT partitions |
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 |
-
2015
- 2015-11-10 CN CN201510764466.3A patent/CN105446832B/en active Active
-
2016
- 2016-04-25 WO PCT/CN2016/080145 patent/WO2017080140A1/en active Application Filing
Patent Citations (3)
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 |
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 |
Also Published As
Publication number | Publication date |
---|---|
WO2017080140A1 (en) | 2017-05-18 |
CN105446832A (en) | 2016-03-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103620550B (en) | Virtual machine image is analyzed | |
CN109189546B (en) | Method and device for making online snapshot of virtual machine | |
CN103793288B (en) | A kind of software watchdog system and method | |
CN104965768B (en) | The method and system placed for the service-aware data in storage system | |
US20140108753A1 (en) | Merging an out of synchronization indicator and a change recording indicator in response to a failure in consistency group formation | |
US9069711B2 (en) | Source cleaning cascaded volumes using write and background copy indicators | |
US10860454B2 (en) | Analyzing large-scale data processing jobs | |
CN104462612A (en) | Method and device for monitoring database information | |
CN105446832B (en) | The data reconstruction method and device of master boot sector | |
CN109408343B (en) | Hard disk indicator lamp control method and device and related equipment | |
CN106095619A (en) | A kind of virtual machine backup method and device | |
CN107533602B (en) | Computing device and method thereof, and computing system | |
CN108647118A (en) | Copy abnormal restoring method, device and computer equipment based on storage cluster | |
CN105760251B (en) | A kind of method and apparatus of Backup Data | |
US8219858B2 (en) | Method for testing hard disks under an extensible firmware interface | |
EP3201754A1 (en) | Improved apparatus and method for performing snapshots of block-level storage devices | |
CN103729166A (en) | Method, device and system for determining thread relation of program | |
CN101833496A (en) | Detection device based on host anti-object reusability of hard disk and detection method thereof | |
CN113821302A (en) | Method and device for deploying virtual machine on virtualization cloud platform, electronic equipment and medium | |
US20120179885A1 (en) | Write control system | |
CN117033099A (en) | Pressure testing method, system and device for system hard disk and storage medium | |
US20190354442A1 (en) | System and method for backup scheduling | |
CN109086162B (en) | Memory diagnosis method and device | |
CN108108131B (en) | Data processing method and device for SSD (solid State disk) | |
CN101751283A (en) | Virtual machine monitor, virtual machine system and client operation system state acquiring method |
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 Technologies Co.,Ltd. Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd. |