Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, embodiment of the present invention is described further in detail below in conjunction with accompanying drawing.
Referring to Fig. 1, a kind of method of recovering storage system is provided in the present embodiment, comprising:
101, obtain partition table and the partition data of the storage system of designated terminal;
The terminal at the executive agent place in the present embodiment has identical systematic parameter with described designated terminal, and preferably, terminal and the described designated terminal at the executive agent place in the present embodiment belong to type of the same race.In the present embodiment, the terminal at the executive agent place in the present embodiment can be referred to as to recover terminal or back-up terminals or main control terminal.When the terminal at executive agent place can be referred to as main control terminal, described designated terminal can be referred to as from terminal.Certainly, the terminal in the present embodiment can be mobile terminal.
Preferably, described partition table and the partition data that obtains the storage system of designated terminal comprises:
Read the partition table of the storage system of designated terminal by general-purpose serial bus USB;
Read the partition data of the storage system of described designated terminal according to the partition table of the storage system of described designated terminal.
102, partition table and the partition data of the storage system of the described designated terminal of storage;
Preferably, partition table and the partition data of the storage system of the described designated terminal of described storage comprise:
The partition table and the partition data that upgrade local storage system with partition table and the partition data of the storage system of described designated terminal.
Alternatively, after the partition table and partition data of the storage system of the described designated terminal of described storage, also comprise:
Send partition table and the partition data of the storage system of this locality to described designated terminal, make described designated terminal upgrade partition table and the partition data of the storage system of self this locality with the described partition table that receives and partition data.
103, when the current storage system of described designated terminal breaks down, the current storage system of described designated terminal is diagnosed the fault data in the current storage system of the described designated terminal of acquisition;
Preferably, described storage system to described designated terminal is diagnosed, and the fault data in the current storage system of the described designated terminal of acquisition comprises:
Read partition table and the partition data of the current storage system of described designated terminal by USB;
Partition table and partition data according to the storage system of the described designated terminal of this locality storage, partition table and partition data to the current storage system of this described designated terminal that reads are diagnosed, and obtain the fault data in the current storage system of this described designated terminal that reads.
Preferably, partition table and the partition data of the storage system of described described designated terminal according to self storing, partition table and partition data to the current storage system of this described designated terminal that reads are diagnosed, obtain the fault data in the current storage system of this described designated terminal that reads, comprising:
Partition table and partition data according to the storage system of the described designated terminal of this locality storage, subregion without file system on the current storage system of this described designated terminal that reads is carried out the scale-of-two diagnosis, there is the subregion of file system to carry out the file system level diagnosis on current storage system to this described designated terminal that reads, obtains the fault data in the current storage system of this described designated terminal that reads.
104, according to the fault data in the partition table of the storage system of the described designated terminal of described fault data and local storage and current storage system that partition data is repaired described designated terminal.
Preferably, the fault data in the partition table of the storage system of described described designated terminal according to described fault data and local storage and the current storage system that partition data is repaired described designated terminal comprises:
According to the fault data in the storage system of described this described designated terminal that reads of diagnosing out, search corresponding repair data in this locality;
The repair data of the described this locality storage that finds is sent to described designated terminal, make described designated terminal upgrade partition table and the partition data of the storage system of self with described repair data, to recover the current storage system of described designated terminal.
the technical scheme that provides by the present embodiment, partition table and the partition data of the storage system of storage designated terminal, when the storage system of described designated terminal breaks down, the partition table of storage system of the designated terminal by storage and the storage system that partition data recovers described designated terminal, due to the terminal room the transmission of data by two same model of use, back up the data of the other side's storage system, and when the storage system of one of them terminal breaks down, another terminal of storage system that can be by storing this terminal is recovered storage system, thereby can not need use professional flashburn tools just can repair terminal, common mobile terminal user just can realize reparation to the terminal storage system by simple operations, thereby problem is recovered by the system that has solved mobile terminal.
A kind of method of recovering storage system is provided in the present embodiment, pass through with USB, that 2 mobile terminal devices are interconnected in the present embodiment, form a pair of master-slave equipment, in the present embodiment, the master control mobile terminal is first terminal, be the second terminal from mobile terminal, the second terminal and the designated terminal in above-described embodiment related in the present embodiment are similar.The master control mobile terminal device connects carrying out mirror back-up, recovery, diagnosis and reparation from mobile terminal device by USB.Wherein mobile terminal can be the electronic products such as panel computer, mobile phone, and this present embodiment is not specifically limited.
Concrete referring to Fig. 2, the method for a kind of recovery system that provides in the present embodiment comprises:
201, first terminal is connected by USB with the second terminal, and first terminal obtains partition table and the partition data of the storage system of the second terminal, and stores partition table and the partition data of the storage system of the second terminal.
In the present embodiment, first terminal and the second terminal belong to type of the same race, and the systematic parameter that they are supported is the same, when first terminal is connected by USB with the second terminal, can carry out reading of data between two equipment.Wherein, data transmission procedure and the prior art of two terminals of specific implementation are similar, and the present embodiment does not repeat them here.
In the present embodiment, when the system failure appears in the second terminal, in order to realize that the system of the second terminal of breaking down is recovered, the system data in the time of at first will obtaining not the breaking down of this second terminal.In this step, after being connected by USB with the second terminal when first terminal, the second terminal starts by button, to self switch to from equipment mode, because the second terminal is connected with first terminal by USB, when the second terminal switched to from equipment mode, first terminal automatically switched to the main equipment pattern.In this step, function key is set on mobile terminal, this function key can realize the switching of the master-slave equipment pattern of first terminal and the second terminal, wherein this button can be a function key that newly increases on mobile terminal, also can carry out function to the existing button of terminal and expand, to realize the switching of first terminal and the second terminal master-slave equipment pattern, the button of concrete extended function can be the numerical key on mobile terminal, volume keys etc. are not specifically limited this present embodiment.
In the present embodiment, concrete first terminal obtains partition table and the partition data of the second terminal, comprising:
At first first terminal obtains the first address at the partition table place of self storage system;
Read the partition table of the storage system of the second terminal by USB, according to the partition table of the storage system of the second terminal, read the partition data of storage system of the second terminal to local.
Get the partition table and partition data of the second terminal at first terminal after, partition table and the partition data of storage the second terminal specifically comprise:
First terminal is with partition table and the partition data of the storage system of the second terminal, begins to upgrade self partition table and partition data from self the partition table first address of storage system, thereby completes first terminal to the mirror image operation of the second terminal.
202, the partition table of the storage system of the second terminal storage first terminal and partition data.
In the present embodiment, not only support the master mobile terminal image copying from the system data of mobile terminal, also support partition table and partition data from the mobile terminal stores master mobile terminal simultaneously.
Concrete, at first first terminal reads partition table and the partition data of the storage system of self, by USB, partition table and the partition data of the storage system of self are passed to the second terminal, after the second terminal receives the partition table and partition data of storage system of first terminal, partition table and partition data with the storage system of first terminal upgrade partition table and the partition data of the storage system of oneself, thereby complete the second terminal to the mirror image operation of first terminal.
The attention of value be, in the present embodiment, first terminal is that master control mobile terminal, the second terminal are for being comparatively speaking from mobile terminal, after two mobile terminals are connected by USB, after the second starting terminal button, the second terminal enters from equipment mode, first terminal enters the main equipment pattern automatically, and is corresponding, when first terminal starts button, at this moment, first terminal is from equipment, and corresponding the second terminal is main equipment, and this present embodiment is not specifically limited.
The explanation of value be, if need to realize that the second terminal is to system's restore funcitons of first terminal, need to carry out this step, the system data of the second terminal image copying first terminal, if but do not need to realize that the second terminal is to system's restore funcitons of first terminal, do not need to carry out this step, it is optional whether carrying out this step in practical operation, and this present embodiment is not specifically limited.
203, when the current storage system of the second terminal breaks down, first terminal is diagnosed the current storage system of the second terminal, obtain the fault data in the current storage system of the second terminal, according to the fault data in the partition table of the storage system of the second terminal of described fault data and local storage and current storage system that partition data is repaired the second terminal.
in the present embodiment, when breaking down, the storage system of the second terminal can affect the normal operation of the second terminal, blue screen appears as the second terminal, or the fault that can't start, start the button on the second terminal this moment, the second terminal is not started from the storage system of Mass storage, start but switch to ROM, the second terminal is connected on the first terminal of normal operation by USB, at this moment, first terminal USB moves with holotype, the second terminal USB is with from mode operation, first terminal is read the Mass storage of the second terminal by USB, and realize mirror back-up with reference to partitioned organization and the partition data of Mass storage of self, diagnosis, further by the second terminal Mass storage being write to realize the reparation of image recovery and storage system.
In the present embodiment, concrete first terminal is diagnosed the storage system of the second terminal, and the fault data in the storage system of acquisition the second terminal comprises:
First terminal reads partition table and the partition data of the storage system of described the second terminal by USB;
First terminal is according to partition table and the partition data of the storage system of described second terminal of this locality storage, partition table and partition data to the current storage system of this described the second terminal of obtaining are diagnosed, and obtain the fault data in the current storage system of described the second terminal.
In this step preferably, first terminal is according to partition table and the partition data of the storage system of described second terminal of this locality storage, storage system to this described the second terminal of obtaining is diagnosed, and obtains the fault data in the current storage system of described the second terminal, comprising:
First terminal is according to partition table and the partition data of the storage system of described second terminal of this locality storage, subregion without file system on the current storage system of this described the second terminal of obtaining is carried out the scale-of-two diagnosis, there is the subregion of file system to carry out the file system level diagnosis on current storage system to this described the second terminal of obtaining, obtains the fault data in the current storage system of this described the second terminal of obtaining.
In this step, after fault data in the storage system that obtains the second terminal, storage system to the second terminal is repaired, wherein concrete first terminal is according to partition table and the partition data of the storage system of the second terminal of fault data and local storage, repair the fault data in the storage system of the second terminal
Comprise: according to the fault data in the current storage system of described the second terminal of diagnosing out, search corresponding repair data in this locality;
The repair data of the described this locality storage that finds is sent to described the second terminal, make described the second terminal upgrade partition table and the partition data of the storage system of self with described repair data, to recover the current storage system of described the second terminal.
in the present embodiment, when the terminal that breaks down is first terminal, start the button on first terminal, first terminal is not started from Mass storage, start but switch to ROM, first terminal is connected on the second terminal of normal operation by USB, at this moment, the second terminal USB moves with holotype, first terminal USB is with from mode operation, the second terminal is read the Mass storage of first terminal by USB, and realize mirror back-up with reference to self partitioned organization and partition data, diagnosis, further by first terminal Mass storage is write to realize image recovery and system's reparation.Concrete, the second terminal is recovered method and the first terminal of storage system of described first terminal according to the partition table of the storage system of first terminal and partition data similar according to the method for the storage system of the partition table of the storage system of described the second terminal and described the second terminal of partition data recovery, just carry out subject and mutually change, this present embodiment is repeated no more.
In order to make those skilled in the art more clearly understand the technical scheme that the present embodiment provides, now be exemplified below, as shown in Figure 5:
2 station terminal device A and B are arranged, start by button, B is switched to from equipment mode, and be connected with A by USB, at this moment, A automatically switches to main equipment, main equipment A is by USB, will be from partition table and the partition information on equipment B, backup in the storer of main equipment A with the form of file.when going wrong from the equipment B system, in the time of can't normally starting, start by button, B is switched to from equipment mode, and be connected with A by USB, at this moment, A automatically switches to main equipment, main equipment A reads partition table information and partition data from equipment B by USB, partition table information and partition data that comparison is retained on main equipment A are diagnosed, subregion without file system is carried out the scale-of-two diagnosis, carry out the file system level diagnosis for the subregion that file system is arranged, the data of required modification after main equipment A will diagnose, send to from equipment B by USB, after receiving diagnostic data from equipment B, diagnose modification, diagnosis is completed.
In the present embodiment, first terminal be connected terminal and connect by USB, carry out the mirror back-up of data, but be not limited to USB connected mode in the present embodiment, also can connect by bluetooth, can be also that other data transfer mode connects, and this present embodiment is not specifically limited.
the technical scheme that provides by the present embodiment, partition table and the partition data of the storage system of storage designated terminal, when the storage system of described designated terminal breaks down, the partition table of storage system of the designated terminal by storage and the storage system that partition data recovers described designated terminal, due to the terminal room the transmission of data by two same model of use, back up the data of the other side's storage system, and when the storage system of one of them terminal breaks down, another terminal of storage system that can be by storing this terminal is recovered storage system, thereby can not need use professional flashburn tools just can repair terminal, common mobile terminal user just can realize reparation to the terminal storage system by simple operations, thereby problem is recovered by the system that has solved mobile terminal.
Referring to Fig. 3, a kind of device that recovers storage system is provided in the present embodiment, comprising: data acquisition module 301, data memory module 302, fault diagnosis module 303 and fault recovery module 304.
Data acquisition module 301 is for partition table and the partition data of the storage system of obtaining designated terminal;
Data memory module 302 is used for storing partition table and the partition data of the storage system of the described designated terminal that described data acquisition module 301 obtains;
Fault diagnosis module 303 is used for when the current storage system of described designated terminal breaks down, the current storage system of described designated terminal being diagnosed the fault data in the current storage system of the described designated terminal of acquisition;
Fault recovery module 304, be used for storing partition table and the partition data of the storage system of the 302 described designated terminals of storing according to fault data and described data memory module that described fault diagnosis module 303 obtains, the fault data in the current storage system of the described designated terminal of reparation.
Referring to Fig. 4, preferably, described data acquisition module 301 comprises:
The first reading unit 301a is for read the partition table of the storage system of designated terminal by general-purpose serial bus USB;
The second reading unit 301b, the partition table that is used for the storage system of the described designated terminal that reads according to described the first reading unit 301a reads the partition data of the storage system of described designated terminal.
Referring to Fig. 4, alternatively, described device also comprises:
Data transmission blocks 305, after partition table and partition data for the storage system of storing designated terminals at described data memory module 302, send partition table and the partition data of the storage system of this locality to described designated terminal, make described designated terminal upgrade partition table and the partition data of the storage system of self with the partition table that receives and partition data.
Referring to Fig. 4, preferably, described fault diagnosis module 303 comprises:
Third reading is got unit 303a, is used for reading by USB partition table and the partition data of the current storage system of described designated terminal;
Failure diagnosis unit 303b, be used for partition table and partition data according to the storage system of the described designated terminal of described data memory module 302 storages, described third reading is got partition table and the partition data of the current storage system of the designated terminal that unit 303a reads and diagnose, obtain the fault data in the current storage system of described designated terminal.
Preferably, described failure diagnosis unit specifically is used for:
Partition table and partition data according to the storage system of described second terminal of described data memory module 302 storages, subregion without file system on the current storage system of described the second terminal that reads is carried out the scale-of-two diagnosis, there is the subregion of file system to carry out the file system level diagnosis, the partition table of the current storage system of the described designated terminal of acquisition and the fault data in partition data on current storage system to the described described designated terminal that reads.
Preferably, fault recovery module 304 comprises:
Repair data acquiring unit 304a is used for the fault data according to the described designated terminal of described fault diagnosis module 303 acquisitions, searches corresponding repair data in described data memory module 302;
Repair data transmitting element 304b, the repair data that the described data memory module 302 that is used for that described repair data acquiring unit is found is stored sends to described designated terminal, partition table and the partition data of the current storage system of renewal self after making described designated terminal with described repair data are to recover the current storage system of described designated terminal.
On the other hand, also provide a kind of terminal in the present embodiment, described terminal comprises the device of recovery storage system as above.
In order to make those skilled in the art more clearly understand the technical scheme that the present embodiment provides, now be exemplified below, referring to Fig. 5:
2 station terminal device A and B are arranged, and the critical piece of two equipment comprises respectively CPU(Central Processing Unit, central processing unit), ROM((Read-Only Memory, ROM (read-only memory)), Mass storage and USB interface hardware.Start by button, B is switched to from equipment mode, and be connected with A by USB, at this moment, A automatically switches to main equipment, and main equipment A is by USB, will be from partition table and the partition information on equipment B, backup in the storer of main equipment with the form of file.when going wrong from the equipment B system, in the time of can't normally starting, start by button, B is switched to from equipment mode, and be connected with A by USB, at this moment, A automatically switches to main equipment, main equipment A reads partition table information and partition data from equipment B by USB, partition table information and partition data that comparison is retained on main equipment A are diagnosed, subregion without file system is carried out the scale-of-two diagnosis, carry out the file system level diagnosis for the subregion that file system is arranged, the data of required modification after main equipment A will diagnose, send to from equipment B by USB, after receiving diagnostic data from equipment B, diagnose modification, diagnosis is completed.
the technical scheme that provides by the present embodiment, partition table and the partition data of the storage system of storage designated terminal, when the storage system of described designated terminal breaks down, the partition table of storage system of the designated terminal by storage and the storage system that partition data recovers described designated terminal, due to the terminal room the transmission of data by two same model of use, back up the data of the other side's storage system, and when the storage system of one of them terminal breaks down, another terminal of storage system that can be by storing this terminal is recovered storage system, thereby can not need use professional flashburn tools just can repair terminal, common mobile terminal user just can realize reparation to the terminal storage system by simple operations, thereby problem is recovered by the system that has solved mobile terminal.
The device that the present embodiment provides specifically can belong to same design with embodiment of the method, and its specific implementation process sees embodiment of the method for details, repeats no more here.
One of ordinary skill in the art will appreciate that all or part of step that realizes above-described embodiment can complete by hardware, also can come the relevant hardware of instruction to complete by program, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium of mentioning can be ROM (read-only memory), disk or CD etc.
The above is only preferred embodiment of the present invention, and is in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of doing, is equal to replacement, improvement etc., within all should being included in protection scope of the present invention.