WO2017054636A1 - Procédé et appareil pour traiter des instantanés de machine virtuelle - Google Patents

Procédé et appareil pour traiter des instantanés de machine virtuelle Download PDF

Info

Publication number
WO2017054636A1
WO2017054636A1 PCT/CN2016/098524 CN2016098524W WO2017054636A1 WO 2017054636 A1 WO2017054636 A1 WO 2017054636A1 CN 2016098524 W CN2016098524 W CN 2016098524W WO 2017054636 A1 WO2017054636 A1 WO 2017054636A1
Authority
WO
WIPO (PCT)
Prior art keywords
virtual
snapshot
processed
virtual resource
physical space
Prior art date
Application number
PCT/CN2016/098524
Other languages
English (en)
Chinese (zh)
Inventor
严进才
吴建成
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2017054636A1 publication Critical patent/WO2017054636A1/fr

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers

Definitions

  • the embodiments of the present invention relate to the field of communications, and in particular, to a virtual snapshot processing method and apparatus.
  • a storage snapshot (hereinafter referred to as a snapshot) is an important storage technology in a disk array. This snapshot is generally performed at the Logic Unit Number (LUN) level (block level), independent of the operating system and file system. Is a mirror of a data set at a particular moment. Generally used for data backup and restoration, it can also be used for data analysis and mining.
  • LUN Logic Unit Number
  • block level block level
  • Copy-On-Write is the most commonly used technique for implementing snapshots.
  • snapshot source volume When data is first written to a storage location (snapshot source volume), the original content is first used. Read out, write to another location (storage space reserved for the snapshot), then write the data to the storage device (snapshot source volume), and will no longer write to the same location of the snapshot source volume Perform a copy on write.
  • COW it is necessary to reserve a certain amount of snapshot storage space for the snapshot of the storage device.
  • the existing storage products either create enough logical unit number LUNs for the snapshots in advance, or create a logical unit number LUN of a certain capacity for the snapshots while creating the snapshots.
  • the data on the snapshot volume is actually distributed in two physical spaces. If the data that has not changed is still on the snapshot source volume since the snapshot was created, the data that has changed is Has been copied to the snapshot reservation.
  • the exception record In order to achieve data reading of the snapshot volume, there must be an additional mechanism to record the data changes of the snapshot source volume, and to record the mapping relationship before and after the data copy, we call the exception record.
  • the storage products in the industry usually allocate a certain amount of metadata logical unit number LUNs to save data changes and data mapping relationships, or directly use a solid state hard disk (Solid State Disk, SSD for short). Metadata logical unit number LUN. Using the metadata logical unit number LUN will bring some performance loss to the data service of the source volume.
  • the metadata needs to be initialized.
  • the metadata needs to be additionally written. , added a write operation.
  • the embodiment of the invention provides a virtual snapshot processing method and device, so as to at least solve the virtual snapshot in the related art.
  • a virtual snapshot processing method and device In the process of copying COW during writing, it is necessary to read and write additional metadata information, resulting in a problem of reduced read and write speed.
  • a virtual snapshot processing method including: acquiring a virtual resource identifier corresponding to a virtual snapshot to be processed, where the current virtual snapshot to be processed is used for recording and the current Data change of the snapshot source volume corresponding to the virtual snapshot to be processed; searching for a physical space in the virtual resource for the virtual resource identifier; if the physical space is not allocated for the virtual resource identifier, The virtual resource identifier allocates the physical space and performs a copy-on-write COW operation corresponding to the data change in the physical space.
  • the method before the performing the copy space COW operation corresponding to the data change in the physical space, the method further includes: determining whether all the pending processes are obtained.
  • the virtual resource identifier corresponding to the virtual snapshot if the virtual resource identifier corresponding to the virtual snapshot to be processed is obtained, the virtual resource identifier corresponding to the virtual snapshot to be processed is stored in the virtual resource identifier array to be processed. in.
  • the allocating the physical space for the virtual resource identifier, and performing a copy-on-write COW operation corresponding to the data change in the physical space includes: identifying, in the array of the to-be-processed virtual resource identifier Each of the virtual resource identifiers allocates a physical space and performs the copy-on-write COW operation in a corresponding physical space.
  • the acquiring the virtual resource identifier corresponding to the current virtual snapshot to be processed includes: acquiring a target logical block address where the data change occurs in the snapshot source volume; determining at least according to the target logical block address The virtual resource identifier corresponding to the current virtual snapshot to be processed.
  • the method before acquiring the virtual resource identifier corresponding to the current virtual snapshot to be processed, the method further includes: creating a virtual resource for the virtual snapshot according to the logical block address of the snapshot source volume, where the granularity of the virtual resource Matches the size of the unit data block in the snapshot source volume.
  • the method further includes: performing an operation performed by the current virtual snapshot to be processed; if the current virtual snapshot to be processed is executed If the operation is a write operation, after the physical space is allocated for the virtual resource identifier, the write-time copy COW operation corresponding to the data change is not performed in the physical space; if the current pending virtual The operation performed by the snapshot is a read operation, and the data in the physical space is read.
  • a virtual snapshot processing apparatus including: a first acquiring module, configured to acquire a virtual resource identifier corresponding to a virtual snapshot to be processed, where the current virtual to be processed The snapshot is used to record the data change of the snapshot source volume corresponding to the current virtual snapshot to be processed; the query module is configured to find in the virtual resource whether the physical space is allocated for the virtual resource identifier; the first processing module, setting Assigning the physical space to the virtual resource identifier if the physical space is not allocated for the virtual resource identifier, and The physical space performs a copy-on-write COW operation corresponding to the data change.
  • the apparatus further includes: a determining module, configured to allocate the physical space for the virtual resource identifier, and perform a copy-on-write COW operation corresponding to the data change in the physical space And determining whether the virtual resource identifier corresponding to the virtual snapshot to be processed is obtained, and the saving module is configured to: when all the virtual resource identifiers corresponding to the virtual snapshots to be processed are obtained, all the pending virtual snapshots are obtained.
  • the corresponding virtual resource identifier is stored in the array of pending virtual resource identifiers.
  • the first processing module is further configured to allocate a physical space for each of the virtual resource identifiers in the to-be-processed virtual resource identifier array, and perform the write-time copy COW operation in a corresponding physical space.
  • the first obtaining module includes: an acquiring unit, configured to acquire a target logical block address where the data change occurs in the snapshot source volume; and a determining unit configured to be at least according to the target logical block The address determines the virtual resource identifier corresponding to the current virtual snapshot to be processed.
  • the identifier is used to identify the target logical block address
  • the N is used to identify the total amount of the virtual snapshot
  • the M is used to identify the size of the snapshot source volume
  • the D is used to identify the unit in the virtual snapshot. The size of the data block.
  • the device further includes: a creating module, configured to create a virtual resource for the virtual snapshot according to the logical block address of the snapshot source volume before acquiring the virtual resource identifier corresponding to the current virtual snapshot to be processed,
  • the granularity of the virtual resource matches the size of the unit data block in the snapshot source volume.
  • the device further includes: a second acquiring module, configured to: after searching, in the virtual resource, whether the physical space is allocated for the virtual resource identifier, acquiring an operation performed by the current virtual snapshot to be processed; a processing module, configured to: when the operation performed by the current virtual snapshot to be processed is a write operation, after the physical space is allocated for the virtual resource identifier, the data is not executed in the physical space. Changing the corresponding copy-on-write COW operation; the reading module is configured to read the data in the physical space when the operation performed by the current virtual snapshot to be processed is a read operation.
  • a computer storage medium is further provided, and the computer storage medium may store an execution instruction for executing the virtual snapshot processing method in the foregoing embodiment.
  • the virtual resource identifier corresponding to the virtual snapshot to be processed is used to record the data change of the snapshot source volume corresponding to the current virtual snapshot to be processed, and the virtual resource is used in the virtual resource.
  • Copy COW operations while writing That is, it is found in the virtual resource whether the physical space is allocated for the virtual resource identifier, as the basis for performing the copy-on-write COW operation corresponding to the data change, without additional metadata to save the data change and the data mapping relationship, resulting in additional Metadata read and write operations.
  • FIG. 1 is a flowchart of a virtual snapshot processing method according to an embodiment of the present invention.
  • FIG. 2 is a schematic structural diagram of a virtualized resource volume according to an embodiment of the present invention.
  • FIG. 3 is a schematic diagram of a relationship between a source volume, a snapshot volume, and a resource volume LBA according to an embodiment of the present invention
  • FIG. 4 is a schematic flow chart of source volume write data according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of a process of reading a snapshot volume according to an embodiment of the present invention.
  • FIG. 6 is a structural block diagram of a virtual snapshot processing apparatus according to an embodiment of the present invention.
  • FIG. 7 is a structural block diagram (1) of a virtual snapshot processing apparatus according to an embodiment of the present invention.
  • FIG. 8 is a structural block diagram (2) of a virtual snapshot processing apparatus according to an embodiment of the present invention.
  • FIG. 9 is a structural block diagram (3) of a virtual snapshot processing apparatus according to an embodiment of the present invention.
  • FIG. 10 is a structural block diagram (4) of a virtual snapshot processing apparatus according to an embodiment of the present invention.
  • FIG. 1 is a flowchart of a virtual snapshot processing method according to an embodiment of the present invention. As shown in FIG. 1 , the process includes the following steps:
  • Step S102 Acquire a virtual resource identifier corresponding to the current virtual snapshot to be processed, where the current virtual snapshot to be processed is used to record data changes of the snapshot source volume corresponding to the current virtual snapshot to be processed.
  • Step S104 Find whether a physical space has been allocated for the virtual resource identifier.
  • Step S106 If it is found that the physical space is not allocated for the virtual resource identifier, allocate the physical space for the virtual resource identifier, and perform a copy-on-write COW operation corresponding to the data change in the physical space.
  • the foregoing virtual snapshot processing method includes, but is not limited to, a snapshot technology applied to a storage system, and different related technologies require additional metadata to save data changes and data mapping relationships, resulting in an increase.
  • the additional metadata read and write operations, but find in the virtual resources whether the physical space has been allocated for the virtual resource identifier, as the basis for whether to perform the copy-on-copy COW operation corresponding to the data change, thereby solving the related technology, in the virtual
  • it is necessary to read and write additional metadata information which causes the problem of lowering the read/write speed, thereby improving the read/write speed and further improving the input and output IO throughput.
  • the foregoing virtual snapshot to be processed includes, but is not limited to, a virtual snapshot to be processed that performs a write operation, and a virtual snapshot to be processed that performs a read operation, and does not do any limited.
  • the method further includes, but is not limited to, when the operation performed by the current virtual snapshot to be processed is a write operation.
  • the write-time copy COW operation corresponding to the data change is not performed in the physical space; when the operation performed by the current virtual snapshot to be processed is a read operation, the read is performed. Data in physical space.
  • the virtual resource identifier corresponding to the current virtual snapshot to be processed including but not limited to: creating a virtual resource for the virtual snapshot according to the logical block address of the snapshot source volume.
  • creating a virtual resource for the virtual snapshot according to the logical block address of the snapshot source volume.
  • the physical storage space is actually occupied, which causes a problem that the utilization of the storage space is reduced.
  • the embodiment of the invention implements a resource volume by using a virtualization method, which can maximize storage space utilization.
  • a virtualization method which can maximize storage space utilization.
  • all user capacity is allocated in the form of virtual storage, and the actual physical disk space will be allocated according to actual usage. It can also be called write allocation.
  • write allocation As a result, the physical disk capacity used is significantly reduced, resulting in more efficient storage space utilization.
  • capacity utilization reaches a predefined threshold, a warning is issued when additional physical disks need to be added to avoid capacity shortages.
  • FIG. 2 is a schematic diagram of the structure of the virtualized resource volume according to an embodiment of the present invention.
  • the resource volume virtualization in the embodiment of the present invention uses a Linux radix tree.
  • Each node has 64 slots, and the key is a logical number (VDBLK) of the data block, and each data item (item) is a data block corresponding to the data block.
  • VDBLK logical number
  • each data item (item) is a data block corresponding to the data block.
  • the physical address, the key value from left to right represents the position of the 1-3th node (assuming only 3 layers). Nodes without children do not appear in the picture. Therefore, the radix tree provides efficient storage for sparse trees. Instead of fixed-size arrays, it provides a quick lookup of key-to-pointers, which is a quick lookup of virtual blocks to physical addresses.
  • the above data block corresponds to data entry 6 in FIG.
  • FIG. 3 is a schematic diagram showing the relationship between a source volume, a snapshot volume, and a resource volume LBA according to an embodiment of the present invention.
  • the snapshot COW process does not require additional metadata information, reduces additional metadata reading and writing, and improves input and output IO throughput.
  • Step S11 determining whether the virtual resource identifier corresponding to all the virtual snapshots to be processed is obtained
  • Step S12 If the virtual resource identifier corresponding to the virtual snapshot to be processed is obtained, the virtual resource identifier corresponding to the virtual snapshot to be processed is stored in the virtual resource identifier array to be processed.
  • the virtual resource identifiers corresponding to all the virtual snapshots to be processed are stored in the virtual resource identifier array to be processed, so as to perform corresponding operations on all the virtual snapshots to be processed. , such as write and read operations.
  • the related art further solves the problem that in the process of copying the COW during the virtual snapshot writing, the additional metadata information needs to be read and written, resulting in a problem of lowering the read/write speed, thereby improving the read/write speed and further improving the input and output.
  • the effect of IO throughput is the effect of IO throughput.
  • allocating the physical space to the virtual resource identifier, and performing a copy-on-write COW operation corresponding to the data change in the physical space includes the following steps:
  • Step S21 allocate a physical space for each virtual resource identifier in the virtual resource identifier array to be processed, and perform a copy-on-write COW operation in the corresponding physical space.
  • the physical space is allocated for each virtual resource identifier in the virtual resource identifier array to be processed, and the COW operation is performed when the write is performed in the corresponding physical space, thereby further solving the related art.
  • it is necessary to read and write additional metadata information, which causes the problem of lowering the read/write speed, thereby improving the read/write speed and further improving the input and output IO throughput.
  • obtaining the virtual resource identifier corresponding to the current virtual snapshot to be processed includes the following steps:
  • Step S31 acquiring a target logical block address where the data change occurs in the snapshot source volume
  • Step S32 Determine, according to the target logical block address, the virtual resource identifier corresponding to the current virtual snapshot to be processed.
  • the virtual virtual snapshot corresponding to the current virtual snapshot is determined according to the target logical block address.
  • the resource identifier, and when the virtual snapshot is written or read, the corresponding location can be found by the virtual resource identifier.
  • VDBLK in the above formula is used to identify the virtual resource identifier corresponding to the current virtual snapshot to be processed
  • LBA is used to identify the target logical block address
  • N is used to identify the total number of virtual snapshots
  • M is used to identify The size of the snapshot source volume
  • D is used to identify the size of the unit data block in the virtual snapshot.
  • the source volume is 10G
  • Change that is, the above LBA is 2G
  • mapping relationship between the source volume and the resource volume can be obtained by simple calculation without the exception record in the traditional incremental snapshot implementation in the related art.
  • the method before acquiring the virtual resource identifier corresponding to the current virtual snapshot to be processed, the method further includes the following steps:
  • Step S41 Create a virtual resource for the virtual snapshot according to the logical block address of the snapshot source volume, where the granularity of the virtual resource matches the size of the unit data block in the snapshot source volume.
  • the granularity of the resource volume virtualization is consistent with the size of the snapshot data block, so that the LBA corresponding to the source volume of the source volume can be quickly queried on the virtual resource volume according to the LBA of the source volume. Whether the COW operation has been performed on the snapshot, so that the snapshot source volume bitmap metadata is no longer needed.
  • FIG. 4 is a schematic flow chart of source volume write data according to an embodiment of the present invention. Assume that the size of the source volume is M, the size of the data block is D, and the LBA is the source volume write address.
  • the process of writing the source volume in this embodiment includes the following steps:
  • Step S401 Acquire the first snapshot of the source volume configuration, and proceed to step S402;
  • Step S402 determining whether all snapshots of the source volume configuration are processed: when the result is yes, proceeding to step S409; and if the result is no, proceeding to step S403;
  • Step S404 Query the calculated VDBLK virtual data block number in the virtualized resource volume to allocate physical space: when the result is yes, proceed to step S405; when the result is no, proceed to step S406;
  • Step S405 in the virtualized resource volume, the VDBLK virtual data block number has been allocated physical space, does not need to perform COW operation, proceeds to step S408;
  • Step S406 in the virtualized resource volume, the VDBLK virtual data block number is not allocated physical space, need to perform COW operation, proceeds to step S407;
  • Step S407 Add the VDBLK virtual data block number to the VDBLK array to be processed, and proceed to step S408;
  • Step S408 Acquire the next snapshot of the source volume configuration, proceeds to step S402;
  • Step S409 determining whether the VDBLK array to be processed is empty: when the result is yes, proceed to step S414; when the result is no, proceed to step S410;
  • Step S410 Allocating physical disk space on the resource volume for the data block on the source volume, proceeding to step S411;
  • Step S411 reading the data block data corresponding to the source volume LBA address, proceeds to step S412;
  • Step S412 The read data is written to the allocated physical disk space on the resource volume, proceeds to step S414;
  • Step S414 The physical address corresponding to each VDBLK in the VDBLK array item to be processed is modified to the assigned physical space address, proceeds to step S414;
  • Step S414 all snapshots have been COW operations, proceeds to step S415;
  • Step S415 data is written to the source volume; step S416;
  • Step S416 The write source volume ends.
  • Step S51 acquiring an operation performed by the current virtual snapshot to be processed
  • Step S52 If the operation performed by the current virtual snapshot to be processed is a write operation, after the physical space is allocated for the virtual resource identifier, the write-time copy COW corresponding to the data change is not performed in the physical space. operating;
  • Step S53 If the operation performed by the current virtual snapshot to be processed is a read operation, the data in the physical space is read.
  • the operation performed on the current virtual snapshot to be processed is a write operation
  • the write-time copy COW operation corresponding to the data change is no longer performed in the physical space
  • the operation performed by the current virtual snapshot to be processed is a read operation
  • FIG. 5 is a schematic diagram of a process of reading a snapshot volume according to an embodiment of the present invention. It is assumed that the size of the source volume is M, and the size of the data block is D, and the Nth snapshot is processed.
  • the process of reading the snapshot volume in the embodiment of the present invention includes the following steps:
  • Step S501 Start reading the snapshot volume, and proceed to step S502;
  • Step S503 Query the calculated VDBLK virtual data block number in the virtualized resource volume to allocate physical space, when the result is yes, proceed to step S505; when the result is no, proceed to step S505;
  • Step S504 reading the snapshot resource volume, proceeding to step S506;
  • Step S505 reading the source volume, proceeds to step S506;
  • Step S506 Read the end of the snapshot volume.
  • the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases, the former is A better implementation.
  • the technical solution of the present invention in essence or the contribution to the related art can be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk, CD-ROM).
  • the instructions include a number of instructions for causing a terminal device (which may be a cell phone, computer, server, or network device, etc.) to perform the methods described in various embodiments of the present invention.
  • a virtual snapshot processing device is also provided, which is used to implement the foregoing embodiments and preferred embodiments, and has not been described again.
  • the term "module” may implement a combination of software and/or hardware of a predetermined function.
  • the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
  • FIG. 6 is a structural block diagram of a virtual snapshot processing apparatus according to an embodiment of the present invention. As shown in FIG. 6, the apparatus includes:
  • the first obtaining module 62 is configured to obtain the virtual resource identifier corresponding to the current virtual snapshot to be processed, where the current virtual snapshot to be processed is used to record the data of the snapshot source volume corresponding to the current virtual snapshot to be processed. Variety;
  • the query module 64 is configured to find in the virtual resource whether a physical space has been allocated for the virtual resource identifier
  • the first processing module 66 is configured to: if the physical space is not allocated for the virtual resource identifier, allocate the physical space for the virtual resource identifier, and perform a copy-on-write corresponding to the data change in the physical space. COW operation.
  • the foregoing virtual snapshot processing apparatus includes, but is not limited to, a snapshot technology applied to a storage system, and different related technologies require additional metadata to save data changes and data mapping relationships, resulting in an increase.
  • the additional metadata read and write operations, but find in the virtual resources whether the physical space has been allocated for the virtual resource identifier, as the basis for whether to perform the copy-on-copy COW operation corresponding to the data change, thereby solving the related technology, in the virtual
  • it is necessary to read and write additional metadata information which causes the problem of lowering the read/write speed, thereby improving the read/write speed and further improving the input and output IO throughput.
  • the foregoing virtual snapshot to be processed includes, but is not limited to, a virtual snapshot to be processed that performs a write operation, and a virtual snapshot to be processed that performs a read operation, and does not do any limited.
  • the method further includes, but is not limited to, when the operation performed by the current virtual snapshot to be processed is a write operation.
  • the write-time copy COW operation corresponding to the data change is not performed in the physical space; when the operation performed by the current virtual snapshot to be processed is a read operation, the read is performed. Data in physical space.
  • the virtual resource identifier corresponding to the current virtual snapshot to be processed including but not limited to: creating a virtual resource for the virtual snapshot according to the logical block address of the snapshot source volume.
  • creating a virtual resource for the virtual snapshot according to the logical block address of the snapshot source volume.
  • the physical storage space is actually occupied, which causes a problem that the utilization of the storage space is reduced.
  • the embodiment of the invention implements a resource volume by using a virtualization device, which can maximize the utilization of the storage space.
  • a virtualization device which can maximize the utilization of the storage space.
  • all user capacity is allocated in the form of virtual storage, and the actual physical disk space will be allocated according to actual usage. It can also be called write allocation.
  • write allocation As a result, the physical disk capacity used is significantly reduced, resulting in more efficient storage space utilization.
  • capacity utilization reaches a predefined threshold, a warning is issued when additional physical disks need to be added to avoid capacity shortages.
  • FIG. 2 is a schematic diagram of the structure of the virtualized resource volume according to an embodiment of the present invention.
  • the resource volume virtualization in the embodiment of the present invention uses a Linux radix tree.
  • Each node has 64 slots, and the key is a logical number (VDBLK) of the data block, and each data item (item) is a data block corresponding to the data block.
  • VDBLK logical number
  • each data item (item) is a data block corresponding to the data block.
  • the physical address, the key value from left to right represents the position of the 1-3th node (assuming only 3 layers). Nodes without children do not appear in the picture. Therefore, the radix tree provides efficient storage for sparse trees. Instead of fixed-size arrays, it provides a quick lookup of key-to-pointers, which is a quick lookup of virtual blocks to physical addresses.
  • the above data block corresponds to data entry 6 in FIG.
  • FIG. 3 is a schematic diagram showing the relationship between a source volume, a snapshot volume, and a resource volume LBA according to an embodiment of the present invention.
  • the snapshot COW process does not require additional metadata information, reducing additional metadata reading.
  • Write improve the input and output IO throughput rate.
  • FIG. 7 is a structural block diagram (1) of a virtual snapshot processing apparatus according to an embodiment of the present invention. As shown in FIG. 7, the apparatus includes:
  • the determining module 72 is configured to: after the physical space is allocated for the virtual resource identifier, and before the copy space COW operation corresponding to the data change is performed in the physical space, determine whether the virtual snapshot corresponding to all the virtual snapshots is obtained.
  • Virtual resource identifier
  • the saving module 74 is configured to: when the virtual resource identifiers corresponding to the virtual snapshots to be processed are obtained, store the virtual resource identifiers corresponding to the virtual snapshots to be processed into the virtual resource identifier array to be processed.
  • the virtual resource identifiers corresponding to all the virtual snapshots to be processed are stored in the virtual resource identifier array to be processed, so as to perform corresponding operations on all the virtual snapshots to be processed. , such as write and read operations.
  • the related art further solves the problem that in the process of copying the COW during the virtual snapshot writing, the additional metadata information needs to be read and written, resulting in a problem of lowering the read/write speed, thereby improving the read/write speed and further improving the input and output.
  • the effect of IO throughput is the effect of IO throughput.
  • the first processing module 66 is further configured to allocate a physical space for each of the virtual resource identifiers in the virtual resource identifier array to be processed, and perform the copy-on-write COW operation in the corresponding physical space.
  • the physical space is allocated for each virtual resource identifier in the virtual resource identifier array to be processed, and the COW operation is performed when the write is performed in the corresponding physical space, thereby further solving the related art.
  • it is necessary to read and write additional metadata information, which causes the problem of lowering the read/write speed, thereby improving the read/write speed and further improving the input and output IO throughput.
  • FIG. 8 is a structural block diagram (2) of a virtual snapshot processing apparatus according to an embodiment of the present invention.
  • the first obtaining module 62 includes:
  • an obtaining unit 82 configured to acquire a target logical block address where the data change occurs in the snapshot source volume
  • the determining unit 84 is configured to determine, according to the target logical block address, the virtual resource identifier corresponding to the current virtual snapshot to be processed.
  • the virtual resource identifier corresponding to the current virtual snapshot to be processed is determined according to the target logical block address, and then, when the virtual snapshot is written or read, the virtual resource identifier may be found by using the virtual resource identifier. The corresponding location.
  • the virtual resource identifier corresponding to the processed virtual snapshot the LBA is used to identify the target logical block address, the N is used to identify the total amount of the virtual snapshot, and the M is used to identify the size of the snapshot source volume, and the D is used to identify the virtual The size of the unit data block in the snapshot.
  • VDBLK in the above formula is used to identify the virtual resource identifier corresponding to the current virtual snapshot to be processed
  • LBA is used to identify the target logical block address
  • N is used to identify the total number of virtual snapshots
  • M is used to identify The size of the snapshot source volume
  • D is used to identify the size of the unit data block in the virtual snapshot.
  • the source volume is 10G
  • Change that is, the above LBA is 2G
  • mapping relationship between the source volume and the resource volume can be obtained by simple calculation without the exception record in the traditional incremental snapshot implementation in the related art.
  • FIG. 9 is a structural block diagram (3) of a virtual snapshot processing apparatus according to an embodiment of the present invention. As shown in FIG. 9, the apparatus includes:
  • the creating module 92 is configured to create a virtual resource for the virtual snapshot according to the logical block address of the snapshot source volume before obtaining the virtual resource identifier corresponding to the virtual snapshot to be processed, where the granularity of the virtual resource is The size of the unit data block in the snapshot source volume matches.
  • the granularity of the resource volume virtualization is consistent with the size of the snapshot data block, so that the LBA corresponding to the source volume of the source volume can be quickly queried on the virtual resource volume according to the LBA of the source volume. Whether the COW operation has been performed on the snapshot, so that the snapshot source volume bitmap metadata is no longer needed.
  • FIG. 4 is a schematic flow chart of source volume write data according to an embodiment of the present invention. Assume that the size of the source volume is M, the size of the data block is D, and the LBA is the source volume write address.
  • the process of writing the source volume in this embodiment includes the following steps:
  • Step S401 Acquire the first snapshot of the source volume configuration, and proceed to step S402;
  • Step S402 determining whether all snapshots of the source volume configuration are processed: when the result is yes, proceeding to step S409; and if the result is no, proceeding to step S403;
  • Step S404 Query the calculated VDBLK virtual data block number in the virtualized resource volume to allocate physical space: when the result is yes, proceed to step S405; when the result is no, proceed to step S406;
  • Step S405 in the virtualized resource volume, the VDBLK virtual data block number has been allocated physical space, does not need to perform COW operation, proceeds to step S408;
  • Step S406 In the virtualized resource volume, the VDBLK virtual data block number does not allocate physical space, and COW operation is required. Go to step S407;
  • Step S407 Add the VDBLK virtual data block number to the VDBLK array to be processed, and proceed to step S408;
  • Step S408 Acquire the next snapshot of the source volume configuration, proceeds to step S402;
  • Step S409 determining whether the VDBLK array to be processed is empty: when the result is yes, proceed to step S414; when the result is no, proceed to step S410;
  • Step S410 Allocating physical disk space on the resource volume for the data block on the source volume, proceeding to step S411;
  • Step S411 reading the data block data corresponding to the source volume LBA address, proceeds to step S412;
  • Step S412 The read data is written to the allocated physical disk space on the resource volume, proceeds to step S414;
  • Step S414 The physical address corresponding to each VDBLK in the VDBLK array item to be processed is modified to the assigned physical space address, proceeds to step S414;
  • Step S414 all snapshots have been COW operations, proceeds to step S415;
  • Step S415 data is written to the source volume; step S416;
  • Step S416 The write source volume ends.
  • FIG. 10 is a structural block diagram (4) of a virtual snapshot processing apparatus according to an embodiment of the present invention. As shown in FIG. 10, the apparatus includes:
  • the second obtaining module 102 is configured to: after finding, in the virtual resource, whether the physical space is allocated for the virtual resource identifier, acquiring an operation performed by the current virtual snapshot to be processed;
  • the second processing module 104 is configured to: when the operation performed by the current virtual snapshot to be processed is a write operation, after the physical space is allocated for the virtual resource identifier, the data is not executed in the physical space. Change the corresponding copy-on-write COW operation;
  • the reading module 106 is configured to read data in the physical space when the operation performed by the current virtual snapshot to be processed is a read operation.
  • the operation performed on the current virtual snapshot to be processed is a write operation
  • the write-time copy COW operation corresponding to the data change is no longer performed in the physical space
  • the operation performed by the current virtual snapshot to be processed is a read operation
  • FIG. 5 is a schematic diagram of a process of reading a snapshot volume according to an embodiment of the present invention. It is assumed that the size of the source volume is M, and the size of the data block is D, and the Nth snapshot is processed.
  • the process of reading the snapshot volume in the embodiment of the present invention includes the following steps:
  • Step S501 Start reading the snapshot volume, and proceed to step S502;
  • Step S503 Query the calculated VDBLK virtual data block number in the virtualized resource volume to allocate physical space, when the result is yes, proceed to step S505; when the result is no, proceed to step S505;
  • Step S504 reading the snapshot resource volume, proceeding to step S506;
  • Step S505 reading the source volume, proceeds to step S506;
  • Step S506 Read the end of the snapshot volume.
  • each of the above modules may be implemented by software or hardware.
  • the foregoing may be implemented by, but not limited to, the foregoing modules are all located in the same processor; or, the modules are located in multiple In the processor.
  • Embodiments of the present invention also provide a storage medium.
  • a storage medium may be configured to store program code for performing the following steps:
  • the virtual resource identifier corresponding to the virtual snapshot to be processed is obtained, where the current virtual snapshot to be processed is used to record data changes of the snapshot source volume corresponding to the current virtual snapshot to be processed;
  • the foregoing storage medium may include, but not limited to, a USB flash drive, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, and a magnetic memory.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • a mobile hard disk e.g., a hard disk
  • magnetic memory e.g., a hard disk
  • the processor performs the above steps S1, S2, and S3 according to the stored program code in the storage medium.
  • modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein. Perform the steps shown or described, or separate them into individual integrated circuit modules, or make multiple modules or steps into a single The integrated circuit module is implemented. Thus, the invention is not limited to any specific combination of hardware and software.
  • the virtual resource identifier corresponding to the current virtual snapshot to be processed is obtained, where the current virtual snapshot to be processed is used to record the data change of the snapshot source volume corresponding to the current virtual snapshot to be processed; If the physical resource space is allocated for the virtual resource identifier, the physical space is allocated for the virtual resource identifier, and the physical space is corresponding to the data change.
  • Copy-on-write COW operations That is, it is found in the virtual resource whether the physical space is allocated for the virtual resource identifier, as the basis for performing the copy-on-write COW operation corresponding to the data change, without additional metadata to save the data change and the data mapping relationship, resulting in additional Metadata read and write operations.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

L'invention concerne un procédé et un appareil pour traiter des instantanés de machine virtuelle, ledit procédé comprend les étapes suivantes : acquérir l'identifiant de ressources virtuelles qui correspond à l'instantané de machine virtuelle à traiter, l'instantané de machine virtuelle à traiter servant à enregistrer des modifications de données dans le volume de source d'instantané qui correspond à l'instantané de machine virtuelle à traiter (S102); effectuer une recherche dans les ressources virtuelles pour déterminer si un espace physique a déjà été attribué pour ledit identifiant de ressources virtuelles (S104); si les résultats de la recherche indiquent qu'aucun espace physique n'a été attribué pour ledit identifiant de ressources virtuelles, un espace physique est attribué pour l'identifiant de ressources virtuelles, les opérations de copie sur écriture (COW) correspondantes étant effectuées pour les modifications de données dans l'espace physique (S106). Le procédé de l'invention permet de résoudre le problème technique de l'art antérieur qui faisait que, pendant le processus COW appliqué aux instantanés de machine virtuelle, des informations de métadonnées supplémentaires devaient être lues/écrites, ce qui ralentissait la lecture/l'écriture; le procédé de l'invention accélère la lecture/l'écriture, tout en améliorant le débit d'entrée/sortie (E/S).
PCT/CN2016/098524 2015-09-30 2016-09-09 Procédé et appareil pour traiter des instantanés de machine virtuelle WO2017054636A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510641555.9A CN106557274A (zh) 2015-09-30 2015-09-30 虚拟快照处理方法及装置
CN201510641555.9 2015-09-30

