CN111208947A - Data migration method and device, physical machine, cloud platform and computer storage medium - Google Patents

Data migration method and device, physical machine, cloud platform and computer storage medium Download PDF

Info

Publication number
CN111208947A
CN111208947A CN202010026080.3A CN202010026080A CN111208947A CN 111208947 A CN111208947 A CN 111208947A CN 202010026080 A CN202010026080 A CN 202010026080A CN 111208947 A CN111208947 A CN 111208947A
Authority
CN
China
Prior art keywords
data
physical machine
disk
cloud platform
shared
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010026080.3A
Other languages
Chinese (zh)
Inventor
傅开庭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sangfor Technologies Co Ltd
Original Assignee
Sangfor Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sangfor Technologies Co Ltd filed Critical Sangfor Technologies Co Ltd
Priority to CN202010026080.3A priority Critical patent/CN111208947A/en
Publication of CN111208947A publication Critical patent/CN111208947A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0647Migration mechanisms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/065Replication mechanisms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]

Abstract

The embodiment of the invention provides a data migration method, which is applied to a physical machine and comprises the following steps: acquiring disk information of the physical machine, sending the disk information to a cloud platform, receiving a shared image shared by the cloud platform according to the disk information, and loading the shared image of the cloud platform; and in the process of migrating snapshot data to the cloud platform, copying the data written into the disk of the physical machine into the shared mirror image. Therefore, the data migration method can realize the synchronization of the data of the disk of the physical machine to the cloud platform without loss; meanwhile, the synchronization process of the data written into the disk is carried out simultaneously in the process of transferring the snapshot data, so that the efficiency of data transfer is improved; the embodiment of the invention also discloses another data migration method, a physical machine, a cloud platform and a computer storage medium.

Description

Data migration method and device, physical machine, cloud platform and computer storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a data migration method and apparatus, a physical machine, a cloud platform, and a computer storage medium.
Background
Online P2V migration (Online physical to virtual migration, P2V) is also called P2V live migration, and refers to a technology for migrating disk data of a physical machine to a cloud platform without interrupting the service of a client, and the disk data of the physical machine is migrated to a virtual machine of the cloud platform, so that the disk data of the physical machine and the disk data of the virtual machine are synchronized.
In the related technology, a scheme for realizing online P2V migration is that, under the condition that a client Service is not interrupted, disk data at a snapshot time point is migrated to a cloud platform through a volume Shadow Copy Service (VSS), data changed by a disk is temporarily stored in a data migration process until the VSS snapshot data is completely transmitted, data synchronization is performed, if new changed data is generated in a data synchronization process and needs to be repeated, a physical machine is closed until the new changed data is within an acceptable data loss range, and then the disk data of the physical machine is inconsistent with the disk data of a virtual machine, and data migration efficiency is affected.
Disclosure of Invention
In view of this, embodiments of the present invention are expected to provide a data migration method, an apparatus, a physical machine, a cloud platform, and a computer storage medium, which can implement synchronization of data of a disk of the physical machine to the cloud platform without loss after data migration is completed, and improve data migration efficiency.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
the embodiment of the invention provides a data migration method, which is applied to a physical machine and comprises the following steps:
acquiring disk information of the physical machine, sending the disk information to a cloud platform, receiving a shared image shared by the cloud platform according to the disk information, and loading the shared image of the cloud platform;
and in the process of migrating snapshot data to the cloud platform, copying the data written into the disk of the physical machine into the shared mirror image.
Optionally, the disk information includes at least one of: the space size of the disk, the number of the disks and the identification of the disks.
Optionally, the copying data written to the disk of the physical machine to the shared image, the method further includes:
monitoring whether data written into a magnetic disk of the physical machine exists in real time;
and under the condition that the data written into the disk of the physical machine exists, copying the data written into the disk of the physical machine into the shared mirror image.
Optionally, the method further comprises:
prompting a user to close the physical machine after the snapshot data is migrated;
after a shutdown instruction is received, data written into a disk of the physical machine is obtained again;
copying the re-acquired data written into the disk of the physical machine into the shared mirror image;
and executing the operation of closing the physical machine.
Optionally, the method comprises:
and after the data written into the disk of the physical machine is acquired again, ignoring the data written into the disk of the physical machine.
The embodiment of the invention provides a data migration method, which is applied to a cloud platform and comprises the following steps:
receiving disk information sent by a physical machine, constructing a shared image according to the disk information, and sharing the shared image to the physical machine;
and in the process of receiving the snapshot data of the migration of the physical machine, receiving data written into a disk of the physical machine based on the shared mirror image.
Optionally, the disk information includes at least one of: the space size of the disk, the number of the disks and the identification of the disks.
Optionally, the method further comprises:
receiving notification information sent by the physical machine, wherein the notification information is used for notifying that data migration is finished;
and merging the snapshot data and the data in the shared mirror image.
The embodiment of the invention provides a data migration device, which is applied to a physical machine and comprises a loading module and a copying module, wherein,
the loading module is used for acquiring disk information of the physical machine, sending the disk information to the cloud platform, receiving a shared mirror image shared by the cloud platform according to the disk information, and loading the shared mirror image of the cloud platform;
a copying module: and the method is used for copying the data written into the disk of the physical machine into the shared mirror image in the process of migrating the snapshot data to the cloud platform.
The embodiment of the invention provides a data migration device, which is applied to a cloud platform and comprises a sharing module and a receiving module, wherein,
sharing the module: the system comprises a physical machine, a shared mirror and a data processing system, wherein the physical machine is used for receiving disk information sent by the physical machine, constructing a shared mirror according to the disk information and sharing the shared mirror to the physical machine;
a receiving module: and in the process of receiving the snapshot data of the migration of the physical machine, receiving data written into a disk of the physical machine based on the shared mirror image.
The embodiment of the present invention provides a physical machine, where the physical machine includes a memory, a processor, and a computer program that is stored in the memory and can be run on the processor, and when the processor executes the computer program, the processor implements the data migration method provided in one or more of the foregoing technical solutions.
The embodiment of the invention provides a cloud platform, which comprises a memory, a processor and a computer program which is stored on the memory and can be run on the processor, wherein when the processor executes the program, the data migration method provided by one or more technical schemes is realized.
The embodiment of the invention provides a computer storage medium, wherein a computer program is stored in the computer storage medium; the computer program can implement the data migration method provided by one or more of the above technical solutions after being executed.
The embodiment of the invention provides a data migration method, a data migration device, a physical machine, a cloud platform and a computer storage medium, wherein the method is applied to the physical machine and comprises the following steps: acquiring disk information of the physical machine, sending the disk information to a cloud platform, receiving a shared image shared by the cloud platform according to the disk information, and loading the shared image of the cloud platform; and in the process of migrating snapshot data to the cloud platform, copying the data written into the disk of the physical machine into the shared mirror image. Therefore, the migration method can realize the synchronization of the data of the disk of the physical machine to the cloud platform without loss; meanwhile, the synchronization process of the data written into the disk is carried out simultaneously in the process of transferring the snapshot data, so that the efficiency of data transfer is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
Drawings
FIG. 1 is a schematic diagram of an application scenario of an embodiment of the present invention;
fig. 2 is a first flowchart illustrating a data migration method according to an embodiment of the present invention;
fig. 3 is a second flowchart illustrating a data migration method according to an embodiment of the present invention;
FIG. 4 is a schematic diagram illustrating a data migration method according to an embodiment of the present invention;
fig. 5 is a schematic flowchart illustrating cooperation of modules in a data migration process according to an embodiment of the present invention;
FIG. 6 is a first schematic structural diagram of a data migration apparatus according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a data migration apparatus according to an embodiment of the present invention;
FIG. 8 is a schematic diagram of a physical machine according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of a cloud platform according to an embodiment of the present invention.
Detailed Description
The technical solution of the present invention is further described in detail with reference to the drawings and the specific embodiments of the specification.
The embodiment of the invention provides a technical scheme of data migration, which can realize data migration between a physical machine and a cloud platform, for example, online P2V migration between the physical machine and the cloud platform can be realized; fig. 1 is a schematic diagram of an application scenario of an embodiment of the present invention, and as shown in fig. 1, a physical machine is a name of a physical computer relative to a virtual machine on a cloud platform, and the physical machine may provide a certain hardware environment for the virtual machine, which is sometimes referred to as a "host" or a "host". The cloud platform is also called as a cloud computing platform, and refers to a service platform based on hardware resources and software resources, which can provide computing, network and storage capabilities, and can be divided into three categories: the cloud computing platform comprises a storage type cloud platform taking data storage as a main part, a computing type cloud platform taking data processing as a main part and a comprehensive cloud computing platform taking computing and data storage processing into consideration.
It should be noted that, the physical machine and the cloud platform may be connected through a network tunnel or other connection manners, and the embodiment of the present invention is not limited.
Based on the above described application scenario, an embodiment of the present invention provides a data migration method, and fig. 2 is a first flowchart of the data migration method provided in the embodiment of the present invention, which is applied to a physical machine, as shown in fig. 2, the data migration method includes:
s101: acquiring disk information of a physical machine, sending the disk information to a cloud platform, receiving a shared mirror image shared by the cloud platform according to the disk information, and loading the shared mirror image of the cloud platform;
here, Mirroring (Mirroring) is a file storage form, and is a type of redundancy, where data on one disk has an identical copy on another disk, that is, Mirroring; many files can be made into an image file, and common image file formats are ISO, BIN, IMG, TAO, DAO, CIF and FCD.
In the embodiment of the invention, a physical machine acquires disk information corresponding to a disk for data migration, after a cloud platform receives the disk information of the physical machine, the cloud platform constructs a shared image corresponding to the disk according to the disk information, the cloud platform shares the shared image to the physical machine, and after the physical machine receives the shared image sent by the cloud platform, the physical machine loads the shared image of the cloud platform.
In the embodiment of the invention, the shared mirror image is an empty disk mirror image corresponding to a disk of the physical machine for data migration, namely, the shared mirror image is an empty disk without any data written in, and after the cloud platform constructs the empty disk mirror image, the empty disk mirror image is shared to the physical machine for use.
In the embodiment of the invention, before the time point when the physical machine creates the snapshot of the disk data, the physical machine loads the shared mirror image of the cloud platform; the physical machine acquires snapshot data transferred to the cloud platform while creating a snapshot time point; here, the snapshot data refers to disk data of a disk of the physical machine at a snapshot time point.
S102: in the process of migrating the snapshot data to the cloud platform, the data written into the disk of the physical machine is copied to the shared mirror image.
In the embodiment of the present invention, after the physical machine creates the snapshot time point, the physical machine may migrate the disk data at the snapshot time point to the cloud platform through the VSS technology, or may migrate the snapshot data to the cloud platform through another method, which is not limited in the embodiment of the present invention.
In the embodiment of the present invention, in the migration process of the snapshot data, the physical machine migrates the snapshot data to the cloud platform without interrupting the service of the client, that is, the physical machine may have a running program on the physical machine while migrating the snapshot data, so that in the migration process of the snapshot data to the cloud platform, a disk of the physical machine may have a situation that data changes, such as data addition, data deletion, data modification, and the like.
In the embodiment of the invention, in the process of migrating the snapshot data to the cloud platform, the physical machine copies the data written into the disk of the physical machine into the shared mirror image.
Illustratively, if the physical machine creates a snapshot time point, snapshot data of a disk on which data migration is performed are data 1, data 2, data 3, and data 4, respectively, while in the process of the snapshot data migration, there are two data written to the disk of the physical machine, that is, two data in the snapshot data are changed, for example, data 2 is changed to data 1, data 3 is changed to data 33, the physical machine copies the data written to the disk of the physical machine, that is, the changed data, to a corresponding position of the shared mirror image, and finally the data written in the shared mirror image are data 0, data 1, data 33, and data 0, respectively; here, the data 0 indicates that no data is written in the corresponding position, and it can be seen that, in the process of snapshot data migration, the physical machine copies the data written in the disk of the physical machine into the shared image, and the data of the disk of the physical machine can be synchronized into the shared image of the cloud platform without loss.
In practical applications, the steps S101 to S102 may be implemented by a Processor of a physical machine in the data migration Device, and the Processor may be at least one of an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), an FPGA, a Central Processing Unit (CPU), a controller, a microcontroller, and a microprocessor.
The embodiment of the invention provides a data migration method, which is applied to a physical machine and comprises the following steps: acquiring disk information of a physical machine, sending the disk information to a cloud platform, receiving a shared mirror image shared by the cloud platform according to the disk information, and loading the shared mirror image of the cloud platform; in the process of migrating the snapshot data to the cloud platform, the data written into the disk of the physical machine is copied to the shared mirror image. Therefore, the migration method can realize the synchronization of the data of the disk of the physical machine to the cloud platform without loss; meanwhile, the synchronization process of the data written into the disk is carried out simultaneously in the process of transferring the snapshot data, so that the efficiency of data transfer is improved.
Illustratively, the disk information includes at least one of: the space size of the disk, the number of the disks and the identification of the disks.
Here, the space size of the disk refers to the storage capacity of the disk, the number of disks refers to the number of disks for data migration, and the identification of the disk may be an identification performed according to the type of the disk or an identification performed in another manner, which is not limited in the embodiment of the present invention.
Exemplarily, if the physical machine sends three disks to the cloud platform, that is, the number of the disks subjected to data migration is three, and the three disks are A, B, C respectively, the cloud platform constructs three shared images corresponding to the three disks, that is, a1, B1 and C1 respectively, according to the number of the received disks, and shares the three shared images to the physical machine, and the physical machine receives and loads the three shared images of the cloud platform.
Exemplarily, if the physical machine sends disks with disk spaces of 8G, 64G, 100G, 256G, and 500G to the cloud platform, the shared images constructed by the cloud platform according to the received disk spaces correspond to: the disk spaces are shared images of 8G, 64G, 100G, 256G and 500G respectively, the shared images are shared to the physical machine, and the physical machine receives and loads the shared images shared by the cloud platform.
Exemplarily, if the identifiers of the disks sent by the physical machine to the cloud platform are M and N, respectively, the shared images constructed by the cloud platform according to the received identifiers of the disks correspond to: and sharing the shared images of the M 'and the N' to a physical machine, and receiving and loading the shared images shared by the cloud platform by the physical machine.
Therefore, the cloud platform constructs the corresponding shared mirror image according to the disk information of the physical machine disk, and the shared mirror image is the empty disk mirror image of the disk for data migration of the physical machine, so that the disk change data can be written into the empty disk mirror image in a targeted manner in the subsequent snapshot data migration process, and the accuracy of data writing is improved.
Illustratively, copying data written to a disk of a physical machine into a shared image includes: monitoring whether data written into a magnetic disk of a physical machine exists in real time; under the condition that data written into a disk of a physical machine exists, copying the data written into the disk of the physical machine into a shared mirror image; when there is no data written in the disk of the physical machine, it is described that the data in the disk of the physical machine has not changed during the migration of the snapshot data, and at this time, no operation is performed on the shared image.
In the embodiment of the invention, before the snapshot time point is created by the physical machine, the physical machine loads a disk filter driver, the disk filter driver can carry out HOOK (HOOK) processing on the operation written into the disk of the physical machine, and the disk filter driver starts to work while the snapshot time is created by the physical machine.
Further, in the process of transferring the snapshot data, the physical machine monitors whether data written into the disk of the physical machine exists in real time, and if the data are successfully written into the disk of the physical machine, the physical machine copies the data successfully written into the disk of the physical machine to the corresponding position of the shared mirror image through the disk filter driver; when the same data is written into both the disk of the physical machine and the shared mirror image of the cloud platform, the data written into the disk of the physical machine is successfully copied to the corresponding position of the shared mirror image, otherwise, the data written into the disk of the physical machine is not successfully copied to the corresponding position of the shared mirror image, and the consistency of the modified data is ensured by judging whether the data written into the disk of the physical machine is the same as the data written into the shared mirror image, so that the accuracy of data migration is improved.
Illustratively, after the snapshot data is migrated, prompting a user to close the physical machine; after a shutdown instruction is received, data written into a disk of the physical machine is obtained again; copying the re-acquired data written into the disk of the physical machine into a shared mirror image; the operation of shutting down the physical machine is performed.
In the embodiment of the present invention, after the physical machine completely migrates the snapshot data to the cloud platform, the user is prompted to close the physical machine, for example, the user may be prompted in a manner of "the physical machine may be closed after the data migration is completed" through a prompt content, or the user may be prompted in other manners, which is not limited in the embodiment of the present invention.
In the embodiment of the invention, after the physical machine receives the shutdown instruction of the user, the physical machine acquires the data written into the disk of the physical machine again; that is to say, until the user clicks the "shutdown" button, the physical machine determines again whether there is any disk cache data to be migrated, if so, the physical machine writes the disk cache data to be migrated into the disk, at this time, the physical machine monitors that the disk of the physical machine writes data again successfully, the physical machine copies the data written again successfully into the disk of the physical machine to the corresponding position of the shared mirror image through the disk filter driver, if not, it is determined that the physical machine does not have the disk cache data to be migrated, and at this time, the disk of the physical machine does not write data.
Illustratively, after the data written to the disk of the physical machine is acquired again, the data written to the disk of the physical machine is ignored.
In the embodiment of the invention, after the physical machine writes the re-acquired disk cache data into the disk of the physical machine, the physical machine sends a command to the filter driver to request to ignore the data written into the disk of the physical machine after re-acquiring the data written into the disk of the physical machine, namely, the physical machine does not perform any processing on all the data written into the disk in the future; and the physical machine informs the cloud platform that the data migration is finished, and executes the operation of closing the physical machine.
Illustratively, the data migration method provided in the embodiment of the present invention is not only applicable to windows, linux, and other operating systems, but also applicable to other unix operating systems, and the embodiment of the present invention is not limited.
An embodiment of the present invention provides a data migration method, and fig. 3 is a flowchart illustrating a second data migration method provided in an embodiment of the present invention, and is applied to a cloud platform, as shown in fig. 3, the data migration method includes:
s201: receiving disk information sent by a physical machine, constructing a shared image according to the disk information, and sharing the shared image to the physical machine;
s202: and in the process of receiving snapshot data of the migration of the physical machine, receiving data written into a disk of the physical machine based on the shared image.
Illustratively, the disk information includes at least one of: the space size of the disk, the number of the disks and the identification of the disks.
In the embodiment of the present invention, the cloud platform shares the shared image to the physical machine, and the connection manner between the cloud platform and the physical machine and the function of implementing the shared image have been described in the foregoing description, and are not described herein again.
Illustratively, receiving notification information sent by a physical machine, wherein the notification information is used for notifying that data migration is completed; and merging the snapshot data and the data in the shared mirror image.
Here, the notification information may be information for closing the physical machine, which is sent by the physical machine to the cloud platform, or may be other information for notifying that the data migration is completed, and the embodiment of the present invention is not limited.
In the embodiment of the present invention, the migration of snapshot data and the acquisition of data in the shared image have been described in the foregoing description, and are not described herein again.
In the embodiment of the invention, when the cloud platform receives the notification information sent by the physical machine, the data of the disk of the physical machine is completely migrated, and the physical machine executes the shutdown operation, and after the cloud platform receives the shutdown notification sent by the physical machine, the cloud platform merges the snapshot data and the data in the shared image to generate the disk image corresponding to the physical machine.
It should be noted that, in the embodiment of the present invention, a manner in which the cloud platform merges the snapshot data and the data in the shared mirror image may be through a certain logic expression, or may be through other calculation methods, and the embodiment of the present invention is not limited.
Exemplarily, it is assumed that snapshot data at a snapshot time point created by the physical machine are data 1, data 2, data 3, data 4, data 5, data 6, data 7, data 8, and data 9, and data written in the shared mirror during the snapshot data migration are data 0, data 5, data 4, data 66, data 0, and data 0, respectively; here, data 0 indicates that no data is written in the corresponding disk position, and it can be seen that three data are changed in the process of snapshot data migration, data 4 is changed to data 5, data 5 is changed to data 4, data 6 is changed to data 66, and after the snapshot data migration is completed, the disk data of the physical machine is changed to data 1, data 2, data 3, data 5, data 4, data 66, data 7, data 8, and data 9; different from the migrated snapshot data, the data generated by the cloud platform after data merging are data 1, data 2, data 3, data 5, data 4, data 66, data 7, data 8 and data 9; namely, the cloud platform merges the snapshot data and the data in the shared mirror image to generate a disk mirror image corresponding to the physical machine.
The disk data modified or added in the snapshot data migration process is written into the shared mirror image, and finally the cloud platform merges the snapshot data and the data in the shared mirror image, so that the effect of completely synchronizing the cloud platform and the physical machine disk data can be achieved.
In practical applications, the steps S201 to S202 may be implemented by using a processor of a cloud platform in the data migration apparatus, where the processor may be at least one of an ASIC, a DSP, a DSPD, a PLD, an FPGA, a CPU controller, a microcontroller, and a microprocessor.
The embodiment of the invention provides a data migration method, which is applied to a cloud platform and comprises the following steps: receiving disk information sent by a physical machine, constructing a shared image according to the disk information, and sharing the shared image to the physical machine; and in the process of receiving snapshot data of the migration of the physical machine, receiving data written into a disk of the physical machine based on the shared image. Therefore, in the process of transferring the snapshot data, the cloud platform can receive the snapshot data of the physical machine and can also receive the disk data of the physical machine changed in the process of transferring the data through the shared mirror image, so that the data synchronization of the cloud platform and the disk of the physical machine is realized; meanwhile, the synchronization process of the data written into the disk is carried out simultaneously in the process of transferring the snapshot data, so that the efficiency of data transfer is improved.
The following is further illustrated by a specific application example;
in a specific application scenario, fig. 4 is a schematic diagram of a principle of a data migration method provided in an embodiment of the present invention, and includes a physical machine and a cloud platform, as shown in fig. 4, the data migration method in the embodiment of the present invention may include the following steps:
step 41: the cloud platform constructs a shared mirror image and is loaded by a physical machine in a sharing mode;
in the embodiment of the present invention, the physical machine acquires disk information of the physical machine, where the disk information includes at least one of the following: the space size of the disks, the number of the disks and the identification of the disks; the physical machine sends the disk information corresponding to the disk for data migration to the cloud platform, and after the cloud platform receives the disk information of the physical machine, the cloud platform constructs a shared mirror image according to the disk information and shares the shared mirror image to the physical machine; the physical machine loads a shared image of the cloud platform.
Step 42: the physical machine obtains snapshot data of a physical machine disk through a VSS technology;
in the embodiment of the invention, the physical machine creates the snapshot time point through the VSS technology, obtains the snapshot data of the snapshot time point as data 1, data 2 and data 3 … … data n, and starts the operation by starting the disk filter driver.
Step 43: the physical machine migrates snapshot data to the cloud platform through a network;
in the embodiment of the invention, snapshot data migrated from the physical machine to the cloud platform through the network are data 1, data 2 and data 3 … … data n.
Step 44: the physical machine carries out data modification operation on the disk in the snapshot data migration process;
in the embodiment of the invention, the data 3 of the disk and the data 5 of the disk are modified in the snapshot data migration process, the data 3 of the disk is modified into the data 3 'and the data 5 of the disk is modified into the data 5' in the snapshot data migration process.
Step 45: the disk filter driver copies the data written into the disk of the physical machine into a shared mirror image;
in the embodiment of the invention, the disk filter driver copies data which are changed in the processes of modifying, adding or deleting the disk data of the physical machine in the snapshot data migration process to the corresponding positions of the shared mirror image, at this time, the data 3 of the disk of the physical machine and the data 5 of the disk at the corresponding positions of the shared mirror image are respectively written into the data 3 'and the data 5', and the data is data 0 because the disk data at other positions of the shared mirror image are not written into the data.
Step 46: finishing the snapshot data migration of the physical machine;
in the embodiment of the invention, after the physical machine migrates the snapshot data to the cloud platform, the user is prompted to close the physical machine, and the snapshot data migrated by the physical machine received by the cloud platform are data 1, data 2 and data 3 … … data n.
Step 47: and the cloud platform performs data combination to generate a disk mirror image.
In the embodiment of the invention, the cloud platform merges the snapshot data with the data 3 'and the data 5' in the shared mirror image to generate the disk mirror image, and finally, the data in the disk mirror image in the cloud platform are data 1, data 2, data 3 ', data 4, and data 5' … … data n. And after receiving the shutdown notification of the physical machine, the cloud platform merges the snapshot data and the data in the shared mirror image to generate a disk mirror image corresponding to the data of the disk of the physical machine.
Fig. 5 is a schematic flow chart of cooperation of modules in a data migration process according to an embodiment of the present invention, and as shown in fig. 5, a data migration method according to an embodiment of the present invention may include the following steps:
1: the physical machine sends disk information;
2: constructing a shared mirror image by the cloud platform;
3: a physical machine loads a cloud platform shared mirror image;
the implementation of steps 1 to 3 in fig. 5 refers to the implementation of step 41 in fig. 4, and is not described herein again.
4: the physical machine establishes a snapshot time point through a VSS technology;
5: the physical machine obtains snapshot data through a VSS technology;
the implementation of step 4 to step 5 in fig. 5 refers to the implementation of step 42 in fig. 4, and is not described herein again.
6: migrating snapshot data to a cloud platform by a physical machine;
7: writing the migrated snapshot data into the cloud platform;
8: the physical machine acquires snapshot data of the next migration;
the implementation of step 6 to step 8 in fig. 5 refers to the implementation of step 43 in fig. 4, and is not described herein again.
9: the physical machine obtains data written into a disk in the migration process;
the implementation of step 9 in fig. 5 refers to the implementation of step 44 in fig. 4, and is not described here again.
10: the disk filter driver copies the data written into the disk to a shared mirror image;
the implementation of step 10 in fig. 5 refers to the implementation of step 45 in fig. 4, and is not described here again.
11: finishing the snapshot data migration of the physical machine;
12: after the physical machine snapshot data is migrated, executing shutdown operation;
the implementation of step 11 to step 12 in fig. 5 refers to the implementation of step 46 in fig. 4, and is not described herein again.
13: the cloud platform merges the snapshot data and the data in the shared mirror image;
14: the cloud platform generates a disk image.
The implementation of step 13 to step 14 in fig. 5 refers to the implementation of step 47 in fig. 4, and is not described herein again.
It can be seen that, in the embodiment of the present invention, after the VSS snapshot time point is created, the physical machine copies data written in the disk of the physical machine to the shared image of the cloud platform, the cloud platform receives the snapshot data of the physical machine and also receives, through the shared image, disk data that changes during the data migration process, and after the data migration is completed and the cloud platform receives notification information that the physical machine is shut down, the cloud platform merges the snapshot data and the data in the shared image to generate the disk image corresponding to the physical machine; furthermore, the data migration method can realize the synchronization of the data of the disk of the physical machine to the cloud platform without loss; meanwhile, the synchronization process of the data written into the disk is carried out simultaneously in the process of transferring the snapshot data, so that the efficiency of data transfer is improved.
Fig. 6 is a schematic structural diagram of a data migration apparatus according to an embodiment of the present invention, which is applied to a physical machine, and as shown in fig. 6, the apparatus includes a loading module 110 and a copying module 120, wherein,
the loading module 110 is configured to acquire disk information of the physical machine, send the disk information to the cloud platform, receive a shared image shared by the cloud platform according to the disk information, and load the shared image of the cloud platform;
the replication module 120: the method and the system are used for copying the data written into the disk of the physical machine into the shared mirror image in the process of migrating the snapshot data to the cloud platform.
In this embodiment, the loading module 110 and the copying module 120 may both correspond to program modules, and after the program modules are executed by one or more processors, the above-mentioned loading of the shared image of the cloud platform and the copying of data written in a disk of a physical machine to the shared image in the process of migrating snapshot data to the cloud platform can be realized, so that an effect of synchronizing data to a virtual machine on the cloud platform in real time without loss is realized.
Optionally, the loading module 110 is configured to obtain disk information of the physical machine, and send the disk information to the cloud platform; receiving a shared mirror image shared by the cloud platform according to the disk information; and loading the shared mirror image of the cloud platform.
Optionally, the disk information includes at least one of: the space size of the disk, the number of the disks and the identification of the disks.
Optionally, the replication module 120 is configured to monitor whether data written to a disk of the physical machine exists in real time; in the case where there is data written to the disk of the physical machine, the data written to the disk of the physical machine is copied to the shared image.
Optionally, the data migration apparatus is further configured to: prompting a user to close the physical machine after the snapshot data is migrated; after a shutdown instruction is received, data written into a disk of the physical machine is obtained again; copying the re-acquired data written into the disk of the physical machine into a shared mirror image; the operation of shutting down the physical machine is performed.
Optionally, the data migration apparatus is further configured to: and after the data written into the disk of the physical machine is acquired again, ignoring the data written into the disk of the physical machine.
Fig. 7 is a schematic structural diagram of a data migration apparatus according to an embodiment of the present invention, which is applied to a cloud platform, and as shown in fig. 7, the apparatus includes a sharing module 210 and a receiving module 220, wherein,
the sharing module 210: the shared mirror is constructed according to the disk information and is shared to the physical machine;
the receiving module 220: and in the process of receiving snapshot data of the migration of the physical machine, receiving data written into a disk of the physical machine based on the shared image.
Optionally, the disk information includes at least one of: the space size of the disk, the number of the disks and the identification of the disks.
Optionally, the data migration apparatus is further configured to: receiving notification information sent by a physical machine, wherein the notification information is used for notifying that data migration is finished; and merging the snapshot data and the data in the shared mirror image.
In practical applications, the loading module 110 and the copying module 120, the sharing module 210 and the receiving module 220 may be implemented by a processor in an electronic device, and the processor may be at least one of an ASIC, a DSP, a DSPD, a PLD, an FPGA, a CPU, a controller, a microcontroller and a microprocessor.
The embodiment of the invention provides a data migration device, which is applied to a physical machine and a cloud platform, and can realize the synchronization of data of a disk of the physical machine to the cloud platform without loss; meanwhile, the synchronization process of the data written into the disk is carried out simultaneously in the process of transferring the snapshot data, so that the efficiency of data transfer is improved.
In addition, each functional module in this embodiment may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware or a form of a software functional module.
Based on the understanding that the technical solution of the present embodiment essentially or a part contributing to the prior art, or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium, and include several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to execute all or part of the steps of the method of the present embodiment. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Specifically, the computer program instructions corresponding to a data migration method in the present embodiment may be stored on a storage medium such as an optical disc, a hard disc, or a usb disk, and when the computer program instructions corresponding to a data migration method in the storage medium are read or executed by an electronic device, any one of the data migration methods in the foregoing embodiments is implemented.
Based on the same technical concept as the foregoing embodiment, referring to fig. 8, it illustrates a physical machine 600 provided by an embodiment of the present invention, which may include: a memory 601 and a processor 602; wherein the content of the first and second substances,
a memory 601 for storing computer programs and data;
a processor 602 for executing the computer program stored in the memory to implement any of the data migration methods shown in fig. 2.
Based on the same technical concept of the foregoing embodiment, referring to fig. 9, it shows a cloud platform 700 provided by an embodiment of the present invention, which may include: a memory 701 and a processor 702; wherein the content of the first and second substances,
a memory 701 for storing computer programs and data;
a processor 702 for executing a computer program stored in the memory to implement any of the data migration methods shown in fig. 3. In practical applications, the memory 601 and the memory 701 may be a volatile memory (volatile memory), such as a RAM; or a non-volatile memory (non-volatile memory) such as a ROM, a flash memory (flash memory), a Hard Disk (Hard Disk Drive, HDD) or a Solid-State Drive (SSD); or a combination of the above types of memories and provides instructions and data to the processor 602 and the processor 702.
The processor 602 and the processor 702 may be at least one of ASIC, DSP, DSPD, PLD, FPGA, CPU, controller, microcontroller, and microprocessor. It is to be understood that, for different augmented reality cloud platforms, other electronic devices may be used to implement the above-described processor function, and the embodiment of the present invention is not particularly limited.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of a unit is only one logical function division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all the functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may be separately used as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (13)

1. A data migration method is applied to a physical machine, and the method comprises the following steps:
acquiring disk information of the physical machine, sending the disk information to a cloud platform, receiving a shared image shared by the cloud platform according to the disk information, and loading the shared image of the cloud platform;
and in the process of migrating snapshot data to the cloud platform, copying the data written into the disk of the physical machine into the shared mirror image.
2. The method of claim 1, wherein the disk information comprises at least one of: the space size of the disk, the number of the disks and the identification of the disks.
3. The method of claim 1, wherein the copying data written to the disk of the physical machine into the shared image, the method further comprises:
monitoring whether data written into a magnetic disk of the physical machine exists in real time;
and under the condition that the data written into the disk of the physical machine exists, copying the data written into the disk of the physical machine into the shared mirror image.
4. The method of claim 1, further comprising:
prompting a user to close the physical machine after the snapshot data is migrated;
after a shutdown instruction is received, data written into a disk of the physical machine is obtained again;
copying the re-acquired data written into the disk of the physical machine into the shared mirror image;
and executing the operation of closing the physical machine.
5. The method of claim 4, wherein the method comprises:
and after the data written into the disk of the physical machine is acquired again, ignoring the data written into the disk of the physical machine.
6. A data migration method is applied to a cloud platform, and the method comprises the following steps:
receiving disk information sent by a physical machine, constructing a shared image according to the disk information, and sharing the shared image to the physical machine;
and in the process of receiving the snapshot data of the migration of the physical machine, receiving data written into a disk of the physical machine based on the shared mirror image.
7. The method of claim 6, wherein the disk information comprises at least one of: the space size of the disk, the number of the disks and the identification of the disks.
8. The method of claim 6, further comprising:
receiving notification information sent by the physical machine, wherein the notification information is used for notifying that data migration is finished;
and merging the snapshot data and the data in the shared mirror image.
9. A data migration device is applied to a physical machine and comprises a loading module and a copying module, wherein,
the loading module is used for loading the shared mirror image of the cloud platform;
a copying module: and the method is used for copying the data written into the disk of the physical machine into the shared mirror image in the process of migrating the snapshot data to the cloud platform.
10. The data migration device is applied to a cloud platform and comprises a sharing module and a receiving module, wherein,
sharing the module: sharing the shared image to the physical machine;
a receiving module: and in the process of receiving the snapshot data of the migration of the physical machine, receiving data written into a disk of the physical machine based on the shared mirror image.
11. A physical machine comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the data migration method of any one of claims 1 to 5 when executing the program.
12. A cloud platform comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the data migration method of any one of claims 6 to 8 when executing the program.
13. A computer storage medium storing a computer program; the computer program when executed is operable to implement the data migration method of any one of claims 1 to 8.
CN202010026080.3A 2020-01-10 2020-01-10 Data migration method and device, physical machine, cloud platform and computer storage medium Pending CN111208947A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010026080.3A CN111208947A (en) 2020-01-10 2020-01-10 Data migration method and device, physical machine, cloud platform and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010026080.3A CN111208947A (en) 2020-01-10 2020-01-10 Data migration method and device, physical machine, cloud platform and computer storage medium

Publications (1)

Publication Number Publication Date
CN111208947A true CN111208947A (en) 2020-05-29

Family

ID=70785049

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010026080.3A Pending CN111208947A (en) 2020-01-10 2020-01-10 Data migration method and device, physical machine, cloud platform and computer storage medium

Country Status (1)

Country Link
CN (1) CN111208947A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112202856A (en) * 2020-09-18 2021-01-08 苏州浪潮智能科技有限公司 Data migration method and device for network storage management system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120110237A1 (en) * 2009-12-01 2012-05-03 Bin Li Method, apparatus, and system for online migrating from physical machine to virtual machine
CN103605561A (en) * 2013-11-28 2014-02-26 中标软件有限公司 Cloud computing cluster system and method for on-line migration of physical server thereof
CN103902233A (en) * 2012-12-27 2014-07-02 中国电信股份有限公司 Virtual machine system on-line storage migration method and device and server
CN106775993A (en) * 2017-02-15 2017-05-31 郑州云海信息技术有限公司 A kind of physical machine is migrated to the method and system of cloud computing platform
CN109521967A (en) * 2018-11-15 2019-03-26 郑州云海信息技术有限公司 A kind of moving method and device of data

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120110237A1 (en) * 2009-12-01 2012-05-03 Bin Li Method, apparatus, and system for online migrating from physical machine to virtual machine
CN103902233A (en) * 2012-12-27 2014-07-02 中国电信股份有限公司 Virtual machine system on-line storage migration method and device and server
CN103605561A (en) * 2013-11-28 2014-02-26 中标软件有限公司 Cloud computing cluster system and method for on-line migration of physical server thereof
CN106775993A (en) * 2017-02-15 2017-05-31 郑州云海信息技术有限公司 A kind of physical machine is migrated to the method and system of cloud computing platform
CN109521967A (en) * 2018-11-15 2019-03-26 郑州云海信息技术有限公司 A kind of moving method and device of data

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112202856A (en) * 2020-09-18 2021-01-08 苏州浪潮智能科技有限公司 Data migration method and device for network storage management system
CN112202856B (en) * 2020-09-18 2022-12-02 苏州浪潮智能科技有限公司 Data migration method and device for network storage management system

Similar Documents

Publication Publication Date Title
US8473462B1 (en) Change tracking for shared disks
US11132264B2 (en) Point-in-time copy restore
US11762740B2 (en) Systems and methods for efficient backup restoration
US10209910B2 (en) Copy-redirect on write
US9823877B2 (en) Virtual machine backup from storage snapshot
US10705917B2 (en) Consolidated full backup of a restored virtual machine
US9354907B1 (en) Optimized restore of virtual machine and virtual disk data
US8700570B1 (en) Online storage migration of replicated storage arrays
US9262344B2 (en) Local locking in a bi-directional synchronous mirroring environment
US8578064B2 (en) Interception and management of I/O operations on portable storage devices
CN110704161B (en) Virtual machine creation method and device and computer equipment
US9760449B2 (en) Restoring a point-in-time copy
US9471256B2 (en) Systems and methods for restoring data in a degraded computer system
US10437754B1 (en) Diagnostic fault management controller for distributed computing
US9760450B2 (en) Restoring a clone point-in-time copy
US9405709B1 (en) Systems and methods for performing copy-on-write operations
CN111208947A (en) Data migration method and device, physical machine, cloud platform and computer storage medium
US9665582B2 (en) Software, systems, and methods for enhanced replication within virtual machine environments
US10942821B1 (en) Method and apparatus for dynamic binding and unbinding thin logical storage volumes to snapshots of a file system
US11500741B2 (en) Data write method and storage system
US10048890B1 (en) Synchronizing catalogs of virtual machine copies
US11301156B2 (en) Virtual disk container and NVMe storage management system and method
CN110704249A (en) Method, device and system for ensuring application consistency
EP3591531B1 (en) Instant restore and instant access of hyper-v vms and applications running inside vms using data domain boostfs
CN116578446B (en) Virtual machine backup method, device and system, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination