CN104468521B - Online moving method, device and system - Google Patents
Online moving method, device and system Download PDFInfo
- Publication number
- CN104468521B CN104468521B CN201410640111.9A CN201410640111A CN104468521B CN 104468521 B CN104468521 B CN 104468521B CN 201410640111 A CN201410640111 A CN 201410640111A CN 104468521 B CN104468521 B CN 104468521B
- Authority
- CN
- China
- Prior art keywords
- migration
- memory block
- block region
- data
- synchronous
- 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
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
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
-
- 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/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/485—Task life-cycle, e.g. stopping, restarting, resuming execution
- G06F9/4856—Task life-cycle, e.g. stopping, restarting, resuming execution resumption being on a different machine, e.g. task migration, virtual machine migration
- G06F9/4862—Task life-cycle, e.g. stopping, restarting, resuming execution resumption being on a different machine, e.g. task migration, virtual machine migration the task being a mobile agent, i.e. specifically designed to migrate
- G06F9/4875—Task life-cycle, e.g. stopping, restarting, resuming execution resumption being on a different machine, e.g. task migration, virtual machine migration the task being a mobile agent, i.e. specifically designed to migrate with migration policy, e.g. auction, contract negotiation
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the present invention provides a kind of online moving method, device and system.This method includes:When receiving the migration order of migration server transmission, the first memory block region is created, and the first memory block region is mounted under migration catalogue, migration order includes migration catalogue;The IO for migrating catalogue is redirected to the first memory block region, the first memory block region is used for data storage;Local hard drive Data Migration corresponding to catalogue will be migrated to move target end;By the data duplication in the first memory block region to move target end, and the first memory block region is discharged after being stored in local hard drive;Terminate online migration.The IO redirection functions that the embodiment of the present invention passes through file system, caused delta data in transition process is written to the first memory block region, realize file system level snapshot, LVM volumes and non-LVM volumes can be supported, realize data consistency, ensure after line migrates, the normal operation of operating system and application software thereon in move target end.
Description
Technical field
The present embodiments relate to the communication technology, more particularly to a kind of online moving method, device and system.
Background technology
Server virtualization technology is current focus, and virtual machine migration technology, due to simplified system maintenance pipe
Reason, system load balancing is improved, strengthening system is fault-tolerant and optimizes the advantages such as power supply managing, then is among virtualization technology
Focus.
Wherein, virtual machine migration technology includes physical machine to the migration (English of virtual machine:Physical-to-Virtual,
Referred to as:P2V) and virtual machine to virtual machine migration (English:Virtual-to-Virtual, referred to as:V2V).Operated in Linux
In system, for logical volume management (English:Logical Volume Manager, referred to as:LVM) volume, P2V and V2V's is online
The snapshot functions for migrating across the facility level of LVM offers ensure LVM volumes of data consistency.But for non-LVM volumes, its data
Uniformity can not then be guaranteed, and then cause the virtual machine after migration can not start or business can not normal operation.
The content of the invention
The embodiment of the present invention provides a kind of online moving method, device and system, to realize P2V and V2V online migration
To non-LVM volumes and the guarantee of LVM volumes of data consistency, it is ensured that the move target after migration is rectified often startup or business and normally transported
OK.
In a first aspect, the embodiment of the present invention provides a kind of online moving method, including:
When receiving the migration order of migration server transmission, the first memory block region is created, and by described first
Counterfoil region is mounted under migration catalogue, and the migration order includes the migration catalogue;
The input and output IO of the migration catalogue is redirected to the first memory block region, the first memory block area
Domain is used to store caused data in the online transition process;
By local hard drive Data Migration corresponding to the migration catalogue to move target end;
By the data duplication in the first memory block region to the move target end, and it is stored in the local hard drive
After discharge the first memory block region;
Terminate the online migration.
With reference in a first aspect, in the first possible implementation of first aspect, the first memory block area of the establishment
Domain, including:
According to the first pre-set space size, the first memory block region is created, first pre-set space is according to business
Data variation amount is set.
With reference to the possible implementation of the first of first aspect or first aspect, second in first aspect is possible
It is described that the migration catalogue IO is redirected to the first memory block region in implementation, including:
The drive module of load document system, the file system have IO redirection functions;
Under the migration catalogue, the file system is established, the migration catalogue IO is redirected in described first
Counterfoil region.
With reference to first aspect, first aspect the first into second of possible implementation any one, first
In the third possible implementation of aspect, before terminating the online migration, methods described also includes:
The space that the data being periodically detected in the first memory block region take;
If it is determined that the space that the data in the first memory block region take is less than or equal to the first predetermined threshold value, then will
Data storage in the first memory block region discharges the first memory block region after the local hard drive;
If it is determined that the space that the data in the first memory block region take is more than first predetermined threshold value, then create
Under the first new memory block region carry to the migration catalogue, and by the migration catalogue IO be redirected to it is described newly first
Memory block region;Meanwhile by the data duplication in the first memory block region to the move target end, and be stored in described
The first memory block region is discharged after local hard drive;Using the first new memory block region as the first memory block area
Domain, the space that the data being periodically detected described in execution in the first memory block region take, until the online migration knot
Beam.
With reference to first aspect, first aspect the first into the third possible implementation any one, first
In 4th kind of possible implementation of aspect, terminating the condition migrated online also includes:
Hard disc data corresponding to receiving the migration catalogue of the move target end feedback writes failure information, or receives
Failure information is write to the data in the first memory block region of move target end feedback.
With reference to first aspect, first aspect the first into the 4th kind of possible implementation any one, first
It is described after the migration order of migration server transmission is received in 5th kind of possible implementation of aspect, the side
Method also includes:
In the online transition process, the migration execution status of task inquiry that the migration server is sent is received, and
Feedback migration task action result at that time gives the migration server, so that the migration server is according to the migration at that time
Task action result judges whether the online migration terminates.
With reference to first aspect, first aspect the first into the 5th kind of possible implementation any one, first
In 6th kind of possible implementation of aspect, before terminating the online migration, methods described also includes:
The synch command that the migration server issues is received, the synch command includes synchronous directory;
The second memory block region is created, and the second memory block region is mounted under the synchronous directory;
The IO of the synchronous directory is redirected to the second memory block region, the second memory block region is used to deposit
Store up caused data in the synchronizing process;
By local hard drive Data Migration corresponding to the synchronous directory to the move target end;
By the data duplication in the second memory block region to the move target end, and it is stored in the local hard drive
After discharge the second memory block region;
Receive the termination order that the migration server is sent.
With reference to the 6th kind of possible implementation of first aspect, in the 7th kind of possible implementation of first aspect
In, the second memory block region of the establishment, including:
According to the second pre-set space size, the second memory block region is created, second pre-set space is according to business
Data variation amount is set.
With reference to the 6th kind of first aspect or the 7th kind of possible implementation, in the 8th kind of possible reality of first aspect
In existing mode, the IO by the synchronous directory is redirected to the second memory block region, including:
The drive module of load document system, the file system have IO redirection functions;
Under the synchronous directory, the file system is established, the synchronous directory IO is redirected in described second
Counterfoil region.
With reference to first aspect the 6th kind to the 8th kind possible implementation in any one, the 9th of first aspect the
In the possible implementation of kind, the IO by the synchronous directory is redirected to after the second memory block region, described
Method also includes:
The space that the data being periodically detected in the second memory block region take;
If it is determined that the space that the data in the second memory block region take is less than or equal to the second predetermined threshold value, then will
Data duplication in the second memory block region is stored in after the local hard drive described in release to the move target end
Second memory block region, and terminate synchronous task;
If it is determined that the space that the data in the second memory block region take is more than second predetermined threshold value, then create
Under new the second memory block region carry to the synchronous directory, and the synchronous directory IO is redirected to described new second
Memory block region;Meanwhile by the data duplication in the second memory block region to the move target end, and be stored in described
The second memory block region is discharged after local hard drive;Using the second new memory block region as the second memory block area
Domain, the space that the data being periodically detected described in execution in the second memory block region take, appoint until terminating the synchronization
Business.
With reference to first aspect the 6th kind to the 9th kind possible implementation in any one, the tenth of first aspect the
In the possible implementation of kind, after the synch command for receiving the migration server and issuing, methods described also includes:
In synchronizing process, receive the synchronous task that the migration server is sent and perform status inquiry, and feed back at that time
Synchronous task implementing result give the migration server.
With reference to first aspect the 6th kind to the tenth kind possible implementation in any one, the tenth of first aspect the
In a kind of possible implementation, it is described terminate order issue condition for user's manual termination, reach it is default termination the time,
Synchronous task implementing result be the synchronous directory corresponding to hard disc data to write failure information and synchronous task implementing result be institute
The data stated in the second memory block region write any one of failure information.
With reference to the 6th kind of first aspect into a kind of the tenth possible implementation any one, the of first aspect
In 12 kinds of possible implementations, the migration order, the synch command and described terminate are ordered to pass through event-driven
Produce, issued by way of socket, or, issued by way of security protocol SSH orders.
Second aspect, the embodiment of the present invention provide a kind of online moving method, including:
Reach after starting the time, issue migration order and give migration source, the migration order includes migration catalogue, the startup
Time and migration catalogue are what is pre-set;
In transition process, the synchronous task that source is migrated described in periodic queries performs state;
Receive the migration task action result of the migration source feedback;
If it is determined that the migration task action result then stops inquiry to terminate, terminate the online migration.
With reference to second aspect, in the first possible implementation of second aspect, before terminating the online migration,
Methods described also includes:
Reach the synchronous task pre-set and start the time, issue synch command to the migration source, the synch command
Include synchronous directory;
When meeting preparatory condition, send termination order and be user's manual termination, arrive to the migration source, the preparatory condition
Any one of triggered up to the default termination time and by synchronous task implementing result.
With reference to the first possible implementation of second aspect, in second of possible implementation of second aspect
In, to after the migration source, methods described also includes the synch command that issues:
In synchronizing process, the synchronous task that source is migrated described in periodic queries performs state, and receives the migration source
The synchronous task implementing result of feedback.
With reference to second of possible implementation of second aspect, in the third possible implementation of second aspect
In, the migration order, the synch command and described terminate are ordered to be produced by event-driven, pass through socket
Mode issue, or, issued by way of security protocol SSH orders.
The third aspect, the embodiment of the present invention provide a kind of online moving apparatus, including:
Receiving module, for receiving the migration order of migration server transmission, the migration order includes migration catalogue;
Processing module, for when the receiving module receives the migration order, creating the first memory block region, and
The first memory block region is mounted under the migration catalogue;The input and output IO of the migration catalogue is redirected to institute
The first memory block region is stated, the first memory block region is used to store caused data in the online transition process;By institute
Local hard drive Data Migration corresponding to migration catalogue is stated to move target end;By the data duplication in the first memory block region
To the move target end, and the first memory block region is discharged after being stored in the local hard drive;And terminate described online
Migration.
With reference to the third aspect, in the first possible implementation of the third aspect, the processing module is used for described
The first memory block region is created, is specially:
According to the first pre-set space size, the first memory block region is created, first pre-set space is according to business
Data variation amount is set.
With reference to the possible implementation of the first of the third aspect or the third aspect, second in the third aspect is possible
In implementation, the processing module is used to the migration catalogue IO being redirected to the first memory block region, is specially:
The drive module of load document system, the file system have IO redirection functions;
Under the migration catalogue, the file system is established, the migration catalogue IO is redirected in described first
Counterfoil region.
With reference to the third aspect, the third aspect the first into second of possible implementation any one, the 3rd
In the third possible implementation of aspect, the processing module is additionally operable to:
Before the online migration is terminated, the sky for the data occupancy being periodically detected in the first memory block region
Between;
If it is determined that the space that the data in the first memory block region take is less than or equal to the first predetermined threshold value, then will
Data storage in the first memory block region discharges the first memory block region after the local hard drive;
If it is determined that the space that the data in the first memory block region take is more than first predetermined threshold value, then create
Under the first new memory block region carry to the migration catalogue, and by the migration catalogue IO be redirected to it is described newly first
Memory block region;Meanwhile by the data duplication in the first memory block region to the move target end, and be stored in described
The first memory block region is discharged after local hard drive;Using the first new memory block region as the first memory block area
Domain, the space that the data being periodically detected described in execution in the first memory block region take, until the online migration knot
Beam.
With reference to the third aspect, the third aspect the first into the third possible implementation any one, the 3rd
In 4th kind of possible implementation of aspect, the receiving module is additionally operable to receive the described of move target end feedback and moved
Hard disc data corresponding to moving catalogue writes failure information, or receives in the first memory block region of the move target end feedback
Data write failure information;
The processing module, which terminates the condition migrated online, also to be included:
The receiving module receive the migration catalogue of move target end feedback corresponding to hard disc data write mistake
Information is lost, or the data received in the first memory block region of the move target end feedback write failure information.
With reference to the third aspect, the third aspect the first into the 4th kind of possible implementation any one, the 3rd
In 5th kind of possible implementation of aspect, described device also includes sending module,
The receiving module, it is additionally operable to after the migration order of migration server transmission is received, is moved online described
During shifting, the migration execution status of task inquiry that the migration server is sent is received;
The sending module, the migration task action result for feeding back at that time gives the migration server, so that described
Migration server judges whether the online migration terminates according to the migration task action result at that time.
With reference to the third aspect, the third aspect the first into the 5th kind of possible implementation any one, the 3rd
In 6th kind of possible implementation of aspect, the receiving module is additionally operable to before the online migration is terminated, and receives institute
The synch command that migration server issues is stated, the synch command includes synchronous directory;
The processing module, it is additionally operable to create the second memory block region, and the second memory block region is mounted to institute
State under synchronous directory;The IO of the synchronous directory is redirected to the second memory block region, the second memory block region
For storing caused data in the synchronizing process;Local hard drive Data Migration corresponding to the synchronous directory is moved to described
Move destination;By the data duplication in the second memory block region to the move target end, and it is hard to be stored in the local
The second memory block region is discharged after disk;
The receiving module is additionally operable to receive the termination order that the migration server is sent.
With reference to the 6th kind of possible implementation of the third aspect, in the 7th kind of possible implementation of the third aspect
In, the processing module is used for the second memory block region of the establishment, is specially:
According to the second pre-set space size, the second memory block region is created, second pre-set space is according to business
Data variation amount is set.
With reference to the 6th kind of the third aspect or the 7th kind of possible implementation, in the 8th kind of possible reality of the third aspect
In existing mode, the processing module is redirected to the second memory block region for the IO by the synchronous directory, tool
Body is:
The drive module of load document system, the file system have IO redirection functions;
Under the synchronous directory, the file system is established, the synchronous directory IO is redirected in described second
Counterfoil region.
With reference to the third aspect the 6th kind to the 8th kind possible implementation in any one, the 9th of the third aspect the
In the possible implementation of kind, the processing module is additionally operable to:
After the IO by the synchronous directory is redirected to the second memory block region, it is periodically detected described
The space that data in second memory block region take;
If it is determined that the space that the data in the second memory block region take is less than or equal to the second predetermined threshold value, then will
Data duplication in the second memory block region is stored in after the local hard drive described in release to the move target end
Second memory block region, and terminate synchronous task;
If it is determined that the space that the data in the second memory block region take is more than second predetermined threshold value, then create
Under new the second memory block region carry to the synchronous directory, and the synchronous directory IO is redirected to described new second
Memory block region;Meanwhile by the data duplication in the second memory block region to the move target end, and be stored in described
The second memory block region is discharged after local hard drive;Using the second new memory block region as the second memory block area
Domain, the space that the data being periodically detected described in execution in the second memory block region take, appoint until terminating the synchronization
Business.
With reference to the third aspect the 6th kind to the 9th kind possible implementation in any one, the tenth of the third aspect the
In the possible implementation of kind, the receiving module is additionally operable to:
After the synch command for receiving the migration server and issuing, in synchronizing process, the migration is received
The synchronous task that server is sent performs status inquiry;
Described device also includes sending module, and the sending module is used for the synchronous task implementing result of feedback at that time to institute
State migration server.
With reference to the third aspect the 6th kind to the tenth kind possible implementation in any one, the tenth of the third aspect the
In a kind of possible implementation, it is described terminate order issue condition for user's manual termination, reach it is default termination the time,
Synchronous task implementing result be the synchronous directory corresponding to hard disc data to write failure information and synchronous task implementing result be institute
The data stated in the second memory block region write any one of failure information.
With reference to the 6th kind of the third aspect into a kind of the tenth possible implementation any one, the of the third aspect
In 12 kinds of possible implementations, the migration order, the synch command and described terminate are ordered to pass through event-driven
Produce, issued by way of socket, or, issued by way of security protocol SSH orders.
Fourth aspect, the embodiment of the present invention provide a kind of online moving apparatus, including:
Sending module, after reaching the startup time, issue migration order and give migration source, the migration order includes migration
Catalogue, the startup time and migration catalogue are what is pre-set;
Processing module, the synchronous task in transition process, migrating source described in periodic queries perform state;
Receiving module, for receiving the migration task action result of the migration source feedback;
The processing module is additionally operable to if it is determined that the migration task action result is terminates, then stopping is inquired about, and terminates institute
State online migration.
With reference to fourth aspect, in the first possible implementation of fourth aspect, the sending module is additionally operable to:
Before terminating the online migration, reach the synchronous task pre-set and start the time, issue synch command to institute
Migration source is stated, the synch command includes synchronous directory;
When meeting preparatory condition, send termination order and be user's manual termination, arrive to the migration source, the preparatory condition
Any one of triggered up to the default termination time and by synchronous task implementing result.
With reference to the first possible implementation of fourth aspect, in second of possible implementation of fourth aspect
In, the processing module is additionally operable to:
In synchronizing process, the synchronous task that source is migrated described in periodic queries performs state;
The receiving module is additionally operable to receive the synchronous task implementing result of the migration source feedback.
With reference to second of possible implementation of fourth aspect, in the third possible implementation of fourth aspect
In, the migration order, the synch command and described terminate are ordered to be produced by event-driven, pass through socket
Mode issue, or, issued by way of security protocol SSH orders.
5th aspect, the embodiment of the present invention provide a kind of online migratory system, including:Move target end, such as third aspect
The online moving apparatus described in online moving apparatus and any one of fourth aspect described in any one.
The embodiment of the present invention is write caused delta data in transition process by the IO redirection functions of file system
To the first memory block region, relative to the snapshot functions for the facility level for passing through LVM offers in the prior art, the embodiment of the present invention
File system level snapshot is realized, LVM volumes and non-LVM volumes can be supported simultaneously, so as to realize the guarantee of data consistency, it is ensured that
After line migration, the normal operation of operating system and application software thereon in move target end.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
There is the required accompanying drawing used in technology description to do one and simply introduce, it should be apparent that, drawings in the following description are this hairs
Some bright embodiments, for those of ordinary skill in the art, without having to pay creative labor, can be with
Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is the flow chart of the online moving method embodiment one of the present invention;
Fig. 2 is component docking mode schematic diagram in the online moving method embodiment two of the present invention;
Fig. 3 is the signaling diagram of transition process in the online moving method embodiment two of the present invention;
Fig. 4 is the flow chart of the online moving method embodiment three of the present invention;
Fig. 5 is the signaling diagram of synchronizing process in the online moving method example IV of the present invention;
Fig. 6 is component docking mode schematic diagram in the online moving method embodiment five of the present invention;
Fig. 7 is the online transition process exemplary plot of prior art;
Fig. 8 is the online transition process exemplary plot of the present invention;
Fig. 9 is the structural representation of the online moving apparatus embodiment one of the present invention;
Figure 10 is the structural representation of the online moving apparatus embodiment two of the present invention;
Figure 11 is the structural representation of the online moving apparatus embodiment three of the present invention;
Figure 12 is the structural representation of the online moving apparatus example IV of the present invention;
Figure 13 is the structural representation of the online moving apparatus embodiment five of the present invention;
Figure 14 is the structural representation of the online moving apparatus embodiment six of the present invention.
Embodiment
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention
In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is
Part of the embodiment of the present invention, rather than whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art
The every other embodiment obtained under the premise of creative work is not made, belongs to the scope of protection of the invention.
In the communications field, the cloud computing of narrow sense refers to information technology (English:Information Technology, referred to as:
IT) delivery of infrastructure and use pattern, refer to by network with demand, easy extension way obtain needed for resource;Broad sense
Cloud computing refers to delivery and the use pattern of service, refer to by network with demand, easy extension way obtain required service, this clothes
Business can be IT and software, internet is related or other are serviced.The core concept of cloud computing is will largely to use network connection
Computing resource unified management and scheduling, form a computing resource pond to user's on-demand service.
Wherein, there is provided the network of resource is referred to as " cloud ".Resource in " cloud " appears to be in user can be with infinite expanding
, and can obtain at any time, use on demand, at any time extension and pay-per-use.
The physical server of solid-state, the network equipment, storage device are become virtual by cloud computing at present using virtualization technology
Computing resource, virtual network resource, virtual machine storage resource, these virtual resource flexible combinations are become into virtual machine, i.e., it is empty
Intend resource computers.
Migrating technology provides easily method for server virtualization and across the cloud platform migration of virtual machine.Main flow is empty at present
Farsighted (the English of Ni Hua manufacturers such as prestige:VMware), outstanding (English is thought:Citrix), Microsoft's (English:Microsoft), red cap (English:
Redhat), Huawei etc. both provides respective migration component.
Specifically, P2V, which refers to, moves to cloud by the operating system on physical server and application software thereon and data and puts down
On virtual machine in platform.On migration pattern, P2V points are online P2V and offline P2V.Wherein, online P2V refers to physical services
Under normal operation, application software and data by its operating system and thereon move to purpose virtual machine to device;Offline
P2V refers to physical server in the case of shutdown, and application software and data by its operating system and thereon move to purpose
Virtual machine.
V2V is to move to the operating system on source virtual machine and application software thereon and data on purpose virtual machine,
It is related to isomorphism cloud platform and isomery cloud platform.On migration pattern, V2V points are online V2V and offline V2V.Online V2V refers to
Under normal operation, it is virtual that application software and data by its operating system and thereon move to purpose to source virtual machine
Machine;Offline V2V refers to by source virtual machine in the case of shutdown, by its operating system and application software thereon and Data Migration
To purpose virtual machine.
It should be noted that the performance indications of migration include three aspects:The bulk migration time, migrated since migration source
The time terminated to migration;Downtime, in transition process, business interruption time;To the performance impact of application program, migration pair
In the influence degree of operation service performance on migration source.
In (SuSE) Linux OS, such as the file system such as ext2, ext3, ext4 and reiserfs does not possess snapshot in itself
Function, because operation system is being run in transition process, constantly there is data generation, cause to migrate after migration source and move target end
Data are inconsistent.
Fig. 1 is the flow chart of the online moving method embodiment one of the present invention.The embodiment of the present invention provides a kind of online migration
Method, this method can be performed by online moving apparatus, and the device can be independently arranged, and can also be integrally disposed in for example virtual
In the equipment such as machine or physical server.As shown in figure 1, the method for the present embodiment includes:
S101, when receiving migration order, create the first memory block region, and the first memory block region be mounted to
Migrate under catalogue.
Wherein, migration order includes migration catalogue.Here, " first " is only to distinguish different memory block regions, and this first
The size in memory block region can be arbitrary, it is generally the case that give tacit consent to its size for 1024MB (English:MByte).
By the first memory block region carry to migrating under catalogue, it is accessed it.
S102, the IO for migrating catalogue is redirected to the first memory block region, the first memory block region is used to store online
Caused data in transition process.
In operating system, some file system have input and output (English:Input/Output, referred to as:IO) redirect
Union mount file system in function, such as (SuSE) Linux OS.The embodiment of the present invention can be with IO using file system
The function of redirection, the IO for migrating catalogue is redirected to the first memory block region, so, the caused data in transition process
It can be stored in the first memory block region.
S103, local hard drive Data Migration corresponding to catalogue will be migrated to move target end.
In the step, the migration of local hard drive data corresponding to migration catalogue is realized first.Due to mesh will be migrated in S102
The IO of record is redirected to the first memory block region, therefore, in transition process, migrate catalogue corresponding to local hard drive data be
The data that line migration has preserved before starting, are relatively-stationary, therefore by network transmission, this partial data is migrated to migration
Destination respective directories.
To caused data in online transition process, online migration is realized by S104.
S104, by the data duplication in the first memory block region to move target end, and discharged after being stored in local hard drive
First memory block region.
By in transition process, the data in the first memory block region write local hard drive and move target end.
S105, terminate online migration.
The embodiment of the present invention is write caused delta data in transition process by the IO redirection functions of file system
To the first memory block region, relative to the snapshot functions for the facility level for passing through LVM offers in the prior art, the embodiment of the present invention
File system level snapshot is realized, LVM volumes and non-LVM volumes can be supported simultaneously, so as to realize the guarantee of data consistency, it is ensured that
After line migration, the normal operation of operating system and application software thereon in move target end.
In addition, the snapshot functions of the facility level provided in the prior art need volume group (English:Volume Group, letter
Claim:VG) there is Spatial Residual;The present invention has space to remain by the way that delta data is write into the first memory block region without volume group
It is remaining that snapshot functions can be achieved;Migration catalogue IO is redirected to the first memory block region, read-write efficiency can be improved, reduce migration
Source and move target end disk write data time.
In the above-described embodiments, creating the first memory block region can include:According to the first pre-set space size, the is created
One memory block region.Wherein, the first pre-set space size can be configured according to the actual requirements, not limited herein, for example,
First pre-set space can be set according to business datum variable quantity.
Further, S102 can include:There is IO to redirect work(for the drive module of load document system, this document system
Energy;In the case where migrating catalogue, file system is established, migration catalogue IO is redirected to the first memory block region.In addition, terminating
Before line migration, this method can also include:Unload above-mentioned file system.
Alternatively, before S105, online moving method can also include:The number being periodically detected in the first memory block region
According to the space of occupancy;If it is determined that the space that the data in the first memory block region take is less than or equal to the first predetermined threshold value, then
Data storage in first memory block region is discharged into the first memory block region after local hard drive;If it is determined that the first memory block area
The space that data in domain take is more than the first predetermined threshold value, then creates the first new memory block region carry to migrating catalogue
Under, and catalogue IO will be migrated and be redirected to the first new memory block region;Meanwhile the data in the first memory block region are answered
Move target end is made, and the first memory block region is discharged after being stored in local hard drive;The first new memory block region is made
For the first memory block region, space that the data that are periodically detected described in execution in the first memory block region take, until online
Migration terminates.
Wherein, the first predetermined threshold value is less than or equal to the space that the first memory block region takes.First predetermined threshold value is set
Put according to the data difference amount for being, for example, the permission of this business migration, be defaulted as the 2/3 of the first memory block region space-consuming, it is existing
Can be adjusted flexibly in net according to business datum situation of change, etc..
Because the size in the first memory block region is fixed, therefore, its data storage capacities is also fixed.The implementation
The space that example is taken by being periodically detected the data obtained in the first memory block region, to have been deposited according to the first memory block region
The size of data of storage, determines subsequent operation.
When the space that the data in the first memory block region take is less than or equal to the first predetermined threshold value, illustrate to migrate
The size of caused data is in the data difference amount that this business migration allows in journey, and migrates mesh after not interfering with migration
End in the normal operation of operating system and application software thereon.At this moment, released after the partial data only being write into local hard drive
Put, without copying to move target end again.
When the space that the data in the first memory block region take is more than the first predetermined threshold value, illustrate to produce in transition process
The size of raw data exceedes the data difference amount that this business migration allows.At this moment, the first new memory block region is created to hang
It is loaded onto under migration catalogue, and catalogue IO will be migrated and be redirected to the first new memory block region.Meanwhile by the first memory block area
Data duplication in domain is stored up and the first memory block region is discharged after local hard drive to move target end;In new first
Counterfoil region is periodically detected described in execution as the first memory block region.
The embodiment of the present invention is write caused delta data in transition process by the IO redirection functions of file system
To the first memory block region, there is Spatial Residual that snapshot functions can be achieved without volume group;Relative to passing through in the prior art
The snapshot functions for the facility level that LVM is provided, the embodiment of the present invention realize file system level snapshot, can support LVM volumes simultaneously
With non-LVM volumes;By the space that the data in the first memory block region take and the contrast of the first predetermined threshold value, perform different
Processing is write, ensures new caused delta data in the data difference amount that this business migration allows, and do not interfere with migration
The normal operation of operating system and application software thereon in destination, so as to realize data consistency, can also improve read-write
Efficiency, reduction migration source and move target end disk write data time;In addition, multistage first memory block district management is used,
Prevent data from overflowing.
Several specific embodiments are used below, and the technical scheme of embodiment of the method shown in Fig. 1 is described in detail.
In a kind of optional embodiment, acted on behalf of by migration server, migration source, Union mount and move target take
Online moving method provided in an embodiment of the present invention is implemented in interaction between business device.
Fig. 2 is component docking mode schematic diagram in the online moving method embodiment two of the present invention.As shown in Fig. 2 migration clothes
Be engaged in device and migration source agency, and migration source agency and move target server, passes through event (English:Event) driving produces letter
Order interaction.Alternatively, R3 (English is passed through:Request, Response, Result) mechanism ensure Signalling exchange it is reliably timely.Separately
Outside, migration server and database whole process interacting message, database are used to preserve the preset data in migration server;Migration source
Agency is interacted by command line interface with file system, is illustrated in the embodiment by taking Union mount as an example.For example, migration clothes
Business device passes through socket (English:Socket) or security protocol is (English:Secure Shell, referred to as:SSH) under the mode of order
Deportation moves order and acted on behalf of to migration source.
Specifically, migration server issues migration order and acted on behalf of to migration source.Migration source proxy load Union mount's
Drive module, the first memory block region is created according to the first pre-set space size, and carry, in the case where migrating catalogue, migration source is acted on behalf of
Call Union mount interfaces to establish repertory catalogue in catalogue is migrated, IO is redirected to the first memory block region, now moved
It is read-only to move local hard drive data corresponding to catalogue, delta data writes the first memory block region.Migration source agency will migrate catalogue
Corresponding local hard drive Data Migration is to move target server.
Whether the space that data corresponding to the first memory block of cycle detection region take is acted on behalf of in migration source default more than first
Threshold values, if it exceeds the first pre-set threshold value, by the data-frozen in the first memory block region, distributes the first new memory block area
Domain, IO is redirected to the first new memory block region, write for delta data, meanwhile, to migration source agency and migration mesh
Server correspond to disk and respectively write a internal memory freezing data, after the completion of write-in, discharge the first memory block region;If not yet
The first pre-set threshold value is had more than, the data in the first memory block region are write to the local hard drive of migration source agency, and unloads connection
Catalogue is closed, terminates this online migration.
Fig. 3 is the signaling diagram of transition process in the online moving method embodiment two of the present invention.As shown in figure 3, the embodiment
In method can include:
S301, migration server and database whole process interacting message.
S302, migration server receive the operation of user's input parameter.
Above-mentioned parameter is saved in database by S303, migration server.
Wherein, the parameter of user's input can include:Migrate catalogue and migration starts the time.
Alternatively, above-mentioned parameter has completely or partially been stored in database, and therefore, S302 and S303 are optional step.
S304, migration server generation migration order.
Specifically, migration server generates migration order according to above-mentioned parameter, and migration order comprises at least migration catalogue, with
Informing removal source agency migrates to which data.
S305, migration server issue migration order and acted on behalf of to migration source.
For example, migration server passes through socket (English:Socket mode) issues migration order and acted on behalf of to migration source.
S306, migration source agency are after migration order is received, loading Union mount drive module.
S307, migration source agency create the first memory block region, and by the first memory block region carry to migrating catalogue.
S308, migration source agency establish Union mount in catalogue is migrated.
The IO for migrating catalogue is redirected to the first memory block region by S309, migration source agency.
S310, migration source agency will migrate local hard drive Data Migration corresponding to catalogue to move target server.
Hard disc data corresponding to S311, move target server feedback migration catalogue writes implementing result to migration source generation
Reason.
If hard disc data write-in implementing result is writes successful information corresponding to the migration catalogue of move target server feedback,
Then perform S312;If hard disc data write-in implementing result is unsuccessfully believed to write corresponding to the migration catalogue of move target server feedback
Breath, then perform S325.
Whether S312, migration source act on behalf of the space of the data occupancy in the first memory block of periodic queries region more than first
Predetermined threshold value.
If the space that the data in the first memory block region take is more than the first predetermined threshold value, S313 is performed;If first
The space that data in memory block region take is less than or equal to the first predetermined threshold value, then performs S319.
S313, migration source agency create the first new memory block region carry and extremely migrated under catalogue.
S314, the IO for migrating catalogue is redirected to the first new memory block region.
S315, migration source agency are by the data storage in above-mentioned first memory block region in local hard drive.
S316, migration source act on behalf of data duplication in above-mentioned first memory block region to move target server.
Data in S317, the first memory block of move target server feedback region write implementing result to migration source generation
Reason.
If the data write-in implementing result in the first memory block region of move target server feedback is the first memory block
Data in region write successful information, then perform S318;If the number in the first memory block region of move target server feedback
Failure information is write for the data in the first memory block region according to write-in implementing result, then performs S325.
S318, migration source agency discharge above-mentioned first memory block region.
Using the first new memory block region as above-mentioned first memory block region, S312 is repeated until online migration
Terminate.
S319, migration source agency discharge the data storage in the first memory block region after local hard drive.
S320, migration source agency unloading Union mount.
Specifically, source proxy call Union mount interface unloading of file system is migrated.
This online migration is set to end mark by S321, migration source agency.
Alternatively, state flag bit being set in the agency of migration source, the state flag bit is used to indicate run mode and ending state,
When migration server inquires about migration execution status of task, the state flag bit is passed to migration server by migration source agency,
So that migration server knows the running status of current migration task.
S322, migration source agency receive the migration execution status of task inquiry that migration server is sent.
Specifically, migration server periodically transmission migration execution status of task is inquired about acts on behalf of to migration source.
S323, the migration task action result of migration source agency's feedback at that time are to migration server.
In online transition process, migration source agency receives the migration execution status of task inquiry that migration server is sent, and
The migration task action result of feedback at that time is to migration server.
S324, migration server judge whether online migration terminates according to the migration task action result at that time.
For example, after migration server detects that end mark is acted on behalf of in migration source, S325 is performed, terminates this and moves online
Move.Otherwise, S321 is repeated.
Supplementary notes, S321 execution are not limited to after S320, in whole online transition process, migration source agency
Any time terminated after migration order is received to online migration, S321 is can carry out, the present invention is not carried out to it
Limitation.
S325, terminate online migration.
After performing aforesaid operations, because the uniformity of data is guaranteed, the behaviour in move target server ensure that
Make system and application normal operation thereon, migrated for the higher operation system of requirement of real-time, can be by configuring in real time
Synchronous task reduces business interruption time.
In the prior art, if virtual machine is not normally functioning after migration, migration source will be repeatedly shut down, it is same to carry out increment
Step;Meanwhile after the completion of Data Migration, general business verification process is longer, data increment pressure is big before causing service switching, equally
Need the longer increment synchronization time.The Inotify file system event-monitorings that Some tools are carried by (SuSE) Linux OS
Framework, file system operation is monitored, for example read, write and create, reach the purpose of real-time synchronization.But pass through Inotify texts
Part system is monitored, and it is more frequent to migrate interaction between source and move target end.
To overcome drawbacks described above, the present invention is on the basis of above-described embodiment, further, is appointed by performing real-time synchronization
Business reduces machine stop times, reduces business interruption time;Reduce migration source and move target end interaction times simultaneously.
Perform synchronous task process and above-mentioned online transition process is basically identical, the main distinction is:Migrated online
Whether Cheng Zhong, migration source automatic decision task terminate;During synchronous task is performed, migration source is receiving migration server
After the termination order issued, terminate migration.
Fig. 4 is the flow chart of the online moving method embodiment three of the present invention.As shown in figure 4, in the base of embodiment illustrated in fig. 1
On plinth, online moving method can include:
S101, when receiving migration order, create the first memory block region, and the first memory block region be mounted to
Migrate under catalogue.
S102, by migrate catalogue IO be redirected to the first memory block region, the first memory block region be used for be stored in
Caused data in line transition process.
S103, local hard drive Data Migration corresponding to catalogue will be migrated to move target end.
S104, by the data duplication in the first memory block region to move target end, and discharged after being stored in local hard drive.
S401, the synch command that migration server issues is received, the synch command includes synchronous directory.
Wherein, synchronous directory can be with identical with migration catalogue, can also be different.For example, migration catalogue is C disks and D disks, together
It is only data catalogues, etc. under D disks to walk catalogue, be will not enumerate herein.
S402, the second memory block region is created, and the second memory block region is mounted under synchronous directory.
Here, " second " is only to distinguish different memory block regions, such as is made a distinction with above-mentioned first memory block region,
The size in the second memory block region can be arbitrary, it is generally the case that give tacit consent to its size for 1024MB (English:MByte,
Referred to as:MB).
By under the second memory block region carry to synchronous directory, it is accessed it.
S403, the IO of synchronous directory is redirected to the second memory block region, the second memory block region is used to store together
Caused data during step.
By the IO redirection functions of file system, the IO of synchronous directory is redirected to the second memory block region, so,
Caused data can be stored in the second memory block region in synchronizing process.
S404, by local hard drive Data Migration corresponding to synchronous directory to move target end.
In the step, the migration of local hard drive data corresponding to synchronous directory is realized first.Due in S403 by synchronous mesh
The IO of record is redirected to the second memory block region, therefore, in synchronizing process, local hard drive data corresponding to synchronous directory be
The data that have preserved before synchronous task starts, are relatively-stationary, therefore by network transmission, and this partial data is migrated to moving
Move destination respective directories.
To caused data in synchronizing process, online migration is realized by S405.
S405, by the data duplication in the second memory block region to move target end, and discharged after being stored in local hard drive
Second memory block region.
By in synchronizing process, the data in the second memory block region write local hard drive and move target end.
S406, receive the termination order that migration server is sent.
S105, terminate online migration.
The embodiment of the present invention reduces shutdown time while online migrating data uniformity is ensured, by performing synchronous task
Number, business interruption time is reduced, and reduce migration source and move target end interaction times, realize file real-time synchronization.
In the above-described embodiments, the second memory block region is created, can be included:According to the second pre-set space size, create
Second memory block region.Wherein, the second pre-set space size can be configured according to the actual requirements, not limited herein, example
Such as, the second pre-set space can be set according to business datum variable quantity.
Further, S403 can include:There is IO to redirect work(for the drive module of load document system, this document system
Energy;Under synchronous directory, file system is established, synchronous directory IO is redirected to the second memory block region.In addition, terminating together
Before step task, this method can also include:Unloading of file system.
Alternatively, after S430, online moving method can also include:The number being periodically detected in the second memory block region
According to the space of occupancy;If it is determined that the space that the data in the second memory block region take is less than or equal to the second predetermined threshold value, then
By the data duplication in the second memory block region to move target end, and the second memory block area is discharged after being stored in local hard drive
Domain, and terminate synchronous task;If it is determined that the space that the data in the second memory block region take is more than the second predetermined threshold value, then create
Build under the second new memory block region carry to synchronous directory, and synchronous directory IO is redirected to the second new memory block area
Domain;Meanwhile by the data duplication in the second memory block region to move target end, and discharged after being stored in local hard drive;Will be new
The second memory block region as the second memory block region, the data being periodically detected described in execution in the second memory block region account for
Space, until terminating synchronous task.
Wherein, the second predetermined threshold value is less than or equal to the space that the second memory block region takes.Second predetermined threshold value is set
Put according to the data difference amount for being, for example, the permission of this data syn-chronization, be defaulted as the 2/3 of the second memory block region space-consuming, it is existing
Can be adjusted flexibly in net according to business datum situation of change, etc..
Because the size in the second memory block region is fixed, therefore, its data storage capacities is also fixed.The implementation
The space that example is taken by being periodically detected the data obtained in the second memory block region, to have been deposited according to the second memory block region
The size of data of storage, determines subsequent operation.
When the space that the data in the second memory block region take is less than or equal to the second predetermined threshold value, illustrate synchronous mistake
The size of caused data is in the data difference amount that this data syn-chronization allows in journey, and migrates mesh after not interfering with migration
End in the normal operation of operating system and application software thereon.At this moment, in synchronizing process there is no the size of caused data
More than the second pre-set threshold value, the order that migration server can be waited to issue, the operation of next step is done, such as terminate online migration.
When the space that the data in the second memory block region take is more than the second predetermined threshold value, illustrate to produce in synchronizing process
The size of raw data exceedes the data difference amount that this data syn-chronization allows.At this moment, the second new memory block region is created to hang
It is loaded onto under migration catalogue, and synchronous directory IO is redirected to the second new memory block region.Meanwhile by the second memory block area
Data duplication in domain is stored up and discharged after local hard drive to move target end;Using the second new memory block region as second
Memory block region, it is periodically detected described in execution.
The embodiment of the present invention is write caused delta data in synchronizing process by the IO redirection functions of file system
To the second memory block region, and the space taken by the data in the second memory block region and the contrast of the second predetermined threshold value,
Different processing is performed, ensures new caused delta data all write-in local hard drive and move target end, so as to realize reality
When it is synchronous, can also improve read-write efficiency, that reduces migration source and move target end disk writes data time and business downtime,
Ensure the availability of synchronous migration destination business each time, save the iteration proving time;In addition, using multilevel memory block region
Management, prevents data from overflowing.
Synchronizing process is mainly described as follows:
Migration server issues synch command and acted on behalf of to migration source.Migration source proxy load Union mount driving mould
Block, the second memory block region is created according to the second pre-set space size, and under carry to synchronous directory;Migration source proxy call
Union mount interfaces establish repertory catalogue in synchronous directory, IO are redirected into the second memory block region, now synchronous mesh
Local hard drive data are read-only corresponding to record, and delta data writes the second memory block region.Act on behalf of the synchronous directory pair in migration source
The local hard drive Data Migration answered migration source agency's detection both ends data situation, is only replicated and become to move target server
The data of change.
Migration source acts on behalf of whether the space that the data in the second memory block of cycle detection region take presets valve more than second
Value, if it exceeds the second pre-set threshold value, by the data-frozen in the second memory block region, distributes the second new memory block area
Domain, IO is redirected to the second new memory block region, write for delta data.Meanwhile to migration source agency and migrate mesh
Server correspond to disk and respectively write a internal memory freezing data, after the completion of write-in, discharge the second memory block region;If not yet
The second pre-set threshold value is had more than, after termination order is received, the data in the second memory block region are write into migration source agency
Local hard drive and move target server, and unload repertory catalogue, terminate this synchronous task.
In a kind of optional embodiment, acted on behalf of by migration server, migration source, Union mount and move target take
Interaction explanation synchronizing process between business device.The component docking mode with reference to shown in figure 2.
Fig. 5 is the signaling diagram of synchronizing process in the online moving method example IV of the present invention.As shown in figure 5, the embodiment
In method can include:
S501, migration server and database whole process interacting message.
S502, migration server receive the operation of user's input parameter.
Above-mentioned parameter is saved in database by S503, migration server.
Wherein, the parameter of user's input can include:Synchronous directory, synchronous set-up time and termination command triggers condition
Deng.
Alternatively, above-mentioned parameter has completely or partially been stored in database, and therefore, S502 and S503 are optional step.
S504, migration server generation synch command.
Specifically, migration server generates synch command according to above-mentioned parameter, and synch command comprises at least synchronous directory, with
Informing removal source agency synchronizes to which data.
Migration server starts synchronous task according to synchronous set-up time.When reaching synchronous set-up time, S505 is performed,
Transmit synchronous task configuration information.
S505, migration server issue synch command and acted on behalf of to migration source.
Alternatively, such as migration server is issued migration order by way of SSH orders and acted on behalf of to migration source, the present invention
It is not limited.
Hereafter, migration server can be periodically detected synchronous task implementation status, i.e. S519;And judge whether to meet to terminate
Order issues condition, if it is satisfied, issuing termination order, performs S522.
S506, migration source agency upon receiving a sync command, load Union mount drive module.
Specifically, after migration source agency receives the synch command that migration server issues, recording synchronism task configuration information,
Start the synchronous preceding drive module for preparing, loading Union mount.
S507, migration source agency create the second memory block region, and by the second memory block region carry to synchronous directory.
S508, migration source agency establish Union mount in synchronous directory.
Specifically, source proxy call Union mount interfaces are migrated, establish file system, i.e. repertory catalogue.
The IO of synchronous directory is redirected to the second memory block region by S509, migration source agency.
S510, migration source are acted on behalf of local hard drive Data Migration corresponding to synchronous directory to move target server.
Hard disc data corresponding to S511, move target server feedback synchronous directory writes implementing result to migration source generation
Reason.
If hard disc data write-in implementing result is writes successful information corresponding to the synchronous directory of move target server feedback,
Then perform S512;If hard disc data write-in implementing result is unsuccessfully believed to write corresponding to the synchronous directory of move target server feedback
Breath, then terminate to migrate online.
Whether S512, migration source act on behalf of the space of the data occupancy in the second memory block of periodic queries region more than second
Predetermined threshold value.
If the space that the data in the second memory block region take is more than the second predetermined threshold value, S513 is performed;If second
The space that data in memory block region take is less than or equal to the second predetermined threshold value, then performs S519.
S513, migration source agency are created under the second new memory block region carry to synchronous directory.
S514, the IO of synchronous directory is redirected to the second new memory block region.
Wherein, the same S507 of S513 and S514.
S515, migration source agency are by the data storage in above-mentioned second memory block region in local hard drive.
S516, migration source act on behalf of data duplication in above-mentioned second memory block region to move target server.
Data in S517, the second memory block of move target server feedback region write implementing result to migration source generation
Reason.
If the data write-in implementing result in the second memory block region of move target server feedback is the second memory block
Data in region write successful information, then perform S518;If the number in the second memory block region of move target server feedback
Failure information is write for the data in the second memory block region according to write-in implementing result, then is receiving the synchronization of migration server transmission
When execution status of task is inquired about, the write-in implementing result is fed back into migration server.
S518, migration source agency discharge above-mentioned second memory block region.
After the step, using the second new memory block region as above-mentioned second memory block region, S512 is repeated
Until synchronizing process terminates.
S519, migration source agency receive the synchronous task that migration server is sent and perform status inquiry.
S520, the synchronous task implementing result of migration source agency's feedback at that time are to migration server.
In synchronizing process, migration source agency receives the synchronous task that migration server is sent and performs status inquiry, and instead
The synchronous task implementing result of feedback at that time is to migration server.
S521, migration server judge whether synchronizing process terminates according to the synchronous task implementing result at that time.
For example, synchronous task implementing result, which is hard disc data corresponding to synchronous directory, writes failure information, or synchronous task is held
When row result is that the data in the second memory block region write failure information, terminate online migration.
Supplementary notes, S519 execution is not limited to after S518, and in whole synchronizing process, migration source agency is connecing
Any time terminated after synch command to synchronizing process is received, can carry out S519, the present invention is not limited.
S522, migration server, which are sent, terminates order to migration source agency.
The termination order issues condition and can be user's manual termination, reach default termination time, synchronous task and hold
Row result is that to write failure information and synchronous task implementing result be in the second memory block region to hard disc data corresponding to synchronous directory
Data write any one of failure information, the present invention is not limited.
Specifically, user can pass through the tasks carrying situation of migration server interface display, manual termination synchronizing process;
Or, preset synchronous task and terminate the time;Or, migration server was detected in continuous N minutes, the second memory block region makes
It is less than the 10% of the second pre-set threshold value with rate, etc. triggering synchronous task termination.
S523, migration source agency are by the data storage in the second memory block region in local hard drive.
S524, migration source agency will discharge after the data duplication in the second memory block region to move target server.
Specifically, source agency is migrated by the data duplication in the second memory block region to move target server, alternatively,
Data write-in implementing result in the second memory block of move target server feedback region is acted on behalf of to migration source.If move target takes
Data write-in implementing result in second memory block region of business device feedback is that the data in the second memory block region are write as work(letter
Breath, then discharge the second memory block region, and perform S525;If in the second memory block region of move target server feedback
Data write-in implementing result is that the data in the second memory block region write failure information, then terminates to migrate online.
S525, migration source agency unloading Union mount.
Specifically, source proxy call Union mount interface unloading of file system is migrated.
S526, migration source agency's feedback terminate command execution results to migration server.
So far, online migration terminates.
In an alternative embodiment, by between migration server, migration source server and move target server
Online moving method provided in an embodiment of the present invention is implemented in interaction.
Fig. 6 is component docking mode schematic diagram in the online moving method embodiment five of the present invention.As shown in fig. 6, migration clothes
Device be engaged in migrating source server, and migration source server and move target server, passes through event (English:Event) driving production
Raw Signalling exchange.Alternatively, R3 (English is passed through:Request, Response, Result) mechanism ensure Signalling exchange it is reliable and
When.In addition, migration server and database whole process interacting message, database is used to preserve the preset data in migration server.
The difference of the embodiment and above-described embodiment is:In the embodiment, migration source server by SSH orders and file system,
Such as Union mount communications, not by the way of migration source deployment migration source agency.
In the embodiment, migration server interacts the side being required for by SSH orders each time with migration source server
Formula, interaction is more frequent, and mesh dependence is higher.In addition, migration source server couples with Union mount, add and be
The complexity of system.
Signalling exchange in the embodiment is similar with technical scheme shown in Fig. 3 and Fig. 5, and here is omitted.
Above-described embodiment illustrates by taking the online migration in (SuSE) Linux OS as an example, using Union mount files
The IO redirection functions of system, by policy control, ensure data consistency and file real-time synchronization, but the present invention not as
Limit.For other operating systems, such as windows operating systems, as long as similar redirecting technique can be realized, can also make
With online migrating technology scheme provided by the invention.
In any embodiment of the present invention, migration order, synch command and termination order are led to be produced by event-driven
The mode for crossing socket issues, or, is issued by way of SSH orders.
Fig. 7 is the online transition process exemplary plot of prior art.As shown in fig. 7, represent different using square frame on a timeline
Period.Specifically, using LVM snapshots or without snapshot during Data Migration;Then, move target end test checking Data Migration
Whether succeed, wherein, judging Data Migration, successfully whether foundation being capable of normal operation for move target end business;If migrate mesh
End business normal operation, then complete online migration, stop migration source business, carry out last increment synchronization and service switching;
If unsuccessful, i.e., move target end business can not be run, then shut down migration source business and carry out increment synchronization;After increment synchronization,
Can move target end re-test checking move target end system and service normal operation;If normal, online migration is completed, is stopped
Source business is only migrated, carries out last increment synchronization and service switching;If unsuccessful, i.e., move target end system or business can not
Start, then shut down migration source business and carry out increment synchronization again, by that analogy, often start until move target is rectified.
Fig. 8 is the online transition process exemplary plot of the present invention.As shown in figure 8, represent different using square frame on a timeline
Period.Specifically, data consistency, after ensure that migration, purpose end system are ensured using Union mount during Data Migration
And business being capable of normal operation;For the not high migration of business requirement of real-time, then online migration is completed, stop migration source industry
Business, carries out last increment synchronization and service switching;For the higher business of requirement of real-time, then subtracted by online real-time synchronization
Source downtime is migrated less;After real-time synchronization is completed, stop migration source business, carry out last increment synchronization and business is cut
Change.
The embodiment of the present invention also provides a kind of online moving method, and this method can also be performed by online moving apparatus, should
Device can be integrated in such as server equipment, such as the migration server in above-described embodiment.This method includes:Arrival is opened
After the dynamic time, issue migration order and give migration source, migration order includes migration catalogue, and it is advance to start time and migration catalogue
Set;In transition process, the synchronous task in periodic queries migration source performs state;Receive the migration for migrating source feedback
Task action result;If it is determined that migration task action result to terminate, then stops inquiry, terminate online migration.Wherein, the implementation
Example is corresponding with Fig. 1 or embodiment illustrated in fig. 3, and specific descriptions refer to above-described embodiment, and here is omitted.
Alternatively, corresponding with Fig. 4 or embodiment illustrated in fig. 5, before terminating online migration, the above method can also wrap
Include:Reach the synchronous task pre-set and start the time, issue synch command and include synchronous mesh to the migration source, synch command
Record;When meeting preparatory condition, transmission terminates order and gives migration source, and the preparatory condition is user's manual termination, arrival is default
Terminate the time and by any one of synchronous task implementing result triggering.Further, synch command is issued to move to described
After shifting source, this method can also include:In synchronizing process, the synchronous task in periodic queries migration source performs state, and
Receive the synchronous task implementing result of migration source feedback.Wherein, migration order, synch command and termination order are to be driven by event
Movable property is given birth to, and is issued by way of socket, or, issued by way of SSH orders.
Fig. 9 is the structural representation of the online moving apparatus embodiment one of the present invention.As shown in figure 9, online moving apparatus 90
Including:Receiving module 91 and processing module 92.
Wherein, receiving module 91 is used for the migration order for receiving migration server transmission, and migration order includes migration mesh
Record;Processing module 92 is used to, when receiving module 91 receives migration order, create the first memory block region, and by the first internal memory
Block region is mounted under migration catalogue;The IO for migrating catalogue is redirected to the first memory block region, the first memory block region
For storing caused data in online transition process;Local hard drive Data Migration corresponding to catalogue will be migrated to move target
End;By the data duplication in the first memory block region to move target end, and the first memory block is discharged after being stored in local hard drive
Region;And terminate online migration.
The device of the present embodiment, it can be used for the technical scheme for performing embodiment of the method shown in Fig. 1, its realization principle and skill
Art effect is similar, and here is omitted.
Alternatively, when processing module 92 is used to create the first memory block region, it is specially:It is big according to the first pre-set space
It is small, the first memory block region is created, first pre-set space is set according to business datum variable quantity.
Processing module 92 is used to migration catalogue IO being redirected to the first memory block region, is specially:Load document system
Drive module, this document system has IO redirection functions;In the case where migrating catalogue, file system is established, catalogue IO will be migrated
It is redirected to the first memory block region.
On the basis of the above, processing module 92 can be also used for:Before online migration is terminated, it is periodically detected in first
The space that data in counterfoil region take;If it is determined that the space that data in the first memory block region take is less than or equal to the
One predetermined threshold value, then the data storage in the first memory block region is discharged into the first memory block region after local hard drive;If really
The space that data in fixed first memory block region take is more than the first predetermined threshold value, then creates the first new memory block region and hang
It is loaded onto under migration catalogue, and migration catalogue IO is redirected to the first new memory block region;Meanwhile by the first memory block region
In data duplication to move target end, and discharge the first memory block region after being stored in local hard drive;By the first new internal memory
The space that block region takes as the first memory block region, the above-mentioned data being periodically detected in the first memory block region of execution,
Until online migration terminates.
Further, receiving module 91 can be also used for receiving hard disk number corresponding to the migration catalogue of move target end feedback
Failure information is write according to the data write in failure information, or the first memory block region of reception move target end feedback.Now, handle
The condition that module 92 terminates to migrate online can also include:Receiving module 91 receives the migration catalogue pair of move target end feedback
The hard disc data answered writes failure information, or the data received in the first memory block region of move target end feedback are write and unsuccessfully believed
Breath.
Figure 10 is the structural representation of the online moving apparatus embodiment two of the present invention.As shown in Figure 10, as shown in Figure 9 real
On the basis of applying example, online moving apparatus 90 can also include sending module 93.In the embodiment, receiving module 91 can also be used
In after the migration order for receiving migration server transmission, in online transition process, receive what migration server was sent
Migrate execution status of task inquiry;Sending module 93 is used to feeding back migration task action result at that time to migration server, with
Migration server is set to judge whether online migration terminates according to the migration task action result at that time.
The device of the present embodiment, it can be used for the technical scheme for performing embodiment of the method shown in Fig. 4, its realization principle and skill
Art effect is similar, and here is omitted.
On the basis of the above, receiving module 91 can be also used for:Before online migration is terminated, receive under migration server
The synch command of hair, synch command include synchronous directory.Processing module 92 can be also used for creating the second memory block region, and will
Second memory block region is mounted under synchronous directory;The IO of synchronous directory is redirected to the second memory block region, the second internal memory
Block region is used to store caused data in synchronizing process;By local hard drive Data Migration corresponding to synchronous directory to move target
End;By the data duplication in the second memory block region to move target end, and the second memory block is discharged after being stored in local hard drive
Region.Receiving module 91 can be also used for receiving the termination order that migration server is sent.
Wherein, processing module 92 is used to create the second memory block region, is specially:According to the second pre-set space size, wound
The second memory block region is built, second pre-set space is set according to business datum variable quantity.
Processing module 92 is used to the IO of synchronous directory being redirected to the second memory block region, is specially:Load document system
The drive module of system, file system have IO redirection functions;Under synchronous directory, file system is established, by synchronous directory IO
It is redirected to the second memory block region.
Further, processing module 92 can be also used for:The IO of synchronous directory is being redirected to the second memory block region
Afterwards, the space that the data being periodically detected in the second memory block region take;If it is determined that the data in the second memory block region
The space of occupancy is less than or equal to the second predetermined threshold value, then by the data duplication in the second memory block region to move target end,
And the second memory block region is discharged after being stored in local hard drive, and terminate synchronous task;If it is determined that in the second memory block region
The space that data take is more than the second predetermined threshold value, then creates under the second new memory block region carry to synchronous directory, and will
Synchronous directory IO is redirected to the second new memory block region;Meanwhile by the data duplication in the second memory block region to migration
Destination, and discharge the second memory block region after being stored in local hard drive;Using the second new memory block region as described second
Memory block region, the space that the data being periodically detected in the second memory block region take is performed, until terminating synchronous task.
Alternatively, receiving module 91 can be also used for:After the synch command that migration server issues is received, in synchronization
During, receive the synchronous task that migration server is sent and perform status inquiry.Sending module 93 can be also used for feedback at that time
Synchronous task implementing result to migration server.
The condition that issues of above-mentioned termination order performs for user's manual termination, arrival default termination time, synchronous task
As a result it is in the second memory block region that hard disc data corresponding to being synchronous directory, which writes failure information and synchronous task implementing result,
Data write any one of failure information etc..
It should be noted that in any embodiment of the present invention, migration order, synch command and termination order are to pass through thing
Part driving produces, and is issued by way of socket, or, issued by way of SSH orders.
Figure 11 is the structural representation of the online moving apparatus embodiment three of the present invention.As shown in figure 11, online moving apparatus
110 include:Sending module 111, processing module 112 and receiving module 113.
Wherein, sending module 111 is used for after reaching the startup time, issues migration order and gives migration source, the migration order bag
The catalogue containing migration, it is what is pre-set to start time and migration catalogue;Processing module 112 is used in transition process, the cycle
Property inquiry migration source synchronous task perform state;Receiving module 113 is used for the migration tasks carrying knot for receiving migration source feedback
Fruit;Processing module 112 be can be also used for if it is determined that migrating task action result to terminate, then stopping is inquired about, and terminate online migration.
Alternatively, sending module 111 can be also used for:Before terminating online migration, the synchronous task pre-set is reached
Start the time, issue synch command and give migration source, the synch command includes synchronous directory;When meeting preparatory condition, send and terminate
Order and give migration source, the preparatory condition is user's manual termination, reaches the default termination time and by synchronous task implementing result
Any one of triggering.
Further, processing module 112 can be also used for:In synchronizing process, the synchronization in periodic queries migration source is appointed
Business execution state;Receiving module can be also used for receiving the synchronous task implementing result of migration source feedback.Wherein, migration order,
Synch command and termination order are to be produced by event-driven, are issued by way of socket, or, the side by SSH orders
Formula issues.
The device of the present embodiment, it can be used for the technical scheme for performing the respective side of embodiment of the method shown in Fig. 1 or Fig. 4,
Its implementing principle and technical effect is similar, and here is omitted.
Figure 12 is the structural representation of the online moving apparatus example IV of the present invention.As shown in figure 12, online moving apparatus
120 include:Receiver 121 and processor 122.
Wherein, receiver 121 is used for the migration order for receiving migration server transmission, and migration order includes migration mesh
Record;Processor 122 is used to, when receiver 121 receives migration order, create the first memory block region, and by the first memory block
Region is mounted under migration catalogue;The IO for migrating catalogue is redirected to the first memory block region, the first memory block region is used
The caused data in the online transition process of storage;Local hard drive Data Migration corresponding to catalogue will be migrated to move target end;
By the data duplication in the first memory block region to move target end, and the first memory block area is discharged after being stored in local hard drive
Domain;And terminate online migration.
The device of the present embodiment, it can be used for the technical scheme for performing embodiment of the method shown in Fig. 1, its realization principle and skill
Art effect is similar, and here is omitted.
Alternatively, when processor 122 is used to create the first memory block region, it is specially:According to the first pre-set space size,
The first memory block region is created, first pre-set space is set according to business datum variable quantity.
Processor 122 is used to migration catalogue IO being redirected to the first memory block region, is specially:Load document system
Drive module, this document system have IO redirection functions;In the case where migrating catalogue, file system is established, by migration catalogue IO weights
It is directed to the first memory block region.
On the basis of the above, processor 122 can be also used for:Before online migration is terminated, it is periodically detected in first
The space that data in counterfoil region take;If it is determined that the space that data in the first memory block region take is less than or equal to the
One predetermined threshold value, then the data storage in the first memory block region is discharged into the first memory block region after local hard drive;If really
The space that data in fixed first memory block region take is more than the first predetermined threshold value, then creates the first new memory block region and hang
It is loaded onto under migration catalogue, and migration catalogue IO is redirected to the first new memory block region;Meanwhile by the first memory block region
In data duplication to move target end, and discharge the first memory block region after being stored in local hard drive;By the first new internal memory
The space that block region takes as the first memory block region, the above-mentioned data being periodically detected in the first memory block region of execution,
Until online migration terminates.
Further, receiver 121 can be also used for receiving hard disk number corresponding to the migration catalogue of move target end feedback
Failure information is write according to the data write in failure information, or the first memory block region of reception move target end feedback.Now, handle
The condition that device 122 terminates to migrate online can also include:The migration catalogue that receiver 121 receives move target end feedback is corresponding
Hard disc data write failure information, or the data received in the first memory block region of move target end feedback are write and unsuccessfully believed
Breath.
Figure 13 is the structural representation of the online moving apparatus embodiment five of the present invention.As shown in figure 13, as shown in figure 12
On the basis of embodiment, online moving apparatus 120 can also include transmitter 123.In the embodiment, receiver 121 can be with
For after the migration order of migration server transmission is received, in online transition process, receiving migration server and sending
Migration execution status of task inquiry;Transmitter 123 is used to feeding back migration task action result at that time to migration server, with
Migration server is set to judge whether online migration terminates according to the migration task action result at that time.
The device of the present embodiment, it can be used for the technical scheme for performing embodiment of the method shown in Fig. 4, its realization principle and skill
Art effect is similar, and here is omitted.
On the basis of the above, receiver 121 can be also used for:Before online migration is terminated, receive under migration server
The synch command of hair, synch command include synchronous directory.Processor 122 can be also used for creating the second memory block region, and will
Second memory block region is mounted under synchronous directory;The IO of synchronous directory is redirected to the second memory block region, the second internal memory
Block region is used to store caused data in synchronizing process;By local hard drive Data Migration corresponding to synchronous directory to move target
End;By the data duplication in the second memory block region to move target end, and the second memory block is discharged after being stored in local hard drive
Region.Receiver 121 can be also used for receiving the termination order that migration server is sent.
Wherein, processor 122 is used to create the second memory block region, is specially:According to the second pre-set space size, create
Second memory block region, second pre-set space are set according to business datum variable quantity.
Processor 122 is used to the IO of synchronous directory being redirected to the second memory block region, is specially:Load document system
Drive module, file system has IO redirection functions;Under synchronous directory, file system is established, by synchronous directory IO weights
It is directed to the second memory block region.
Further, processor 122 can be also used for:By the IO of synchronous directory be redirected to the second memory block region it
Afterwards, the space that the data being periodically detected in the second memory block region take;If it is determined that the data in the second memory block region account for
Space is less than or equal to the second predetermined threshold value, then by the data duplication in the second memory block region to move target end, and
The second memory block region is discharged after being stored in local hard drive, and terminates synchronous task;If it is determined that the number in the second memory block region
It is more than the second predetermined threshold value according to the space of occupancy, then creates under the second new memory block region carry to synchronous directory, and will be same
Step catalogue IO is redirected to the second new memory block region;Meanwhile by the data duplication in the second memory block region to migration mesh
End, and discharge the second memory block region after being stored in local hard drive;Using the second new memory block region as in described second
Counterfoil region, the space that the data being periodically detected in the second memory block region take is performed, until terminating synchronous task.
Alternatively, receiver 121 can be also used for:After the synch command that migration server issues is received, in synchronization
During, receive the synchronous task that migration server is sent and perform status inquiry.Transmitter 123 can be also used for feeding back at that time
Synchronous task implementing result is to migration server.
The condition that issues of above-mentioned termination order performs for user's manual termination, arrival default termination time, synchronous task
As a result it is in the second memory block region that hard disc data corresponding to being synchronous directory, which writes failure information and synchronous task implementing result,
Data write any one of failure information etc..
It should be noted that in any embodiment of the present invention, migration order, synch command and termination order are to pass through thing
Part driving produces, and is issued by way of socket, or, issued by way of SSH orders.
Figure 14 is the structural representation of the online moving apparatus embodiment six of the present invention.As shown in figure 14, online moving apparatus
140 include:Transmitter 141, processor 142 and receiver 143.
Wherein, transmitter 141 is used for after reaching the startup time, issues migration order and gives migration source, the migration order includes
Catalogue is migrated, it is what is pre-set to start time and migration catalogue;Processor 142 is used in transition process, periodically looks into
The synchronous task for asking migration source performs state;Receiver 143 is used for the migration task action result for receiving migration source feedback;Processing
Device 142 be can be also used for if it is determined that migrating task action result to terminate, then stopping is inquired about, and terminate online migration.
Alternatively, transmitter 141 can be also used for:Before terminating online migration, reach the synchronous task pre-set and open
The dynamic time, issue synch command and give migration source, the synch command includes synchronous directory;When meeting preparatory condition, send and terminate life
Make and give migration source, the preparatory condition is user's manual termination, reaches the default termination time and touched by synchronous task implementing result
Any one of hair.
Further, processor 142 can be also used for:In synchronizing process, periodic queries migrate the synchronous task in source
Execution state;Receiver can be also used for receiving the synchronous task implementing result of migration source feedback.Wherein, migration is ordered, is synchronous
Order and terminate order to be produced by event-driven, issued by way of socket, or, by way of SSH orders under
Hair.
The device of the present embodiment, it can be used for the technical scheme for performing the respective side of embodiment of the method shown in Fig. 1 or Fig. 4,
Its implementing principle and technical effect is similar, and here is omitted.
The embodiment of the present invention also provides a kind of online migratory system, and the online migratory system includes:Move target end, such as scheme
Online moving apparatus shown in 9 or Figure 10, and online moving apparatus as described in Figure 11.
One of ordinary skill in the art will appreciate that:Realizing all or part of step of above-mentioned each method embodiment can lead to
The related hardware of programmed instruction is crossed to complete.Foregoing program can be stored in a computer read/write memory medium.The journey
Sequence upon execution, execution the step of including above-mentioned each method embodiment;And foregoing storage medium includes:ROM, RAM, magnetic disc or
Person's CD etc. is various can be with the medium of store program codes.
Finally it should be noted that:Various embodiments above is merely illustrative of the technical solution of the present invention, rather than its limitations;To the greatest extent
The present invention is described in detail with reference to foregoing embodiments for pipe, it will be understood by those within the art that:Its according to
The technical scheme described in foregoing embodiments can so be modified, either which part or all technical characteristic are entered
Row equivalent substitution;And these modifications or replacement, the essence of appropriate technical solution is departed from various embodiments of the present invention technology
The scope of scheme.
Claims (35)
- A kind of 1. online moving method, it is characterised in that including:When receiving the migration order of migration server transmission, the first memory block region is created, and by first memory block Region is mounted under migration catalogue, and the migration order includes the migration catalogue;The input and output IO of the migration catalogue is redirected to the first memory block region, the first memory block region is used The caused data in the storage online transition process;By local hard drive Data Migration corresponding to the migration catalogue to move target end;By the data duplication in the first memory block region to the move target end, and released after being stored in the local hard drive Put the first memory block region;Terminate the online migration.
- 2. according to the method for claim 1, it is characterised in that the first memory block region of the establishment, including:According to the first pre-set space size, the first memory block region is created, first pre-set space is according to business datum Variable quantity is set.
- 3. method according to claim 1 or 2, it is characterised in that it is described the migration catalogue IO is redirected to it is described First memory block region, including:The drive module of load document system, the file system have IO redirection functions;Under the migration catalogue, the file system is established, the migration catalogue IO is redirected to first memory block Region.
- 4. method according to claim 1 or 2, it is characterised in that before terminating the online migration, methods described is also wrapped Include:The space that the data being periodically detected in the first memory block region take;If it is determined that the space that the data in the first memory block region take is less than or equal to the first predetermined threshold value, then by described in Data storage in first memory block region discharges the first memory block region after the local hard drive;If it is determined that the space that the data in the first memory block region take is more than first predetermined threshold value, then create newly Under first memory block region carry to the migration catalogue, and the migration catalogue IO is redirected to the first new internal memory Block region;Meanwhile by the data duplication in the first memory block region to the move target end, and it is stored in the local The first memory block region is discharged after hard disk;Using the first new memory block region as the first memory block region, The space that the data being periodically detected described in execution in the first memory block region take, until the online migration terminates.
- 5. method according to claim 1 or 2, it is characterised in that terminating the condition migrated online also includes:Hard disc data corresponding to receiving the migration catalogue of the move target end feedback writes failure information, or receives institute The data stated in the first memory block region of move target end feedback write failure information.
- 6. method according to claim 1 or 2, it is characterised in that described to receive the migration of migration server transmission After order, methods described also includes:In the online transition process, the migration execution status of task inquiry that the migration server is sent is received, and feed back Migration task action result at that time gives the migration server, so that the migration server is according to the migration task at that time Implementing result judges whether the online migration terminates.
- 7. method according to claim 1 or 2, it is characterised in that before terminating the online migration, methods described is also wrapped Include:The synch command that the migration server issues is received, the synch command includes synchronous directory;The second memory block region is created, and the second memory block region is mounted under the synchronous directory;The IO of the synchronous directory is redirected to the second memory block region, the second memory block region is used to store institute State caused data in synchronizing process;By local hard drive Data Migration corresponding to the synchronous directory to the move target end;By the data duplication in the second memory block region to the move target end, and released after being stored in the local hard drive Put the second memory block region;Receive the termination order that the migration server is sent.
- 8. according to the method for claim 7, it is characterised in that the second memory block region of the establishment, including:According to the second pre-set space size, the second memory block region is created, second pre-set space is according to business datum Variable quantity is set.
- 9. according to the method for claim 7, it is characterised in that the IO by the synchronous directory is redirected to described the Two memory block regions, including:The drive module of load document system, the file system have IO redirection functions;Under the synchronous directory, the file system is established, the synchronous directory IO is redirected to second memory block Region.
- 10. according to the method for claim 7, it is characterised in that the IO by the synchronous directory is redirected to described After second memory block region, methods described also includes:The space that the data being periodically detected in the second memory block region take;If it is determined that the space that the data in the second memory block region take is less than or equal to the second predetermined threshold value, then by described in Data duplication in second memory block region discharges described second to the move target end after being stored in the local hard drive Memory block region, and terminate synchronous task;If it is determined that the space that the data in the second memory block region take is more than second predetermined threshold value, then create newly Under second memory block region carry to the synchronous directory, and the synchronous directory IO is redirected to the second new internal memory Block region;Meanwhile by the data duplication in the second memory block region to the move target end, and it is stored in the local The second memory block region is discharged after hard disk;Using the second new memory block region as the second memory block region, The space that the data being periodically detected described in execution in the second memory block region take, until terminating the synchronous task.
- 11. according to the method for claim 7, it is characterised in that the synchronous life for receiving the migration server and issuing After order, methods described also includes:In synchronizing process, receive the synchronous task that the migration server is sent and perform status inquiry, and feed back at that time same Step task action result gives the migration server.
- 12. according to the method for claim 10, it is characterised in that the condition that issues for terminating order is that user is whole manually Only, the default termination time is reached, the synchronous task implementing result is that hard disc data corresponding to the synchronous directory writes failure Information and the synchronous task implementing result are that the data in the second memory block region write any one of failure information.
- 13. according to the method for claim 7, it is characterised in that migration order, the synch command and the termination Order to be produced by event-driven, issued by way of socket, or, the side by security protocol SSH orders Formula issues.
- A kind of 14. online moving method, it is characterised in that including:Reach after starting the time, issue migration order and give migration source, the migration order includes migration catalogue, the startup time It is what is pre-set with migration catalogue;In transition process, the synchronous task that source is migrated described in periodic queries performs state;Receive the migration task action result of the migration source feedback;If it is determined that the migration task action result then stops inquiry to terminate, terminate the online migration.
- 15. according to the method for claim 14, it is characterised in that before terminating the online migration, methods described is also wrapped Include:Reach the synchronous task pre-set and start the time, issue synch command and included to the migration source, the synch command Synchronous directory;When meeting preparatory condition, send and terminate order to the migration source, the preparatory condition is user's manual termination, arrival is pre- If the termination time and by synchronous task implementing result trigger any one of.
- 16. according to the method for claim 15, it is characterised in that the synch command that issues to after the migration source, Methods described also includes:In synchronizing process, the synchronous task that source is migrated described in periodic queries performs state, and receives the migration source feedback The synchronous task implementing result.
- 17. according to the method for claim 16, it is characterised in that migration order, the synch command and the end Only order is issued, or, pass through security protocol SSH orders to be produced by event-driven by way of socket Mode issues.
- A kind of 18. online moving apparatus, it is characterised in that including:Receiving module, for receiving the migration order of migration server transmission, the migration order includes migration catalogue;Processing module, for when the receiving module receives the migration order, creating the first memory block region, and by institute The first memory block region is stated to be mounted under the migration catalogue;The input and output IO of the migration catalogue is redirected to described the One memory block region, the first memory block region are used to store caused data in the online transition process;Moved described Local hard drive Data Migration corresponding to catalogue is moved to move target end;By the data duplication in the first memory block region to institute Move target end is stated, and the first memory block region is discharged after being stored in the local hard drive;And terminate described to move online Move.
- 19. device according to claim 18, it is characterised in that the processing module is used for the first memory block of the establishment Region, it is specially:According to the first pre-set space size, the first memory block region is created, first pre-set space is according to business datum Variable quantity is set.
- 20. the device according to claim 18 or 19, it is characterised in that the processing module is used for the migration catalogue IO is redirected to the first memory block region, is specially:The drive module of load document system, the file system have IO redirection functions;Under the migration catalogue, the file system is established, the migration catalogue IO is redirected to first memory block Region.
- 21. the device according to claim 18 or 19, it is characterised in that the processing module is additionally operable to:Before the online migration is terminated, the space for the data occupancy being periodically detected in the first memory block region;If it is determined that the space that the data in the first memory block region take is less than or equal to the first predetermined threshold value, then by described in Data storage in first memory block region discharges the first memory block region after the local hard drive;If it is determined that the space that the data in the first memory block region take is more than first predetermined threshold value, then create newly Under first memory block region carry to the migration catalogue, and the migration catalogue IO is redirected to the first new internal memory Block region;Meanwhile by the data duplication in the first memory block region to the move target end, and it is stored in the local The first memory block region is discharged after hard disk;Using the first new memory block region as the first memory block region, The space that the data being periodically detected described in execution in the first memory block region take, until the online migration terminates.
- 22. the device according to claim 18 or 19, it is characterised in that the receiving module is additionally operable to receive the migration Hard disc data corresponding to the migration catalogue of destination feedback writes failure information, or receives the institute of the move target end feedback The data stated in the first memory block region write failure information;The processing module, which terminates the condition migrated online, also to be included:The receiving module receive the migration catalogue of move target end feedback corresponding to hard disc data write and unsuccessfully believe Breath, or the data received in the first memory block region of the move target end feedback write failure information.
- 23. the device according to claim 18 or 19, it is characterised in that described device also includes sending module,The receiving module, it is additionally operable to after the migration order of migration server transmission is received, was migrated online described Cheng Zhong, receive the migration execution status of task inquiry that the migration server is sent;The sending module, the migration task action result for feeding back at that time gives the migration server, so that the migration Server judges whether the online migration terminates according to the migration task action result at that time.
- 24. the device according to claim 18 or 19, it is characterised in thatThe receiving module, it is additionally operable to before the online migration is terminated, receives the synchronous life that the migration server issues Order, the synch command include synchronous directory;The processing module, it is additionally operable to create the second memory block region, and the second memory block region is mounted to described same Walk under catalogue;The IO of the synchronous directory is redirected to the second memory block region, the second memory block region is used for Store caused data in the synchronizing process;By local hard drive Data Migration corresponding to the synchronous directory to the migration mesh End;By the data duplication in the second memory block region to the move target end, and after being stored in the local hard drive Discharge the second memory block region;The receiving module is additionally operable to receive the termination order that the migration server is sent.
- 25. device according to claim 24, it is characterised in that the processing module is used for the second memory block of the establishment Region, it is specially:According to the second pre-set space size, the second memory block region is created, second pre-set space is according to business datum Variable quantity is set.
- 26. device according to claim 24, it is characterised in that the processing module is used for described by the synchronous directory IO be redirected to the second memory block region, be specially:The drive module of load document system, the file system have IO redirection functions;Under the synchronous directory, the file system is established, the synchronous directory IO is redirected to second memory block Region.
- 27. device according to claim 24, it is characterised in that the processing module is additionally operable to:After the IO by the synchronous directory is redirected to the second memory block region, described second is periodically detected The space that data in memory block region take;If it is determined that the space that the data in the second memory block region take is less than or equal to the second predetermined threshold value, then by described in Data duplication in second memory block region discharges described second to the move target end after being stored in the local hard drive Memory block region, and terminate synchronous task;If it is determined that the space that the data in the second memory block region take is more than second predetermined threshold value, then create newly Under second memory block region carry to the synchronous directory, and the synchronous directory IO is redirected to the second new internal memory Block region;Meanwhile by the data duplication in the second memory block region to the move target end, and it is stored in the local The second memory block region is discharged after hard disk;Using the second new memory block region as the second memory block region, The space that the data being periodically detected described in execution in the second memory block region take, until terminating the synchronous task.
- 28. device according to claim 24, it is characterised in that the receiving module is additionally operable to:After the synch command for receiving the migration server and issuing, in synchronizing process, the migration service is received The synchronous task that device is sent performs status inquiry;Described device also includes sending module, and the synchronous task implementing result that the sending module is used to feed back at that time is moved to described Move server.
- 29. device according to claim 27, it is characterised in that the condition that issues for terminating order is that user is whole manually Only, the default termination time is reached, the synchronous task implementing result is that hard disc data corresponding to the synchronous directory writes failure Information and the synchronous task implementing result are that the data in the second memory block region write any one of failure information.
- 30. device according to claim 24, it is characterised in that migration order, the synch command and the end Only order is issued, or, pass through security protocol SSH orders to be produced by event-driven by way of socket Mode issues.
- A kind of 31. online moving apparatus, it is characterised in that including:Sending module, after reaching the startup time, issue migration order and give migration source, the migration order includes migration mesh Record, the startup time and migration catalogue are what is pre-set;Processing module, the synchronous task in transition process, migrating source described in periodic queries perform state;Receiving module, for receiving the migration task action result of the migration source feedback;The processing module is additionally operable to if it is determined that the migration task action result then stops inquiry to terminate, terminate it is described Line migrates.
- 32. device according to claim 31, it is characterised in that the sending module is additionally operable to:Before terminating the online migration, reach the synchronous task pre-set and start the time, issue synch command and moved to described Shifting source, the synch command include synchronous directory;When meeting preparatory condition, send and terminate order to the migration source, the preparatory condition is user's manual termination, arrival is pre- If the termination time and by synchronous task implementing result trigger any one of.
- 33. device according to claim 32, it is characterised in that the processing module is additionally operable to:In synchronizing process, the synchronous task that source is migrated described in periodic queries performs state;The receiving module is additionally operable to receive the synchronous task implementing result of the migration source feedback.
- 34. device according to claim 33, it is characterised in that migration order, the synch command and the end Only order is issued, or, pass through security protocol SSH orders to be produced by event-driven by way of socket Mode issues.
- A kind of 35. online migratory system, it is characterised in that including:Move target end, as described in claim any one of 18-30 Online moving apparatus and the online moving apparatus as described in claim any one of 31-34.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410640111.9A CN104468521B (en) | 2014-11-13 | 2014-11-13 | Online moving method, device and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410640111.9A CN104468521B (en) | 2014-11-13 | 2014-11-13 | Online moving method, device and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104468521A CN104468521A (en) | 2015-03-25 |
CN104468521B true CN104468521B (en) | 2017-12-29 |
Family
ID=52913893
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410640111.9A Active CN104468521B (en) | 2014-11-13 | 2014-11-13 | Online moving method, device and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104468521B (en) |
Families Citing this family (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106557265B (en) | 2015-09-25 | 2019-08-23 | 伊姆西公司 | Method, equipment and the medium of the operating characteristics of managed data object |
CN105511816A (en) * | 2015-12-14 | 2016-04-20 | 浪潮(北京)电子信息产业有限公司 | Method and system for migrating virtual machine disk data |
CN105739918B (en) * | 2016-01-07 | 2019-01-18 | 新华三技术有限公司 | The online moving method of the storage of virtual machine and device |
CN107305502B (en) * | 2016-04-21 | 2022-01-25 | 中兴通讯股份有限公司 | Application instance migration method and device |
CN107566319B (en) * | 2016-06-30 | 2021-01-26 | 中央大学 | Virtual machine instant transfer method |
CN106775930A (en) * | 2016-11-28 | 2017-05-31 | 中车株洲电力机车研究所有限公司 | A kind of acquisition methods and device of network interface status information |
CN108228672B (en) * | 2016-12-22 | 2022-05-03 | 阿里巴巴集团控股有限公司 | Metadata migration method, device, system and equipment |
CN110046510B (en) * | 2019-03-13 | 2021-10-01 | 北京深演智能科技股份有限公司 | Cross-cloud data migration method, device and system |
CN110989929A (en) * | 2019-11-22 | 2020-04-10 | 浪潮电子信息产业股份有限公司 | MON service migration method, device, equipment and readable storage medium |
CN111078368B (en) * | 2019-12-26 | 2023-03-21 | 浪潮电子信息产业股份有限公司 | Memory snapshot method and device of cloud computing platform virtual machine and readable storage medium |
CN111858030B (en) * | 2020-06-17 | 2024-03-22 | 北京百度网讯科技有限公司 | Resource processing method and device for job, electronic equipment and readable storage medium |
CN111930707B (en) * | 2020-07-10 | 2022-08-02 | 江苏安超云软件有限公司 | Method and system for correcting drive letter of windows cloud migration |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8219788B1 (en) * | 2007-07-23 | 2012-07-10 | Oracle America, Inc. | Virtual core management |
US8464256B1 (en) * | 2009-04-10 | 2013-06-11 | Open Invention Network, Llc | System and method for hierarchical interception with isolated environments |
CN103399778A (en) * | 2013-07-01 | 2013-11-20 | 华为技术有限公司 | Method and device for on-line integral migration of virtual machine |
CN103678045A (en) * | 2013-12-31 | 2014-03-26 | 曙光云计算技术有限公司 | Data backup method for virtual machines |
CN103729237A (en) * | 2014-01-07 | 2014-04-16 | 浪潮(北京)电子信息产业有限公司 | Method for transferring virtual machine across storage pools |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9152448B2 (en) * | 2012-05-11 | 2015-10-06 | Vmware, Inc. | Performance of load balancing modules with migration awareness |
-
2014
- 2014-11-13 CN CN201410640111.9A patent/CN104468521B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8219788B1 (en) * | 2007-07-23 | 2012-07-10 | Oracle America, Inc. | Virtual core management |
US8464256B1 (en) * | 2009-04-10 | 2013-06-11 | Open Invention Network, Llc | System and method for hierarchical interception with isolated environments |
CN103399778A (en) * | 2013-07-01 | 2013-11-20 | 华为技术有限公司 | Method and device for on-line integral migration of virtual machine |
CN103678045A (en) * | 2013-12-31 | 2014-03-26 | 曙光云计算技术有限公司 | Data backup method for virtual machines |
CN103729237A (en) * | 2014-01-07 | 2014-04-16 | 浪潮(北京)电子信息产业有限公司 | Method for transferring virtual machine across storage pools |
Non-Patent Citations (1)
Title |
---|
云计算中可信虚拟存储的研究;李成明;《中国优秀硕士学位论文全文数据库信息科技辑(2012)》;20120515(第5期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN104468521A (en) | 2015-03-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104468521B (en) | Online moving method, device and system | |
US10073747B2 (en) | Reducing recovery time in disaster recovery/replication setup with multitier backend storage | |
CN202798798U (en) | High availability system based on cloud computing technology | |
CN102981931B (en) | Backup method and device for virtual machine | |
US8626936B2 (en) | Protocol independent server replacement and replication in a storage area network | |
CN110311831B (en) | Container cloud-based system resource monitoring method and related equipment | |
CN105338078B (en) | Date storage method and device for storage system | |
CN111162941B (en) | Method for automatically managing virtual IP (Internet protocol) in Kubernetes environment | |
CN104714811A (en) | Method and device for manufacturing difference upgrade package and system difference upgrade method and device | |
CN108964948A (en) | Principal and subordinate's service system, host node fault recovery method and device | |
US20140059003A1 (en) | Automated migration to a new target volume via merged bitmaps to maintain consistency | |
CN104166606A (en) | File backup method and main storage device | |
CN103647849A (en) | Method and device for migrating businesses and disaster recovery system | |
CN104102535B (en) | Process migration method and transportable operating system | |
JP2013114684A (en) | System and method for managing virtual machine | |
CN103491192A (en) | Namenode switching method and system of distributed system | |
CN104040512A (en) | Method and device for processing storage space and non-volatile computer readable storage medium | |
CN104793981B (en) | A kind of online snapshot management method and device of cluster virtual machine | |
CN104683486B (en) | Method, apparatus, the distributed system of synchronization message are handled in distributed system | |
CN104461779B (en) | A kind of storage method of distributed data, apparatus and system | |
CN103559198A (en) | Data synchronizing method and equipment | |
CN103065096B (en) | A kind of data guard method, Apparatus and system | |
CN104536852B (en) | Data recovery method and device | |
CN106383667A (en) | Method and apparatus for LUN migration in business operation | |
CN107402839A (en) | A kind of method and system of Backup Data |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right |
Effective date of registration: 20220208 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. |
|
TR01 | Transfer of patent right |