Publications (1)

Publication Number Publication Date
WO2017054636A1 true WO2017054636A1 (fr) 2017-04-06

Family

ID=58417799

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/098524 WO2017054636A1 (fr) 2015-09-30 2016-09-09 Procédé et appareil pour traiter des instantanés de machine virtuelle

Country Status (2)

Country Link
CN (1) CN106557274A (fr)
WO (1) WO2017054636A1 (fr)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10620843B2 (en) * 2017-07-26 2020-04-14 Netapp, Inc. Methods for managing distributed snapshot for low latency storage and devices thereof
CN109165120B (zh) * 2018-08-08 2022-04-05 华为技术有限公司 分布式存储系统中管理快照和差异位图生成方法和产品
CN109871355B (zh) * 2019-01-23 2021-04-27 杭州宏杉科技股份有限公司 一种快照元数据存储方法、装置及设备、介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070288711A1 (en) * 2006-06-08 2007-12-13 Inventec Corporation Snapshot copy management method used for logic volume manager
CN101819543A (zh) * 2010-02-01 2010-09-01 成都市华为赛门铁克科技有限公司 快照数据处理方法和系统以及存储设备
CN103914647A (zh) * 2014-04-14 2014-07-09 中国人民解放军国防科学技术大学 基于本地虚拟化机制的程序隔离运行方法
CN104360914A (zh) * 2014-10-22 2015-02-18 浪潮(北京)电子信息产业有限公司 增量快照方法和装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070288711A1 (en) * 2006-06-08 2007-12-13 Inventec Corporation Snapshot copy management method used for logic volume manager
CN101819543A (zh) * 2010-02-01 2010-09-01 成都市华为赛门铁克科技有限公司 快照数据处理方法和系统以及存储设备
CN103914647A (zh) * 2014-04-14 2014-07-09 中国人民解放军国防科学技术大学 基于本地虚拟化机制的程序隔离运行方法
CN104360914A (zh) * 2014-10-22 2015-02-18 浪潮(北京)电子信息产业有限公司 增量快照方法和装置

Also Published As

Publication number Publication date
CN106557274A (zh) 2017-04-05

Similar Documents

Publication Publication Date Title
US11029848B2 (en) File management method, distributed storage system, and management node
US11082206B2 (en) Layout-independent cryptographic stamp of a distributed dataset
US10067684B2 (en) File access method and apparatus, and storage device
JP5932043B2 (ja) 不揮発性記憶装置セットの揮発メモリ表現
US9134908B2 (en) Logical volume space sharing
KR102275563B1 (ko) 호스트-관리 비휘발성 메모리
WO2018072420A1 (fr) Procédé de gestion de stockage et dispositif de stockage
EP3502877B1 (fr) Procédé et dispositif de chargement de données pour machines virtuelles
TW201923587A (zh) 非揮發性記憶體設備中的命名空間分配
EP3729251A1 (fr) Ocssds virtualisés couvrant des canaux ocssd physiques
WO2017185579A1 (fr) Procédé et appareil de stockage de données
KR102443600B1 (ko) 하이브리드 메모리 시스템
BR112016019305B1 (pt) Controlador de arranjo, disco de estado sólido, e método para controlar disco de estado sólido para gravar dados
US20100205397A1 (en) Method and apparatus for allocating resources in a computer system
US9430492B1 (en) Efficient scavenging of data and metadata file system blocks
EP4105770A1 (fr) Procédé et appareil d'accès à une arborescence b+ et support de stockage lisible par ordinateur
US11243703B2 (en) Expandable index with pages to store object records
CN113568562A (zh) 一种存储系统、内存管理方法和管理节点
KR20200121372A (ko) 하이브리드 메모리 시스템
WO2017054636A1 (fr) Procédé et appareil pour traiter des instantanés de machine virtuelle
WO2021047425A1 (fr) Procédé et système de virtualisation pour une mémoire persistante
WO2020192710A1 (fr) Procédé de traitement des objets inutilisés au moyen d'une base de données lsm, d'un disque dur à semi-conducteurs et d'un appareil de stockage
WO2016187975A1 (fr) Procédé et appareil de défragmentation de mémoire interne
WO2016206070A1 (fr) Procédé de mise à jour de fichier et dispositif de mémorisation
US9009204B2 (en) Storage system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16850260

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16850260

Country of ref document: EP

Kind code of ref document: A1