CN105718377A - Method and apparatus for copying magnetic disk data in virtual application - Google Patents

Method and apparatus for copying magnetic disk data in virtual application Download PDF

Info

Publication number
CN105718377A
CN105718377A CN201410736272.8A CN201410736272A CN105718377A CN 105718377 A CN105718377 A CN 105718377A CN 201410736272 A CN201410736272 A CN 201410736272A CN 105718377 A CN105718377 A CN 105718377A
Authority
CN
China
Prior art keywords
disk
partition
data
source
disk partition
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410736272.8A
Other languages
Chinese (zh)
Other versions
CN105718377B (en
Inventor
张波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201410736272.8A priority Critical patent/CN105718377B/en
Publication of CN105718377A publication Critical patent/CN105718377A/en
Application granted granted Critical
Publication of CN105718377B publication Critical patent/CN105718377B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Signal Processing For Digital Recording And Reproducing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

Embodiments of the present invention relate to a method and an apparatus for copying magnetic disk data in a virtual application. The method comprises the steps of virtualizing a partition table of a platform read magnetic disk; analyzing content of the partition table, and acquiring magnetic disk partition information of the magnetic disk; selecting a source magnetic disk partition of to-be-copied data from a magnetic disk partition of the magnetic disk according to the partition information of the magnetic disk; and mounting the source magnetic disk partition, and copying data of the mounted source magnetic disk partition to a mounted target magnetic disk partition. In the prior art, when data of the magnetic disk partition of the magnetic disk is copied, data of the whole magnetic disk in which the magnetic disk partition is needs to be copied, so that extra storage space is used, and the time is long. Through adoption of the method, the problem in the prior art is solved.

Description

Method and device for copying disk data in virtualization application
Technical Field
The invention relates to the technical field of computer virtualization applications, in particular to a method and a device for copying disk data in virtualization applications.
Background
In a virtualization application scenario, there are many services that need to copy data of a disk, for example, services for template deployment of a virtual machine and virtual machine cloning generally need to copy data of a disk.
At present, copying data of a disk refers to copying all data of a source disk in a certain period of time to a target disk by taking the whole disk as a unit, when the data of a certain disk partition in the disk needs to be copied, the prior art can only copy the data in the disk where the disk partition is located, and the data of the disk partition is usually much smaller than the data of the whole disk, so that when the data of the whole disk where the disk partition is located is copied, the problems of extra storage space consumption and long time consumption are caused.
Disclosure of Invention
The embodiment of the invention provides a method and a device for copying disk data in virtualization application, which can solve the problems of large occupied storage space and long consumed time caused by the fact that when the data of a disk partition in a disk is copied in the prior art, the data of the whole disk where the disk partition is located needs to be copied.
In a first aspect, a method for copying disk data in a virtualized application is provided, where the method includes:
the virtualization platform reads a partition table of a disk;
analyzing the content of the partition table to obtain the disk partition information of the disk;
selecting a source disk partition of data to be copied from disk partitions of the disks according to the disk partition information;
and mounting the source disk partition, and copying the data of the mounted source disk partition to the mounted target disk partition.
With reference to the first aspect, in a first implementation manner of the first aspect, the disk partition information includes a size and a starting position offset of the disk partition;
selecting a source disk partition of data to be copied from disk partitions of the disk according to the disk partition information comprises:
and selecting a source disk partition of the data to be copied from the disk partitions of the disk according to the size and the initial position offset of the disk partition.
With reference to the first implementation manner of the first aspect, in a second implementation manner of the first aspect, the source disk partitions of the data to be copied are multiple;
mounting the source disk partition, wherein the copying the data of the mounted source disk partition to the mounted target disk partition comprises:
mounting the source disk partitions, and respectively copying data of the source disk partitions to a plurality of target disk partitions of one mounted target disk; or,
and mounting the source disk partitions, and respectively copying the data of the source disk partitions to the target disk partitions of the mounted target disks.
With reference to the first aspect, or the first implementation manner of the first aspect, or the second implementation manner of the first aspect, in a third implementation manner of the first aspect, the copying the data of the mounted source disk partition to the mounted target disk partition includes:
and copying the data of the mounted source disk partition to the mounted target disk partition by taking the size of a preset data block as a unit.
With reference to the first aspect, or the first implementation manner of the first aspect, or the second implementation manner of the first aspect, in a fourth implementation manner of the first aspect, the copying the data of the mounted source disk partition to the mounted target disk partition includes:
analyzing a file system of a host mounted with the source disk partition to obtain a file list of the host;
acquiring a file stored in the source disk partition from the file list;
and copying the content of the file to the mounted target disk partition.
In a second aspect, an apparatus for copying disk data in a virtualized application is provided, the apparatus comprising: the device comprises a reading unit, an analysis unit, a selection unit and a copying unit;
the reading unit is used for reading a partition table of the disk;
the analysis unit is used for analyzing the content of the partition table read by the reading unit to acquire the disk partition information of the disk;
the selecting unit is used for selecting a source disk partition of the data to be copied from the disk partitions of the disk according to the disk partition information analyzed by the analyzing unit;
and the copying unit is used for mounting the source disk partition selected by the selecting unit and copying the data of the mounted source disk partition into the mounted target disk partition.
With reference to the second aspect, in a first implementation manner of the second aspect, the copy unit is specifically configured to:
and selecting a source disk partition of the data to be copied from the disk partitions of the disk according to the size and the initial position offset of the disk partition.
With reference to the first implementation manner of the second aspect, in a second implementation manner of the second aspect, the source disk partitions of the data to be copied are multiple;
the copy unit is specifically configured to:
mounting the source disk partitions, and respectively copying data of the source disk partitions to a plurality of target disk partitions of one mounted target disk; or,
and mounting the source disk partitions, and respectively copying the data of the source disk partitions to the target disk partitions of the mounted target disks.
With reference to the second aspect or the first implementation manner of the second aspect or the second implementation manner of the second aspect, in a third implementation manner of the second aspect, the copying unit is further specifically configured to:
and copying the data of the mounted source disk partition to the mounted target disk partition by taking the size of a preset data block as a unit.
With reference to the second aspect or the first implementation manner of the second aspect or the second implementation manner of the second aspect, in a fourth implementation manner of the second aspect, the copying unit is further specifically configured to:
analyzing a file system of a host mounted with the source disk partition to obtain a file list of the host;
acquiring a file stored in the source disk partition from the file list;
and copying the content of the file to the mounted target disk partition.
According to the method and the device for copying the disk data in the virtualization application, provided by the embodiment of the invention, the virtualization platform analyzes the content of the partition table of the disk to obtain the disk partition information of the disk; selecting a source disk partition of data to be copied from disk partitions of the disks according to the disk partition information; and mounting the source disk partition, and copying the data of the mounted source disk partition to the mounted target disk partition. Therefore, the problems that in the prior art, when data of the disk partition in the disk is copied, the data of the whole disk where the disk partition is located needs to be copied, so that the storage space is additionally consumed, and the consumed time is long can be solved.
Drawings
Fig. 1 is a flowchart of a method for copying disk data in a virtualized application according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating a result of MBR partition table parsing of a virtual disk;
FIG. 3 is a diagram illustrating a mapping relationship between a source disk partition and a target disk partition;
fig. 4 is a schematic diagram of an apparatus for copying disk data in a virtualized application according to a second embodiment of the present invention;
fig. 5 is a schematic diagram of an apparatus for copying disk data in a virtualized application according to a third embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
For the convenience of understanding of the embodiments of the present invention, the following description will be further explained with reference to specific embodiments, which are not to be construed as limiting the embodiments of the present invention.
The method mainly comprises the steps of analyzing a partition table of a disk through a virtualization platform, obtaining the size and the initial position offset of a disk partition of each disk partition, selecting a source disk partition of data to be copied according to the size and the initial position offset of the disk partition, and mounting the source disk partition, so that the virtualization platform finishes data copying from the source disk partition to a mounted target disk partition. Therefore, the problems that in the prior art, when data of the disk partition in the disk is copied, the data of the whole disk where the disk partition is located needs to be copied, so that the storage space is additionally consumed, and the consumed time is long can be solved.
Fig. 1 is a flowchart of a method for copying disk data in a virtualized application according to an embodiment of the present invention. As shown in fig. 1, the method specifically includes:
s110, the virtualization platform reads the partition table of the disk.
The disk may be a virtual disk or a physical disk, and in this specification, the disk is taken as the virtual disk for example. The partition table may be a Master Boot Record (MBR) partition table of a disk, and may also be a GUID Partition Table (GPT), and in this specification, the partition table is described as an example of an MBR partition table.
It should be noted that the number of virtual disks here may be one or more. The virtualization platform, also called Hypervisor, is an intermediate software layer running between the underlying physical server and the operating system, which can read and parse the MBR partition table of the virtual disk. The MBR partition table is positioned on a No. 0 magnetic column, a No. 0 magnetic head and a No. 1 sector of a virtual disk, and is also called as a main guide sector and comprises three parts: the method comprises a main boot program, a hard Disk Partition Table (DPT) and a partition effective mark, wherein the size and the initial position offset of a disk partition are recorded in the DPT.
It should be noted that the contents of the MBR partition table are written by an operating system tool (e.g., a kpartx tool) when initializing the virtual disk.
And S120, analyzing the content of the partition table to acquire the disk partition information of the disk.
Referring to the schematic diagram of the MBR partition table analysis result of the virtual disk shown in fig. 2, 255 headers indicate that the virtual disk has 255 magnetic surfaces, 63sectors/track indicates that one magnetic surface has 63sectors, 261 cyclinders indicates that the virtual disk has 261 magnetic pillars, the capacity of each magnetic pillar is 16065 × 512 (the size of the sector is 8225280 bytes), the first magnetic pillar (i.e., the magnetic pillar 0) is occupied by the MBR partition table, partition is performed from the magnetic pillar 1, the value of Start (Start) indicates the number of the starting magnetic pillar of the partition, and End (End) indicates the number of the ending magnetic pillar of the partition, for example, "1" and "65" in fig. 2 respectively indicate that the first partition starts from the magnetic pillar 1 to the End of the magnetic pillar 65; the value of Blocks represents the capacity of a disk partition in units of K, and the value of a partition capacity is given by the following equation: blocks ═ (corresponding zone End value-corresponding zone Start value) x units of capacity of the magnetic column.
As above, the result of analyzing the content of the MBR partition table of one virtual disk, that is, one virtual disk may be divided into a plurality of disk partitions; in addition, one virtual disk can also be only divided into one disk partition; and when the number of the virtual disks is multiple, acquiring the disk partition information of the multiple virtual disks, wherein the number of the disk partitions of each virtual disk can be one or more.
And S130, selecting a source disk partition of the data to be copied from the disk partitions of the disk according to the disk partition information.
Here, the disk partition information may include the size of the disk partition and the amount of start position offset.
In order to reduce the extra occupation of the storage space and shorten the copying time of the data of the virtual disk, the invention does not copy the data of the whole virtual disk, but selects the disk partition of the data to be copied, namely the source disk partition, and only copies the data in the source disk partition. Specifically, a source disk partition of the data to be copied is selected from the disk partitions of the disks according to the size of the disk partition and the initial position offset.
For example, a disk partition 1, a disk partition 2, and a disk partition 3 are obtained by dividing the same virtual disk, and data of the operating system is recorded in the disk partition 1, so that when the system needs to be backed up, only the data of the disk partition 1 needs to be copied, that is, the disk partition 1 is selected from the three disk partitions as a source disk partition according to the size and the position offset of the disk partition 1; when the data of the three disk partitions need to be managed separately so as to perform maintenance operation separately and enhance the service flexibility of the virtual disk, the data of the three disk partitions need to be copied to three independent target virtual disks respectively, namely, the disk partition 1, the disk partition 2 and the disk partition 3 are selected as the source disk partition according to the size and the position offset of the disk partition 1, the disk partition 2 and the disk partition 3 respectively, wherein, fig. 3 is a schematic diagram of the corresponding relationship between the source disk partition and the target disk partition, the virtual disk 1 is the disk to which the source disk partition belongs, the virtual disk 2, the virtual disk 3 and the virtual disk 4 are three target virtual disks, each target virtual disk comprises a target disk partition, and the target disk partition is mounted on the virtualization platform.
In the foregoing, the disk partition 1, the disk partition 2, and the disk partition 3 may also be obtained by dividing two or three virtual disks, and when the three disk partitions are obtained by dividing two or three virtual disks and the number of the virtual disks needs to be reduced to reduce the maintenance cost, the data of the three disk partitions may be copied to the three disk partitions of one target virtual disk.
S140, mounting the source disk partition, and copying the data of the mounted source disk partition to the mounted target disk partition.
The mounting process is to map the source disk partition into a device operable by the virtualization platform. For example, in a linux system, the mount of the source disk partition may be implemented by a command "mount".
Referring to the above example, the mounting of multiple source disk partitions of one virtual disk or multiple source disk partitions of multiple virtual disks may be completed.
After the mounting of the disk partition is completed, the virtualization platform can copy the data of the disk partition.
Optionally, the source disk partition of the data to be copied is multiple;
mounting the source disk partition, wherein the copying the data of the mounted source disk partition to the mounted target disk partition comprises:
mounting the source disk partitions, and respectively copying data of the source disk partitions to a plurality of target disk partitions of one mounted target disk; or,
and mounting the source disk partitions, and respectively copying the data of the source disk partitions to the target disk partitions of the mounted target disks.
Preferably, the target disk is a virtual disk. It should be noted that the mounting manner of the target disk partition of the target disk is similar to the mounting manner of the source disk partition in S140, and details are not described herein.
Further, the copying the data of the mounted source disk partition to the mounted target disk partition includes:
and copying the data of the mounted source disk partition to the mounted target disk partition by taking the size of a preset data block as a unit.
As in the foregoing example, when the disk partition 1 is used as the source disk partition and the data in the source disk partition is copied to the target disk partition, assuming that the size of the disk partition 1 is 522081KB and the size of the preset data block is 512KB, the size of the data copied from the source disk partition is 512KB each time, and a total of (522081/512) copies are required.
Further, the copying the data of the mounted source disk partition to the mounted target disk partition in S140 may further include:
analyzing a file system of a host mounted with the source disk partition to obtain a file list of the host;
acquiring a file stored in the source disk partition from the file list;
and copying the content of the file to the mounted target disk partition.
Here, it is prior art to resolve the file system of the host mounting the source disk partition, so it is not described in detail in this specification. The content of the obtained file list of the host may be as follows:
filename a b c d e f
Assuming that the files stored in the source disk partition include a and b, the contents of the files a and b are copied to the partition of the target disk. In the linux system, the copying of the file content can be completed by using a command "cp".
To sum up, in the method for copying disk data in a virtualization application provided by the embodiment of the present invention, a virtualization platform obtains disk partition information of a disk by analyzing contents of a partition table of the disk; selecting a source disk partition of data to be copied from disk partitions of the disks according to the disk partition information; and mounting the source disk partition, and copying the data of the mounted source disk partition to the mounted target disk partition. Therefore, the problems that in the prior art, when data of the disk partition in the disk is copied, the data of the whole disk where the disk partition is located needs to be copied, so that the storage space is additionally consumed, and the consumed time is long can be solved.
Fig. 4 is a schematic diagram of an apparatus for copying disk data in a virtualized application according to a second embodiment of the present invention. The apparatus may be configured to perform the method described in fig. 1. In fig. 4, the apparatus includes: a reading unit 401, a parsing unit 402, a selecting unit 403 and a copying unit 404.
The reading unit 401 is configured to read a partition table of a disk.
An analyzing unit 402, configured to analyze the content of the partition table read by the reading unit 401, and obtain disk partition information of the disk.
A selecting unit 403, configured to select, according to the disk partition information obtained through analysis by the analyzing unit 402, a source disk partition of the data to be copied from the disk partitions of the disk.
And a copying unit 404, configured to mount the source disk partition selected by the selecting unit 403, and copy the data of the mounted source disk partition to the mounted target disk partition.
Copy unit 404 is specifically configured to: and selecting a source disk partition of the data to be copied from the disk partitions of the disk according to the size and the initial position offset of the disk partition.
Optionally, the source disk partition of the data to be copied is multiple;
copy unit 404 is specifically configured to:
mounting the source disk partitions, and respectively copying data of the source disk partitions to a plurality of target disk partitions of one mounted target disk; or,
and mounting the source disk partitions, and respectively copying the data of the source disk partitions to the target disk partitions of the mounted target disks.
Optionally, the copy unit 404 is further specifically configured to:
and copying the data of the mounted source disk partition to the mounted target disk partition by taking the size of a preset data block as a unit.
Optionally, the copy unit 404 is further specifically configured to:
analyzing a file system of a host mounted with the source disk partition to obtain a file list of the host;
acquiring a file stored in the source disk partition from the file list;
and copying the content of the file to the mounted target disk partition.
The device for copying the disk data in the virtualization application provided by the embodiment of the invention can solve the problems that in the prior art, when the data of the disk partition of the disk is copied, the data of the whole disk where the disk partition is located needs to be copied, so that the storage space is additionally consumed, and the time consumption is long.
The device provided by the second embodiment of the present invention is implanted with the method provided by the first embodiment of the present invention, and therefore, the detailed working process of the device provided by the present invention is not repeated herein.
In the second embodiment of the present invention, the reading unit 401 reads the partition table of the disk; an analyzing unit 402 configured to analyze the read contents of the partition table to obtain disk partition information of the disk; a selecting unit 403, configured to select a source disk partition of data to be copied from disk partitions of the disk according to the disk partition information; and the copying unit 404 mounts the source disk partition, and copies the data of the mounted source disk partition to the mounted target disk partition. The method and the device can solve the problems that in the prior art, when the data of the disk partition of the disk is copied, the data of the whole disk where the disk partition is located needs to be copied, so that the storage space is additionally consumed, and the consumed time is long.
Fig. 5 is a schematic diagram of an apparatus for copying disk data in a virtualized application according to a third embodiment of the present invention. As shown in fig. 5, the apparatus includes: a network interface 501, a processor 502, and a memory 503. The system bus 504 is used to connect the network interface 501, the processor 502, and the memory 503.
The processor 502 may be a CPU, for example.
The network interface 501 is used to communicate with other devices.
The memory 503 may be a permanent memory such as a hard disk drive and a flash memory, with software modules and device drivers in the memory 503. The software module can execute various functional modules of the method; the device drivers may be network and interface drivers.
At startup, these software components are loaded into memory 503 and then accessed by processor 502 and executed by the following instructions:
reading a partition table of a disk;
analyzing the content of the partition table to obtain the disk partition information of the disk;
selecting a source disk partition of data to be copied from disk partitions of the disks according to the disk partition information;
and mounting the source disk partition, and copying the data of the mounted source disk partition to the mounted target disk partition.
Further, the disk partition information includes the size and the starting position offset of the disk partition;
the application program further includes instructions operable to cause the processor 502 and the apparatus to perform the following:
and selecting a source disk partition of the data to be copied from the disk partitions of the disk according to the size and the initial position offset of the disk partition.
Optionally, the source disk partitions of the data to be copied are multiple;
the application program further includes instructions operable to cause the processor 502 and the apparatus to perform the following:
mounting the source disk partitions, and respectively copying data of the source disk partitions to a plurality of target disk partitions of one mounted target disk; or,
and mounting the source disk partitions, and respectively copying the data of the source disk partitions to the target disk partitions of the mounted target disks.
Further, the application program may further include instructions operable to cause the processor 502 and the apparatus to perform the following processes:
and copying the data of the mounted source disk partition to the mounted target disk partition by taking the size of a preset data block as a unit.
Further, the application program may further include instructions operable to cause the processor 502 and the apparatus to perform the following processes:
analyzing a file system of a host mounted with the source disk partition to obtain a file list of the host;
acquiring a file stored in the source disk partition from the file list;
and copying the content of the file to the mounted target disk partition.
The device for copying the disk data in the virtualization application provided by the embodiment of the invention can solve the problems that in the prior art, when the data of the disk partition of the disk is copied, the data of the whole disk where the disk partition is located needs to be copied, so that the storage space is additionally consumed, and the time consumption is long.
Those of skill would further appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied in hardware, a software module executed by a processor, or a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are merely exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method for copying disk data in a virtualized application, the method comprising:
the virtualization platform reads a partition table of a disk;
analyzing the content of the partition table to obtain the disk partition information of the disk;
selecting a source disk partition of data to be copied from disk partitions of the disks according to the disk partition information;
and mounting the source disk partition, and copying the data of the mounted source disk partition to the mounted target disk partition.
2. The method of claim 1, wherein the disk partition information includes a size and a starting position offset of the disk partition;
selecting a source disk partition of data to be copied from disk partitions of the disk according to the disk partition information comprises:
and selecting a source disk partition of the data to be copied from the disk partitions of the disk according to the size and the initial position offset of the disk partition.
3. The method according to claim 2, wherein the source disk partition of the data to be copied is multiple;
mounting the source disk partition, wherein the copying the data of the mounted source disk partition to the mounted target disk partition comprises:
mounting the source disk partitions, and respectively copying data of the source disk partitions to a plurality of target disk partitions of one mounted target disk; or,
and mounting the source disk partitions, and respectively copying the data of the source disk partitions to the target disk partitions of the mounted target disks.
4. The method of any of claims 1-3, wherein copying the data of the mounted source disk partition to the mounted target disk partition comprises:
and copying the data of the mounted source disk partition to the mounted target disk partition by taking the size of a preset data block as a unit.
5. The method of any of claims 1-3, wherein copying the data of the mounted source disk partition to the mounted target disk partition comprises:
analyzing a file system of a host mounted with the source disk partition to obtain a file list of the host;
acquiring a file stored in the source disk partition from the file list;
and copying the content of the file to the mounted target disk partition.
6. An apparatus for copying disk data in a virtualized application, the apparatus comprising: the device comprises a reading unit, an analysis unit, a selection unit and a copying unit;
the reading unit is used for reading a partition table of the disk;
the analysis unit is used for analyzing the content of the partition table read by the reading unit to acquire the disk partition information of the disk;
the selecting unit is used for selecting a source disk partition of the data to be copied from the disk partitions of the disk according to the disk partition information analyzed by the analyzing unit;
and the copying unit is used for mounting the source disk partition selected by the selecting unit and copying the data of the mounted source disk partition into the mounted target disk partition.
7. The apparatus according to claim 6, wherein the copy unit is specifically configured to:
and selecting a source disk partition of the data to be copied from the disk partitions of the disk according to the size and the initial position offset of the disk partition.
8. The apparatus according to claim 7, wherein the source disk partition of the data to be copied is plural;
the copy unit is specifically configured to:
mounting the source disk partitions, and respectively copying data of the source disk partitions to a plurality of target disk partitions of one mounted target disk; or,
and mounting the source disk partitions, and respectively copying the data of the source disk partitions to the target disk partitions of the mounted target disks.
9. The apparatus according to any of claims 6-8, wherein the copy unit is further specifically configured to:
and copying the data of the mounted source disk partition to the mounted target disk partition by taking the size of a preset data block as a unit.
10. The apparatus according to any of claims 6-8, wherein the copy unit is further specifically configured to:
analyzing a file system of a host mounted with the source disk partition to obtain a file list of the host;
acquiring a file stored in the source disk partition from the file list;
and copying the content of the file to the mounted target disk partition.
CN201410736272.8A 2014-12-05 2014-12-05 The method and device of data in magnetic disk is copied in virtualization applications Active CN105718377B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410736272.8A CN105718377B (en) 2014-12-05 2014-12-05 The method and device of data in magnetic disk is copied in virtualization applications

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410736272.8A CN105718377B (en) 2014-12-05 2014-12-05 The method and device of data in magnetic disk is copied in virtualization applications

Publications (2)

Publication Number Publication Date
CN105718377A true CN105718377A (en) 2016-06-29
CN105718377B CN105718377B (en) 2019-10-25

Family

ID=56143816

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410736272.8A Active CN105718377B (en) 2014-12-05 2014-12-05 The method and device of data in magnetic disk is copied in virtualization applications

Country Status (1)

Country Link
CN (1) CN105718377B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106569752A (en) * 2016-12-27 2017-04-19 哈尔滨安天科技股份有限公司 System and method for quickly combining disk partitions
CN106775846A (en) * 2016-11-30 2017-05-31 三星(中国)半导体有限公司 For the method and device of the online migration of physical server
CN106777288A (en) * 2016-12-29 2017-05-31 北京安天网络安全技术有限公司 A kind of quick fractionation virtualizes the system and method for disk mirroring
CN108399048A (en) * 2017-02-08 2018-08-14 杭州信核数据科技股份有限公司 A kind of data copy migration method and system based on (SuSE) Linux OS
CN109614053A (en) * 2018-12-17 2019-04-12 郑州云海信息技术有限公司 A kind of method and apparatus extending KVM magnetic disk of virtual machine subregion
CN109710375A (en) * 2018-12-06 2019-05-03 国云科技股份有限公司 A method of separation virtual machine system subregion
CN110941515A (en) * 2019-12-04 2020-03-31 深圳市科力锐科技有限公司 Host backup reconstruction method, device, server and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5974517A (en) * 1996-09-17 1999-10-26 Compaq Computer Corporation Method and system for mounting a system partition as a logical drive while an operating system is operational by modifying a partition table
CN101609393A (en) * 2009-07-21 2009-12-23 北京数帅科技有限公司 The operating system access of non-LVM is based on the method for the memory device of LV volume
CN103051687A (en) * 2012-12-10 2013-04-17 浪潮(北京)电子信息产业有限公司 System and method for deploying application service to cloud-storage virtual machine
CN103488956A (en) * 2012-06-07 2014-01-01 亚旭电脑股份有限公司 Data protection method of portable electronic device and computer program product thereof
CN103605588A (en) * 2013-11-21 2014-02-26 上海爱数软件有限公司 Disk backup method of virtue machine

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5974517A (en) * 1996-09-17 1999-10-26 Compaq Computer Corporation Method and system for mounting a system partition as a logical drive while an operating system is operational by modifying a partition table
CN101609393A (en) * 2009-07-21 2009-12-23 北京数帅科技有限公司 The operating system access of non-LVM is based on the method for the memory device of LV volume
CN103488956A (en) * 2012-06-07 2014-01-01 亚旭电脑股份有限公司 Data protection method of portable electronic device and computer program product thereof
CN103051687A (en) * 2012-12-10 2013-04-17 浪潮(北京)电子信息产业有限公司 System and method for deploying application service to cloud-storage virtual machine
CN103605588A (en) * 2013-11-21 2014-02-26 上海爱数软件有限公司 Disk backup method of virtue machine

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106775846A (en) * 2016-11-30 2017-05-31 三星(中国)半导体有限公司 For the method and device of the online migration of physical server
CN106775846B (en) * 2016-11-30 2021-02-23 三星(中国)半导体有限公司 Method and device for online migration of physical server
CN106569752A (en) * 2016-12-27 2017-04-19 哈尔滨安天科技股份有限公司 System and method for quickly combining disk partitions
CN106569752B (en) * 2016-12-27 2019-07-02 哈尔滨安天科技股份有限公司 A kind of system and method for quick merging disk partition
CN106777288A (en) * 2016-12-29 2017-05-31 北京安天网络安全技术有限公司 A kind of quick fractionation virtualizes the system and method for disk mirroring
CN106777288B (en) * 2016-12-29 2019-09-27 北京安天网络安全技术有限公司 A kind of system and method for quick fractionation virtualization disk mirroring
CN108399048A (en) * 2017-02-08 2018-08-14 杭州信核数据科技股份有限公司 A kind of data copy migration method and system based on (SuSE) Linux OS
CN109710375A (en) * 2018-12-06 2019-05-03 国云科技股份有限公司 A method of separation virtual machine system subregion
CN109614053A (en) * 2018-12-17 2019-04-12 郑州云海信息技术有限公司 A kind of method and apparatus extending KVM magnetic disk of virtual machine subregion
CN110941515A (en) * 2019-12-04 2020-03-31 深圳市科力锐科技有限公司 Host backup reconstruction method, device, server and storage medium
CN110941515B (en) * 2019-12-04 2022-05-24 深圳市科力锐科技有限公司 Host backup reconstruction method, device, server and storage medium

Also Published As

Publication number Publication date
CN105718377B (en) 2019-10-25

Similar Documents

Publication Publication Date Title
CN105718377B (en) The method and device of data in magnetic disk is copied in virtualization applications
CN110941515B (en) Host backup reconstruction method, device, server and storage medium
EP2840495B1 (en) Container-based processing method and apparatus
US20100057818A1 (en) Performing defragment on hard disk of host machine having a virtual machine
US20160092261A1 (en) Method and system for physical computer system virtualization
CN104636266B (en) Cover tile magnetic recording hard disk, cover tile magnetic recording hard disk write method and the device of data
US9053064B2 (en) Method for saving virtual machine state to a checkpoint file
CN107544864B (en) Virtual machine data copying method and virtual machine data copying system
US20100205397A1 (en) Method and apparatus for allocating resources in a computer system
US8683111B2 (en) Metadata storage in unused portions of a virtual disk file
US20170371749A1 (en) Backup image restore
CN102521016A (en) Method and system for operating multiple virtual machines
US11675628B2 (en) Methods for operating storage driver in container environment and storage driver apparatuses
CN104572656A (en) Method and device for recycling space of disk mirror image
CN107203480B (en) Data prefetching method and device
US9336131B1 (en) Systems and methods for enabling virtual environments to mount non-native storage disks
WO2009083947A1 (en) Device and method for integrating file systems
CN110941516B (en) Operating system restoration method, device, equipment and storage medium
US20150012722A1 (en) Identification of page sharing opportunities within large pages
US20200026540A1 (en) Dynamic provisioning and delivery of virtual applications
CN107341073B (en) Method and device for realizing compatibility of container host and virtual host image file
US10592425B2 (en) Virtualizing NVDIMM WPQ flushing with minimal overhead
CN105653352A (en) Virtual simulation evidence-obtaining method for operating system
JP7522775B2 (en) Non-volatile storage partition identifier
KR101628436B1 (en) Method for processing data of virtual machine

Legal Events

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