CN107145300B - Data sharing management method and device - Google Patents

Data sharing management method and device Download PDF

Info

Publication number
CN107145300B
CN107145300B CN201610115216.1A CN201610115216A CN107145300B CN 107145300 B CN107145300 B CN 107145300B CN 201610115216 A CN201610115216 A CN 201610115216A CN 107145300 B CN107145300 B CN 107145300B
Authority
CN
China
Prior art keywords
disk
data
cloud disk
virtual
virtual machine
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610115216.1A
Other languages
Chinese (zh)
Other versions
CN107145300A (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.)
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 CN201610115216.1A priority Critical patent/CN107145300B/en
Publication of CN107145300A publication Critical patent/CN107145300A/en
Application granted granted Critical
Publication of CN107145300B publication Critical patent/CN107145300B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/0662Virtualisation aspects
    • G06F3/0665Virtualisation aspects at area level, e.g. provisioning of virtual or logical volumes
    • 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/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a data sharing management method, which comprises the following steps: acquiring cloud disk data of a public cloud disk, and storing the acquired cloud disk data in a physical disk; generating at least one logic disk in the physical disk according to the acquired cloud disk data; and allocating the at least one logic disk to at least one virtual machine according to a preset allocation rule to serve as a virtual disk of the at least one virtual machine. The invention also discloses a data sharing management device. By adopting the invention, the data sharing efficiency can be improved.

Description

Data sharing management method and device
Technical Field
The present invention relates to the field of computers, and in particular, to a data sharing management method and apparatus.
Background
At present, a plurality of public clouds provide free cloud disk services, the number of the cloud disk services is hundreds of GB, and the number of the cloud disk services is tens of TB, and the public cloud disks store personal data such as photos or other data. Virtual Machine (VM) refers to a complete computer system that has complete hardware system functions and runs in a completely isolated environment, and is simulated by software, and another or multiple Virtual computers (or any other physical devices, simply referred to as Virtual machines) can be simulated on a physical computer by Virtual Machine software, and these Virtual machines operate completely like real computers, such as installing operating systems, installing applications, accessing network resources, and so on; the virtual machine may also access the public cloud disk to obtain data from the public cloud disk. In the prior art, corresponding cloud disk software needs to be installed in each virtual machine, and a user manually downloads data from a public cloud disk or uploads data to the public cloud disk through the cloud disk software, and the method has the following defects: because corresponding cloud disk software needs to be installed in each virtual machine, a user logs in a public cloud disk through the cloud disk software, the public cloud disk can only provide services for a single virtual machine, for example, when the user operates the virtual machine A, the user needs to acquire cloud disk data from the public cloud disk, the user logs in the public cloud disk through the cloud disk software installed in the virtual machine A to acquire the cloud disk data, and when the virtual machine B also needs to acquire the cloud disk data from the public cloud disk, the user can only log in the public cloud disk through the cloud disk software installed in the virtual machine B to acquire the cloud disk data, so that when the cloud disk data of the public cloud disk is shared to the virtual machine, the user needs to spend a long time, and the user is limited by bandwidth, and the sharing efficiency is low.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide a data sharing management method and a data sharing management device, and aims to solve the technical problem of low data sharing efficiency in the prior art.
In order to achieve the above object, the present invention provides a data sharing management method, including:
acquiring cloud disk data of a public cloud disk, and storing the acquired cloud disk data in a physical disk;
generating at least one logic disk in the physical disk according to the acquired cloud disk data;
and allocating the at least one logic disk to at least one virtual machine according to a preset allocation rule to serve as a virtual disk of the at least one virtual machine.
Preferably, the method further comprises:
when a user executes write operation on the virtual disk of the at least one virtual machine, sending data of the virtual disk of the at least one virtual machine to the public cloud disk so as to update the public cloud disk.
Preferably, the step of creating at least one logical disk on the physical disk according to the acquired cloud disk data includes:
searching a storage block or a sector where the acquired cloud disk data are located in a folder in the physical disk;
and generating at least one logical disk according to the searched storage block or sector, and endowing the logical disk with disk characteristics.
Preferably, when a user performs a write operation on the virtual disk of the at least one virtual machine, the step of sending data of the virtual disk of the at least one virtual machine to the public cloud disk to update the public cloud disk includes:
when a user executes write operation on the virtual disk of the at least one virtual machine, acquiring updated data in the virtual disk of the at least one virtual machine, and sending the updated data to a public cloud disk to update the public cloud disk.
Preferably, the step of acquiring cloud disk data of a public cloud disk and storing the acquired cloud disk data in a physical disk includes:
and when the cloud disk data of the public cloud disk change, acquiring the changed cloud disk data in the public cloud disk, and storing the acquired cloud disk data in the physical disk.
In addition, to achieve the above object, the present invention provides a data sharing management apparatus, including:
the acquisition module is used for acquiring cloud disk data of a public cloud disk and storing the acquired cloud disk data into a physical disk;
the generating module is used for generating at least one logical disk in the physical disk according to the acquired cloud disk data;
and the allocation module is used for allocating the at least one logic disk to the at least one virtual machine according to a preset allocation rule to serve as the virtual disk of the at least one virtual machine.
Preferably, the apparatus further comprises:
and the updating module is used for sending the data of the virtual disk of the at least one virtual machine to the public cloud disk to update the public cloud disk when a user executes write operation on the virtual disk of the at least one virtual machine.
Preferably, the generating module is further configured to search a storage block or a sector where a folder of the acquired cloud disk data in the physical disk is located, and to generate at least one logical disk according to the searched storage block or sector, and assign a disk characteristic to the logical disk.
Preferably, the update module includes:
the first updating unit is used for acquiring updated data in the virtual disk of the at least one virtual machine when a user executes write operation on the virtual disk of the at least one virtual machine, and sending the updated data to a public cloud disk to update the public cloud disk.
Preferably, the obtaining module is further configured to obtain the changed cloud disk data in the public cloud disk when the cloud disk data of the public cloud disk changes, and store the obtained cloud disk data in the physical disk.
The invention discloses a data sharing management method and a device, wherein the method comprises the following steps: acquiring cloud disk data of a public cloud disk, and storing the acquired cloud disk data in a physical disk; generating at least one logic disk in the physical disk according to the acquired cloud disk data; allocating the at least one logic disk to at least one virtual machine according to a preset allocation rule to serve as a virtual disk of the at least one virtual machine; the cloud disk data acquired from the public cloud disk can be shared to at least one virtual machine, the data sharing efficiency is improved, and corresponding cloud disk software does not need to be installed in each virtual machine.
Drawings
FIG. 1 is a flowchart illustrating a data sharing management method according to a first embodiment of the present invention;
FIG. 2 is a flowchart illustrating a data sharing management method according to a second embodiment of the present invention;
FIG. 3 is a flowchart illustrating a data sharing management method according to a third embodiment of the present invention;
FIG. 4 is a flowchart illustrating a data sharing management method according to a fourth embodiment of the present invention;
FIG. 5 is a flowchart illustrating a fifth embodiment of a data sharing management method according to the present invention;
FIG. 6 is a schematic structural diagram of a data sharing management device according to a first embodiment of the present invention;
FIG. 7 is a diagram illustrating a second embodiment of a data sharing management device according to the present invention;
FIG. 8 is a schematic structural diagram of a data sharing management device according to a third embodiment of the present invention;
FIG. 9 is a diagram illustrating a fourth embodiment of a data sharing management device according to the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a schematic flow chart of a data sharing management method according to a first embodiment of the present invention, where the method includes:
and S10, acquiring cloud disk data of the public cloud disk, and storing the acquired cloud disk data in the physical disk.
The public cloud disk provides an Application Programming Interface (API), and in this step, the public cloud disk may be connected to the public cloud disk through the API, obtain cloud disk data of the public cloud disk, and store the obtained cloud disk data in the physical disk. The physical host in which the physical disk is located comprises at least one virtual machine. And the physical host where the physical disk is located establishes communication connection with the public cloud disk so as to acquire cloud disk data from the public cloud disk.
A specific folder may be established in the physical disk in advance, and the acquired cloud disk data may be stored in the specific folder of the physical disk. There may be a plurality of the specific folders.
And S20, generating at least one logical disk on the physical disk according to the acquired cloud disk data.
And generating at least one logical disk in the physical disk according to the acquired cloud disk data, wherein the logical disk comprises cloud disk data acquired from a public cloud disk, and the logical disk has disk characteristics, namely the logical disk comprises sectors and cylinders and can be partitioned. Optionally, at least one logical disk may be generated in the physical disk according to the data type of the acquired cloud disk data, for example, when the data type of the acquired cloud disk data includes a text type and a photo type, one or more logical disks are generated according to the physical disk in which the cloud disk data of the text type is located, and one or more logical disks are generated according to the physical disk in which the cloud disk data of the photo type is located. Optionally, the corresponding folder or subfolder of the acquired cloud disk data in the physical disk may be converted into the physical disk according to the corresponding folder or subfolder of the acquired cloud disk data in the physical disk; for example, in one embodiment, the acquired cloud disk data is stored in folder a, folder B, and folder C of the physical disk, so that folder a may be converted into a logical disk, folder B may be converted into a logical disk, and folder C may be converted into a logical disk.
Optionally, in an embodiment, the step of generating at least one logical disk in the physical disk according to the acquired cloud disk data includes: searching a storage block or a sector where the acquired cloud disk data is located in a folder in the physical disk; and generating at least one logical disk according to the searched storage block or sector, and endowing the logical disk with disk characteristics. The acquired cloud disk data may be stored in one or more folders of the physical disk, each folder may correspond to one or more storage blocks or sectors, in this step, a storage block or sector where the cloud disk data is located in the folder in the physical disk is searched, for example, the cloud disk data is stored in a folder 1 and a folder 2, the folder 1 corresponds to a storage block 1 and a storage block 2, and the folder corresponds to a storage block 3 and a storage block 4, and then at least one logical disk is determined and generated according to a preset generation policy, where the generation policy is set by a user as needed, for example, a logical disk is generated according to the storage block 1, the storage block 2, the storage block 3, and the storage block 4, that is, the logical disk corresponds to the storage block 1, the storage block 2, the storage block 3, and the storage block 4; such as generating one logical disk from the memory blocks 1 and 3 and another logical disk from the memory blocks 2 and 4. In this step, disk characteristics are assigned to each logical disk generated so that the logical disk can be allocated as a whole for use by the virtual machine. Each logical disk has a disk identification.
And S30, allocating the at least one logical disk to at least one virtual machine according to a preset allocation rule to serve as a virtual disk of the at least one virtual machine.
In the step, the logic disk is distributed to at least one virtual machine according to a preset distribution rule to serve as a virtual disk of the at least one virtual machine; optionally, the logical disk may be allocated to at least one virtual machine according to a data type of data stored in the logical disk, and the logical disks allocated to the virtual machines may be the same or different; for example, a virtual machine 1 is allocated to a logical disk with a data type of text, a virtual machine 2 is allocated to a logical disk with a data type of photo, a virtual machine 3 is allocated to a logical disk with a data type of text and a logical disk with a data type of photo, a virtual machine 4 is allocated to a logical disk with a data type of text, and the like, the logical disks allocated to the virtual machine 1 and the virtual machine 4 are the same, and the virtual machine 1 and the virtual machine 4 can share the logical disks.
By adopting the embodiment, the cloud disk data of the public cloud disk is obtained, and the obtained cloud disk data is stored in the physical disk; generating at least one logic disk in the physical disk according to the acquired cloud disk data; allocating the at least one logic disk to at least one virtual machine according to a preset allocation rule to serve as a virtual disk of the at least one virtual machine; the cloud disk data acquired from the public cloud disk can be shared to at least one virtual machine, the data sharing efficiency is improved, and corresponding cloud disk software does not need to be installed in each virtual machine.
Referring to fig. 2, fig. 2 is a flowchart illustrating a data sharing management method according to a second embodiment of the present invention.
Based on the first embodiment of the data sharing management method described above, after step S30, the method includes:
and S40, when the user performs write operation on the virtual disk of the at least one virtual machine, sending the data of the virtual disk of the at least one virtual machine to the public cloud disk so as to update the public cloud disk.
Each virtual machine in the physical host where the physical disk is located may correspond to different users, for example, one virtual machine corresponds to one user, that is, one user operates one virtual machine. When a user executes write operation on the at least one virtual machine, update data is generated, the data of the virtual disk corresponding to the virtual machine changes, namely the data of the logical disk corresponding to the virtual machine also changes, the data of the virtual disk of the virtual machine is sent to the public cloud disk, and the public cloud disk performs synchronous update after receiving the data sent by the virtual machine.
Specifically, when a user executes write operation on the virtual disk of the at least one virtual machine, the data of the virtual disk of the virtual machine, of which the data of the virtual disk changes, is sent to the public cloud disk, so that the public cloud disk can be updated synchronously; in an embodiment, a physical host where the physical disk is located includes a virtual machine 1, a virtual machine 2, a virtual machine 3, a virtual machine 4, and a virtual machine 5, a user performs a write operation on the virtual machine 1, so that data of a virtual disk corresponding to the virtual machine 1 is changed, the user does not perform the write operation on the virtual machine 2, the virtual machine 3, the virtual machine 4, and the virtual machine 5, and new data is not added to the virtual disks corresponding to the virtual machine 2, the virtual machine 3, the virtual machine 4, and the virtual machine 5, only the data of the virtual disk of the virtual machine 1 is sent to a public cloud disk, so that the public cloud disk performs synchronous update.
Further, as shown in fig. 3, the step S40 includes:
and S41, when the user performs write operation on the virtual disk of the at least one virtual machine, acquiring updated data in the virtual disk of the at least one virtual machine, and sending the updated data to the public cloud disk to update the public cloud disk.
In this step, updated data in the virtual disk of at least one virtual machine is obtained, specifically, a virtual machine whose data of the virtual disk changes may be selected from all virtual machines in the physical host where the physical disk is located, the updated data is obtained from the virtual disk of the selected virtual machine, and the updated data is sent to the public cloud disk to update the public cloud disk.
Further, as shown in fig. 4, the step S40 includes:
s42, when the user executes write operation on the virtual disk of the at least one virtual machine, judging whether the physical host where the physical disk is located is connected with the public cloud disk; if the physical host where the physical disk is located is connected to the public cloud disk, step S43 is executed, otherwise step S44 is executed.
In the step, whether the physical host where the physical disk is located is connected with the public cloud disk is judged, and if the physical host where the physical disk is located is connected with the public cloud disk, the public cloud disk can be considered to be updated synchronously; if the physical host where the physical disk is located is disconnected from the public cloud disk, waiting is needed, and when the physical host where the physical disk is located is reestablished with the public cloud disk, the public cloud disk is synchronously updated.
And S43, sending the data of the virtual disk of the at least one virtual machine to the public cloud disk so as to update the public cloud disk.
In this step, the data of the virtual disk of the at least one virtual machine is sent to the public cloud disk, and specifically, the data of the virtual disk of the virtual machine, of which the data of the virtual disk changes, is sent to the public cloud disk for synchronous update by the public cloud disk; and the data of the virtual disk of the virtual machine, of which the data of the virtual disk is unchanged, is not sent to the public cloud disk. Further, the changed data in the virtual disk of the virtual machine in which the data of the virtual disk is changed may be sent to the public cloud disk for synchronous update of the public cloud disk, for example, when a user operates the virtual machine 1, a new photo 1 is written in the virtual disk of the virtual machine 1, the data of the virtual disk of the virtual machine 1 may be sent to the public cloud disk, or the photo 1 written in the virtual disk of the virtual machine 1 may be sent to the public cloud disk.
S44, monitoring whether the physical host where the physical disk is located is connected with the public cloud disk again according to a preset time period; and if the physical host where the physical disk is located is reestablished with the public cloud disk, sending the data in the virtual disk corresponding to the at least one virtual machine to the public cloud disk so as to update the public cloud disk.
The preset time period can be set according to needs, for example, the preset time period is 1 second.
In the step, monitoring whether a physical host where the physical disk is located is reconnected with the public cloud disk or not so as to determine whether to send data in the virtual disk corresponding to the at least one virtual machine to the public cloud disk or not; and if the physical host where the physical disk is located is reconnected with the public cloud disk, sending the data in the virtual disk corresponding to the at least one virtual machine to the public cloud disk.
Specifically, the step of sending the data of the virtual disk of the at least one virtual machine to the public cloud disk includes: the data of the virtual disk of the virtual machine, of which the data of the virtual disk changes, can be sent to the public cloud disk for synchronous updating of the public cloud disk; and the data of the virtual disk of the virtual machine, of which the data of the virtual disk is unchanged, is not sent to the public cloud disk. Further, the changed data in the virtual disk of the virtual machine in which the data of the virtual disk is changed may be sent to the public cloud disk for synchronous update of the public cloud disk, for example, when a user operates the virtual machine 1, a new photo 1 is written in the virtual disk of the virtual machine 1, the data of the virtual disk of the virtual machine 1 may be sent to the public cloud disk, or the photo 1 written in the virtual disk of the virtual machine 1 may be sent to the public cloud disk.
Further, as shown in fig. 5, the step S10 includes:
and S11, when the cloud disk data of the public cloud disk change, acquiring the changed cloud disk data in the public cloud disk, and storing the acquired cloud disk data in the physical disk.
Optionally, when the cloud disk data of the public cloud disk changes, sending an acquisition request to the public cloud disk, so that the public cloud disk returns the changed cloud disk data of the public cloud disk according to the acquisition request, and in this step, receiving the changed cloud disk data of the public cloud disk returned by the public cloud disk; optionally, when the cloud disk data of the public cloud disk changes, the public cloud disk actively sends the cloud disk data occurring in the public cloud disk to the physical host where the physical disk is located, and in this step, the changed cloud disk data in the public cloud disk returned by the public cloud disk is received.
Optionally, in this step, when the cloud disk data of the public cloud disk changes, it is first determined whether the changed cloud disk data in the public cloud disk is uploaded from the physical host where the physical disk is located, and if the changed cloud disk data in the public cloud disk is not uploaded from the physical host where the physical disk is located, the changed cloud disk data in the public cloud disk is obtained, and the obtained cloud disk data is stored in the physical disk.
Referring to fig. 6, fig. 6 is a diagram of a data sharing management apparatus according to a first embodiment of the present invention, including:
the acquisition module 10 is used for acquiring cloud disk data of a public cloud disk and storing the acquired cloud disk data into a physical disk;
a generating module 20, configured to generate at least one logical disk in the physical disk according to the acquired cloud disk data;
the allocating module 30 is configured to allocate the at least one logical disk to at least one virtual machine according to a preset allocation rule, so as to serve as a virtual disk of the at least one virtual machine.
The public cloud disk provides an API (Application Programming Interface), and the obtaining module 10 may connect to the public cloud disk through the API, obtain cloud disk data of the public cloud disk, and store the obtained cloud disk data in a physical disk. The physical host in which the physical disk is located comprises at least one virtual machine. And the physical host where the physical disk is located establishes communication connection with the public cloud disk so as to acquire cloud disk data from the public cloud disk.
A specific folder may be established in the physical disk in advance, and the acquired cloud disk data may be stored in the specific folder of the physical disk. There may be a plurality of the specific folders.
The generating module 20 generates at least one logical disk in the physical disk according to the acquired cloud disk data, where the logical disk includes cloud disk data acquired from a public cloud disk, and the logical disk has disk characteristics, that is, the logical disk includes sectors and cylinders and can perform partition operations on the logical disk. Optionally, the generating module 20 may generate at least one logical disk in the physical disk according to the data type of the acquired cloud disk data, and for example, when the data type of the acquired cloud disk data includes a text type and a photo type, generate one or more logical disks according to the physical disk in which the cloud disk data of the text type is located, and generate one or more logical disks according to the physical disk in which the cloud disk data of the photo type is located. Optionally, the generating module 20 may convert the folder or the subfolder, corresponding to the acquired cloud disk data, in the physical disk into the physical disk according to the folder or the subfolder, corresponding to the acquired cloud disk data, in the physical disk; for example, in one embodiment, the acquired cloud disk data is stored in folder a, folder B, and folder C of the physical disk, so that folder a may be converted into a logical disk, folder B may be converted into a logical disk, and folder C may be converted into a logical disk.
Optionally, the generating module 20 is further configured to search a storage block or a sector where the obtained cloud disk data is located in the folder in the physical disk, and generate at least one logical disk according to the searched storage block or sector, and assign a disk characteristic to the logical disk. The acquired cloud disk data may be stored in one or more folders of the physical disk, each folder may correspond to one or more storage blocks or sectors, the generation module 20 searches for a storage block or sector where the cloud disk data is located in the physical disk, for example, the cloud disk data is stored in a folder 1 and a folder 2, the folder 1 corresponds to a storage block 1 and a storage block 2, and the folder corresponds to a storage block 3 and a storage block 4, and then determines to generate at least one logical disk according to a preset generation policy, where the generation policy is set by a user as needed, for example, a logical disk is generated according to the storage block 1, the storage block 2, the storage block 3, and the storage block 4, that is, the logical disk corresponds to the storage block 1, the storage block 2, the storage block 3, and the storage block 4; such as generating one logical disk from the memory blocks 1 and 3 and another logical disk from the memory blocks 2 and 4. In this step, disk characteristics are assigned to each logical disk generated so that the logical disk can be allocated as a whole for use by the virtual machine. Each logical disk has a disk identification.
The allocating module 30 allocates the logical disk to at least one virtual machine according to a preset allocation rule, and the logical disk is used as a virtual disk of the at least one virtual machine; optionally, the logical disk may be allocated to at least one virtual machine according to a data type of data stored in the logical disk, and the logical disks allocated to the virtual machines may be the same or different; for example, a virtual machine 1 is allocated to a logical disk with a data type of text, a virtual machine 2 is allocated to a logical disk with a data type of photo, a virtual machine 3 is allocated to a logical disk with a data type of text and a logical disk with a data type of photo, a virtual machine 4 is allocated to a logical disk with a data type of text, and the like, the logical disks allocated to the virtual machine 1 and the virtual machine 4 are the same, and the virtual machine 1 and the virtual machine 4 can share the logical disks.
Further, as shown in fig. 7, the apparatus further includes:
and the updating module 40 is configured to send data of the virtual disk of the at least one virtual machine to the public cloud disk to update the public cloud disk when a user performs a write operation on the virtual disk of the at least one virtual machine.
Each virtual machine in the physical host where the physical disk is located may correspond to different users, for example, one virtual machine corresponds to one user, that is, one user operates one virtual machine. When a user executes a write operation in the at least one virtual machine, update data is generated, data of the virtual disk corresponding to the virtual machine changes, that is, data of the logical disk corresponding to the virtual machine also changes, the update module 40 sends the data of the virtual disk of the virtual machine to the public cloud disk, and the public cloud disk performs synchronous update after receiving the data sent by the virtual machine.
Specifically, when a user performs a write operation on the virtual disk of the at least one virtual machine, the updating module 40 sends data of the virtual disk of the virtual machine, of which the data of the virtual disk changes, to the public cloud disk, so that the public cloud disk performs synchronous updating; in an embodiment, a physical host where the physical disk is located includes a virtual machine 1, a virtual machine 2, a virtual machine 3, a virtual machine 4, and a virtual machine 5, a user performs a write operation on the virtual machine 1, so that data of a virtual disk corresponding to the virtual machine 1 is changed, the user does not perform the write operation on the virtual machine 2, the virtual machine 3, the virtual machine 4, and the virtual machine 5, and new data is not added to the virtual disks corresponding to the virtual machine 2, the virtual machine 3, the virtual machine 4, and the virtual machine 5, only the data of the virtual disk of the virtual machine 1 is sent to a public cloud disk, so that the public cloud disk performs synchronous update.
Further, as shown in fig. 8, the update module 40 includes:
the first updating unit 41 is configured to, when a user performs a write operation on the virtual disk of the at least one virtual machine, obtain updated data in the virtual disk of the at least one virtual machine, and send the updated data to the public cloud disk to update the public cloud disk.
The first updating unit 41 obtains updated data in the virtual disk of at least one virtual machine, specifically, may select a virtual machine with changed data of the virtual disk from all virtual machines in the physical host where the physical disk is located, obtain updated data from the virtual disk of the selected virtual machine, and send the updated data to the public cloud disk to update the public cloud disk.
Further, as shown in fig. 9, the update module 40 includes:
a determining unit 42, configured to determine whether a physical host where the physical disk is located is connected to the public cloud disk when a user performs a write operation on the virtual disk of the at least one virtual machine;
a second updating unit 43, configured to send data of the virtual disk of the at least one virtual machine to the public cloud disk when the physical host where the physical disk is located is connected to the public cloud disk, so as to update the public cloud disk;
the monitoring unit 44 is configured to monitor, according to a preset time period, whether the physical host where the physical disk is located is re-connected with the public cloud disk when the physical host where the physical disk is located is not connected with the public cloud disk;
a third updating unit 45, configured to send data in the virtual disk corresponding to the at least one virtual machine to the public cloud disk when the physical host where the physical disk is located is re-connected with the public cloud disk, so as to update the public cloud disk.
The determining unit 42 determines whether the physical host where the physical disk is located is connected to the public cloud disk, and if the physical host where the physical disk is located is connected to the public cloud disk, it is determined that the public cloud disk can be updated in real time; if the physical host where the physical disk is located is disconnected from the public cloud disk, waiting is needed, and when the physical host where the physical disk is located is reestablished with the public cloud disk, the public cloud disk is synchronously updated.
The second updating unit 43, when the physical host where the physical disk is located is connected to the public cloud disk, sends the data of the virtual disk of the at least one virtual machine to the public cloud disk, and specifically, sends the data of the virtual disk of the virtual machine, of which the data of the virtual disk changes, to the public cloud disk for the public cloud disk to perform synchronous updating; and the data of the virtual disk of the virtual machine, of which the data of the virtual disk is unchanged, is not sent to the public cloud disk. Further, the second updating unit 43 may send the data that changes in the virtual disk of the virtual machine, where the data of the virtual disk changes, to the public cloud disk, so as to perform synchronous updating on the public cloud disk, for example, when a user operates the virtual machine 1, and newly writes a photo 1 in the virtual disk of the virtual machine 1, the data of the virtual disk of the virtual machine 1 may all be sent to the public cloud disk, or the photo 1 written in the virtual disk of the virtual machine 1 may be sent to the public cloud disk.
The preset time period can be set according to needs, for example, the preset time period is 1 second.
The monitoring unit 44 monitors whether the physical host where the physical disk is located is reconnected with the public cloud disk, so as to determine whether to send data in the virtual disk corresponding to the at least one virtual machine to the public cloud disk; and if the physical host where the physical disk is located is reconnected with the public cloud disk, sending the data in the virtual disk corresponding to the at least one virtual machine to the public cloud disk.
Specifically, the third updating unit 45 sends the data of the virtual disk of the at least one virtual machine to the public cloud disk when the physical host where the physical disk is located is re-connected with the public cloud disk, and specifically, sends the data of the virtual disk of the virtual machine, of which the data of the virtual disk changes, to the public cloud disk for synchronous updating of the public cloud disk; and the data of the virtual disk of the virtual machine, of which the data of the virtual disk is unchanged, is not sent to the public cloud disk. Further, the second third updating unit 45 may send the data that changes in the virtual disk of the virtual machine, where the data of the virtual disk changes, to the public cloud disk, so as to synchronously update the public cloud disk, for example, when a user operates the virtual machine 1, a new photo 1 is written in the virtual disk of the virtual machine 1, all the data of the virtual disk of the virtual machine 1 may be sent to the public cloud disk, or the photo 1 written in the virtual disk of the virtual machine 1 may be sent to the public cloud disk.
Further, the obtaining module 10 is further configured to obtain cloud disk data that changes in the public cloud disk when the cloud disk data of the public cloud disk changes, and store the obtained cloud disk data in the physical disk.
Optionally, when the cloud disk data of the public cloud disk changes, the obtaining module 10 sends an obtaining request to the public cloud disk, so that the public cloud disk returns the changed cloud disk data of the public cloud disk according to the obtaining request, and the obtaining module 10 receives the changed cloud disk data of the public cloud disk returned by the public cloud disk; optionally, when the cloud disk data of the public cloud disk changes, the public cloud disk actively sends the cloud disk data occurring in the public cloud disk to the physical host where the physical disk is located, and the obtaining module 10 receives the cloud disk data that changes in the public cloud disk and is returned by the public cloud disk.
Optionally, when the cloud disk data of the public cloud disk changes, the obtaining module 10 first determines whether the changed cloud disk data in the public cloud disk is uploaded from the physical host where the physical disk is located, and if the changed cloud disk data in the public cloud disk is not uploaded from the physical host where the physical disk is located, obtains the changed cloud disk data in the public cloud disk, and stores the obtained cloud disk data in the physical disk.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A method for managing data sharing, the method comprising:
acquiring cloud disk data of a public cloud disk, and storing the acquired cloud disk data in a physical disk;
generating at least one logic disk in the physical disk according to the acquired cloud disk data;
and allocating the at least one logic disk to more than two virtual machines according to a preset allocation rule to serve as the virtual disks of the more than two virtual machines.
2. The data sharing management method of claim 1, wherein the method further comprises:
when a user executes write operation on a virtual disk of at least one virtual machine, sending data of the virtual disk of the at least one virtual machine to a public cloud disk so as to update the public cloud disk.
3. The data sharing management method according to claim 1 or 2, wherein the step of creating at least one logical disk in the physical disk according to the acquired cloud disk data includes:
searching a storage block or a sector where the acquired cloud disk data are located in a folder in the physical disk;
and generating at least one logical disk according to the searched storage block or sector, and endowing the logical disk with disk characteristics.
4. The data sharing management method according to claim 2, wherein the step of sending the data of the virtual disk of the at least one virtual machine to the public cloud disk to update the public cloud disk when the user performs a write operation on the virtual disk of the at least one virtual machine comprises:
when a user executes write operation on a virtual disk of at least one virtual machine, acquiring updated data in the virtual disk of the at least one virtual machine, and sending the updated data to a public cloud disk to update the public cloud disk.
5. The data sharing management method according to claim 1 or 2, wherein the step of acquiring cloud disk data of a public cloud disk and saving the acquired cloud disk data in a physical disk comprises:
and when the cloud disk data of the public cloud disk change, acquiring the changed cloud disk data in the public cloud disk, and storing the acquired cloud disk data in the physical disk.
6. A data sharing management apparatus, characterized in that the apparatus comprises:
the acquisition module is used for acquiring cloud disk data of a public cloud disk and storing the acquired cloud disk data into a physical disk;
the generating module is used for generating at least one logical disk in the physical disk according to the acquired cloud disk data;
and the allocation module is used for allocating the at least one logic disk to more than two virtual machines according to a preset allocation rule to serve as the virtual disks of the more than two virtual machines.
7. The data sharing management apparatus according to claim 6, wherein the apparatus further comprises:
the updating module is used for sending the data of the virtual disk of the at least one virtual machine to the public cloud disk to update the public cloud disk when a user executes write operation on the virtual disk of the at least one virtual machine.
8. The data sharing management apparatus according to claim 6 or 7, wherein the generating module is further configured to search a storage block or a sector where a folder of the acquired cloud disk data in the physical disk is located, and to generate at least one logical disk according to the searched storage block or sector, and assign a disk characteristic to the logical disk.
9. The data sharing management apparatus according to claim 7, wherein the update module includes:
the first updating unit is used for acquiring updated data in the virtual disk of at least one virtual machine when a user executes write operation on the virtual disk of the at least one virtual machine, and sending the updated data to a public cloud disk to update the public cloud disk.
10. The data sharing management apparatus according to claim 6 or 7, wherein the obtaining module is further configured to obtain cloud disk data that changes in the public cloud disk when the cloud disk data of the public cloud disk changes, and store the obtained cloud disk data in the physical disk.
CN201610115216.1A 2016-03-01 2016-03-01 Data sharing management method and device Active CN107145300B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610115216.1A CN107145300B (en) 2016-03-01 2016-03-01 Data sharing management method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610115216.1A CN107145300B (en) 2016-03-01 2016-03-01 Data sharing management method and device

Publications (2)

Publication Number Publication Date
CN107145300A CN107145300A (en) 2017-09-08
CN107145300B true CN107145300B (en) 2020-05-19

Family

ID=59783908

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610115216.1A Active CN107145300B (en) 2016-03-01 2016-03-01 Data sharing management method and device

Country Status (1)

Country Link
CN (1) CN107145300B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102289513A (en) * 2011-09-05 2011-12-21 盛乐信息技术(上海)有限公司 Method and system for obtaining internal files of virtual machine
CN102520887A (en) * 2011-12-19 2012-06-27 中山爱科数字科技股份有限公司 Storage space configuration and management method applied to cloud computing
CN103327112A (en) * 2013-07-02 2013-09-25 曙光信息产业(北京)有限公司 Desktop synchronization method based on cloud storage and device for realizing desktop synchronization
CN103677858A (en) * 2012-08-30 2014-03-26 中兴通讯股份有限公司 Method, system and device for managing virtual machine software in cloud environment
CN104219234A (en) * 2014-08-28 2014-12-17 杭州华澜微科技有限公司 Security method of personal data in cloud storage
CN104216759A (en) * 2014-08-27 2014-12-17 华为技术有限公司 Method and device for generating logical disk of virtual machine
CN104506635A (en) * 2014-12-26 2015-04-08 成都致云科技有限公司 Fast and efficient cloud mainframe creating and matching method and system
CN104536909A (en) * 2014-12-09 2015-04-22 华为技术有限公司 Memory management method, memory management device and memory device
CN105099997A (en) * 2014-05-04 2015-11-25 北京云端时代科技有限公司 Virtual infrastructure-based multimedia desktop delivery method and system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101661381B (en) * 2009-09-08 2012-05-30 华南理工大学 Data sharing and access control method based on Xen
CN102339444A (en) * 2010-07-27 2012-02-01 戴元顺 Cloud supermarket system
US10073656B2 (en) * 2012-01-27 2018-09-11 Sandisk Technologies Llc Systems and methods for storage virtualization
CN103997502A (en) * 2014-06-05 2014-08-20 浪潮电子信息产业股份有限公司 Safety enhanced model designing method based on cloud computing data center

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102289513A (en) * 2011-09-05 2011-12-21 盛乐信息技术(上海)有限公司 Method and system for obtaining internal files of virtual machine
CN102520887A (en) * 2011-12-19 2012-06-27 中山爱科数字科技股份有限公司 Storage space configuration and management method applied to cloud computing
CN103677858A (en) * 2012-08-30 2014-03-26 中兴通讯股份有限公司 Method, system and device for managing virtual machine software in cloud environment
CN103327112A (en) * 2013-07-02 2013-09-25 曙光信息产业(北京)有限公司 Desktop synchronization method based on cloud storage and device for realizing desktop synchronization
CN105099997A (en) * 2014-05-04 2015-11-25 北京云端时代科技有限公司 Virtual infrastructure-based multimedia desktop delivery method and system
CN104216759A (en) * 2014-08-27 2014-12-17 华为技术有限公司 Method and device for generating logical disk of virtual machine
CN104219234A (en) * 2014-08-28 2014-12-17 杭州华澜微科技有限公司 Security method of personal data in cloud storage
CN104536909A (en) * 2014-12-09 2015-04-22 华为技术有限公司 Memory management method, memory management device and memory device
CN104506635A (en) * 2014-12-26 2015-04-08 成都致云科技有限公司 Fast and efficient cloud mainframe creating and matching method and system

Also Published As

Publication number Publication date
CN107145300A (en) 2017-09-08

Similar Documents

Publication Publication Date Title
US8336047B2 (en) Provisioning virtual resources using name resolution
US10977062B2 (en) System for starting virtual machine using mirror image file stored in units of a distributed block storage system mapped to units of a logical volume
KR101357397B1 (en) Method for tracking memory usages of a data processing system
US11003625B2 (en) Method and apparatus for operating on file
CN106933508B (en) Application container migration method and device
KR20190056295A (en) On-demand storage provisioning using distributed and virtual namespace management
CN111124604A (en) Method, device, equipment and storage medium for allocating Pod (POD) IP addresses
US9612766B2 (en) Systems and methods for shadow migration progress estimation
US10361995B2 (en) Management of clustered and replicated systems in dynamic computing environments
JP6293086B2 (en) Deduplication of receiver-side data in data systems
US10282120B2 (en) Method, apparatus and system for inserting disk
US9317210B2 (en) Balancing traffic through logical unit range partitioning
CN106817388B (en) Method and device for acquiring data by virtual machine and host machine and system for accessing data
CN103607428A (en) Method of accessing shared memory and apparatus thereof
CN113806300B (en) Data storage method, system, device, equipment and storage medium
CN113037529A (en) Reserved bandwidth allocation method, device, equipment and storage medium
US20190114076A1 (en) Method and Apparatus for Storing Data in Distributed Block Storage System, and Computer Readable Storage Medium
CN103207805A (en) Virtualization-based hard disk reuse system
CN114730307A (en) Intelligent data pool
CN111488242A (en) Method and system for tagging and routing a striped backup to a single deduplication instance on a deduplication appliance
CN111475279A (en) System and method for intelligent data load balancing for backup
CN107145300B (en) Data sharing management method and device
US10346424B2 (en) Object processing
US20180123999A1 (en) Tracking client location using buckets
CN107168646B (en) Distributed data storage control method and server

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
CB02 Change of applicant information

Address after: Nanshan District Xueyuan Road in Shenzhen city of Guangdong province 518052 No. 1001 Nanshan Chi Park building A1 layer

Applicant after: SANGFOR TECHNOLOGIES Inc.

Address before: Nanshan District Xueyuan Road in Shenzhen city of Guangdong province 518052 No. 1001 Nanshan Chi Park building A1 layer

Applicant before: Sangfor Technologies Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant