CN105260323B - A kind of Storage Virtualization data processing method and device - Google Patents

A kind of Storage Virtualization data processing method and device Download PDF

Info

Publication number
CN105260323B
CN105260323B CN201510686112.1A CN201510686112A CN105260323B CN 105260323 B CN105260323 B CN 105260323B CN 201510686112 A CN201510686112 A CN 201510686112A CN 105260323 B CN105260323 B CN 105260323B
Authority
CN
China
Prior art keywords
user
storage location
data
file system
storage
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510686112.1A
Other languages
Chinese (zh)
Other versions
CN105260323A (en
Inventor
王燊
高天亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201510686112.1A priority Critical patent/CN105260323B/en
Publication of CN105260323A publication Critical patent/CN105260323A/en
Application granted granted Critical
Publication of CN105260323B publication Critical patent/CN105260323B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

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

Abstract

The embodiment of the invention discloses a kind of Storage Virtualization data processing method and devices, and wherein method includes: acquisition disk partition table, and identify the corresponding user file system of the target disk subregion in the disk partition table;The storage location of user data in the user file system is identified, to be determined as effective storage location;According to effective storage location, user's valid data in the source data volume in Storage Virtualization layer are searched, and generates the only target data comprising user's valid data and rolls up.Using the present invention, it can avoid the hash in virtualized environment and be copied, and then improve system performance.

Description

A kind of Storage Virtualization data processing method and device
Technical field
The present invention relates to computer virtualized technology field more particularly to a kind of Storage Virtualization data processing method and Device.
Background technique
In existing virtualized environment, by taking volume migrates (or template deployment) as an example, if user's text in some virtual machine Part system includes three files, respectively file1, file2 and file3, and three files are stored respectively in the virtual machine In user's virtual disk in, and also the storage that is stored in hypervisor (management program) simultaneously is virtual for these three files Change the book in layer, but when the file3 in user's virtual disk in the virtual machine is deleted, in Storage Virtualization layer File3 be not synchronized to delete, and since Storage Virtualization layer will not perceive user file system, so to storage When book in virtualization layer is migrated (or template imports and exports), the file3 being deleted in user's virtual disk is still It can be copied, that is, copy useless data, cause waste spatially, and then influence system performance.
Summary of the invention
The embodiment of the present invention provides a kind of Storage Virtualization data processing method and device, can avoid in virtualized environment Middle hash is copied, and then improves system performance.
First aspect present invention provides a kind of Storage Virtualization data processing method, comprising:
Disk partition table is obtained, and identifies the corresponding user file system of the target disk subregion in the disk partition table System;
The storage location of user data in the user file system is identified, to be determined as effective storage location;
According to effective storage location, user's valid data in the source data volume in Storage Virtualization layer are searched, And it generates the only target data comprising user's valid data and rolls up.
In the first possible implementation, the storage position for identifying user data in the user file system It sets, to be determined as effective storage location, comprising:
Judge the storage location information in the metadata of the user file system whether only comprising being assigned number of users According to storage location information;
If being judged as YES, is identified in the user file system according to the metadata and be assigned depositing for user data Storage space is set, to be determined as effective storage location;
If being judged as NO, the user file system is scanned, to generate user corresponding with the user file system The storage location state table of virtual disk, and the storage location shape for busy state being identified as in the storage location state table The corresponding storage location of state is determined as effective storage location.
The possible implementation of with reference to first aspect the first, in the second possible implementation, the basis The metadata identifies the storage location that user data has been assigned in the user file system, to be determined as effectively storing position It sets, comprising:
According to the type of the user file system identified, the format of the metadata is determined;
Format based on the metadata reads the metadata, has been assigned user data to extract in the metadata Storage location information;
Storage location corresponding to the storage location information for being assigned user data is determined as effectively to store position It sets.
The possible implementation of with reference to first aspect the first, in the third possible implementation, the scanning The user file system, to generate the storage location state table of user's virtual disk corresponding with the user file system, And the corresponding storage location of storage location state for being identified as busy state in the storage location state table is determined as having Imitate storage location, comprising:
The metadata of the user file system is read and scans, to extract the storage location information in the metadata; Storage location information in the metadata includes being assigned the storage location information of user data and unallocated having had number of users According to storage location information;
Create the storage location state table of corresponding with user file system user's virtual disk, and by the storage Storage location status indicator corresponding with the storage location information for being assigned user data is non-empty in location status table Not busy state, and by the storage location state table with the unallocated corresponding storage of storage location information for having user data Location status is identified as idle state;
The corresponding storage location of storage location state that busy state is identified as in the storage location state table is true It is set to effective storage location.
With reference to first aspect, in the fourth possible implementation, described according to effective storage location, it searches User's valid data in source data volume in Storage Virtualization layer, and generate number of targets only comprising user's valid data According to volume, comprising:
Search the storage position in the source data volume in Storage Virtualization layer with effective storage location with mapping relations It sets, to be determined as the target storage position of the source data volume;
The data in the target storage position of the source data volume are extracted, to be determined as user's valid data;
User's valid data are copied, are rolled up with generating the only target data comprising user's valid data, and to institute It states target data volume and carries out volume migration operation.
With reference to first aspect, in a fifth possible implementation, described according to effective storage location, it searches User's valid data in source data volume in Storage Virtualization layer, and generate number of targets only comprising user's valid data According to volume, comprising:
Search the storage position in the source data volume in Storage Virtualization layer with effective storage location with mapping relations It sets, to be determined as the target storage position of the source data volume;
The data in the target storage position of the source data volume are extracted, to be determined as user's valid data;
User's valid data are copied, to generate the data template for only including user's valid data;
The target data for carrying out template deployment operation is generated according to the data template to roll up;In the target data volume Only include user's valid data, and the target data volume in user's valid data storage location and the source The target storage position of book is corresponding.
With reference to first aspect, in a sixth possible implementation, the acquisition disk partition table, and identify the magnetic The corresponding user file system of target disk subregion in disk partition table, comprising:
Disk partition table is obtained, and reads the disk partition table, to identify the target magnetic in the disk partition table Disk subregion;
According to the file system identifier in the target disk subregion, use corresponding with the file system identifier is identified Family file system.
Second aspect of the present invention provides a kind of Storage Virtualization data processing equipment, comprising:
Module is obtained, for obtaining disk partition table, and identifies that the target disk subregion in the disk partition table is corresponding User file system;
Identification module, for identification in the user file system user data storage location, to be determined as effectively depositing Storage space is set;
Processing module is searched, for according to effective storage location, searching the source data volume in Storage Virtualization layer In user's valid data, and generate only comprising user's valid data target data roll up.
In the first possible implementation, the identification module includes:
Judging unit, whether the storage location information in metadata for judging the user file system is only comprising It is assigned the storage location information of user data;
Location identification unit identifies the user according to the metadata if being judged as YES for the judging unit The storage location of user data is assigned in file system, to be determined as effective storage location;
It scans determination unit and scans the user file system if being judged as NO for the judging unit, to generate The storage location state table of user's virtual disk corresponding with the user file system, and will be in the storage location state table The corresponding storage location of storage location state for being identified as busy state is determined as effective storage location.
In conjunction with the first possible implementation of second aspect, in the second possible implementation, the position Recognition unit includes:
First determines subelement, for the type according to the user file system identified, determines the metadata Format;
Information extraction subelement reads the metadata for the format based on the metadata, to extract first number The storage location information of user data has been assigned in;
Described first determines subelement, and being also used to will be corresponding to the storage location information that be assigned user data Storage location is determined as effective storage location.
In conjunction with the first possible implementation of second aspect, in the third possible implementation, the scanning Determination unit includes:
Scanning subelement is read, for reading and scanning the metadata of the user file system, to extract first number Storage location information in;Storage location information in the metadata includes the storage location letter for being assigned user data Breath and the unallocated storage location information for having user data;
Creation mark subelement, for creating the storage location of user's virtual disk corresponding with the user file system State table, and by storage corresponding with the storage location information for being assigned user data in the storage location state table Location status is identified as busy state, and by the storage location state table with the unallocated storage for having user data The corresponding storage location status indicator of location information is idle state;
Second determines subelement, for will be identified as the storage location shape of busy state in the storage location state table The corresponding storage location of state is determined as effective storage location.
In conjunction with second aspect, in the fourth possible implementation, the lookup processing module includes:
First searching unit has for searching in the volume of the source data in Storage Virtualization layer with effective storage location The storage location of mapping relations, to be determined as the target storage position of the source data volume;
First extraction unit, the data in target storage position for extracting the source data volume, to be determined as user Valid data;
Migration units, for copying user's valid data, to generate the target for only including user's valid data Book, and volume migration operation is carried out to target data volume.
In conjunction with second aspect, in a fifth possible implementation, the lookup processing module includes:
Second searching unit has for searching in the volume of the source data in Storage Virtualization layer with effective storage location The storage location of mapping relations, to be determined as the target storage position of the source data volume;
Second extraction unit, the data in target storage position for extracting the source data volume, to be determined as user Valid data;
Template generation unit only includes user's valid data to generate for copying user's valid data Data template;
The template generation unit is also used to generate the target for carrying out template deployment operation according to the data template Book;It only include user's valid data in the target data volume, and the user in target data volume has The storage location for imitating data is corresponding with the target storage position that the source data is rolled up.
In conjunction with second aspect, in a sixth possible implementation, the acquisition module includes:
Reading unit for obtaining disk partition table, and reads the disk partition table, to identify the disk partition Target disk subregion in table;
System identification unit, for identifying and the text according to the file system identifier in the target disk subregion The corresponding user file system of part system banner.
The embodiment of the present invention is by identifying corresponding with target disk subregion user file system, and by user file system The storage location of middle user data is determined as effective storage location, and is searched in Storage Virtualization layer according to effective storage location Source data volume in user's valid data, can be generated only comprising user's valid data target data roll up so as to mesh When mark book migrate or template imports and exports, user's valid data can be only copied, to can avoid in virtualization ring Hash is copied in border, and then improves system performance.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, 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 Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is a kind of flow diagram of Storage Virtualization data processing method provided in an embodiment of the present invention;
Fig. 2 is the flow diagram of another Storage Virtualization data processing method provided in an embodiment of the present invention;
Fig. 3 is the flow diagram of one of volume moving method provided in an embodiment of the present invention;
Fig. 4 is the flow diagram of one of template dispositions method provided in an embodiment of the present invention;
Fig. 5 is a kind of structural schematic diagram of Storage Virtualization data processing equipment provided in an embodiment of the present invention;
Fig. 6 is a kind of structural schematic diagram of identification module provided in an embodiment of the present invention;
Fig. 7 is a kind of structural schematic diagram for searching processing module provided in an embodiment of the present invention;
Fig. 8 is another structural schematic diagram for searching processing module provided in an embodiment of the present invention;
Fig. 9 is a kind of structural schematic diagram for obtaining module provided in an embodiment of the present invention;
Figure 10 is a kind of structural schematic diagram of server provided in an embodiment of the present invention.
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, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
It referring to Figure 1, is a kind of flow diagram of Storage Virtualization data processing method provided in an embodiment of the present invention, The method may include:
S101 obtains disk partition table, and identifies the corresponding user's text of the target disk subregion in the disk partition table Part system;
Specifically, server carry initial volume is virtual disk first, the virtual disk refers to that the initial volume is passed through Virtualization software simulation and for the object that program is operated, the initial volume refers to the corresponding data of the virtual disk The unit set being stored in physical store stores form difference according to rear end, can be a file in physical store, It can be one piece of continuous physical space;The magnetic corresponding with the virtual disk being pre-stored in local server is obtained again Disk partition table, and the disk partition table is identified, specific identification method can be by existing Open-Source Tools into Row identification, is not discussed here;Wherein, the disk partition table can (Master Boot Record, master draw for MBR Lead record) partition table or GDT (GUID Partition Table, globally unique identifier's disk partition table) partition table.The magnetic Disk partition table includes the information of at least one disk partition in the virtual disk, and the server is carrying out volume migration or mould When plate deployment operation, need at each disk partition corresponding to the information of at least one disk partition Reason, due to what is be similar to the treatment process of each disk partition, so the embodiment of the present invention is with one of disk point It is described for area, and using the disk partition as target disk subregion.The server is reading the disk partition table In at least one disk partition information after, can identify that the target disk subregion in the disk partition table is corresponding User file system can specifically identify the target disk point according to the file system identifier in the target disk subregion The corresponding user file system in area.Wherein, the user file system in each disk partition can correspond to a specific mark. Wherein, each disk partition in the virtual disk may each comprise virtual machine, and each virtual machine may each comprise corresponding User file system and user's virtual disk.
S102 identifies the storage location of user data in the user file system, to be determined as effective storage location;
Specifically, virtual machine corresponding with the user file system may include user's virtual disk, i.e., it is described virtual Machine may include the user file system and user's virtual disk, and the user data in the user file system is to deposit It is stored in user's virtual disk.The server identifies the storage location of user data in the user file system, i.e., To identify the storage location for being stored with user data in user's virtual disk, the use that the server will identify that again The storage location of user data is determined as effective storage location.For example, if in user file system in certain virtual machine including three File, respectively file1, file2 and file3, and file1, file2 and file3 are stored in the use in the virtual machine Family virtual disk, then the server can identify file1, file2 and file3 on user's virtual disk one by one Storage location, and the corresponding storage location of file1, file2 and file3 that will identify that is determined as effectively storing position It sets;When the file3 in user's virtual disk in the virtual machine is deleted, server is by re-recognizing the user file The storage location of user data in system, it can be found that will only identify file1 and file2 on user's virtual disk Storage location, and the corresponding storage location of file1 and file2 that will identify that is determined as effective storage location, i.e., it is described Server can perceive that specifically to have which storage location on user's virtual disk be to be stored with user data.
S103, according to effective storage location, the user searched in the source data volume in Storage Virtualization layer is effective Data, and generate the only target data comprising user's valid data and roll up;
Specifically, the user data can synchronize storage when the user data is stored in user's virtual disk In source data volume in the Storage Virtualization layer, and the storage of the user data in user's virtual disk Position and the storage location of the user data in source data volume have mapping relations, for example, file1 file stores Position A in user's virtual disk, then file1 file can also synchronize the position A being stored in the source data volume. Therefore, after the server determines effective storage location, can search in Storage Virtualization layer source data volume in Effective storage location has the storage location of mapping relations, to be determined as the target storage position of the source data volume, and The data extracted in the target storage position of the source data volume ensure that the user has to be determined as user's valid data Effect data are only the user data in user's virtual disk.It therefore, only include user's valid data by generating Target data volume, and to the target data volume carry out migration or template dispose when, it is ensured that volume migration or template deployment User's valid data are only copied in the process, i.e., only copy the user data in user's virtual disk, avoid source data Hash in volume is also copied together.
For example, if user file system in some virtual machine includes three files, respectively file1, file2 and File3, and three files are stored respectively in user's virtual disk in the virtual machine, and these three files are also deposited simultaneously The book being stored in Storage Virtualization layer, but when the file3 in user's virtual disk in the virtual machine is deleted, deposit The file3 in book in storage virtualization layer is not synchronized to delete, if provided through the embodiment of the present invention at this time Method carries out volume migration, then first identifies the user file system, and identify the file1 in the user file system and Storage location (file3 from user virtual disk deleted) of the file2 in user's virtual disk, and will identify that Storage location is determined as effective storage location, and searches with effective storage location in the book with mapping relations Storage location, to be determined as the target storage position of the book, and extract the data in the target storage position, with It is determined as user's valid data, i.e., finds out user's valid data (file1 and file2) in the book, then right Only the new data volume comprising user's valid data migrates, and can copy to avoid to useless data (file3) Migration.
In another example if user file system in some virtual machine includes three files, respectively file1, file2 and File3, and three files are stored respectively in user's virtual disk in the virtual machine, and these three files are also deposited simultaneously The book being stored in Storage Virtualization layer since the space management granularity of user file system is generally 4K to 64K, and stores The space management granularity of virtualization layer is generally 64K to 64MB, but when file1, file2 and file3 are only 10K File, and the space management granularity of Storage Virtualization layer be 64M when, then file1, file2 and file3 are in physical store The space of 64MB will be all occupied respectively, i.e. file1, file2 and file3 has the sky for occupying 192MB altogether in the book Between so that contain a large amount of hash in the book, if at this time through the embodiment of the present invention provided by method into Row volume migration, can equally find out user's valid data (file1, file2 and file3) in the book, described The search procedure of user's valid data is identical as above-mentioned example, is not discussed here;Again to only effective comprising the user The new data volume of data is migrated, and can be carried out to avoid a large amount of hashes in the book to Storage Virtualization layer Copy migration.
The embodiment of the present invention is by identifying corresponding with target disk subregion user file system, and by user file system The storage location of middle user data is determined as effective storage location, and is searched in Storage Virtualization layer according to effective storage location Source data volume in user's valid data, can be generated only comprising user's valid data target data roll up so as to mesh When mark book migrate or template imports and exports, user's valid data can be only copied, to can avoid in virtualization ring Hash is copied in border, and then improves system performance.
Fig. 2 is referred to again, is that the process of another Storage Virtualization data processing method provided in an embodiment of the present invention is shown It is intended to, the method may include:
S201 obtains disk partition table, and reads the disk partition table, to identify the mesh in the disk partition table Mark disk partition;
Specifically, server carry initial volume is virtual disk first, the virtual disk refers to that the initial volume is passed through Virtualization software simulation and for the object that program is operated, the initial volume refers to the corresponding data of the virtual disk The unit set being stored in physical store stores form difference according to rear end, can be a file in physical store, It can be one piece of continuous physical space;The magnetic corresponding with the virtual disk being pre-stored in local server is obtained again Disk partition table, and the disk partition table is identified, specific identification method can be by existing Open-Source Tools into Row identification, is not discussed here;Wherein, the disk partition table can be MBR partition table or GDT partition table.The magnetic Disk partition table includes the information of at least one disk partition in the virtual disk, and the server is carrying out volume migration or mould When plate deployment operation, need at each disk partition corresponding to the information of at least one disk partition Reason, due to what is be similar to the treatment process of each disk partition, so the embodiment of the present invention is with one of disk point It is described for area, and using the disk partition as target disk subregion.
S202 is identified and the file system identifier pair according to the file system identifier in the target disk subregion The user file system answered;
Specifically, the server can identify the mesh according to the file system identifier in the target disk subregion Mark the corresponding user file system of disk partition.Wherein, the user file system in each disk partition can correspond to a spy Fixed mark.Wherein, each disk partition in the virtual disk may each comprise virtual machine, and each virtual machine can wrap Include corresponding user file system and user's virtual disk.
Optionally, the type that may recognize that the user file system, specifically can use existing Open-Source Tools Judge the type of user file system.For example, running blkid for using blkid tool, obtain following as a result, wherein TYPE is corresponding be exactly user file system type:
/ dev/sdb1:UUID=" 5bc09a7e-225d-4034-b8ba-107de990d467 " TYPE=" ext3 ";
/ dev/sda1:UUID=" 6adaea21-a071-4567-98f9-ec30c454ff2f " TYPE=" swap "
/ dev/sda2:UUID=" a140603f-e3b2-4fee-9cb4-33b2303f521d " TYPE=" ext3 "
/ dev/block/252:0:UUID=" 03195c0b-fb1d-488a-9434-5dc53c758c07 "
SEC_TYPE=" ext2 " TYPE=" ext3 "
/ dev/xvdb:UUID=" 03195c0b-fb1d-488a-9434-5dc53c758c07 " SEC_TYPE=" Ext2 " TYPE=" ext3 "
/ dev/block/252:1:UUID=" d8da259a-d7be-479d-b3cd-282e1acf426e "
SEC_TYPE=" ext2 " TYPE=" ext3 "
/ dev/xvdd:UUID=" d8da259a-d7be-479d-b3cd-282e1acf426e " TYPE=" ext3 ".
The type of user file system is judged alternatively, it is also possible to the corresponding interface return value of Open Source Code using blkid.
S203 judges whether the storage location information in the metadata of the user file system is only useful comprising having distributed The storage location information of user data;
Specifically, there are two types of storage location information, the first storage location letters in the metadata of the user file system Breath is only to delete a certain file in the user file system comprising the storage location information for being assigned user data When, it includes to guarantee the metadata only that storage location information corresponding with this document, which can be also deleted, in the metadata It is assigned the storage location information of user data;Second of storage location information then includes being assigned the storage position of user data Confidence breath and the unallocated storage location information for having user data, i.e., the described metadata include the storage of entire user's virtual disk Location information, when the file A in the user file system is deleted, storage corresponding with A file position in the metadata Confidence breath will become the unallocated storage location information for having user data.Therefore, the server is identifying user's text After part system, it can be determined that whether the storage location information in the metadata of the user file system is only useful comprising having distributed The storage location information of user data judges that the storage location information in the metadata is to belong to the first storage location letter Breath or second of storage location information.
Wherein, virtual machine corresponding with the user file system may include user's virtual disk, i.e., the described virtual machine It may include the user file system and user's virtual disk, the user data in the user file system is storage In user's virtual disk.
S204 identifies the storage location that user data has been assigned in the user file system according to the metadata, To be determined as effective storage location;
Specifically, being identified in the user file system and having been divided according to the metadata if S203 step is judged as YES Storage location equipped with user data, to be determined as effective storage location.Specific identification process are as follows: according to identifying The type of user file system determines the format of the metadata, then the format based on the metadata reads the metadata, To extract the storage location information for being assigned user data in the metadata, and depositing for user data has been assigned by described Storage location corresponding to storage location information is determined as effective storage location.Only due to the storage location information in the metadata Storage location information comprising being assigned user data, it is possible to directly believe all storage locations in the metadata Breath is used as effective storage location, without distinguishing knowledge to the storage location information in the metadata extracted again Not.
S205 scans the user file system, to generate user's virtual disk corresponding with the user file system Storage location state table, and it is the storage location state that busy state is identified as in the storage location state table is corresponding Storage location is determined as effective storage location;
Specifically, the user file system is scanned if S203 step is judged as NO, to generate and the user file The storage location state table of the corresponding user's virtual disk of system, the storage location state table can indicate that the user is virtual The storage state of each storage unit in disk, the storage state, which is divided into, state data memory and no data storage shape State, so being known that in user's virtual disk that having which storage location is to have data by the storage location state table , which storage location is not no data.Specifically, the storage location state table can be bitmap (bitmap images), In bitmap, can there will be the storage location of data to be disposed as 1 in user's virtual disk, by user's virtual magnetic The storage location of no data is disposed as 0 in disk, i.e., the user data in user file system, which is all stored in bitmap, is arranged For in 1 storage location, it is possible to which the storage location for being set as 1 in bitmap is determined as effective storage location.
Further, the scanning user file system, to generate user corresponding with the user file system The detailed process of the storage location state table of virtual disk can be with are as follows: according to the type of the user file system identified, Determine that the format of the metadata, then the format based on the metadata read and scan first number of the user file system According to extract the storage location information in the metadata, the storage location information in the metadata here includes having divided Storage location information and the unallocated storage location information for having user data equipped with user data, therefore, in order to more efficiently Determine effective storage location, the storage location shape of user's virtual disk corresponding with the user file system can be created State table, and by storage position corresponding with the storage location information for being assigned user data in the storage location state table Set status indicator be busy state, and by the storage location state table with the unallocated storage position for having user data It is idle state that confidence, which ceases corresponding storage location status indicator, enables the server to get the bid the storage location state table Know and is determined as effective storage location for the corresponding storage location of storage location state of busy state.The storage location state Table includes the storage state of each storage unit in user's virtual disk, and the storage location state table can be The forms such as bitmap, tree, array.The storage location state table is primarily to facilitate background program and is easier to find out effective storage Position.
S206, according to effective storage location, the user searched in the source data volume in Storage Virtualization layer is effective Data, and generate the only target data comprising user's valid data and roll up;
Specifically, S206 step all will be directly executed after S204 or S205 step determines effective storage location, I.e. according to effective storage location, user's valid data in the source data volume in Storage Virtualization layer are searched, and generate Only the target data comprising user's valid data is rolled up.Specifically, the user data is stored in user's virtual disk When, the user data can synchronize in the source data volume being stored in the Storage Virtualization layer, and empty in the user The storage location of the user data in quasi- disk and the storage location of the user data in source data volume have There are mapping relations, for example, file1 file is stored in the position A in user's virtual disk, then file1 file also can be same Step is stored in the position A in the source data volume.Therefore, after the server determines effective storage location, Ke Yicha There is the storage location of mapping relations with effective storage location, to be determined as in the source data volume looked in Storage Virtualization layer The target storage position of the source data volume, and the data in the target storage position that the source data is rolled up are extracted, to be determined as User's valid data ensure that user's valid data are only the user data in user's virtual disk.Therefore, pass through Only the target data comprising user's valid data is rolled up for generation, and carries out migration or template deployment to target data volume When, it is ensured that user's valid data are only copied during volume migration or template are disposed, i.e., it is empty only to copy the user User data in quasi- disk avoids the hash in source data volume from also being copied together.
The embodiment of the present invention is by identifying corresponding with target disk subregion user file system, and by user file system The storage location of middle user data is determined as effective storage location, and is searched in Storage Virtualization layer according to effective storage location Source data volume in user's valid data, can be generated only comprising user's valid data target data roll up so as to mesh When mark book migrate or template imports and exports, user's valid data can be only copied, to can avoid in virtualization ring Hash is copied in border, and then improves system performance.
Fig. 3 is referred to again, is the flow diagram of one of volume moving method provided in an embodiment of the present invention, the side Method can correspond to the S103 in the above-mentioned Fig. 1 corresponding embodiment or S206 in above-mentioned Fig. 2 corresponding embodiment, and the method can be with Include:
S301, searching in the source data volume in Storage Virtualization layer has depositing for mapping relations with effective storage location Storage space is set, to be determined as the target storage position of the source data volume;
Specifically, the user data can synchronize when being stored in user's virtual disk due to the user data It is stored in the source data volume in the Storage Virtualization layer, and the user data in user's virtual disk Storage location and the storage location of the user data in source data volume have mapping relations, so determining described After effective storage location, can search in the source data volume in Storage Virtualization layer with effective storage location there is mapping to close The storage location of system, to be determined as the target storage position of the source data volume.
S302 extracts the data in the target storage position of the source data volume, to be determined as user's valid data;
Specifically, can extract the source number after the server determines the target storage position that the source data is rolled up According to the data in the target storage position of volume, to be determined as user's valid data, user's valid data are user's text File in part system, the data stored in as described user's virtual disk.
S303 copies user's valid data, is rolled up with generating the only target data comprising user's valid data, and Volume migration operation is carried out to target data volume;
Specifically, the server can copy user's valid data, it only include user's significant figure to generate According to target data volume, and to the target data volume carry out volume migration operation, avoid in the prior art directly to the source Book is copied and is migrated, and avoids afterwards and the hash in source data volume is also copied, so as to protect Card only copies user's valid data in volume transition process, i.e., only copies the user data in user's virtual disk.
The embodiment of the present invention can be generated only effective comprising user by finding out user's valid data in source data is rolled up The target data of data is rolled up, so that can copy user's valid data, only when migrating to target data volume so as to keep away Exempt from the hash in virtualized environment to be copied, and then improves system performance.
Fig. 4 is referred to again, is the flow diagram of one of template dispositions method provided in an embodiment of the present invention, it is described Method can correspond to the S103 in the above-mentioned Fig. 1 corresponding embodiment or S206 in above-mentioned Fig. 2 corresponding embodiment, and the method can To include:
S401, searching in the source data volume in Storage Virtualization layer has depositing for mapping relations with effective storage location Storage space is set, to be determined as the target storage position of the source data volume;
S402 extracts the data in the target storage position of the source data volume, to be determined as user's valid data;
The specific implementation process of S401 and S402 step may refer to the S301-S302 in above-mentioned Fig. 3 corresponding embodiment, this In no longer repeated.
S403 copies user's valid data, to generate the data template for only including user's valid data;
Specifically, the server can copy user's valid data, it only include user's significant figure to generate According to data template, avoid going out in the prior art directly by source data volume as data template so as to avoid in data template Existing hash.
S404 generates the target data for carrying out template deployment operation according to the data template and rolls up;The number of targets According in volume only include user's valid data, and the target data volume in user's valid data storage location with The target storage position of the source data volume is corresponding;
Specifically, since the data template only includes user's valid data, so raw according to the data template It also only can include user's valid data at the target data volume for carrying out template deployment operation, i.e., be imported and exported in template During only user's valid data can be copied, avoid copying a large amount of hash.
The embodiment of the present invention can be generated only effective comprising user by finding out user's valid data in source data is rolled up The data template of data, so that when importing and exporting to data template user's valid data can be copied, only so as to keep away Exempt from the hash in virtualized environment to be copied, and then improves system performance.
Fig. 5 is referred to, is a kind of structural representation of Storage Virtualization data processing equipment 1 provided in an embodiment of the present invention Figure, the Storage Virtualization data processing equipment 1 are applied in server, and the Storage Virtualization data processing equipment 1 includes: It obtains module 10, identification module 20, search processing module 30;
The acquisition module 10 for obtaining disk partition table, and identifies the target disk in the disk partition table point The corresponding user file system in area;
Specifically, the 10 carry initial volume of acquisition module described first is virtual disk, the virtual disk refers to described first Begin volume by virtualization software simulation and for the object that program is operated, the initial volume refers to the virtual disk pair The data answered are stored in the unit set in physical store, store form difference according to rear end, can be one in physical store A file is also possible to one piece of continuous physical space;The acquisition module 10 obtains again to be pre-stored in local server Disk partition table corresponding with the virtual disk, and the disk partition table is identified, specific identification method can Being identified by existing Open-Source Tools, it is not discussed here;Wherein, the disk partition table can be MBR Partition table or GDT partition table.The disk partition table includes the information of at least one disk partition in the virtual disk, institute Server is stated when carrying out volume migration or template deployment operation, the information at least one disk partition is needed to respectively correspond Each disk partition handled, due to what is be similar to the treatment process of each disk partition, so of the invention Embodiment is described by taking one of disk partition as an example, and using the disk partition as target disk subregion.The acquisition Module 10 in reading the disk partition table described at least one disk partition information after, can identify the disk point The corresponding user file system of target disk subregion in area's table, specifically can be according to the file system in the target disk subregion System identifies the corresponding user file system of the target disk subregion.Wherein, the user file in each disk partition System can all correspond to a specific mark.Wherein, each disk partition in the virtual disk may each comprise virtual machine, Each virtual machine may each comprise corresponding user file system and user's virtual disk.
The identification module 20, for identification in the user file system user data storage location, to be determined as Effective storage location;
Specifically, virtual machine corresponding with the user file system may include user's virtual disk, i.e., it is described virtual Machine may include the user file system and user's virtual disk, and the user data in the user file system is to deposit It is stored in user's virtual disk.The identification module 20 can identify the storage of user data in the user file system Position, as identifies the storage location that user data is stored in user's virtual disk, and the identification module 20 will be known again Not Chu the storage location of the user data be determined as effective storage location.For example, if user file system in certain virtual machine It include three files, respectively file1, file2 and file3 in system, and file1, file2 and file3 are stored in this User's virtual disk in virtual machine, then the identification module 20 can identify file1, file2 and file3 in institute one by one The storage location on user's virtual disk is stated, and the corresponding storage location of file1, file2 and the file3 that will identify that It is determined as effective storage location;When the file3 in user's virtual disk in the virtual machine is deleted, the identification module 20 By re-recognizing the storage location of user data in the user file system, it can be found that will only identify file1 and Storage location of the file2 on user's virtual disk, and the corresponding storage position file1 and file2 that will identify that It sets and is determined as effective storage location, i.e., the described identification module 20, which can perceive on user's virtual disk, specifically has which to deposit It is to be stored with user data that storage space, which is set,.
The lookup processing module 30, for searching the source in Storage Virtualization layer according to effective storage location User's valid data in book, and generate the only target data comprising user's valid data and roll up;
Specifically, the user data can synchronize storage when the user data is stored in user's virtual disk In source data volume in the Storage Virtualization layer, and the storage of the user data in user's virtual disk Position and the storage location of the user data in source data volume have mapping relations, for example, file1 file stores Position A in user's virtual disk, then file1 file can also synchronize the position A being stored in the source data volume. Therefore, after the identification module 20 determines effective storage location, it can be searched and be stored by the lookup processing module 30 There is the storage location of mapping relations with effective storage location, to be determined as the source in source data volume in virtualization layer The target storage position of book, and the data in the target storage position that the source data is rolled up are extracted, have to be determined as user Data are imitated, ensure that user's valid data are only the user data in user's virtual disk.Therefore, by generating only Target data volume comprising user's valid data, and migration carried out to target data volume or when template is disposed, it can be with Guarantee only to copy user's valid data during volume migration or template are disposed, i.e., only copies in user's virtual disk User data, avoid source data roll up in hash also copied together.
Further, then Fig. 6 is referred to, is a kind of structural schematic diagram of identification module 20 provided in an embodiment of the present invention, The identification module 20 may include: judging unit 201, location identification unit 202, scanning determination unit 203;
The judging unit 201, whether the storage location information in metadata for judging the user file system It only include the storage location information for being assigned user data;
Specifically, there are two types of storage location information, the first storage location letters in the metadata of the user file system Breath is only to delete a certain file in the user file system comprising the storage location information for being assigned user data When, it includes to guarantee the metadata only that storage location information corresponding with this document, which can be also deleted, in the metadata It is assigned the storage location information of user data;Second of storage location information then includes being assigned the storage position of user data Confidence breath and the unallocated storage location information for having user data, i.e., the described metadata include the storage of entire user's virtual disk Location information, when the file A in the user file system is deleted, storage corresponding with A file position in the metadata Confidence breath will become the unallocated storage location information for having user data.Therefore, after identifying the user file system, institute Stating judging unit 201 may determine that whether the storage location information in the metadata of the user file system only includes to have distributed There is the storage location information of user data, that is, judges that the storage location information in the metadata is to belong to the first storage location Information or second of storage location information.
Wherein, virtual machine corresponding with the user file system may include user's virtual disk, i.e., the described virtual machine It may include the user file system and user's virtual disk, the user data in the user file system is storage In user's virtual disk.
The location identification unit 202 is known if being judged as YES for the judging unit 201 according to the metadata The storage location of user data is assigned in the not described user file system, to be determined as effective storage location;
Specifically, the location identification unit 202 is according to the metadata if the judging unit 201 is judged as YES The storage location that user data has been assigned in the user file system is identified, to be determined as effective storage location.Wherein, institute Stating location identification unit 202 can further include: first determines subelement 2021, information extraction subelement 2022;
Described first determines subelement 2021, for the type according to the user file system identified, determines institute State the format of metadata;
The information extraction subelement 2022 reads the metadata for the format based on the metadata, to extract The storage location information of user data has been assigned in the metadata;
Described first determines subelement 2021, and it is right by the storage location information institute for being assigned user data to be also used to The storage location answered is determined as effective storage location;
Since the storage location information in the metadata only includes to be assigned the storage location information of user data, institute Determine that subelement 2021 can directly store all storage location information in the metadata as effective using described first Position, without distinguishing identification to the storage location information in the metadata extracted again.
The scanning determination unit 203 scans the user file if being judged as NO for the judging unit 201 System, to generate the storage location state table of corresponding with user file system user's virtual disk, and by the storage The corresponding storage location of storage location state that busy state is identified as in location status table is determined as effective storage location;
Specifically, the scanning determination unit 203 scans user's text if the judging unit 201 is judged as NO Part system, to generate the storage location state table of user's virtual disk corresponding with the user file system, the storage position The storage state for each storage unit that state table can indicate in user's virtual disk is set, the storage state, which is divided into, to be had State data memory and no data storage state, so being known that user's virtual magnetic by the storage location state table There is which storage location there are data in disk, which storage location is not no data.Specifically, the storage location state Table can be bitmap (bitmap images), in bitmap, the storage location that can will have data in user's virtual disk It is disposed as 1, the storage location of no data in user's virtual disk is disposed as 0, i.e. use in user file system User data is all stored in the storage location for being set as 1 in bitmap, so the scanning determination unit 203 can be by bitmap In be set as 1 storage location and be determined as effective storage location.
Wherein, the scanning determination unit 203 further comprises: reading scanning subelement 2031, creation mark subelement 2032, second subelement 2033 is determined;
The reading scans subelement 2031, for reading and scanning the metadata of the user file system, to extract Storage location information in the metadata;Storage location information in the metadata includes being assigned depositing for user data Store up location information and the unallocated storage location information for having user data;
The creation identifies subelement 2032, for creating user's virtual disk corresponding with the user file system Storage location state table, and by the storage location state table with the storage location information pair for being assigned user data The storage location status indicator answered is busy state, and unallocated will have number of users with described in the storage location state table According to the corresponding storage location status indicator of storage location information be idle state;
Described second determines subelement 2033, for will be identified as depositing for busy state in the storage location state table The corresponding storage location of storage location status is determined as effective storage location;
Specifically, the scanning subelement 2031 that reads is determined according to the type of the user file system identified The format of the metadata, then the format based on the metadata read and scan the metadata of the user file system, with The storage location information in the metadata is extracted, the storage location information in the metadata here is useful including having distributed The storage location information of user data and the unallocated storage location information for having user data, therefore, for determination more efficiently Effective storage location out, it is virtual that the creation mark subelement 2032 can create user corresponding with the user file system The storage location state table of disk, and by the storage location state table with the storage location for being assigned user data The corresponding storage location status indicator of information is busy state, and unallocated will be had in the storage location state table with described The corresponding storage location status indicator of the storage location information of user data is idle state, so that described second determines subelement 2033 can be true by the corresponding storage location of storage location state for being identified as busy state in the storage location state table It is set to effective storage location.The storage location state table includes the storage shape of each storage unit in user's virtual disk State, the storage location state table can be the forms such as bitmap, tree, array.The storage location state table is primarily to facilitate Background program is easier to find out effective storage location.
Further, then Fig. 7 is referred to, is a kind of structural representation for searching processing module 30 provided in an embodiment of the present invention Figure, the lookup processing module 30 may include: the first searching unit 301, the first extraction unit 302, migration units 303;
First searching unit 301, for search the source data in Storage Virtualization layer volume in effective storage Position has the storage location of mapping relations, to be determined as the target storage position of the source data volume;
Specifically, the user data can synchronize when being stored in user's virtual disk due to the user data It is stored in the source data volume in the Storage Virtualization layer, and the user data in user's virtual disk Storage location and the storage location of the user data in source data volume have mapping relations, so determining described After effective storage location, first searching unit 301, which can search, to be had in the volume of the source data in Storage Virtualization layer with described The storage location that storage location has mapping relations is imitated, to be determined as the target storage position of the source data volume.
First extraction unit 302, the data in target storage position for extracting the source data volume, with determination For user's valid data;
Specifically, after first searching unit 301 determines the target storage position that the source data is rolled up, described first Extraction unit 302 is the data in the target storage position for can extract the source data volume, to be determined as user's valid data, institute Stating user's valid data is the file in the user file system, the data stored in as described user's virtual disk.
The migration units 303 only include user's valid data to generate for copying user's valid data Target data volume, and to the target data volume carry out volume migration operation;
Specifically, the migration units 303 can copy user's valid data, only have comprising the user to generate The target data volume of data is imitated, and volume migration operation is carried out to target data volume, is avoided in the prior art directly to institute It states source data volume to be copied and migrated, avoids afterwards and the hash in source data volume is also copied, so as to To guarantee only to copy user's valid data in volume transition process, i.e., only copy the number of users in user's virtual disk According to.
Further, then Fig. 8 is referred to, is that another structure for searching processing module 30 provided in an embodiment of the present invention is shown It is intended to, the lookup processing module 30 may include: the second searching unit 304, the second extraction unit 305, template generation unit 306;
Second searching unit 304, for search the source data in Storage Virtualization layer volume in effective storage Position has the storage location of mapping relations, to be determined as the target storage position of the source data volume;
Second extraction unit 305, the data in target storage position for extracting the source data volume, with determination For user's valid data;
Second searching unit 304 and the specific embodiment of second extraction unit 305 are corresponding with above-mentioned Fig. 7 real It applies first searching unit 301 in example and first extraction unit 302 is identical, be not discussed here.
The template generation unit 306, it is only effective comprising the user to generate for copying user's valid data The data template of data;
Specifically, the template generation unit 306 can copy user's valid data, it only include the use to generate The data template of family valid data avoids in the prior art directly by source data volume as data template, so as to avoid data Occurs hash in template.
The template generation unit 306 is also used to be generated according to the data template for carrying out template deployment operation Target data volume;It only include user's valid data in target data volume, and the use in target data volume The storage location of family valid data is corresponding with the target storage position that the source data is rolled up;
Specifically, since the data template only includes user's valid data, so the template generation unit 306 Generating the target data for carrying out template deployment operation according to the data template and roll up also only can include user's significant figure According to only being copied to user's valid data during template imports and exports, avoid copy a large amount of useless Data.
Wherein, the lookup processing module 30 can also include first searching unit 301, first extraction simultaneously Unit 302, the migration units 303, second searching unit 304, second extraction unit 305 and the template are raw At unit 306, i.e., the described lookup processing module 30 can be realized simultaneously volume migration and template deployment;Wherein, it described first searches Unit 301 and second searching unit 304 can be merged into the same searching unit, first extraction unit 302 and institute Stating the second extraction unit 305 also can be merged into the same extraction unit.
Further, then Fig. 9 is referred to, is a kind of structural schematic diagram for obtaining module 10 provided in an embodiment of the present invention, The acquisition module 10 may include: reading unit 101, system identification unit 102;
The reading unit 101 for obtaining disk partition table, and reads the disk partition table, described to identify Target disk subregion in disk partition table;
Specifically, the 101 carry initial volume of reading unit described first is virtual disk, the virtual disk refers to described first Begin volume by virtualization software simulation and for the object that program is operated, the initial volume refers to the virtual disk pair The data answered are stored in the unit set in physical store, store form difference according to rear end, can be one in physical store A file is also possible to one piece of continuous physical space;The reading unit 101 obtains magnetic corresponding with the virtual disk again Disk partition table, and the disk partition table is read, to identify the target disk subregion in the disk partition table;The disk Partition table includes the information of at least one disk partition in the virtual disk, and the target disk subregion is described at least one A disk partition in a disk partition.
The system identification unit 102, for according to the file system identifier in the target disk subregion, identify with The corresponding user file system of the file system identifier;
Specifically, the system identification unit 102 can be known according to the file system identifier in the target disk subregion It Chu not the corresponding user file system of the target disk subregion.Wherein, the user file system in each disk partition can A corresponding specific mark.Wherein, each disk partition in the virtual disk may each comprise virtual machine, each virtual Machine may each comprise corresponding user file system and user's virtual disk.
The embodiment of the present invention is by identifying corresponding with target disk subregion user file system, and by user file system The storage location of middle user data is determined as effective storage location, and is searched in Storage Virtualization layer according to effective storage location Source data volume in user's valid data, can be generated only comprising user's valid data target data roll up so as to mesh When mark book migrate or template imports and exports, user's valid data can be only copied, to can avoid in virtualization ring Hash is copied in border, and then improves system performance.
Referring to Figure 10, it is a kind of structural schematic diagram of server provided in an embodiment of the present invention, the server 1000 It may include that (quantity of the processor 1001 in server 1000 can for processor 1001, communication interface 1002 and memory 1003 One or more is thought, in Figure 10 by taking a processor 1001 as an example).In some embodiments of the present invention, processor 1001 leads to Letter interface 1002 can be connected with memory 1003 by communication bus or other modes, wherein Figure 10 by communication bus to be connected It is connected in example.
Wherein, the communication interface 1002, for being communicated with client;
The memory 1003 is for storing program;
The processor 1001 is for executing described program, to realize
Disk partition table is obtained, and identifies the corresponding user file system of the target disk subregion in the disk partition table System;
The storage location of user data in the user file system is identified, to be determined as effective storage location;
According to effective storage location, user's valid data in the source data volume in Storage Virtualization layer are searched, And it generates the only target data comprising user's valid data and rolls up.
Wherein, the storage position of the processor 1001 user data in executing the identification user file system It sets, specific to execute when being determined as effective storage location:
Judge the storage location information in the metadata of the user file system whether only comprising being assigned number of users According to storage location information;
If being judged as YES, is identified in the user file system according to the metadata and be assigned depositing for user data Storage space is set, to be determined as effective storage location;
If being judged as NO, the user file system is scanned, to generate user corresponding with the user file system The storage location state table of virtual disk, and the storage location shape for busy state being identified as in the storage location state table The corresponding storage location of state is determined as effective storage location.
Wherein, the processor 1001 has divided in described identified in the user file system according to the metadata of execution Storage location equipped with user data is specific to execute when being determined as effective storage location:
According to the type of the user file system identified, the format of the metadata is determined;
Format based on the metadata reads the metadata, has been assigned user data to extract in the metadata Storage location information;
Storage location corresponding to the storage location information for being assigned user data is determined as effectively to store position It sets.
Wherein, the processor 1001 is executing the scanning user file system, to generate and user's text The storage location state table of the corresponding user's virtual disk of part system, and it is busy by being identified as in the storage location state table It is specific to execute when the corresponding storage location of storage location state of state is determined as effective storage location:
The metadata of the user file system is read and scans, to extract the storage location information in the metadata; Storage location information in the metadata includes being assigned the storage location information of user data and unallocated having had number of users According to storage location information;
Create the storage location state table of corresponding with user file system user's virtual disk, and by the storage Storage location status indicator corresponding with the storage location information for being assigned user data is non-empty in location status table Not busy state, and by the storage location state table with the unallocated corresponding storage of storage location information for having user data Location status is identified as idle state;
The corresponding storage location of storage location state that busy state is identified as in the storage location state table is true It is set to effective storage location.
Wherein, the processor 1001 is described according to effective storage location in execution, searches in Storage Virtualization layer In source data volume in user's valid data, and generate only comprising user's valid data target data volume when, specifically It executes:
Search the storage position in the source data volume in Storage Virtualization layer with effective storage location with mapping relations It sets, to be determined as the target storage position of the source data volume;
The data in the target storage position of the source data volume are extracted, to be determined as user's valid data;
User's valid data are copied, are rolled up with generating the only target data comprising user's valid data, and to institute It states target data volume and carries out volume migration operation.
Alternatively, the processor 1001 is described according to effective storage location in execution, search in Storage Virtualization layer In source data volume in user's valid data, and generate only comprising user's valid data target data volume when, specifically It executes:
Search the storage position in the source data volume in Storage Virtualization layer with effective storage location with mapping relations It sets, to be determined as the target storage position of the source data volume;
The data in the target storage position of the source data volume are extracted, to be determined as user's valid data;
User's valid data are copied, to generate the data template for only including user's valid data;
The target data for carrying out template deployment operation is generated according to the data template to roll up;In the target data volume Only include user's valid data, and the target data volume in user's valid data storage location and the source The target storage position of book is corresponding.
Wherein, the processor 1001 is executing the acquisition disk partition table, and identifies in the disk partition table It is specific to execute when the corresponding user file system of target disk subregion:
Disk partition table is obtained, and reads the disk partition table, to identify the target magnetic in the disk partition table Disk subregion;
According to the file system identifier in the target disk subregion, use corresponding with the file system identifier is identified Family file system.
The embodiment of the present invention is by identifying corresponding with target disk subregion user file system, and by user file system The storage location of middle user data is determined as effective storage location, and is searched in Storage Virtualization layer according to effective storage location Source data volume in user's valid data, can be generated only comprising user's valid data target data roll up so as to mesh When mark book migrate or template imports and exports, user's valid data can be only copied, to can avoid in virtualization ring Hash is copied in border, and then improves system performance.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the program can be stored in a computer-readable storage medium In, the program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, the storage medium can be magnetic Dish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access Memory, RAM) etc..
The above disclosure is only the preferred embodiments of the present invention, cannot limit the right model of the present invention with this certainly It encloses, therefore equivalent changes made in accordance with the claims of the present invention, is still within the scope of the present invention.

Claims (12)

1. a kind of Storage Virtualization data processing method characterized by comprising
Disk partition table is obtained, and identifies the corresponding user file system of the target disk subregion in the disk partition table;
Judge the storage location information in the metadata of the user file system whether only comprising being assigned user data Storage location information;
If being judged as YES, the storage position that user data has been assigned in the user file system is identified according to the metadata It sets, to be determined as effective storage location;
If being judged as NO, the user file system is scanned, it is virtual to generate user corresponding with the user file system The storage location state table of disk, and the storage location state pair for busy state being identified as in the storage location state table The storage location answered is determined as effective storage location;
According to effective storage location, user's valid data in the source data volume in Storage Virtualization layer are searched, and raw It is rolled up at the target data for only including user's valid data.
2. the method as described in claim 1, which is characterized in that described to identify the user file system according to the metadata In be assigned the storage location of user data, to be determined as effective storage location, comprising:
According to the type of the user file system identified, the format of the metadata is determined;
Format based on the metadata reads the metadata, and depositing for user data has been assigned in the metadata to extract Store up location information;
Storage location corresponding to the storage location information for being assigned user data is determined as effective storage location.
3. the method as described in claim 1, which is characterized in that the scanning user file system, with generate with it is described The storage location state table of the corresponding user's virtual disk of user file system, and will be identified as in the storage location state table The corresponding storage location of storage location state of busy state is determined as effective storage location, comprising:
The metadata of the user file system is read and scans, to extract the storage location information in the metadata;It is described Storage location information in metadata includes being assigned the storage location information of user data and unallocated having had user data Storage location information;
Create the storage location state table of corresponding with user file system user's virtual disk, and by the storage location Storage location status indicator corresponding with the storage location information for being assigned user data is busy shape in state table State, and by the storage location state table with the unallocated corresponding storage location of storage location information for having user data Status indicator is idle state;
The corresponding storage location of storage location state that busy state is identified as in the storage location state table is determined as Effective storage location.
4. the method as described in claim 1, which is characterized in that it is described according to effective storage location, it searches empty in storage User's valid data in source data volume in quasi-ization layer, and generate the only target data comprising user's valid data and roll up, Include:
The storage location in the source data volume in Storage Virtualization layer with effective storage location with mapping relations is searched, with It is determined as the target storage position of the source data volume;
The data in the target storage position of the source data volume are extracted, to be determined as user's valid data;
User's valid data are copied, are rolled up with generating the only target data comprising user's valid data, and to the mesh Mark book carries out volume migration operation.
5. the method as described in claim 1, which is characterized in that it is described according to effective storage location, it searches empty in storage User's valid data in source data volume in quasi-ization layer, and generate the only target data comprising user's valid data and roll up, Include:
The storage location in the source data volume in Storage Virtualization layer with effective storage location with mapping relations is searched, with It is determined as the target storage position of the source data volume;
The data in the target storage position of the source data volume are extracted, to be determined as user's valid data;
User's valid data are copied, to generate the data template for only including user's valid data;
The target data for carrying out template deployment operation is generated according to the data template to roll up;It is only wrapped in the target data volume Containing user's valid data, and the storage location and the source data of user's valid data in target data volume The target storage position of volume is corresponding.
6. the method as described in claim 1, which is characterized in that the acquisition disk partition table, and identify the disk partition The corresponding user file system of target disk subregion in table, comprising:
Disk partition table is obtained, and reads the disk partition table, to identify the target disk in the disk partition table point Area;
According to the file system identifier in the target disk subregion, user's text corresponding with the file system identifier is identified Part system.
7. a kind of Storage Virtualization data processing equipment characterized by comprising
Module is obtained, for obtaining disk partition table, and identifies the corresponding use of target disk subregion in the disk partition table Family file system;
Identification module, for identification in the user file system user data storage location, to be determined as effectively storing position It sets;
Processing module is searched, for according to effective storage location, searching in the source data volume in Storage Virtualization layer User's valid data, and generate the only target data comprising user's valid data and roll up;
Wherein, the identification module includes:
Judging unit, whether the storage location information in metadata for judging the user file system is only comprising having distributed There is the storage location information of user data;
Location identification unit identifies the user file according to the metadata if being judged as YES for the judging unit The storage location of user data is assigned in system, to be determined as effective storage location;
It scans determination unit and scans the user file system if being judged as NO for the judging unit, with generation and institute The storage location state table of the corresponding user's virtual disk of user file system is stated, and will be identified in the storage location state table It is determined as effective storage location for the corresponding storage location of storage location state of busy state.
8. device as claimed in claim 7, which is characterized in that the location identification unit includes:
First determines subelement, for the type according to the user file system identified, determines the lattice of the metadata Formula;
Information extraction subelement reads the metadata for the format based on the metadata, to extract in the metadata It has been assigned the storage location information of user data;
Described first determines subelement, is also used to storage corresponding to the storage location information for being assigned user data Position is determined as effective storage location.
9. device as claimed in claim 7, which is characterized in that the scanning determination unit includes:
Scanning subelement is read, for reading and scanning the metadata of the user file system, to extract in the metadata Storage location information;Storage location information in the metadata include be assigned user data storage location information and The unallocated storage location information for having user data;
Creation mark subelement, for creating the storage location state of user's virtual disk corresponding with the user file system Table, and by storage location corresponding with the storage location information for being assigned user data in the storage location state table Status indicator be busy state, and by the storage location state table with the unallocated storage location for having user data The corresponding storage location status indicator of information is idle state;
Second determines subelement, for will be identified as the storage location state pair of busy state in the storage location state table The storage location answered is determined as effective storage location.
10. device as claimed in claim 7, which is characterized in that the lookup processing module includes:
First searching unit has mapping with effective storage location for searching in the volume of the source data in Storage Virtualization layer The storage location of relationship, to be determined as the target storage position of the source data volume;
First extraction unit, the data in target storage position for extracting the source data volume are effective to be determined as user Data;
Migration units, for copying user's valid data, to generate the target data for only including user's valid data Volume, and volume migration operation is carried out to target data volume.
11. device as claimed in claim 7, which is characterized in that the lookup processing module includes:
Second searching unit has mapping with effective storage location for searching in the volume of the source data in Storage Virtualization layer The storage location of relationship, to be determined as the target storage position of the source data volume;
Second extraction unit, the data in target storage position for extracting the source data volume are effective to be determined as user Data;
Template generation unit, for copying user's valid data, to generate the data for only including user's valid data Template;
The template generation unit is also used to generate the target data for carrying out template deployment operation according to the data template Volume;It only include user's valid data in target data volume, and user's significant figure in target data volume According to storage location it is corresponding with the target storage position that the source data is rolled up.
12. device as claimed in claim 7, which is characterized in that the acquisition module includes:
Reading unit for obtaining disk partition table, and reads the disk partition table, to identify in the disk partition table Target disk subregion;
System identification unit, for according to the file system identifier in the target disk subregion, identifying and the file system System identifies corresponding user file system.
CN201510686112.1A 2015-10-21 2015-10-21 A kind of Storage Virtualization data processing method and device Active CN105260323B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510686112.1A CN105260323B (en) 2015-10-21 2015-10-21 A kind of Storage Virtualization data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510686112.1A CN105260323B (en) 2015-10-21 2015-10-21 A kind of Storage Virtualization data processing method and device

Publications (2)

Publication Number Publication Date
CN105260323A CN105260323A (en) 2016-01-20
CN105260323B true CN105260323B (en) 2019-02-05

Family

ID=55100022

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510686112.1A Active CN105260323B (en) 2015-10-21 2015-10-21 A kind of Storage Virtualization data processing method and device

Country Status (1)

Country Link
CN (1) CN105260323B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107332904A (en) * 2017-06-29 2017-11-07 郑州云海信息技术有限公司 A kind of data migration method, apparatus and system across storage system
CN113703682B (en) * 2021-08-26 2024-02-23 杭州华橙软件技术有限公司 File mounting method and device, storage medium and electronic device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101609393A (en) * 2009-07-21 2009-12-23 北京数帅科技有限公司 The operating system access of non-LVM is based on the method for the memory device of LV volume
CN104461685A (en) * 2014-11-19 2015-03-25 华为技术有限公司 Virtual machine processing method and virtual computer system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5700262B2 (en) * 2010-02-24 2015-04-15 マーベル ワールド トレード リミテッド Cache based on spatial distribution of access to data storage devices

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101609393A (en) * 2009-07-21 2009-12-23 北京数帅科技有限公司 The operating system access of non-LVM is based on the method for the memory device of LV volume
CN104461685A (en) * 2014-11-19 2015-03-25 华为技术有限公司 Virtual machine processing method and virtual computer system

Also Published As

Publication number Publication date
CN105260323A (en) 2016-01-20

Similar Documents

Publication Publication Date Title
CN111008185B (en) Data sharing method, system and equipment
EP3035197B1 (en) File migration method and apparatus and storage device
EP3138010B1 (en) System and method for optimized signature comparisons and data replication
EP3103025B1 (en) Content based organization of file systems
CN103970585B (en) Create the method and device of virtual machine
KR101403416B1 (en) Method system for managing virtual machine storage space and physical host
CN103699585B (en) Methods, devices and systems for file metadata storage and file recovery
US20150339077A1 (en) Logical volume space sharing
US9792075B1 (en) Systems and methods for synthesizing virtual hard drives
US9558074B2 (en) Data replica control
US10089024B2 (en) Memory deduplication protection for memory pages
US20120167087A1 (en) Apparatus and method for driving virtual machine, and method for deduplication of virtual machine image
CN104978151A (en) Application awareness based data reconstruction method in repeated data deletion and storage system
WO2016010570A1 (en) Partial snapshot creation
CN111090618B (en) Data reading method, system and equipment
JP2012089094A5 (en)
US12124561B2 (en) Embedding security requirements in container images
CN110008197B (en) Data processing method and system, electronic equipment and storage medium
CN108073352A (en) Virtual disk processing method and processing device
CN107656796B (en) Virtual machine cold migration method, system and equipment
CN116414801A (en) Data migration method, device, computer equipment and storage medium
CN105260323B (en) A kind of Storage Virtualization data processing method and device
CN107329836B (en) Multi-system memory management method and device and mobile terminal
CN111767287A (en) Data import method, device, equipment and computer storage medium
CN108897858A (en) The appraisal procedure and device, electronic equipment of distributed type assemblies index fragment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant