Summary of the invention
The objective of the invention is to overcome prior art can't be with the virtual defective that turns to a unified virtual memory facilities of the physical storage device of a plurality of non-homogeneous, thus provide a kind of can be with the virtual virtual method that turns to a virtual memory facilities of the physical storage device of non-homogeneous.
Another object of the present invention provides a kind of physical storage device to non-homogeneous and is optimized configuration, the virtualization system of performance different storage device characteristics.
To achieve these goals, the invention provides a kind of virtualization system of non-homogeneous physical storage device, comprise virtual memory facilities 1, operation interface module 5, key-course 11 and physical storage device, be the physical storage device of non-homogeneous between described physical storage device, described key-course 11 comprises control enquiry module 6, mapping policy module 7, storage device physical characteristic administration module 8, equipment room data sync transferring module 9 and I/O processing module 12; Wherein, described virtual memory facilities 1 is connected with described key-course 11,11 of described key-courses are connected respectively with the physical storage device of described non-homogeneous, and described operation interface module 5 is connected on the physical storage device of described key-course 11 and each non-homogeneous; Described control enquiry module 6 is connected with I/O processing module 12 with mapping policy module 7, storage device physical characteristic administration module 8, equipment room data sync transferring module 9 respectively; Described mapping policy module 7 also is connected with storage device physical characteristic administration module 8, I/O processing module 12; Described equipment room data sync transferring module 9 also is connected with I/O processing module 12;
Wherein, described mapping policy module 7 is obtained the I/O mapping policy of user's appointment by control enquiry module 6, in conjunction with the information that storage device physical storage characteristics administration module 8 is described, determines to be fit to the I/O mapping policy of virtual memory facilities 1;
Described storage device physical characteristic administration module 8 is inquired about the physical characteristics of the physical storage device of described non-homogeneous in the building process of virtual memory facilities 1.
In the technique scheme, the physical storage device of described non-homogeneous is that internal memory non-firm offer or floppy disk or common this locality connect disk or USB portable hard drive or Flash memory disc or the network storage equipment that connects by LAN (Local Area Network) or the network storage equipment that connects by wide area network.
The present invention also provides a kind of virtual method of non-homogeneous physical storage device, may further comprise the steps:
Step 10), the physical storage device of the non-homogeneous that will add virtualization system is registered the title of the physical storage device of input non-homogeneous and the virtualization policy that virtualization system will adopt; Described virtualization policy comprises the I/O mapping policy;
Step 20), make up virtual memory facilities, described amount of capacity, the storage device type information that joins the physical storage device of the non-homogeneous in the virtualization system is registered in this virtual memory facilities, and represent the information of described virtual memory facilities superblock to be saved on the physical storage device that joins each non-homogeneous in the virtualization system with a superblock;
Step 30), the physical characteristics of each non-homogeneous physical storage device in identification and the record virtualization system;
Step 40), according to I/O mapping policy and step 30 in the user configured virtualization policy in the step 10)) in the physical characteristics of each non-homogeneous physical storage device of obtaining, make the concrete I/O mapping policy in the described virtual memory facilities;
Step 50), virtualization system makes up and to finish, use for computer system;
Step 60), utilize virtual memory facilities, realization reading and storing to data;
Step 70), after virtual memory facilities finishes read-write operation to data, in described physical storage device, realize data synchronization and migration;
Step 80), after virtual memory facilities is finished using, delete this virtual memory facilities.
In the technique scheme, in described step 20) in, the information, current data that described superblock comprises memory device, each member's memory device of memory device, the inefficacy of sign, the device number of virtual memory facilities, the virtual mapping policy of employing, sub-memory device number, virtual memory facilities update time, operate as normal is synchronously and the state of migration.
In the technique scheme, in described step 30) in, described physical characteristics comprises that memory device is the capacity of the availability of read-write response speed, memory device of persistent storage or interim storage, memory device and reliability, memory device.
In the technique scheme, in described step 60) in, described data are read and storage comprises:
Step 60-1), receive the I/O read-write requests;
Step 60-2), according to the physical characteristics of I/O mapping policy and each memory device, the I/O read-write requests done remapping;
Step 60-3), the I/O read-write requests is forwarded to the physical storage device of appointment;
Step 60-4), read-write operation finishes, and returns step 60-1), receive next request.
In the technique scheme, in described step 70) in, described data synchronization and migration are comprised:
Step 70-1), receive data synchronization or migration request, comprise in this request: synchronously and the source memory device and the target storage device of migration data, move or start address and the quantity of data in synchronization in these two equipment, maximum data synchronously or the speed of migration;
Step 70-2), guarantee current normal I/O operation suspension, if current have a normal I/O operation, wait for then that it is finished to begin again this data sync and migration cycle;
Step 70-3), data in the operating cycle, carry out data write synchronously or migration operation, finish when this data manipulation cycle, wait for that then next operation begins the I/O operation that data sync or migration are continued in the back;
Step 70-4), in the process of carrying out data sync and migration, data total amount according to nearest a period of time transmission, calculate current data sync or migration rate, if surpass preset upper limit, then this data manipulation finishes, and carries out the data sync operation again after wait operating cycle next time begins;
Step 70-5), in the process of data sync and migration, confirm by bitmap originally whether subsynchronous or migration operation corresponding data piece is in synchronously and last state, if this data block is synchronous and up-to-date, then, proceed the processing of other data blocks to the operation cancellation of this data block
Step 70-6), finishing data designated synchronously and after the migration request task, upgrade the data mode of respective storage devices, finish data synchronization and migration operation.
In the technique scheme, in described step 80) in, described deletion virtual memory facilities comprises:
Step 80-1), the user assign the deletion virtual memory facilities order;
Step 80-2), stop the I/O operation of all I/O operations in the virtual memory facilities and data sync or migration, waits for that current I/O operates to finish;
Step 80-3), deletion is written to the superblock in the physical storage device of each non-homogeneous, make after computer system is restarted, can not rebuild virtual memory facilities because of the existence of superblock;
Step 80-4), the information of in computer system, nullifying virtual memory facilities, finish delete procedure.
The invention has the advantages that:
1, when virtual memory facilities is created, each physical characteristics of forming the concrete memory device of virtual memory facilities is distinguished, and these attributes have been carried out the delimitation of priority, realized management to the physical characteristics of non-homogeneous equipment;
2, do the physical characteristics of considering each concrete memory device when the I/O mapping is handled, make the overall performance of virtual memory facilities be optimized;
3, can effectively improve the consistance and the reliability of computer system data.
Embodiment
The present invention is further illustrated below in conjunction with the drawings and specific embodiments.
In the present embodiment, as shown in Figure 1, non-homogeny storage device virtualization system of the present invention comprises virtual memory facilities 1, first physical storage device 2, second physical storage device 3, the 3rd physical storage device 4, operation interface module 5 and key-course 11.Wherein, virtual memory facilities 1 is connected with key-course 11,11 of key-courses are connected with first physical storage device 2, second physical storage device 3, the 3rd physical storage device 4 respectively, and 5 of operation interface modules are connected respectively on key-course 11, first physical storage device 2, second physical storage device 3 and the 3rd physical storage device 4.
Above-mentioned virtual memory facilities 1 is one and offers the memory device that the user's computer system uses, do not store any data in this equipment, all data all are stored on first physical storage device 2, second physical storage device 3, the 3rd physical storage device 4.Should be noted that, in the present embodiment, for the convenience that illustrates, be provided with three physical storage devices, but in actual use, the number of physical storage device is unrestricted, and the type of each physical storage device also can be different, they can be the memory devices of non-homogeneous, for example, described first physical storage device 2, second physical storage device 3, the 3rd physical storage device 4 can be the internal memory non-firm offer, floppy disk, common this locality connects disk, the USB portable hard drive, the Flash memory disc, a kind of in the network storage equipment that connects by LAN (Local Area Network) or the network storage equipment that connects by wide area network.
Operation interface module 5 mainly is to provide the bookkeeping interface to user and computer system, resolves configuration file and user command, these orders is transmitted to key-course the corresponding function module finishes action required.Can register physical storage device by it, create or the deletion virtual memory facilities, in specifying virtual memory facilities, add new physical storage device or therefrom remove certain physical storage device, inquire about the state of current virtual memory facilities and each member's memory device.
In key-course 11, comprise control enquiry module 6, mapping policy module 7, storage device physical characteristic administration module 8, equipment room data sync transferring module 9, I/O processing module 12.
Wherein, structure and deletion that control enquiry module 6 participates in virtual memory facilities 1, and the judgement of the condition monitoring of responsible system and member's memory device.The concrete work of this module comprises:
1), the I/O operational circumstances of physical storage device is added up, whether the state of monitoring each member's memory device is available.An I/O operation overtime of default value, if the I/O request timed out that I/O processing module 12 is found certain lower floor's memory device (being physical storage device noted earlier), then this memory device of notice control enquiry module 6 marks is a failure state, and key-course 11 just no longer is transmitted to the I/O request memory device of this inefficacy like this.Control enquiry module 6 also can calculate the load requests of current memory device according to the number of times of read-write I/O in the unit interval, distinguishes different loads with 0~20 integer, is worth that big more expression current I/O load is heavy more.
2), the use of control reserve physical storage device.After certain physical equipment lost efficacy, if this equipment has reserve physical equipment of the same type, then whether this reserve physical equipment is replaced the physical equipment that lost efficacy by the decision of this module, the foundation that control enquiry module 6 is finished this decision-making can be the order that shows, also can be preassigned strategy in the configuration file.
3), the synchronous and migration situation of monitoring control data.Data sync transferring module 9 is obtained the information of data sync and migration between control enquiry module 6 slave units, and these information specifically comprise: the number percent that data sync and migration are finished, synchronously and the source memory device and the target storage device of migration operation.When physical storage device lost efficacy, if need after this disabling devices recovers afterwards data are carried out synchronously, then this module command data sync and transferring module 6 write down in bitmap did not have the data in synchronization piece.When this memory device recovers,, then initiate the data synchronization operation by this module command data sync and transferring module if needs are arranged.
4), restart or during failure recovery when the computer system at virtual memory facilities place, in rebuilding the process of virtual memory facilities, this module also will be responsible for member's physical storage device of virtual memory facilities is verified, with the legitimacy of guaranteeing it and the consistance of data.Concrete grammar is to check whether digital signature information is consistent with creation-time in the superblock of each memory device, if there is inconsistent state, then notifies computer system to have mistake, and the report virtual memory facilities makes up failure or adopts the mode of demoting to use.
The virtual memory facilities status information that control enquiry module 6 outwards provides comprises: the mapping policy of the I/O situation of virtual memory facilities 1, logical capacity, current employing, effective memory device, the memory device of inefficacy, reserve memory device; Constitute each physical storage device name, I/O situation, physical characteristics, physical space utilization rate, the data mode (whether up-to-date, unanimity) of virtual memory facilities; Current data synchronously or the number percent finished of migration operation, synchronously or the source physical storage device and the target physical memory device name of migration operation.
Mapping policy module 7 is in the process that virtual memory facilities makes up, obtain the I/O mapping policy of user's appointment by control enquiry module 6, in conjunction with the definite I/O mapping policy that is fit to virtual memory facilities 1 of information that storage device physical storage characteristics administration module 8 is described, when handling the I/O request, this strategy decision I/O processing module 12 is somebody's turn to do which physical storage device the I/O request was sent to.Its cardinal rule is to consider the physical characteristics difference of memory device under in conjunction with the situation of each load, makes virtual memory facilities obtain the highest availability, reliability and overall performance.Such as: when computer system from virtual memory facilities 1 read data when being present in plural memory device, then read from the fast physical storage device of read-write response speed; When writing data, also guarantee to write earlier the good memory device of readwrite performance, finish data synchronization or migration work by data sync and transferring module 9 again; When the data that write need lasting the preservation, then these data are saved in the high persistent storage device of reliability as far as possible.
Storage device physical characteristic administration module 8 carries out the initial work of each sub-storage device physical characteristic in the building process of virtual memory facilities 1, specify the concrete I/O mapping policy of this virtual memory facilities that foundation is provided for mapping policy module 7 provides.
Equipment room data sync transferring module 9 mainly is responsible for safeguarding consistance, integrality and the correctness of different storage device data, data synchronization and transition process are periodically to carry out, trigger this operation by a timer cycle ground in the module, make virtual memory facilities 1 can continue to handle normal I/O flow process at other times.
The I/O mapping policy that I/O processing module 12 is determined according to mapping policy module 7 is finished the processing of I/O.
Describe below in conjunction with the virtualization system of non-homogeny storage device of the present invention construction method and workflow this system.
Step 10, registration physical storage device, input memory device name and virtualization policy.Because in virtualization system of the present invention, physical storage device has various type, therefore, need register to distinguish various physical storage devices physical storage device.In when registration, general input memory device name and the selected virtualization policy of only needing, and then discern the amount of capacity, storage characteristics etc. of this memory device by subsequent operation, but also can in the process of registration, specify the characteristic of memory device.The registration of physical storage device is generally finished by operation interface module 5 automatically by configuration file, also can be finished by hand by the command-line tool that operation interface module 5 is provided by the user.Wherein, virtualization policy comprises I/O mapping policy and some relevant administration configuration work.The core of virtualization policy is the I/O mapping policy, and the I/O mapping policy is mainly used in the concrete I/O of solution and how transmits the problem how to handle.The I/O mapping policy has determined the mutual relationship of physical storage device in the I/O mapping, for example do mutually in the I/O strategy of mirror image at a memory device, need to determine which memory device is a main equipment, realizing under the I/O mapping policy of an equipment as the buffer memory of another equipment, needing to determine which memory device is used as buffer memory and uses.
In registration process, operation interface module 5 can check whether the physical storage device that will register is used or be in the BUSY state by other virtual memory facilities in this computer system by control enquiry module 6, if then this memory device can not be registered.
The specifying information of step 20, registration physical storage device, and make up virtual memory facilities.5 pairs of log-in commands of receiving of operation interface module are resolved, and the relevant information after will resolving is transmitted to control enquiry module 6.The physical storage device that 6 scannings of control enquiry module will be registered, obtain the amount of capacity of each physical storage device, information such as the type of physical storage device, for generating a unique digital signature at random, virtual memory facilities is used to identify this virtual memory facilities then, and virtual memory facilities member's memory device tabulation of maintenance (DEVICE LIST) for making up, in this tabulation, write down the information of member's memory device (being the physical storage device of being registered), comprised amount of capacity, storage device type, the time that adds virtual memory facilities, physical store characteristic etc.Control enquiry module 6 generates a superblock (Super Block) simultaneously to preserve the relevant information of virtual memory facilities, and the information that this superblock is preserved comprises: the information of the memory device of the virtual mapping policy of the sign of virtual memory facilities, device number, employing, sub-memory device number, virtual memory facilities update time, operate as normal, the memory device of inefficacy, each member's memory device, current data are synchronously and the state of migration.Resulting superblock (Super Block) indicates this physical storage device and has been used to make up virtual memory facilities by controlling the predetermined deviation post (being the metadata area that system sets) of afterbody that enquiry module 6 is written to each physical storage device of forming virtual memory facilities.
Step 30, discern and write down the physical characteristics of each physical storage device.Storage device physical characteristic administration module 8 is mainly paid close attention to following characteristic when the physical characteristics of identification physical storage device:
A) lasting or interim storage;
B) read-write response speed;
C) availability of equipment and reliability;
D) capacity.
In system of the present invention, also stipulated as the default rule in the table 1:
|
Storage time |
Response speed |
Availability, reliability |
Capacity |
The internal memory non-firm offer |
Temporarily |
The fastest |
Lower |
Little |
Flash memory |
Lastingly |
Hurry up |
Lower |
Less |
Local disk |
Lastingly |
Slower |
Higher |
Bigger |
Floppy disk |
Lastingly |
Slowly |
Higher |
Little |
CD |
Lastingly |
Slower |
Generally |
Generally |
The network storage equipment |
Lastingly |
Decide by the network connection state, as then very fast by the high-speed dedicated net, otherwise slower |
Height, but because network and instability |
Greatly |
Table 1
When making up virtual memory facilities, storage device physical characteristic administration module 8 can be determined the weights of several physical characteristicss of each physical storage device according to the rule in the table 1 according to the type of equipment, and the weights of each physical characteristics of appointment are determined in the time of also can be by registration.In general, the weights of physical characteristics are more little, and then performance is good more, and reliability is high more.The weights of each storage device physical characteristic that storage device physical characteristic administration module 8 will be determined are kept in the physical characteristics territory of DEVICE LIST, for inquiry in using.
Step 40, mapping policy module 7 are made concrete I/O mapping policy in this virtual memory facilities according to the physical characteristics of each physical storage device that obtains in I/O mapping policy in the user configured virtualization policy in the step 10 and the step 30.For example, two physical storage devices are made mirror image mutually, the term of specialty is raidl, it is exactly a kind of concrete I/O mapping policy, its essence writes a piece of data exactly on virtual unit, behind this I/O mapping policy, middle key-course need all be write portion at these two physical storage devices with this piece of data, makes mirror image mutually and backs up in other words.
Mapping policy module 7 is obtained the basic I/O mapping policy of user's appointment by control enquiry module 6, such as this basic I/O strategy can be the IO mapping policy of realizing the data image between two non-homogeneous physical storage devices, determines the I/O mapping policy of an optimization then in conjunction with the physical characteristics of each physical storage device in the storage device physical characteristic administration module 8.After mapping policy module 7 is determined the I/O mapping policy of this virtual memory facilities employing, when using virtual memory facilities,, finish the I/O processing of request in conjunction with the I/O processing module according to resulting concrete I/O mapping policy.
Step 50, virtual memory facilities make up and finish, and offer computer system and use.
At the physical storage device of determining to form virtual memory facilities, and behind the I/O mapping policy that is adopted in the virtual memory facilities, can normally use by the current virtual memory facilities of control enquiry module 6 notice computer systems, so far finish the constructive process of virtual memory facilities.
Step 60, utilize virtual memory facilities, realize reading and storing data.It mainly is storage and reading of data that computer system is used virtual memory facilities, after the I/O of computer system request sends to the virtual memory facilities that is made up by the present invention, key-course is taken over the I/O request of response, I/O processing module 12 by it is handled, the mapping policy that I/O processing module 12 is described according to mapping policy module 7 is forwarded to corresponding physical storage device with I/O.After physical storage device is handled the I/O request, the result is returned to key-course, key-course is transmitted to computer system again and finishes the I/O processing of request then.
If computer system need be inquired about the current information of virtual memory facilities, then can inquire about, after control enquiry module 6 receives querying command the needed information of computer system be returned to the inquiry that computer system is finished information by operation interface module 5 by the order that operation interface module 5 provides.
Hypothesis I/O mapping policy is a data image below, and the process that data are handled describes.
Read data:
Step 61, computer system send read data request to the equipment interface of virtual memory facilities 1, after virtual memory facilities 1 receives this read data request, are handled by 12 pairs of these read data request of I/O processing module;
Step 62, when I/O processing module 12 receives read data request, notice mapping policy module 7 is current to have an IO request to need to handle.The data mode that mapping policy module 7 is inquired about each member's memory device by control enquiry module 6 earlier, find out all and have the equipment of asking desired data and data to be in last state, and then obtain the round values that these equipment are represented present load, these information are turned back in the mapping policy module 7 handle again.
After step 63, mapping policy module 7 are received the information sent of control enquiry module 6, each physical storage device that comprises in these information of storage device physical characteristic administration module 8 inquiry reads the response speed characteristic again, obtain corresponding expression weights, and in conjunction with the value of representing these physical storage device loads, calculate mean value according to both shared weight proportions, mapping policy module 7 is selected the physical storage device of mean value minimum from these equipment, then this physical storage device is returned to I/O processing module 12.
Step 64, I/O processing module 12 guarantee that the memory device that storage device physical characteristic administration module 8 returns does not carry out data sync and migration operation, otherwise, wait for that originally subsynchronous or migration operation is finished, when not carrying out data sync and migration operation on the memory device, notice I/O processing module 12 is forwarded to reading of data on the memory device that mapping policy module 7 returns with read data request.
Step 65, I/O processing module 12 return to computer system with the data that read and finish this read data request.
Write data:
Step 66, computer system send write data requests to the equipment interface of virtual memory facilities 1, after virtual memory facilities 1 receives data write request, are handled by 12 pairs of this I/O requests of I/O processing module;
Step 67, I/O processing module 12 check whether allow the asynchronous write operation in current I/O mapping policy by mapping policy module 7, if do not allow, then changing step 610 over to continues to handle, if allow, 7 states of mapping policy module by control enquiry module 6 each available member's memory device of inquiry, obtain these equipment and represent the round values of present load, by control enquiry module 6 these information are turned back to mapping policy module 7 again and handle;
Step 68: after mapping policy module 7 is received the information sent of control enquiry module 6, again to the write response velocity characteristic of each memory device of storage device physical characteristic administration module 8 inquiry, obtain corresponding expression weights, again in conjunction with the value of representing these memory device loads, calculate mean value according to both shared weight proportions, the physical characteristics administration module is selected the memory device of mean value minimum from these equipment, then this memory device is returned to I/O processing module 12;
Step 69, finish data writing operation, it is implemented as follows.
Step 69-1, I/O processing module 12 are forwarded to write data requests and finish data on the memory device that mapping policy module 7 returns and write, but need to guarantee that this memory device does not carry out data sync or migration operation before transmitting, otherwise, wait for that originally subsynchronous the and migration cycle is finished the processing of carrying out the back again; The enquiry module of notice control simultaneously 6 records have only this memory device to write this secondary data, other memory device is in asynchronous state, and the data block contents that allows data sync and transferring module 9 know this write request correspondence in the bitmap acceptance of the bid is in asynchronous state, is data sync use later on;
After step 69-2, write request were finished, I/O processing module 12 these write operations of notice computer system were finished, and finish this write operation.Writing by the synchronizing process of data sync and transferring module 9 of other memory devices finished, make final data reach consistent.
Step 610, finish synchronous writing operation.
Step 610-1, I/O processing module 12 are by controlling the memory device that enquiry module 6 inquires current operate as normal, and each duplicates portion and is forwarded on these memory devices I/O processing module 12 for these memory devices with write request.But need also to guarantee that these memory devices do not have data sync or migration operation to take place before transmitting, wait for that then originally subsynchronous the and migration cycle is finished the processing of carrying out the back again if having.
Step 610-2: after the write request that is distributed to these memory devices is all finished, these write requests of I/O processing module 12 notice computer system are finished dealing with, then notification data synchronously and transferring module the bitmap table of pairing data block in the virtual memory facilities is shown synchronous regime.
Step 70, virtual memory facilities also need be realized data synchronization and migration in physical storage device after finishing read-write operation to data.It is implemented as follows:
Step 71, equipment room data sync transferring module 9 begin synchronously or migration operation after receiving the synchronous or migration data request of controlling enquiry module 6 transmissions, this request comprises: synchronously and the source memory device and the target storage device of migration data, move or start address and the quantity of data in synchronization in these two equipment, maximum data synchronously or the speed of migration.
Step 72, equipment room data sync transferring module 9 carry out needing to guarantee current normal I/O operation suspension before data I/O operation beginning, if current have a normal I/O operation, waits for then that it is finished to begin this data sync and migration cycle again.
Step 73,9 these data manipulation cycles of beginning of equipment room data sync transferring module, carry out the synchronous or migration operation of data write according to the solicited message that control enquiry module 6 is sent, when this data manipulation cycle finishes and then waits for the I/O operation that continues data sync or migration after next operation begins, cycle next time is triggered by timer.
Step 74, equipment room data sync transferring module 9 are in the process of carrying out data sync and migration, data total amount according to nearest a period of time transmission is calculated current data sync or migration rate, if surpass preset upper limit, then this data manipulation finishes to wait for that operating cycle next time carries out the data sync operation after beginning again.
Step 75, equipment room data sync transferring module 9 are in the process of data sync and migration, by the message bit pattern minimizing data manipulation quantity of this module.Module can be earlier before sending read-write I/O request confirms that by bitmap this subsynchronous or migration operation corresponding data piece is to be in synchronously and last state, if this data block is synchronous and up-to-date, then, proceed the processing of other data blocks to the operation cancellation of this data block.
Step 76, equipment room data sync transferring module 9 are finished data designated synchronously and after the migration request task, and notice control enquiry module 6 upgrades the data mode of respective storage devices, so far finishes data synchronization and migration operation.
Step 80, after virtual memory facilities of the present invention is finished using, delete this virtual memory facilities, it is implemented as follows.
Step 81, user assign the order of deleting virtual memory facilities 1 by operation interface module 5, and order is through being transmitted to the control enquiry module 6 in the key-course after resolving;
Step 82, control enquiry module 6 stop the I/O operation to all I/O operations of virtual memory facilities 1 and data sync or migration, wait for that current I/O operates to finish;
Step 83, deletion are written to the superblock (Super Block) in each physical storage device, make can not rebuild virtual memory facilities because of the existence of superblock after computer system is restarted;
Step 84, the relevant information of nullifying this virtual memory facilities from computer system are finished delete procedure.
Lift a concrete example below, the virtualization system of non-homogeny storage device of the present invention is described, with and related methods.
In a virtualization system, two physical storage devices are arranged, be respectively a flash memory device a and a disk b, virtualization policy is for making up simple data image.
Virtual memory facilities makes up:
User input commands or by configuration file with the name of these two memory devices in computer system, the order input of using mirror image to provide by the system operation interface module as information such as mapping policys, key-course carries out initialization according to the order after resolving to the essential information of these two physical storage devices and virtual memory facilities, and is saved in the meta-data region of these two physical storage devices.The physical characteristics of these two physical storage devices is discerned and write down to storage device physical characteristic administration module then, setting according to default rule, system can know that flash memory device a has quicker response than disk unit b, and is lower but reliability compares.The physical attribute that the mapping policy module is made the mapping policy of mirror image and current device a, b according to two memory devices setting is formulated the concrete I/O mapping policy of this virtual memory facilities.Because the concrete higher read-write response speed of equipment a, and equipment b has higher reliability, so in concrete I/O mapping policy, virtual memory facilities carries out among the preferential slave unit a when reading and writing, and by equipment room synchronously and transferring module guarantee that finally data are synchronized among the disk unit b, the realization image feature.
The I/O processing procedure:
Synchronous read-write operation
During write operation, need guarantee just to notify this operation to finish after flash memory device a and disk unit b finish to virtual memory facilities.
During read data, because when data write be synchronous operation, so needed data are necessarily arranged on flash memory device a, in conjunction with the loading condition of current device a, b (load is represented by the load value of above controlling described in the enquiry module), system's key-course preferentially is forwarded to request of data the read operation of removing to finish virtual memory facilities among the equipment a when reading.
The asynchronous read and write operation
During write operation, key-course promptly returns expression virtual memory facilities write operation and finishes as long as write request is forwarded to equipment a after waiting facilities a finishes, and need not consider the performance of equipment b.Because be to make up the virtual memory facilities of realizing image feature between equipment a and the equipment b, they must preserve consistent data.The data consistency of equipment b is responsible for by equipment room data sync transferring module in this example when asynchronous write is operated, if the current equipment b that do not write data into, then when system load is low weight, data slave unit a is synchronized among the equipment b, to guarantee the realization of virtual memory facilities image feature by equipment room data sync transferring module.
During read data, key-course is paid the utmost attention to data read request is forwarded among the equipment a and is read, if the load of equipment a is very heavy, then whether desired data is arranged on disk unit b by the synchronization bit pattern inspection, if have and the load of equipment b lower, then directly request is forwarded to the read data operation of finishing virtual memory facilities in the disk unit, otherwise still forwards the request to this read data operation of removing to finish virtual memory facilities among the equipment a.
The deletion of virtual memory facilities:
This process is fairly simple, the control command that the user provides by operation interface module is assigned the order of deletion virtual memory facilities, after key-course receives order after the parsing, at first forbid the I/O request that the receiving computer system newly sends, whether have on checkout facility a and the equipment b then and carry out I/O operation, if having then wait for the operation of carrying out again after these operations are finished thereafter.After these two physical storage device a that guarantee to form virtual memory facilities and b do not have ongoing I/O operation, the information deletion that writes down in the meta-data region of key-course with these two memory devices notifies computer system to delete the deletion work that information that this virtual memory facilities registers is finished this virtual memory facilities at last.