The hanging method and relevant apparatus of storage system in a kind of virtual platform
Technical field
This application involves field of computer technology, in particular to the hanging method of storage system in a kind of virtual platform,
Carry device, server and computer readable storage medium.
Background technique
With the development of cloud computing technology, there is a kind of virtualization technology --- the virtual platform of basic cloud computing,
Those skilled in the art can manage hundreds of or thousands of calculate nodes by a virtual platform.Wherein, each calculate node
It is mutually to carry out carry by storage system and host to be formed.Therefore, in the prior art, it is generally required that being hung to storage system
Carry processing and unloading processing.
But in the prior art in order to avoid carrying out data entanglements caused by multiple carries are handled simultaneously, and serially into
The processing of row carry, that is, to successively progress carry processing.It is existing when the calculate node quantity for needing to carry out carry processing is more
There is the carry mode in technology to will lead to repetitive operation existing for whole process, consume the plenty of time, reduces efficiency.
Therefore, the Important Problems that multiple carry processing are those skilled in the art's concerns how are carried out simultaneously.
Summary of the invention
The purpose of the application is to provide hanging method, the carry device, server of storage system in a kind of virtual platform
And computer readable storage medium, carry processing is carried out by lock mechanism, the reliability of data is ensure that, improves at carry
The speed of reason.
In order to solve the above technical problems, the application provides a kind of hanging method of storage system in virtual platform, comprising:
When receiving the request of multiple carry tasks, platform cluster system is according to lock mechanism to all carry tasks
Carry out carry processing;
When carry task is handled successfully, processing successful information is sent;
When carry task processing failure, to the carry task execution rolling back action, so as to by the carry task
Storage system and host return to original state.
Optionally, when receiving the request of multiple carry tasks, platform cluster system is according to lock mechanism to all described
Carry task carries out carry processing, comprising:
When receiving the request of multiple carry tasks, bottom that platform cluster system is handled the carry according to lock mechanism
Layer order carries out locking processing, obtains lock mechanism carry order;
Carry processing is carried out to all carry tasks according to the lock mechanism carry order.
Optionally, when the carry task processing failure, to the carry task execution rolling back action, so as to will be described
The storage system and host of carry task return to original state, comprising:
When the carry task processing failure, the storage system of the carry task and described is removed in the database
The mark data of host;
The incidence relation of the storage system and the host is deleted in the bottom data of the platform cluster system, with
Just the storage system of the carry task and the host are returned to original state.
Optionally, when carry task processing failure, further includes:
Send processing failure information.
Optionally, further includes:
Client sends the request of multiple carry tasks to the platform cluster system in a parallel fashion.
The application also provides a kind of carry device of storage system in virtual platform, comprising:
Carry task parallel processing module, for when receiving the request of multiple carry tasks, according to lock mechanism to institute
There is the carry task to carry out carry processing;
It is successfully processed module, for when carry task is handled successfully, sending processing successful information;
Failure handling module, for when carry task processing failure, to the carry task execution rolling back action, so as to
The storage system of the carry task and host are returned to original state.
Optionally, the carry task parallel processing module, comprising:
Lock processing unit, for when receiving the request of multiple carry tasks, according to lock mechanism to the carry at
The bottom order of reason carries out locking processing, obtains lock mechanism carry order;
Carry unit is locked, for carrying out at carry according to the lock mechanism carry order to all carry tasks
Reason.
Optionally, further includes:
Transmitted in parallel module is requested, for sending multiple carry tasks in a parallel fashion to the platform cluster system
Request.
The application also provides a kind of server characterized by comprising
Memory, for storing computer program;
Processor, the step of hanging method as described above is realized when for executing the computer program.
The application also provides a kind of computer readable storage medium, and calculating is stored on the computer readable storage medium
The step of machine program, the computer program realizes hanging method as described above when being executed by processor.
The hanging method of storage system in a kind of virtual platform provided herein, comprising: when receiving multiple extensions
When the request of load task, platform cluster system carries out carry processing to all carry tasks according to lock mechanism;When carry is appointed
When business is handled successfully, processing successful information is sent;When carry task processing failure, the carry task execution rollback is grasped
Make, to return to original state the storage system of the carry task and host.
Carry processing is carried out to all carry tasks by way of to lock mechanism, avoids while carrying out multiple carries
When task to carry processing in order simultaneously carry out operate appearance data entanglement the case where, realize holding data reliability
It is lower by carry task parallel processing, the case where improving the treatment effeciency of carry task, and also avoid corrupt data, simultaneously
When carry task processing failure, rolling back action is carried out to carry task, the storage system of carry task and host are restored to
Original state, further increases the reliable of parallel processing carry task at the case where avoiding the error in data that carry unsuccessfully occurs
Property, guarantee the parallel processing of carry task, improves the treatment effeciency of carry task.
The application also provides in a kind of virtual platform the carry device, server of storage system and computer-readable deposits
Storage media has above-mentioned beneficial effect, and this will not be repeated here.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
The embodiment of application for those of ordinary skill in the art without creative efforts, can also basis
The attached drawing of offer obtains other attached drawings.
Fig. 1 is the flow chart of the hanging method of storage system in a kind of virtual platform provided by the embodiment of the present application;
Fig. 2 is the flow chart of the rolling back action method of hanging method provided by the embodiment of the present application;
Fig. 3 is the structural representation of the carry device of storage system in a kind of virtual platform provided by the embodiment of the present application
Figure.
Specific embodiment
The core of the application is to provide hanging method, the carry device, server of storage system in a kind of virtual platform
And computer readable storage medium, carry processing is carried out by lock mechanism, the reliability of data is ensure that, improves at carry
The speed of reason.
To keep the purposes, technical schemes and advantages of the embodiment of the present application clearer, below in conjunction with the embodiment of the present application
In attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment is
Some embodiments of the present application, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art
Every other embodiment obtained without making creative work, shall fall in the protection scope of this application.
In the prior art in order to avoid carrying out data entanglement caused by multiple carries are handled simultaneously, and serially carry out carry
Processing, that is, carry processing is successively carried out to storage system and host.When the calculate node quantity for needing to carry out carry processing
When more, carry mode in the prior art will lead to whole process, and there are repetitive operations, consume the plenty of time, reduce efficiency.It is existing
Have in technology and is primarily due to using serial manner when multiple carry tasks while when carrying out, to the data in virtual platform
Library and bottom data carry out write operation simultaneously, are easy to appear write-in problem, lead to data remanence to keep virtual platform wrong
The carry state of identification storage system accidentally, is easy to go wrong in virtual platform.So carry task serial is held
Row, reduces the quantity for write-in problem occur.
Therefore, the present embodiment carries out carry processing to all carry tasks by way of to lock mechanism, avoids same
When the multiple carry tasks of Shi Jinhang is carried out to the order in carry processing the case where operating the data entanglement of appearance simultaneously, realized
It keeps that carry task parallel processing is improved the treatment effeciency of carry task, and also avoid data under data reliability
The case where error, while when carry task processing failure, rolling back action is carried out to carry task, by the storage system of carry task
The case where system and host return to original state, avoid the error in data that carry unsuccessfully occurs, further increases parallel processing
The reliability of carry task guarantees the parallel processing of carry task, improves the treatment effeciency of carry task.
In addition, storage system and the carry task of host and unloading task defect having the same in calculate node, are unloaded
Load task can also be improved by the technical solution in the embodiment of the present application.
Specifically, referring to FIG. 1, Fig. 1 is storage system in a kind of virtual platform provided by the embodiment of the present application
The flow chart of hanging method.
This method may include:
S101, when receiving the request of multiple carry tasks, platform cluster system appoints all carries according to lock mechanism
Business carries out carry processing;
This step is intended to when receiving the request of multiple carry tasks, and platform cluster system is according to lock mechanism to all extensions
Load task carries out carry processing.This step, can be simultaneously to multiple carry tasks namely when receiving multiple carry tasks
It is handled, not as in the prior art to the processing of carry task serial.It is emphasized that appointing in this step to multiple carries
It is engaged in while being handled that multiple carry tasks are namely carried out parallel processing.
Wherein, the mode that multiple carry tasks are received in this step can be while receiving multiple carry tasks,
It can be and be respectively received multiple carry tasks in different moments, can also be by way of both the above reception while being connect
It receives, it is seen then that the mode that multiple carry tasks are received in the present embodiment is not unique, can be not specifically limited, also, at this
The carry task no matter received by which kind of mode in step can carry out at carry all carry tasks received
Reason.
Specifically, in this step by all carry tasks received while carry processing can be carried out, it is also possible to work as
It receives a carry task just to handle it, without being associated with other carry tasks, can also appoint according to carry is received
The mode of business determines how to be handled, for example, carry task is to receive multiple carry tasks simultaneously, then this step is exactly
The carry task that receives simultaneously is handled, if carry task is to be sequentially received different moments whithin a period of time
, just it is handled then a carry task can be received in this step.As it can be seen that above, no matter which kind of carry is appointed
All there are the multiple carry tasks handled at any time in the processing mode of business.And it is in the prior art an extension
Load task carries out after treatment and just carries out next carry task, is a kind of parallel processing mode, although ensuring data
It will not malfunction, but the processing speed of carry task can be reduced.
And in this step, carry processing is mainly carried out to all carry tasks according to lock mechanism.Wherein, according to lock mechanism
Form carry out carry processing when can guarantee multiple carry tasks while be handled, wherein the life limited by lock mechanism
Order may only be called by a carry task, avoided multiple carry tasks while being called an order, and the number occurred
According to the situation of mistake.
It has been discovered that in the prior art guarantee data do not malfunction, be exactly from the process of carry task execution so that
All orders in carry processing are can be called by a carry task, can reduce the speed of the carry processing of carry task
Degree.It, therefore, can be just for the extension of part and in actual carry treatment process and not all order can only be called individually
Order in load processing is limited, so that the order is only individually called, others order can be called simultaneously.Namely
A part is in parallel processing in entire carry processing links, and a part is serial process, than complete order serial process
Reduce the processing time.Therefore, data had not only been maintained not malfunction, but also has improved whole processing speed.
Specifically, the order of carry task is limited by lock mechanism in this step, it is any for the order of locking
Moment may only have a carry task to be called.Used programming language is different, the lock mechanism mode realized to order
Also different, therefore this will not be repeated here.More specifically, there are multiple orders in carry processing, different command is locked logarithm
It is also different according to the influence size of error, it can substantially be divided into upper layer commands and bottom order, wherein can carry out to two
Lock can also only lock to wherein any one order, can specifically be locked according to practical situation to order,
It is not specifically limited herein.
Optionally, this step may include:
Step 1, when receiving the request of multiple carry tasks, platform cluster system is handled carry according to lock mechanism
Bottom order carries out locking processing, obtains lock mechanism carry order;
Step 2, carry processing is carried out to all carry tasks according to the order of lock mechanism carry.
This optinal plan, which is realized, carries out carry processing to carry task according to lock mechanism.
S102 sends processing successful information when carry task is handled successfully;
On the basis of S101, this step is intended to when the success of any one carry task execution, and transmission, which is handled, successfully to be believed
Breath.As long as namely occurring handling successful carry task, a processing successful information is sent.It can be to corresponding client
Successful information is sent, successful information can also be sent to technical staff in a manner of mail messaging etc., it can be with sound such as voices
Mode sends prompt information.As it can be seen that the mode for sending processing successful information is not unique, it is not specifically limited herein.
S103, when carry task processing failure, to carry task execution rolling back action, so as to by the storage of carry task
System and host return to original state.
On the basis of step S101, this step is intended to when any one carry task processing failure, to carry task
Rolling back action is executed, to return to original state the corresponding storage system of carry task and host.Wherein, rolling back action has
Body executive mode namely passes through data manipulation, by the data mode for indicating incidence relation between storage system and host restore to
Execute the state before carry task, that is, original state.
In the prior art, it is easy to be primarily due to batch processing carry task under the technological accumulation and inheritance for serial process carry task
Occur executing the situation of mistake, and executing mistake can make the relationship between storage system and host occur in platform cluster system
Write error remains abnormal data, for example, when carry is failed but what is show in systems with client has been extension
It carries successfully, will continue to operate storage system using the state at this time, and state at this time has been the state of mistake,
Therefore lead to serious data storage problem.So the prior art is in order to avoid arising a problem that, and use serial place
Reason mode reduces the probability for write error occur, to avoid the mistake of storage system.But serial manner can be reduced seriously
The treatment effeciency of carry task influences normal treatment effeciency when large batch of processing carry task.
Therefore, by judging the processing status of carry task in this step, when there is mistake, that is, unsuccessfully when to carry
Task execution rolling back action ensure that parallel processing carry task to handle incidental write error in the prior art
Reliability.
Optionally, can also include: when carry task processing failure in the present embodiment
Send processing failure information.
This optinal plan further includes sending processing failure information, carries out relevant information alert operation.
Optionally, the present embodiment can also include:
Client sends the request of multiple carry tasks to platform cluster system in a parallel fashion.
This optinal plan further includes sending multiple carry tasks in a parallel fashion to platform cluster system in the client
Request.
Specifically, multiple carry tasks can be received by front end UI, and pass through front end to platform cluster system in parallel
Send multiple carry tasks.
To sum up, the present embodiment carries out carry processing to all carry tasks by way of to lock mechanism, avoids same
When the multiple carry tasks of Shi Jinhang is carried out to the order in carry processing the case where operating the data entanglement of appearance simultaneously, realized
It keeps that carry task parallel processing is improved the treatment effeciency of carry task, and also avoid data under data reliability
The case where error, while when carry task processing failure, rolling back action is carried out to carry task, by the storage system of carry task
The case where system and host return to original state, avoid the error in data that carry unsuccessfully occurs, further increases parallel processing
The reliability of carry task guarantees the parallel processing of carry task, improves the treatment effeciency of carry task.
It is emphasized that mainly carry task is handled in a upper embodiment, it similarly can also be by this reality
The method for applying example is applied in unloading processing.Therefore, a kind of discharging method also provided, specific as follows:
Step 1, when receiving the request of multiple unloading tasks, platform cluster system according to lock mechanism to it is all unloading appoint
Business carries out unloading processing;
Step 2, when unload task handle successfully when, transmission handle successful information;
Step 3, when unloading task processing failure, to unloading task execution rolling back action, so that depositing for task will be unloaded
Storage system and host return to original state.
Wherein, step 1 may include:
Step 1.1, when receiving the request of multiple unloading tasks, platform cluster system according to lock mechanism to unloading handle
Bottom order carry out locking processing, obtain lock mechanism unloading order;
Step 1.2 carries out unloading processing to all unloading tasks according to lock mechanism unloading order.
Wherein, carry processing is only changed to unloading processing, specific description content can be with reference in a upper embodiment
Illustrate, this will not be repeated here.The embodiment can equally guarantee the reliability of data, while improve the speed of unloading processing.
The rolling back action executed in embodiment shown in FIG. 1 can be using any one rollback behaviour that the prior art provides
Make, a kind of rolling back action method provided in this embodiment can also be used.It can be in database and platform bottom by this method
Rolling back action is carried out in data, so that carry task recovery is to original state.
Specifically, referring to FIG. 2, Fig. 2 is the stream of the rolling back action method of hanging method provided by the embodiment of the present application
Cheng Tu.
This method may include:
S201 when carry task processing failure, removes the storage system of carry task and the mark of host in the database
Data;
S202 deletes the incidence relation of storage system and host, in the bottom data of platform cluster system to hang
The storage system and host of load task return to original state.
The present embodiment is mainly database level and bottom data level in platform cluster system to storage system and master
The data of the expression incidence relation of machine are purged.
Specifically, database level save be storage system and host mark data, for example, storage system is related
The mark data of host is stored in database, and the mark data of storage system is stored in the relevant database of host, this
A little data are primarily used to the data shown in front end, occur display mistake in order to prevent, thus in the present embodiment into
Row is removed;What it is in the preservation of bottom data level is storage system and the practical data for being associated relationship of host, due to having hung
Failure is carried therefore to be also required to for the data of these incidence relations being purged herein.
After the data of the incidence relation above to database and bottom data are purged, so that it may by storage system and
Host returns to original state, and solves write error bring serious consequence.
The embodiment of the present application provides a kind of hanging method of storage system in virtual platform, can pass through state rollback
Mode solve the problems, such as data remanence caused by write-in when being performed simultaneously carry task, ensure that carry processing in data
Reliability.
The carry device of storage system in a kind of virtual platform provided by the embodiments of the present application is introduced below, under
System is stored in the carry device of storage system and a kind of above-described virtual platform in a kind of virtual platform of text description
The hanging method of system can correspond to each other reference.
Specifically, referring to FIG. 3, Fig. 3 is storage system in a kind of virtual platform provided by the embodiment of the present application
The structural schematic diagram of carry device.
The apparatus may include:
Carry task parallel processing module 100, for when receiving the request of multiple carry tasks, according to lock mechanism pair
All carry tasks carry out carry processing;
It is successfully processed module 200, for when carry task is handled successfully, sending processing successful information;
Failure handling module 300, for when carry task processing failure, to carry task execution rolling back action, so as to
The storage system of carry task and host are returned to original state.
Optionally, the carry task parallel processing module 100 may include:
Processing unit is locked, for being handled carry according to lock mechanism when receiving the request of multiple carry tasks
Bottom order carries out locking processing, obtains lock mechanism carry order;
Carry unit is locked, for carrying out carry processing to all carry tasks according to the order of lock mechanism carry.
Optionally, the device can also include:
Transmitted in parallel module is requested, for sending asking for multiple carry tasks in a parallel fashion to platform cluster system
It asks.
The embodiment of the present application can also provide a kind of server, comprising:
Memory, for storing computer program;
Processor, the step of hanging method as described above in Example is realized when for executing the computer program.
The embodiment of the present application can also provide a kind of computer readable storage medium, on the computer readable storage medium
It is stored with computer program, the computer program realizes hanging method as described above in Example when being executed by processor
Step.
The computer readable storage medium may include: USB flash disk, mobile hard disk, read-only memory (Read-Only
Memory, ROM), random access memory (Random Access Memory, RAM), magnetic or disk etc. is various to deposit
Store up the medium of program code.
Each embodiment is described in a progressive manner in specification, the highlights of each of the examples are with other realities
The difference of example is applied, the same or similar parts in each embodiment may refer to each other.For device disclosed in embodiment
Speech, since it is corresponded to the methods disclosed in the examples, so being described relatively simple, related place is referring to method part illustration
?.
Professional further appreciates that, unit described in conjunction with the examples disclosed in the embodiments of the present disclosure
And algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware and
The interchangeability of software generally describes each exemplary composition and step according to function in the above description.These
Function is implemented in hardware or software actually, the specific application and design constraint depending on technical solution.Profession
Technical staff can use different methods to achieve the described function each specific application, but this realization is not answered
Think beyond scope of the present application.
The step of method described in conjunction with the examples disclosed in this document or algorithm, can directly be held with hardware, processor
The combination of capable software module or the two is implemented.Software module can be placed in random access memory (RAM), memory, read-only deposit
Reservoir (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technology
In any other form of storage medium well known in field.
Above to the hanging method, carry device of storage system, service in a kind of virtual platform provided herein
Device and computer readable storage medium are described in detail.Used herein principle and reality of the specific case to the application
The mode of applying is expounded, the description of the example is only used to help understand the method for the present application and its core ideas.It answers
It, for those skilled in the art, can also be to this under the premise of not departing from the application principle when pointing out
Some improvement and modification can also be carried out for application, these improvement and modification are also fallen into the protection scope of the claim of this application.