Nothing Special   »   [go: up one dir, main page]

CN102323943A - Virtual-machine-based data storage method and system - Google Patents

Virtual-machine-based data storage method and system Download PDF

Info

Publication number
CN102323943A
CN102323943A CN201110258703A CN201110258703A CN102323943A CN 102323943 A CN102323943 A CN 102323943A CN 201110258703 A CN201110258703 A CN 201110258703A CN 201110258703 A CN201110258703 A CN 201110258703A CN 102323943 A CN102323943 A CN 102323943A
Authority
CN
China
Prior art keywords
virtual machine
file
data storage
data
storage
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201110258703A
Other languages
Chinese (zh)
Inventor
黄晓华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BEIJING CLOUD-FRAME TECHNOLOGY Co Ltd
Original Assignee
BEIJING CLOUD-FRAME TECHNOLOGY 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 BEIJING CLOUD-FRAME TECHNOLOGY Co Ltd filed Critical BEIJING CLOUD-FRAME TECHNOLOGY Co Ltd
Priority to CN201110258703A priority Critical patent/CN102323943A/en
Publication of CN102323943A publication Critical patent/CN102323943A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a virtual-machine-based data storage method and system. The method comprises the following steps of: establishing an operating system mirror image file and a storage disk file; formatting the operating system mirror image file into a system installation file system, and formatting the storage disk file into a data storage file system; installing a virtual machine operating system on the system installation file system, and associating the storage disk file and the virtual machine operating system to establish a virtual machine corresponding to the virtual machine operating system and a loading channel of the storage disk file; and storing data into the data storage file system through the virtual machine operating system and the corresponding loading channel. According to the invention, by separating the virtual machine operating system from data storage, the safety and transportability of the data and the convenience for data management are increased.

Description

Data storage method and system based on virtual machine
Technical Field
The invention relates to the technical field of data storage, in particular to a data storage method and system based on a virtual machine.
Background
The continuous development of informatization enables the information data volume of each enterprise and unit to rapidly increase. The growth in the amount of data has made management and maintenance of data increasingly important.
Currently, there are two main ways for data storage for users: one is based on the storage of the virtual machine, namely establish a mirror image file, and format the mirror image file into a file system, the file system can be divided into several partitions, the operating system of the virtual machine is installed on appointed partition, and operating system and data storage of the virtual machine are in the same mirror image file; the other is online storage, namely space of the online storage of the user is provided in a directory space division mode.
The problems existing in the prior art are as follows:
1. since online storage is not combined with a virtual machine, only data can be stored but not edited, which is poor in convenience.
2. For storage based on a virtual machine, because data and a virtual machine operating system are stored in the same image file, once the virtual machine operating system crashes, data of a user is lost, data security is poor, and the user needs to access the data through the virtual machine, so that convenience is poor.
Disclosure of Invention
The object of the present invention is to solve at least one of the above technical drawbacks.
In order to achieve the above object, in one aspect, the present invention provides a data storage method based on a virtual machine, including the following steps: s1: creating an operating system mirror image file and a storage disk file; s2: formatting the operating system image file into a system installation file system, and formatting the storage disk file into a data storage file system; s3: installing a virtual machine operating system on the system installation file system, and associating the storage disk file with the virtual machine operating system to establish a loading channel of a virtual machine corresponding to the virtual machine operating system and the storage disk file; and S4: and storing data into the data storage file system through the virtual machine operating system and the corresponding loading channel.
According to the data storage method based on the virtual machine, the virtual machine operating system and the data storage are separated, so that data cannot be lost due to the crash of the virtual machine operating system, and the safety of the data is guaranteed.
In another aspect of the present invention, a data storage system based on a virtual machine is further provided, including: a data storage file system for storing data; and the system installation file system is associated with the data storage file system and is provided with a virtual machine operating system, and the data is stored in the data storage file system through the virtual machine operating system.
According to the data storage system based on the virtual machine, the two file systems are used for respectively storing the virtual machine operating system and the user data, and the data and the operating system are separated, so that the data cannot be lost due to the crash of the virtual machine operating system, and the safety of the data is ensured.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
The foregoing and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 is a flow chart of a method for virtual machine based data storage according to an embodiment of the invention;
FIG. 2 is a flow chart of a method for virtual machine based data storage according to another embodiment of the present invention;
FIG. 3 is a schematic diagram of accessing data in a data storage file system, according to one embodiment of the present invention;
FIG. 4 is a schematic diagram of a virtual machine based data storage system in accordance with one embodiment of the present invention; and
FIG. 5 is a schematic diagram of a virtual machine based data storage system according to another embodiment of the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative only and should not be construed as limiting the invention.
Fig. 1 is a flowchart of a virtual machine-based data storage method according to an embodiment of the present invention. As shown in fig. 1, the virtual machine based data storage method according to the embodiment of the present invention includes the following steps:
step S101, creating an operating system image file and a storage disk file.
Step S102, the image file of the operating system is formatted into a system installation file system, and the storage disk file is formatted into a data storage file system.
Step S103, installing a virtual machine operating system on the system installation file system, and associating the storage disk file with the virtual machine operating system to establish a loading channel of a virtual machine and the storage disk file corresponding to the virtual machine operating system.
And step S104, storing the data into a data storage file system through the virtual machine operating system and the corresponding loading channel.
According to the data storage method based on the virtual machine, the virtual machine operating system and the data storage are separated, so that data cannot be lost due to the crash of the virtual machine operating system, and the safety of the data is guaranteed.
The following describes the data storage method based on virtual machine in detail with reference to fig. 2.
Fig. 2 is a flowchart of a virtual machine-based data storage method according to another embodiment of the present invention. As shown in fig. 2, the method comprises the steps of:
step S201, an operating system image file and a storage disk file are created.
Step S202, the image file of the operating system is formatted into a system installation file system, and the storage disk file is formatted into a data storage file system.
Step S203, installing the virtual machine operating system on the system installation file system.
Step S204, acquiring the virtual machine identification associated with the storage disk file.
For example, a virtual machine identification associated with storing a disk file may be obtained through a virtual machine storage management function.
Step S205, a loading channel between the virtual machine corresponding to the virtual machine identifier and the storage disk file is established.
For example, a loading channel between the virtual machine corresponding to the virtual machine identifier and the storage disk file may be established through a virtual disk technology.
Step S206, storing the data into a data storage file system through the virtual machine operating system and the corresponding loading channel.
Specifically, after the virtual machine is started, the data storage space can be checked in the disk management of the operating system by entering the system desktop, so that the data is stored.
It should be understood that after the data of the user is stored in the data storage file system, the data stored in the data storage file system may be edited by other virtual machines, or by a web browser.
Specifically, fig. 3 is a schematic diagram of accessing data in a data storage file system according to an embodiment of the present invention, and as shown in fig. 3, when a user replaces a virtual machine B, the use of data in an original storage disk can be implemented by the following method: firstly, closing a loading channel 1 between a virtual machine A and a storage disk file; then, establishing a loading channel 2 between the storage disk file and the virtual machine B through a virtual disk technology; and then, restarting the virtual machine B, and editing the data stored in the data storage file system through the operating system of the virtual machine B and the corresponding loading channel 2.
As shown in fig. 3, the user may also view and edit data stored in the data storage file system directly through the web browser without through the virtual machine.
Specifically, the load channel between the virtual machine and the storage disk file is first closed. Then, a link channel 3 of a web service is established through the web storage server, and the storage disk file is associated with the link channel 3. Then, the file in the data storage file system can be directly accessed through the web browser, so that the uploading and downloading of the file are realized, including the file uploading after the file is edited.
According to the data storage method based on the virtual machine, the virtual machine operating system and the data storage are separated, so that data cannot be lost due to the crash of the virtual machine operating system, and the safety of the data is guaranteed. In addition, the storage disk file is not bound with the operating system, so that the data can be edited across the operating systems, the data has portability, and the data can be operated through a web browser, so that the convenience of data management is improved.
The invention further provides a data storage system based on the virtual machine.
FIG. 4 is a schematic diagram of a virtual machine based data storage system, according to an embodiment of the present invention. As shown in FIG. 4, the system includes a data storage file system 100 and a system mount file system 200.
Wherein the data storage file system 100 is used to store data. System mount file system 200 is associated with data storage file system 100 and system mount file system 200 has a virtual machine operating system mounted thereon through which data is stored in data storage file system 100.
According to the data storage system based on the virtual machine, the two file systems are used for respectively storing the virtual machine operating system and the user data, and the data and the operating system are separated, so that the data cannot be lost due to the crash of the virtual machine operating system, and the safety of the data is ensured.
FIG. 5 is a schematic diagram of a virtual machine based data storage system according to another embodiment of the present invention. As shown in fig. 5, based on the embodiment shown in fig. 4, the virtual machine-based data storage system may further include: a creation module 300 and a formatting module 400. The creating module 300 is used for creating an operating system image file and a storage disk file. Formatting module 400 is configured to format operating system image files into system mount file system 200 and storage disk files into data storage file system 100.
Further, the virtual machine-based data storage system may further include: an acquisition module 500 and a channel establishment module 600. The obtaining module 500 is configured to obtain a virtual machine identifier associated with a storage disk file, for example, the virtual machine identifier may be obtained through a virtual machine storage association management function. The channel establishing module 600 is configured to establish a loading channel between a virtual machine corresponding to the virtual machine identifier and the storage disk file, and may be implemented by using a virtual disk technology, for example.
Still further, the virtual machine-based data storage system may further include: a web storage server 700 and a web browser 800. The web storage server 700 is configured to establish a link channel and associate the storage disk file with the link channel. The web browser 800 is used to access data stored in the data storage file system 100 through a link. Therefore, the stored data can be used as long as the internet can be accessed, and the convenience of data management is improved.
In one embodiment of the invention, the system may also include a plurality of virtual machines (not shown). Thus, data can be edited across operating systems, making the data portable.
The data storage method and system based on the virtual machine, provided by the embodiment of the invention, have the following beneficial effects at least:
1. by separating the virtual machine operating system from the data storage, the data cannot be lost due to the crash of the virtual machine operating system, and the safety of the data is ensured.
2. Because the storage disk file is not bound with the operating system, the data can be edited across the operating systems, so that the data has portability.
3. A user can directly access data in the data storage file system through the web browser, and the data can be used only in places where the user can surf the internet, so that convenience of data management is improved.
Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.

Claims (10)

1. A data storage method based on a virtual machine is characterized by comprising the following steps:
s1: creating an operating system mirror image file and a storage disk file;
s2: formatting the operating system image file into a system installation file system, and formatting the storage disk file into a data storage file system;
s3: installing a virtual machine operating system on the system installation file system, and associating the storage disk file with the virtual machine operating system to establish a loading channel of a virtual machine corresponding to the virtual machine operating system and the storage disk file; and
s4: and storing data into the data storage file system through the virtual machine operating system and the corresponding loading channel.
2. The virtual machine-based data storage method according to claim 1, wherein the step S3 further comprises:
installing a virtual machine operating system on the system installation file system;
acquiring a virtual machine identifier associated with the storage disk file;
and establishing a loading channel between the storage disk file and the virtual machine corresponding to the virtual machine identifier.
3. The virtual machine-based data storage method of claim 1, further comprising:
editing the data stored in the data storage file system through other virtual machines; or,
and editing the data stored in the data storage file system through a web browser.
4. The virtual machine-based data storage method of claim 3, wherein the editing the data stored in the data storage file system by the other virtual machine further comprises:
closing a loading channel between the current virtual machine and the storage disk file;
establishing a loading channel between the storage disk file and the other virtual machines;
and restarting the other virtual machines, and editing the data stored in the data storage file system through the operating systems and the corresponding loading channels of the other virtual machines.
5. The virtual machine-based data storage method of claim 3, wherein the editing the data stored in the data storage file system through a web browser further comprises:
closing a loading channel between the current virtual machine and the storage disk file;
establishing a link channel of the web browser, and associating the storage disk file with the link channel;
accessing files in the data storage file system through the web browser.
6. A virtual machine-based data storage system, comprising:
a data storage file system for storing data; and
and the system installation file system is associated with the data storage file system and is provided with a virtual machine operating system, and the data is stored into the data storage file system through the virtual machine operating system.
7. The virtual machine-based data storage system of claim 6, further comprising:
the creating module is used for creating an operating system mirror image file and a storage disk file; and
and the formatting module is used for formatting the operating system image file into the system installation file system and formatting the storage disk file into the data storage file system.
8. The virtual machine-based data storage system of claim 6, further comprising:
the acquisition module is used for acquiring the virtual machine identifier associated with the storage disk file; and
and the channel establishing module is used for establishing a loading channel between the storage disk file and the virtual machine corresponding to the virtual machine identifier.
9. The data storage system of claim 6, comprising a plurality of virtual machines.
10. The virtual machine-based data storage system of claim 6, further comprising:
the Web storage server is used for establishing a link channel and associating the storage disk file with the link channel; and
and the Web browser is used for accessing the data stored in the data storage file system through the link channel.
CN201110258703A 2011-09-02 2011-09-02 Virtual-machine-based data storage method and system Pending CN102323943A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110258703A CN102323943A (en) 2011-09-02 2011-09-02 Virtual-machine-based data storage method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110258703A CN102323943A (en) 2011-09-02 2011-09-02 Virtual-machine-based data storage method and system

Publications (1)

Publication Number Publication Date
CN102323943A true CN102323943A (en) 2012-01-18

Family

ID=45451686

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110258703A Pending CN102323943A (en) 2011-09-02 2011-09-02 Virtual-machine-based data storage method and system

Country Status (1)

Country Link
CN (1) CN102323943A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104331375A (en) * 2014-10-29 2015-02-04 中国建设银行股份有限公司 Shared virtualized resource management method and shared virtualized resource management device under shared virtualized resource pool environment
CN104504000A (en) * 2014-12-08 2015-04-08 华为技术有限公司 Remote transmission method, device and system for mirror image file
CN104570831A (en) * 2013-09-27 2015-04-29 费希尔-罗斯蒙特系统公司 Process control systems and methods
CN105607869A (en) * 2015-12-15 2016-05-25 国云科技股份有限公司 Method for quickly formatting and using virtual machine disk
CN106155758A (en) * 2015-03-24 2016-11-23 联想(北京)有限公司 A kind of server system and corresponding control methods thereof

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1916855A (en) * 2005-08-19 2007-02-21 联想(北京)有限公司 System of virtual machine, and method for configuring hardware
CN101278263A (en) * 2005-10-08 2008-10-01 国际商业机器公司 Direct-memory access between input/output device and physical memory within virtual machine environment
CN101443748A (en) * 2006-05-08 2009-05-27 微软公司 Converting machines to virtual machines

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1916855A (en) * 2005-08-19 2007-02-21 联想(北京)有限公司 System of virtual machine, and method for configuring hardware
CN101278263A (en) * 2005-10-08 2008-10-01 国际商业机器公司 Direct-memory access between input/output device and physical memory within virtual machine environment
CN101443748A (en) * 2006-05-08 2009-05-27 微软公司 Converting machines to virtual machines

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104570831A (en) * 2013-09-27 2015-04-29 费希尔-罗斯蒙特系统公司 Process control systems and methods
CN104331375A (en) * 2014-10-29 2015-02-04 中国建设银行股份有限公司 Shared virtualized resource management method and shared virtualized resource management device under shared virtualized resource pool environment
CN104504000A (en) * 2014-12-08 2015-04-08 华为技术有限公司 Remote transmission method, device and system for mirror image file
CN104504000B (en) * 2014-12-08 2018-05-18 华为技术有限公司 A kind of transmission method of Remote Switched Port Analyzer file, apparatus and system
CN106155758A (en) * 2015-03-24 2016-11-23 联想(北京)有限公司 A kind of server system and corresponding control methods thereof
CN105607869A (en) * 2015-12-15 2016-05-25 国云科技股份有限公司 Method for quickly formatting and using virtual machine disk
CN105607869B (en) * 2015-12-15 2019-02-01 国云科技股份有限公司 A kind of quick formatting and the method using magnetic disk of virtual machine

Similar Documents

Publication Publication Date Title
US10140118B2 (en) Application data synchronization method and apparatus
EP2891109B1 (en) A video file encryption and decryption method, device, and mobile terminal
US9965305B2 (en) Stateless virtual machine in cloud computing environment and application thereof
US20090254590A1 (en) Method of bi-directional synchronization of user data
CN111475483B (en) Database migration method and device and computing equipment
KR101672349B1 (en) File cloud service apparatus and method
AU2013210018B2 (en) Location independent files
US9104511B2 (en) Method and computation node for processing application data
CN103064717B (en) A kind of apparatus and method of parallel installation of software for cluster system
CN102323943A (en) Virtual-machine-based data storage method and system
CN104113576A (en) Method and device for updating client
CN104145468A (en) File access authority control method and device thereof
CN102917116A (en) Method for sharing mobile phone software and mobile phone
CN114077602B (en) Data migration method and device, electronic equipment and storage medium
CN103984621B (en) log separation method and system
CN108170514A (en) A kind of container operation method and device
CN109445988B (en) Heterogeneous disaster recovery method, device, system, server and disaster recovery platform
CN104517067A (en) Method, device and system for data access
CN107623705B (en) Storage mode upgrading method, device and system based on video cloud storage system
CN114168156A (en) Multi-tenant data persistence method and device, storage medium and computer equipment
CN109710454A (en) A kind of cloud host snapshot method and device
CN105975528B (en) Synchronization method, device and system for background configuration file
CN110018986B (en) Abnormal snapshot identification method and device
CN112905700B (en) Data synchronization method, device and equipment
CN116028463A (en) Method for constructing large data platform with separated storage and calculation

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20120118