CN109347896A - A kind of information processing method, equipment and computer readable storage medium - Google Patents
A kind of information processing method, equipment and computer readable storage medium Download PDFInfo
- Publication number
- CN109347896A CN109347896A CN201810923075.5A CN201810923075A CN109347896A CN 109347896 A CN109347896 A CN 109347896A CN 201810923075 A CN201810923075 A CN 201810923075A CN 109347896 A CN109347896 A CN 109347896A
- Authority
- CN
- China
- Prior art keywords
- server
- mark
- target
- mapping relations
- file
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1097—Protocols 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)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the invention discloses a kind of information processing method, the method is applied in first server, which comprises creates object space in the storage pool of the first server;Based on the object space creation block device;Wherein, three block devices are included at least in each object space;The first mapping relations between the virtual machine in each block device and second server are established, and are stored in the first server;Based on the object space, the block device and first mapping relations, data communication is carried out with the second server.The embodiment of the present invention also discloses a kind of information processing equipment and computer readable storage medium simultaneously.
Description
Technical field
The present embodiments relate to the information processing technology in the communications field more particularly to a kind of information processing method, set
Standby and computer readable storage medium.
Background technique
With the extensive use of software definition storage (Software Defined Storage, SDS), virtualization is as public
Department's daily use also gradually increases;So, distributed memory system is built in virtual platform to be tested, be tested, ground
Studying carefully is current Major Epidemic mode.Currently, the distributed memory system of common copy mechanism has CEPH, distributed field system
Unite (Hadoop Distributed File System, HDFS) and SheepDog etc.;In this way, enterprise takes on virtual platform
Three copy distributed storage systems built same data for bottom SDS just need to store nine parts.In this way, virtual level
Data just need to store more parts within the physical layer, greatly reduce the efficiency of bottom storage, and cause the wave of memory space
Take.
Summary of the invention
In order to solve the above technical problems, an embodiment of the present invention is intended to provide a kind of information processing method, equipment and computers
Readable storage medium storing program for executing solves the problems, such as that bottom storage efficiency is lower in the distributed memory system of the relevant technologies, improves bottom
The storage efficiency of layer, ensure that effective use of memory space, has avoided the waste of memory space.
The technical scheme of the present invention is realized as follows:
A kind of information processing method, the method are applied in first server, which comprises
Object space is created in the storage pool of the first server;
Based on the object space creation block device;Wherein, three block devices are included at least in each object space;
The first mapping relations between the virtual machine in each block device and second server are established, and are stored in institute
It states in first server;
Based on the object space, the block device and first mapping relations, counted with the second server
According to communication.
Optionally, the method also includes:
The second mapping relations between the object space and the storage pool are set;
Third mapping relations between each block device and the object space are set;
Second mapping relations and the third mapping relations are stored in the first server;Wherein, described
First mapping relations and the third mapping relations are for the second server and first server progress data communication.
Optionally, described to be based on the object space, the block device and first mapping relations, with second clothes
Business device carries out data communication, comprising:
Receive the acquisition request for being used to obtain file that the target virtual machine of the second server is sent;Wherein, described
The mark of file identification and the target virtual machine is carried in acquisition request;
Mark and first mapping relations based on the target virtual machine, from the object of the first server
Target block device is determined in space;
File destination corresponding with the file identification is obtained from the target block device, and is sent to second clothes
Business device.
A kind of information processing method, the method are applied in second server, which comprises
The processing for handling the file to be processed is received to request;Wherein, files-designated is carried in the processing request
Know;
The processing request is responded, the mark of the target virtual machine of the second server is obtained;
The first mapping relations are read from the first server;Wherein, first mapping relations are second clothes
The relationship being engaged between the virtual machine of device and the block device of the first server;
Mark and first mapping relations based on the target virtual machine, read target from the first server
The mark of block device;
Mark based on the file identification and the target block device, passes through the default communication interface and described first
Server carries out file process.
Optionally, the method also includes:
It is default communication interface that the interface communicated in the second server with first server, which is arranged,;Wherein, described pre-
If communication interface includes: the first sub- communication interface, the second sub- communication interface and the sub- communication interface of third.
Correspondingly, the mark based on the file identification and the target block device, is connect by the default communication
Mouth carries out file process with the first server, comprising:
The second mapping relations and third mapping relations are read from the first server;Wherein, second mapping is closed
It is the relationship between the object space and the storage pool, the third mapping relations are block device and the object space
Between relationship;
Mark and third mapping relations based on the target block device, read target object from the first server
The mark in space;
Mark and second mapping relations based on the target object space, read mesh from the first server
Mark the mark of storage pool;
Based on the file identification, the mark of the target block device, the mark in the target object space and the mesh
The mark for marking storage pool carries out file process with the first server.
Optionally, the processing request includes that written document is requested, described to be based on the file identification, the target block device
Mark, the mark in the target object space and the mark of the target storage pool, with the first server carry out file
Processing, comprising:
Monitoring node listing, cluster identity and connection socket are read from the first server;
If not stored file destination corresponding with the file identification, is asked based on the written document in the second server
Seek file destination described in the data creation of carrying;
The mark of mark, the target object space based on the target block device, the mark of the target storage pool,
The monitoring node listing, the cluster identity and the connection socket create access address;
Based on the access address, call the first sub- communication interface in the default communication interface by the file destination
It is written in second server;
Correspondingly, the method also includes:
Establish the incidence relation between the access address and the file identification and storage.
Optionally, the processing request includes reading file request, described to be based on the file identification, the target block device
Mark, the mark in the target object space and the mark of the target storage pool, with the first server carry out file
Processing, comprising:
The mark of mark, the target object space based on the target block device, the mark of the target storage pool,
The monitoring node listing, the cluster identity and the connection socket create access address;
Based on the access address, sent by the second sub- communication interface in the default communication interface for obtaining text
The acquisition request of part is to the first server;Wherein, the file identification and the target are carried in the acquisition request
The mark of virtual machine;
Receive the file destination that the first server is sent;Wherein, the file destination is the first service
Device is obtained based on the file identification;
Correspondingly, the processing request includes deleting file request, it is described to be set based on the file identification, the object block
Standby mark, the mark in the target object space and the mark of the target storage pool carries out text with the first server
Part processing, comprising:
The mark of mark, the target object space based on the target block device, the mark of the target storage pool,
The monitoring node listing, the cluster identity and the connection socket create access address;
Based on the access address, the sub- communication interface of third in the default communication interface is called, deletes described first
File destination corresponding with the file identification in server.
A kind of first server, the first server include: that first processor, first memory and the first communication are total
Line;
First communication bus is for realizing the communication connection between first processor and first memory;
The first processor is for executing the message handling program stored in first memory, to perform the steps of
Object space is created in the storage pool of the first server;
Based on the object space creation block device;Wherein, three block devices are included at least in each object space;
The first mapping relations between the virtual machine in each block device and second server are established, and are stored in institute
It states in first server;
Based on object space, the block device and first mapping relations, it is logical that data are carried out with the second server
Letter.
A kind of second server, the second server include: that second processor, second memory and the second communication are total
Line;
Second communication bus is for realizing the communication connection between second processor and second memory;
The second processor is for executing the message handling program stored in second memory, to perform the steps of
The processing for handling the file to be processed is received to request;Wherein, files-designated is carried in the processing request
Know;
The processing request is responded, the mark of the target virtual machine of the second server is obtained;
The first mapping relations are read from the first server;Wherein, first mapping relations are second clothes
The relationship being engaged between the virtual machine of device and the block device of the first server;
Mark and first mapping relations based on the target virtual machine, read target from the first server
The mark of block device;
Mark based on the file identification and the target block device, passes through the default communication interface and described first
Server carries out file process.
A kind of computer readable storage medium, the computer-readable recording medium storage have one or more program,
One or more of programs can be executed by one or more processor, to realize information processing method described above
Step.
Information processing method, equipment provided by the embodiment of the present invention and computer readable storage medium, in the first clothes
It is engaged in creating object space in the storage pool of device, and is based on object space creation block device, three are included at least in each object space
A block device, the first mapping relations between the virtual machine established in each block device and second server later are simultaneously stored in
In one server, it is based ultimately upon object space, block device and the first mapping relations and second server carries out data communication, such as
This, can store three parts of data to be stored in virtual level, then object in an object space in the storage pool of physical layer
It only needs three object spaces that can meet the storage demand of three copies of distributed memory system in reason layer, does not need such as phase
To nine parts of data are stored in technology, solve the problems, such as that bottom storage efficiency is lower in the related technology, improves the storage of bottom
Efficiency ensure that effective use of memory space, avoid the waste of memory space.
Detailed description of the invention
Fig. 1 is a kind of flow diagram for information processing method that the embodiment of the present invention provides;
Fig. 2 is the flow diagram for another information processing method that the embodiment of the present invention provides;
Fig. 3 is the flow diagram for another information processing method that the embodiment of the present invention provides;
Fig. 4 is a kind of flow diagram for information processing method that another embodiment of the present invention provides;
Fig. 5 is the flow diagram for another information processing method that another embodiment of the present invention provides;
Fig. 6 is the flow diagram for another information processing method that another embodiment of the present invention provides;
Fig. 7 is a kind of flow diagram for information processing method that another embodiment of the present invention provides;
Fig. 8 is a kind of structural schematic diagram for first server that the embodiment of the present invention provides;
Fig. 9 is a kind of structural schematic diagram for second server that the embodiment of the present invention provides.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description.
The embodiment of the present invention provides a kind of information processing method, shown referring to Fig.1, method includes the following steps:
Step 101 creates object space in the storage pool of first server.
Wherein, step 101 creates object space in the storage pool of first server and can be realized by first server;
First server can be the physical layer with distributed memory system, and certainly, first server to a certain extent can also be with
It is bottom physical environment.Distributed memory system in the embodiment of the present invention can be the distribution with three copy storage demands
Storage system, in a kind of feasible implementation, distributed memory system may include CEPH, distributed file system
The systems such as (Hadoop Distributed File System, HDFS) and Sheepdog.Object space is a kind of Virtual Space
The quantity of concept, the object space created in the storage pool of physical layer includes at least three, and specific quantity can be according to reality
The demands of the application scenarios on border determines.
Step 102 is based on object space creation block device.
Wherein, three block devices are included at least in each object space.
In other embodiments of the invention, step 102 can be by first server based on object space creation block device
To realize;Block device can be created in the object space in physical layer based on object space creation block device, each object is empty
Between the quantity of block device of middle creation be at least three, specific quantity can be according to the demand of actual application scenarios come really
It is fixed.Wherein, block device is a kind of notional virtual unit to a certain extent, is not the equipment of an entity.
Step 103 is established the first mapping relations between the virtual machine in each block device and second server, and is stored
In first server.
In other embodiments of the invention, step 103 establish the virtual machine in each block device and second server it
Between the first mapping relations and be stored in first server and can be realized by first server;First mapping relations refer to
Incidence relation between each of each of physical layer block device and virtual level virtual machine;Establish the first mapping relations
Afterwards, what which can be stored in physical layer can be in memory space that virtual level is checked.
Step 104 is based on object space, block device and the first mapping relations, carries out data communication with second server.
In other embodiments of the invention, step 104 is based on object space, block device and the first mapping relations, with the
Two servers carry out data communication can be realized by first server;The communication that data are carried out between virtual level and physical layer can
Being realized by means of the first mapping relations of creation, by the block device in access object space.
It is empty to create object in the storage pool of first server for information processing method provided by the embodiment of the present invention
Between, and it is based on object space creation block device, three block devices are included at least in each object space, are established each piece later and are set
The first mapping relations between the standby virtual machine with second server are simultaneously stored in first server, are based ultimately upon object sky
Between, block device and the first mapping relations and second server carry out data communication, in this way, one in the storage pool of physical layer is right
Three parts of data to be stored in virtual level can be stored in image space, then only needing three object spaces can in physical layer
To meet the storage demand of three copies of distributed memory system, do not need to solve as stored nine parts of data in relative skill
The lower problem of bottom storage efficiency in the related technology improves the storage efficiency of bottom, ensure that effectively making for memory space
With avoiding the waste of memory space.
Based on previous embodiment, the embodiment of the present invention provides a kind of information processing method, referring to shown in Fig. 2, this method
The following steps are included:
Step 201, the processing received for handling file to be processed are requested.
Wherein, file identification is carried in processing request.
In other embodiments of the invention, step 201 receive that the processing for handling file to be processed requests can be by
Second server is realized;Second server can be a kind of virtual platform, be also possible to virtual level.Processing request can be
User needs to be sent to virtual level when carrying out data processing by virtual level.In a kind of feasible implementation, processing is asked
The local file system that can be in virtual level is asked to receive.
Step 202, response processing request, obtain the mark of the target virtual machine of second server.
In other embodiments of the invention, the target virtual machine of step 202 response processing request second server
Mark can be realized by second server;Target virtual machine is that the needs and physical layer in virtual level interact at progress data
The virtual machine of reason.
Step 203 reads the first mapping relations from first server.
Wherein, the first mapping relations are the relationship between the virtual machine of second server and the block device of first server.
In other embodiments of the invention, step 203 the first mapping relations are read from first server can be by
Two servers are realized;Virtual machine in virtual level may be implemented to read in the particular disk in physical layer by virtualization technology
Information.
Step 204, the mark based on target virtual machine and the first mapping relations read object block from first server and set
Standby mark.
In other embodiments of the invention, mark and first mapping relations of the step 204 based on target virtual machine, from
The mark that target block device is read in one server can be realized by second server;Target block device can be physical layer
Block device corresponding with the target virtual machine in virtual level and that data interaction can be carried out with it in object space;Wherein,
Because what is stored in the first mapping relations is the corresponding relationship between virtual machine and block device, it can directly pass through target virtual machine
Mark from the first mapping relations search virtual level in the corresponding physical layer of target virtual machine in target block device.
Step 205, the mark based on file identification and target block device, by default communication interface and first server into
Row file process.
In other embodiments of the invention, mark of the step 205 based on file identification and target block device, by default
Communication interface carries out file process with first server can be realized by second server.Default communication interface is right in advance
The standard interface of the local file system of virtual level is converted to realize, can be the local file system of virtual level
Standard interface is converted to a kind of interface for the object interface that can support physical layer.
It should be noted that in the present embodiment with the explanation of same steps in other embodiments and identical content, Ke Yican
According to the description in other embodiments, details are not described herein again.
Information processing method provided by the embodiment of the present invention is received for handling file to be processed and carrying file
The processing of mark is requested, and the mark of the target virtual machine of response processing request second server is read from first server
The first mapping relations between the virtual machine of second server and the block device of first server are taken, and based on target virtual machine
Mark and the first mapping relations read the mark of target block device from first server, are based on file identification and object block later
The mark of equipment carries out file process by default communication interface and first server, in this way, one in the storage pool of physical layer
It can store three parts of data to be stored in virtual level in three block devices for including in a object space, then in physical layer only
It needs three object spaces that can meet the storage demand of three copies of distributed memory system, does not need as in relative skill
Nine parts of data are stored, solves the problems, such as that bottom storage efficiency is lower in the related technology, improves the storage efficiency of bottom, are guaranteed
Effective use of memory space, avoids the waste of memory space.
Based on previous embodiment, the embodiment of the present invention provides a kind of information processing method, referring to shown in Fig. 3, this method
The following steps are included:
Step 301, first server create object space in the storage pool of first server.
Step 302, first server are based on object space creation block device.
Wherein, three block devices are included at least in each object space.
In other embodiments of the invention, after the completion of the block device creation in physical layer, physical layer is needed to creation
Block device is grouped, and each package equipment after grouping corresponds to a set of distributed memory system;Every suit distributed storage system
It unites and corresponds at least nine block device.
Step 303, first server establish the first mapping between the virtual machine in each block device and second server
Relationship, and be stored in first server.
Wherein, within the physical layer after object space and block device creation is completed, carry out data transmission with virtual level
Before, physical layer needs the first object space to storage pool and creation and block device mark, and realization sets object space and block
Standby management;Storage pool, object space and block device mark can be and connect by increasing object space creation within the physical layer
Mouthful (i.e. create_object_space (int64_t poolid, int64_t clusterid) is come what is realized:
In a kind of feasible implementation, the structural body of object space can store the head number in the block device of virtualization
According in structure.
The first mapping relations between virtual machine in each of object space of physical layer block device and virtual level,
It can be and equipment association (int bond_device (int64_t poolid, int64_t object_ is carried out by binding interface
Space_id, int64_t rbdid, list<monitoriplist>) come what is realized, such as may include:
The second mapping relations between step 304, first server setting object space and storage pool.
The third mapping relations between each block device and object space are arranged in step 305, first server.
Wherein, the second mapping relations and third mapping relations can be by increasing map record and realize;In one kind
In feasible implementation, the first mapping relations and the second mapping relations can be and are associated with by newly-increased block device with object space
Interface: tier_device_object_space (int64_t rbdid, int64_t poolid, int64_t
Objectspaceid it) realizes.
Second mapping relations and third mapping relations are stored in first server by step 306, first server.
Wherein, the first mapping relations, the second mapping relations and third mapping relations can be stored in corresponding block device
Header file in, such as can store in the object_space_info of block device.
The interface communicated in step 307, second server setting second server with first server is that default communication connects
Mouthful.
Wherein, default communication interface includes: the first sub- communication interface, the second sub- communication interface and the sub- communication interface of third.
In other embodiments of the invention, the local file system that default communication interface can be by adjusting virtual level
Portable Operating System interface (posix) come what is realized;The posix of adjustment local file system can be by that will write
(write), it reads (read) or deletion (unlink) interface is realized to physical layer object interface.In a kind of feasible reality
In existing mode, the first sub- communication interface also refers to the interface for write, and the second sub- communication interface also refers to be used for
The interface of read, the sub- communication interface of third also refer to the interface for unlink.
Step 308, second server receive the processing for handling file to be processed and request.
Wherein, file identification is carried in processing request.
Step 309, second server response processing request, obtain the mark of the target virtual machine of second server.
Step 310, second server read the first mapping relations from first server.
Step 311, second server mark and the first mapping relations based on target virtual machine, read from first server
Take the mark of target block device.
Step 312, second server read the second mapping relations and third mapping relations from first server.
Step 313, second server mark and third mapping relations based on target block device, read from first server
Take the mark in target object space.
Step 314, second server mark and the second mapping relations based on target object space, from first server
Read the mark of target storage pool.
Wherein, the mark of the first mapping relations, the second mapping relations, third mapping relations, the mark of virtual machine and block device
The head that can be stored in block device is known, at this point, virtual level can be by reading in the head of the block device of physical layer
Information obtains the first mapping relations, the second mapping relations, third mapping relations, the mark of target virtual machine, target block device
Mark and target storage pool mark.
Step 315, second server based on file identification, the mark of target block device, the mark in target object space and
The mark of target storage pool carries out file process with first server.
Wherein, the file process between physical layer and virtual level may include that virtual level reads file, virtual from physical layer
Some file etc. stored in physical layer or virtual level deletion of physically layer is written in file by layer.
It should be noted that in the present embodiment with the explanation of same steps in other embodiments and identical content, Ke Yican
According to the description in other embodiments, details are not described herein again.
Information processing method provided by the embodiment of the present invention, creation has in the storage pool of first server sets including block
Standby object space, three block devices are included at least in each object space, and first server establishes each block device and second
First mapping relations of the virtual machine in server simultaneously store, and second server obtains the mark of the target virtual machine of second server
Know, read the first mapping relations from first server, and the mark based on target virtual machine and the first mapping relations are from first
The mark that target block device is read in server, the mark later based on file identification and target block device are connect by default communication
Mouth carries out file process with first server, in this way, three blocks for including in an object space in the storage pool of physical layer
It can store three parts of data to be stored in virtual level in equipment, then only needing three object spaces that can expire in physical layer
The storage demand of three copies of sufficient distributed memory system is not needed as stored nine parts of data in relative skill;Also, virtual level
The storage of file can be carried out by the mapping relations of the block device of the virtual machine and virtual level of physical layer and physical layer, read and
The processing such as deletion, solves the problems, such as that bottom storage efficiency is lower in the related technology, improves the storage efficiency of bottom, ensure that
Effective use of memory space, avoids the waste of memory space.
Based on previous embodiment, the embodiment of the present invention provides a kind of information processing method, referring to shown in Fig. 4, this method
The following steps are included:
Step 401, first server create object space in the storage pool of first server.
Step 402, first server are based on object space creation block device.
Wherein, three block devices are included at least in each object space.
Step 403, first server establish the first mapping between the virtual machine in each block device and second server
Relationship, and be stored in first server.
The second mapping relations between step 404, first server setting object space and storage pool.
The third mapping relations between each block device and object space are arranged in step 405, first server.
Second mapping relations and third mapping relations are stored in first server by step 406, first server.
Wherein, the first mapping relations and third mapping relations are logical for second server and first server progress data
Letter.
The interface communicated in step 407, second server setting second server with first server is that default communication connects
Mouthful.
Wherein, default communication interface includes: the first sub- communication interface, the second sub- communication interface and the sub- communication interface of third.
Step 408, second server receive the processing for handling file to be processed and request.
Wherein, file identification is carried in processing request.
Step 409, second server response processing request, obtain the mark of the target virtual machine of second server.
Step 410, second server read the first mapping relations from first server.
Step 411, second server mark and the first mapping relations based on target virtual machine, read from first server
Take the mark of target block device.
Step 412, second server read the second mapping relations and third mapping relations from first server.
Step 413, second server mark and third mapping relations based on target block device, read from first server
Take the mark in target object space.
Step 414, second server mark and the second mapping relations based on target object space, from first server
Read the mark of target storage pool.
Step 415, second server read monitoring node listing, cluster identity and connection socket from first server
Word.
Wherein, monitoring node listing, cluster identity and connection socket can be virtual level at corresponding piece of physical layer
Reading obtains in the head file of equipment.
If not stored file destination corresponding with file identification in step 416, second server, second server is based on writing
The data creation file destination carried in file request.
In other embodiments of the invention, when virtual level receives write-in file request, virtual level is firstly the need of judgement
Whether the file that in write-in file request needs be written is stored in virtual level;If storing the text of write-in in need in virtual level
Part, that is to say, that file destination corresponding with file identification is stored in second server, virtual level directly executes step at this time
417~418, it finally will be in the corresponding block device of file destination write-in physical layer;If not stored in virtual level in need write
The file entered, virtual level needs first to create this file at this time, is then executing the write-in of step 417~418 progress files.
Step 417, second server mark, mark, the target storage pool in target object space based on target block device
Mark, monitoring node listing, cluster identity and connection socket, create access address.
In a kind of feasible implementation, the access address of creation can be as follows: monitorip:port/
clusterid/poolid/objectspaceid/rbdid/objecti;Wherein, access address can be positioned with unified resource
(Uniform Resource Locator, URL) is accorded with to indicate.
Step 418, second server are based on access address, and calling presets the first sub- communication interface in communication interface for mesh
It marks in file write-in second server.
Wherein, it can be in certain implementation through put interface and to realize for the interface of write-in.
It should be noted that operation corresponding to step 415~418 is to include to write text in the big processing request packet of virtual level reception
The operation that part executes when requesting.
In a kind of feasible implementation, the first sub- communication interface (interface for write) be can be by as follows
Mode defines:
In other embodiments of the invention, referring to Figure 5, information processing method can with the following steps are included:
Step 419, second server establish the incidence relation between access address and file identification and storage.
Wherein, the access address of creation and file identification are stored in the local file system of virtual level in the form of associated
In, it is used when can carry out the write-in of same file for next time;That is, next time identical virtual machine be written again it is identical
When file, the access address of storage can be called directly and carry out the write-in of file based on the access address.
In other embodiments of the invention, processing request includes reading file request, referring to shown in Fig. 6, after step 414
Step 420~425 can be executed:
Step 420, second server mark, mark, the target storage pool in target object space based on target block device
Mark, monitoring node listing, cluster identity and connection socket, create access address.
In a kind of feasible implementation, the access address of creation can be as follows: monitorip:port/
clusterid/poolid/objectspaceid/rbdid/objectid;Wherein, access address can be positioned with unified resource
(Uniform Resource Locator, URL) is accorded with to indicate.
Step 421, second server are based on access address, are sent by the second sub- communication interface preset in communication interface
For obtaining the acquisition request of file to first server.
Wherein, the mark of file identification and target virtual machine is carried in acquisition request.
In a kind of feasible implementation, the interface for reading be can be in certain implementation through get interface
Come what is realized;In other words, physical layer can call get interface to obtain text to physical layer block equipment application by the URL of construction
Part.
Step 422, first server receive the acquisition for being used to obtain file that the target virtual machine of second server is sent
Request.
Step 423, first server mark and the first mapping relations based on target virtual machine, from pair of first server
Target block device is determined in image space.
Step 424, first server obtain file destination corresponding with file identification from target block device, and are sent to
Second server.
Step 425, second server receive the file destination that first server is sent.
In a kind of feasible implementation, the second sub- communication interface (interface for read) be can be through such as lower section
Formula defines:
In other embodiments of the invention, processing request includes deleting file request, referring to shown in Fig. 7, step 414 it
Step 426~427 are executed afterwards:
Step 426, second server mark, mark, the target storage pool in target object space based on target block device
Mark, monitoring node listing, cluster identity and connection socket, create access address.
In a kind of feasible implementation, the access address of creation can be as follows: monitorip:port/
clusterid/poolid/objectspaceid/rbdid/objectid;Wherein, access address can be positioned with unified resource
(Uniform Resource Locator, URL) is accorded with to indicate.
Step 427, second server are based on access address, call the sub- communication interface of third in default communication interface, delete
Except the file destination corresponding with file identification in first server.
In a kind of feasible implementation, the interface for reading can be in certain implementation to be connect by delete
It mouthful realizes;In other words, physical layer can call delete interface to delete to the initiation of physical layer block equipment by the URL of construction
Except the operation of file.
It should be noted that in the present embodiment with the explanation of same steps in other embodiments and identical content, Ke Yican
According to the description in other embodiments, details are not described herein again.
Information processing method provided by the embodiment of the present invention, creation has in the storage pool of first server sets including block
Standby object space, three block devices are included at least in each object space, and first server establishes each block device and second
First mapping relations of the virtual machine in server simultaneously store, and second server obtains the mark of the target virtual machine of second server
Know, read the first mapping relations from first server, and the mark based on target virtual machine and the first mapping relations are from first
The mark that target block device is read in server, the mark later based on file identification and target block device are connect by default communication
Mouth carries out file process with first server, in this way, three blocks for including in an object space in the storage pool of physical layer
It can store three parts of data to be stored in virtual level in equipment, then only needing three object spaces that can expire in physical layer
The storage demand of three copies of sufficient distributed memory system is not needed as stored nine parts of data in relative skill;Also, virtual level
The storage of file can be carried out by the mapping relations of the block device of the virtual machine and virtual level of physical layer and physical layer, read and
The processing such as deletion, solves the problems, such as that bottom storage efficiency is lower in the related technology, improves the storage efficiency of bottom, ensure that
Effective use of memory space, avoids the waste of memory space.
Based on previous embodiment, the embodiment of the present invention provides a kind of first server, and first server can be applied to
In the information processing method that Fig. 1,3~7 corresponding embodiments provide, referring to shown in Fig. 8, which includes: at first
Manage device 51, first memory 52 and the first communication bus 53;
First communication bus 53 is for realizing the communication connection between first processor 51 and first memory 52;
First processor 53 is for executing the message handling program stored in first memory 52, to perform the steps of
Object space is created in the storage pool of first server;
Based on object space creation block device;
Wherein, three block devices are included at least in each object space;
The first mapping relations between the virtual machine in each block device and second server are established, and are stored in the first clothes
It is engaged in device;
Based on object space, block device and the first mapping relations, data communication is carried out with second server.
In other embodiments of the invention, first processor 53 is for executing at the information stored in first memory 52
Program is managed, to perform the steps of
The second mapping relations between object space and storage pool are set;
Third mapping relations between each block device and object space are set;
Second mapping relations and third mapping relations are stored in first server;
Wherein, the first mapping relations and third mapping relations are logical for second server and first server progress data
Letter.
In other embodiments of the invention, first processor 53 be used for execute stored in first memory 52 based on right
Image space, block device and the first mapping relations carry out data communication with second server, to perform the steps of
Receive the acquisition request for being used to obtain file that the target virtual machine of second server is sent;
Wherein, the mark of file identification and target virtual machine is carried in acquisition request;
Mark and the first mapping relations based on target virtual machine determine object block from the object space of first server
Equipment;
File destination corresponding with file identification is obtained from target block device, and is sent to second server.
First server provided by the embodiment of the present invention, creating in the storage pool of first server has including block device
Object space, three block devices are included at least in each object space, are established in each block device and second server later
Virtual machine between the first mapping relations and be stored in first server, be based ultimately upon object space, block device and first
Mapping relations and second server carry out data communication, in this way, in an object space in the storage pool of physical layer
Three parts of data to be stored in virtual level are stored, are deposited then only needing three object spaces that can meet distribution in physical layer
The storage demand of three copies of storage system does not need solve bottom in the related technology as stored nine parts of data in relative skill
The lower problem of storage efficiency, improves the storage efficiency of bottom, ensure that effective use of memory space, and it is empty to avoid storage
Between waste.
Based on previous embodiment, the embodiment of the present invention provides a kind of second server, and second server can be applied to
In the information processing method that the corresponding embodiment in Fig. 2~7 provides, referring to shown in Fig. 9, which includes: second processing
Device 61, second memory 62 and the second communication bus 63;
Second communication bus 63 is for realizing the communication connection between second processor 61 and second memory 62;
Second processor 63 is for executing the message handling program stored in second memory 62, to perform the steps of
The processing for handling file to be processed is received to request;
Wherein, file identification is carried in processing request;
Response processing request, obtains the mark of the target virtual machine of second server;
The first mapping relations are read from first server;
Wherein, the first mapping relations are the relationship between the virtual machine of second server and the block device of first server;
Mark and the first mapping relations based on target virtual machine read the mark of target block device from first server
Know;
Mark based on file identification and target block device is carried out at file by default communication interface and first server
Reason.
In other embodiments of the invention, second processor 63 is for executing at the information stored in second memory 62
Program is managed, to perform the steps of
It is default communication interface that the interface communicated in second server with first server, which is arranged,;
Wherein, default communication interface includes: the first sub- communication interface, the second sub- communication interface and the sub- communication interface of third.
In other embodiments of the invention, second processor 63 be used for execute stored in second memory 62 based on text
The mark of part mark and target block device carries out file process by default communication interface and first server, following to realize
Step:
The second mapping relations and third mapping relations are read from first server;
Wherein, relationship of second mapping relations between object space and storage pool, third mapping relations be block device with
Relationship between object space;
Mark and third mapping relations based on target block device read the mark in target object space from first server
Know;
Mark and the second mapping relations based on target object space read the mark of target storage pool from first server
Know;
Based on file identification, the mark of target block device, the mark of the mark in target object space and target storage pool, with
First server carries out file process.
In other embodiments of the invention, processing request includes that written document is requested, and second processor 63 is for executing the
What is stored in two memories 62 is stored based on file identification, the mark of target block device, the mark in target object space and target
The mark in pond carries out file process with first server, to perform the steps of
Monitoring node listing, cluster identity and connection socket are read from first server;
If not stored file destination corresponding with file identification in second server, based on the number carried in written document request
According to creation file destination;
The mark of mark, target object space based on target block device, the mark of target storage pool, monitoring node column
Table, cluster identity and connection socket, create access address;
Based on access address, call the first sub- communication interface in default communication interface that second service is written in file destination
In device.
In other embodiments of the invention, processing request includes that written document is requested, and second processor 63 is for executing the
The message handling program stored in two memories 62, to perform the steps of
Establish the incidence relation between access address and file identification and storage.
In other embodiments of the invention, processing request includes reading file request, and second processor 63 is for executing the
What is stored in two memories 62 is stored based on file identification, the mark of target block device, the mark in target object space and target
The mark in pond carries out file process with first server, to perform the steps of
The mark of mark, target object space based on target block device, the mark of target storage pool, monitoring node column
Table, cluster identity and connection socket, create access address;
Based on access address, the acquisition for obtaining file is sent by presetting the second sub- communication interface in communication interface
It requests to first server;
Wherein, the mark of file identification and target virtual machine is carried in acquisition request;
Receive the file destination that first server is sent;
Wherein, file destination is that first server is obtained based on file identification.
In other embodiments of the invention, processing request includes deleting file request, and second processor 63 is for executing
What is stored in second memory 62 is deposited based on file identification, the mark of target block device, the mark in target object space and target
The mark of reservoir carries out file process with first server, to perform the steps of
The mark of mark, target object space based on target block device, the mark of target storage pool, monitoring node column
Table, cluster identity and connection socket, create access address;
Based on access address, call the sub- communication interface of third in default communication interface, delete in first server with
The corresponding file destination of file identification.
Second server provided by the embodiment of the present invention is received for handling file to be processed and carrying files-designated
The processing of knowledge is requested, and the mark of the target virtual machine of response processing request second server is read from first server
The first mapping relations between the virtual machine of second server and the block device of first server, and the mark based on target virtual machine
Know the mark for reading target block device from first server with the first mapping relations, is set later based on file identification and object block
Standby mark carries out file process by default communication interface and first server, in this way, one in the storage pool of physical layer
It can store three parts of data to be stored in virtual level in three block devices for including in object space, then only needing in physical layer
It wants three object spaces that can meet the storage demand of three copies of distributed memory system, does not need as deposited in relative skill
Nine parts of data are stored up, solve the problems, such as that bottom storage efficiency is lower in the related technology, improves the storage efficiency of bottom, ensure that
Effective use of memory space, avoids the waste of memory space.
Based on previous embodiment, the embodiment of the present invention provides a kind of computer readable storage medium, this is computer-readable
Storage medium is stored with one or more program, which can be executed by one or more processor,
To realize the letter of the corresponding embodiment offer of the information processing method provided such as Fig. 1,3~7 corresponding embodiments or Fig. 4~7
The step of ceasing processing method.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, system or computer program
Product.Therefore, the shape of hardware embodiment, software implementation or embodiment combining software and hardware aspects can be used in the present invention
Formula.Moreover, the present invention, which can be used, can use storage in the computer that one or more wherein includes computer usable program code
The form for the computer program product implemented on medium (including but not limited to magnetic disk storage and optical memory etc.).
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product
Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions
The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs
Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real
The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
The foregoing is only a preferred embodiment of the present invention, is not intended to limit the scope of the present invention.
Claims (10)
1. a kind of information processing method, the method is applied in first server, which comprises
Object space is created in the storage pool of the first server;
Based on the object space creation block device;Wherein, three block devices are included at least in each object space;
The first mapping relations between the virtual machine in each block device and second server are established, and are stored in described
In one server;
Based on the object space, the block device and first mapping relations, it is logical that data are carried out with the second server
Letter.
2. the method according to claim 1, wherein the method also includes:
The second mapping relations between the object space and the storage pool are set;
Third mapping relations between each block device and the object space are set;
Second mapping relations and the third mapping relations are stored in the first server;Wherein, described first
Mapping relations and the third mapping relations are for the second server and first server progress data communication.
3. the method according to claim 1, wherein described be based on the object space, the block device and institute
The first mapping relations are stated, carry out data communication with the second server, comprising:
Receive the acquisition request for being used to obtain file that the target virtual machine of the second server is sent;Wherein, the acquisition
The mark of file identification and the target virtual machine is carried in request;
Mark and first mapping relations based on the target virtual machine, from the object space of the first server
Middle determining target block device;
File destination corresponding with the file identification is obtained from the target block device, and is sent to the second service
Device.
4. a kind of information processing method, the method is applied in second server, which comprises
The processing for handling the file to be processed is received to request;Wherein, file identification is carried in the processing request;
The processing request is responded, the mark of the target virtual machine of the second server is obtained;
The first mapping relations are read from the first server;Wherein, first mapping relations are the second server
Virtual machine and the first server block device between relationship;
Mark and first mapping relations based on the target virtual machine read object block from the first server and set
Standby mark;
Mark based on the file identification and the target block device, passes through the default communication interface and the first service
Device carries out file process.
5. according to the method described in claim 4, it is characterized in that, the method also includes:
It is default communication interface that the interface communicated in the second server with first server, which is arranged,;Wherein, described default logical
Believe that interface includes: the first sub- communication interface, the second sub- communication interface and the sub- communication interface of third.
Correspondingly, the mark based on the file identification and the target block device, by the default communication interface with
The first server carries out file process, comprising:
The second mapping relations and third mapping relations are read from the first server;Wherein, second mapping relations are
Relationship between the object space and the storage pool, the third mapping relations are between block device and the object space
Relationship;
Mark and third mapping relations based on the target block device read target object space from the first server
Mark;
Mark and second mapping relations based on the target object space read target from the first server and deposit
The mark of reservoir;
It is deposited based on the file identification, the mark of the target block device, the mark in the target object space and the target
The mark of reservoir carries out file process with the first server.
6. according to the method described in claim 5, it is characterized in that, the processing request include written document request, it is described to be based on
The file identification, the mark of the target block device, the mark in the target object space and the mark of the target storage pool
Know, carry out file process with the first server, comprising:
Monitoring node listing, cluster identity and connection socket are read from the first server;
If not stored file destination corresponding with the file identification in the second server, based in written document request
File destination described in the data creation of carrying;
It is the mark of mark, the target object space based on the target block device, the mark of the target storage pool, described
Node listing, the cluster identity and the connection socket are monitored, access address is created;
Based on the access address, call the first sub- communication interface in the default communication interface that the file destination is written
In second server;
Correspondingly, the method also includes:
Establish the incidence relation between the access address and the file identification and storage.
7. according to the method described in claim 5, it is characterized in that, the processing request include read file request, it is described to be based on
The file identification, the mark of the target block device, the mark in the target object space and the mark of the target storage pool
Know, carry out file process with the first server, comprising:
It is the mark of mark, the target object space based on the target block device, the mark of the target storage pool, described
Node listing, the cluster identity and the connection socket are monitored, access address is created;
Based on the access address, sent by the second sub- communication interface in the default communication interface for obtaining file
Acquisition request is to the first server;Wherein, the file identification and the destination virtual are carried in the acquisition request
The mark of machine;
Receive the file destination that the first server is sent;Wherein, the file destination is the first server base
It is obtained in the file identification;
It is described based on the file identification, the target block device correspondingly, processing request includes deleting file request
Mark, the mark of the mark in the target object space and the target storage pool, carry out at file with the first server
Reason, comprising:
It is the mark of mark, the target object space based on the target block device, the mark of the target storage pool, described
Node listing, the cluster identity and the connection socket are monitored, access address is created;
Based on the access address, the sub- communication interface of third in the default communication interface is called, the first service is deleted
File destination corresponding with the file identification in device.
8. a kind of first server, which is characterized in that the first server includes: first processor, first memory and
One communication bus;
First communication bus is for realizing the communication connection between first processor and first memory;
The first processor is for executing the message handling program stored in first memory, to perform the steps of
Object space is created in the storage pool of the first server;
Based on the object space creation block device;Wherein, three block devices are included at least in each object space;
The first mapping relations between the virtual machine in each block device and second server are established, and are stored in described
In one server;
Based on object space, the block device and first mapping relations, data communication is carried out with the second server.
9. a kind of second server, which is characterized in that the second server includes: second processor, second memory and
Two communication bus;
Second communication bus is for realizing the communication connection between second processor and second memory;
The second processor is for executing the message handling program stored in second memory, to perform the steps of
The processing for handling the file to be processed is received to request;Wherein, file identification is carried in the processing request;
The processing request is responded, the mark of the target virtual machine of the second server is obtained;
The first mapping relations are read from the first server;Wherein, first mapping relations are the second server
Virtual machine and the first server block device between relationship;
Mark and first mapping relations based on the target virtual machine read object block from the first server and set
Standby mark;
Mark based on the file identification and the target block device, passes through the default communication interface and the first service
Device carries out file process.
10. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage have one or
Multiple programs, one or more of programs can be executed by one or more processor, to realize such as claims 1 to 3
Or the step of information processing method described in any one of 4 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810923075.5A CN109347896B (en) | 2018-08-14 | 2018-08-14 | Information processing method, equipment and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810923075.5A CN109347896B (en) | 2018-08-14 | 2018-08-14 | Information processing method, equipment and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109347896A true CN109347896A (en) | 2019-02-15 |
CN109347896B CN109347896B (en) | 2021-01-15 |
Family
ID=65297000
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810923075.5A Active CN109347896B (en) | 2018-08-14 | 2018-08-14 | Information processing method, equipment and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109347896B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111522514A (en) * | 2020-04-27 | 2020-08-11 | 上海商汤智能科技有限公司 | Cluster file system, data processing method, computer device and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102801806A (en) * | 2012-08-10 | 2012-11-28 | 薛海强 | Cloud computing system and cloud computing resource management method |
US20130262405A1 (en) * | 2012-03-27 | 2013-10-03 | Andrew Kadatch | Virtual Block Devices |
CN104216759A (en) * | 2014-08-27 | 2014-12-17 | 华为技术有限公司 | Method and device for generating logical disk of virtual machine |
CN104298559A (en) * | 2014-09-30 | 2015-01-21 | 深圳市深信服电子科技有限公司 | Method and device for virtualizing physical host system |
CN106852174A (en) * | 2014-10-22 | 2017-06-13 | 慧与发展有限责任合伙企业 | The data recovery presented using block disk |
-
2018
- 2018-08-14 CN CN201810923075.5A patent/CN109347896B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130262405A1 (en) * | 2012-03-27 | 2013-10-03 | Andrew Kadatch | Virtual Block Devices |
CN102801806A (en) * | 2012-08-10 | 2012-11-28 | 薛海强 | Cloud computing system and cloud computing resource management method |
CN104216759A (en) * | 2014-08-27 | 2014-12-17 | 华为技术有限公司 | Method and device for generating logical disk of virtual machine |
CN104298559A (en) * | 2014-09-30 | 2015-01-21 | 深圳市深信服电子科技有限公司 | Method and device for virtualizing physical host system |
CN106852174A (en) * | 2014-10-22 | 2017-06-13 | 慧与发展有限责任合伙企业 | The data recovery presented using block disk |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111522514A (en) * | 2020-04-27 | 2020-08-11 | 上海商汤智能科技有限公司 | Cluster file system, data processing method, computer device and storage medium |
CN111522514B (en) * | 2020-04-27 | 2023-11-03 | 上海商汤智能科技有限公司 | Cluster file system, data processing method, computer equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN109347896B (en) | 2021-01-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8255420B2 (en) | Distributed storage | |
US8590050B2 (en) | Security compliant data storage management | |
US7783737B2 (en) | System and method for managing supply of digital content | |
CN103064927B (en) | The data access method of distributed file system and device | |
CN103198090B (en) | For optimizing the method and system of the storage distribution in virtual desktop environment | |
CN103324533B (en) | distributed data processing method, device and system | |
CN104618482B (en) | Access method, server, conventional memory device, the system of cloud data | |
CN103475682B (en) | File transfer method and file transfer equipment | |
CN104050216B (en) | For customizing the file system manager of resource allocation | |
CN106446159B (en) | A kind of method of storage file, the first virtual machine and name node | |
US8001327B2 (en) | Method and apparatus for managing placement of data in a tiered storage system | |
CN102611745A (en) | On-line file moving method, device and system | |
CN107026876B (en) | A kind of file data access system and method | |
CN105074702A (en) | Database system providing single-tenant and multi-tenant environments | |
CN103620580A (en) | System and method for migration of data clones | |
CN106648462B (en) | Date storage method and device | |
WO2007134918A1 (en) | Distributed storage | |
CN111209090B (en) | Method and assembly for creating virtual machine in cloud platform and server | |
CN106933747B (en) | Data-storage system and date storage method based on multithread | |
CN106817388B (en) | Method and device for acquiring data by virtual machine and host machine and system for accessing data | |
US11416176B2 (en) | Function processing using storage controllers for load sharing | |
CN109271110A (en) | The wiring method of storing data, writing system and relevant apparatus in storage system | |
CN105227672A (en) | The method and system that data store and access | |
CN110147203A (en) | A kind of file management method, device, electronic equipment and storage medium | |
CN109783462A (en) | A kind of data access method and device based on distributed file system |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |