Method and system for selectively replicating data of a main memory

By receiving a set of configurable parameters and cooperating with the replication engine, the logical unit data of the main memory is selectively replicated, solving the problem of inefficient data replication in the prior art and realizing an efficient and resource-saving data replication process.

CN114503068BActive Publication Date: 2025-11-28HUAWEI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202080068855.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-05
Publication Date
2025-11-28
Estimated Expiration
2040-06-05

AI Technical Summary

Technical Problem

Existing technologies suffer from inefficiency and unnecessary resource consumption during data replication, and cannot selectively replicate specific data from main memory, resulting in wasted storage space and performance degradation in auxiliary storage systems.

Method used

By receiving a set of configurable parameters, data in logical units of main memory can be selectively copied. The copying engine performs efficient data copying at the logical unit level, avoiding unnecessary data copying. It supports data copying of different formats and virtual machine management.

Benefits of technology

It achieves efficient data copying from main memory to auxiliary memory, reduces computing resource requirements, saves auxiliary memory storage space, reduces hardware costs, and supports data copying in different formats.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114503068B_ABST
    Figure CN114503068B_ABST
Patent Text Reader

Abstract

A method for selectively copying data of a primary memory, wherein the data is stored on one or more blocks of one or more logical units of the primary memory. The method includes receiving, by a secondary memory, a request to selectively copy the data of the primary memory. The method also includes executing a command to receive a configurable set of parameters of the logical unit. The method also includes selectively copying, from the primary memory to the secondary memory, the one or more blocks storing the data in accordance with the received configurable set of parameters.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present invention relates generally to the field of storage systems; more specifically, to a method and system for selectively replicating data of a primary storage. BACKGROUND

[0002] In a storage system, data is typically stored in a block device, and the data in the block device is typically stored in some file system format. Generally, a block device is a computer data storage device that supports reading and optionally writing data in fixed-size blocks, sectors, or clusters. Further, data replication is a process of storing data in more than one node (e.g., primary storage and secondary storage) to improve availability of data and ensure data protection in case of data loss. Thus, for security reasons, secondary storage is typically used to replicate data present in a primary storage system of a host computing system. In one example, both the primary storage system and the secondary storage system can be block devices for data storage.

[0003] Currently, one way of data replication is to use a block storage replication mechanism, where data is replicated from a traditional primary storage to a traditional secondary storage system (typically, both are of the same type) at a block level. The traditional technique requires additional software to enable the secondary storage system to replicate data from the primary storage system. The secondary storage system replicates all data present in the primary storage system through this software in a synchronous or asynchronous manner.

[0004] However, there are several technical problems associated with such traditional data replication techniques. In many cases, only a small portion of data needs to be replicated, or sometimes all data except a specific portion of data. For example, a user can want to replicate only a single virtual machine or a few virtual machines out of all virtual machines running on a host computing system. However, traditional systems and methods do not address such scenarios, and thus the replication process becomes inefficient and a compute resource intensive process. Further, traditional methods and systems replicate unwanted data, such as temporary files, along with important data (i.e., desired data), which causes unnecessary consumption of transmission bandwidth (i.e., inefficient replication). Thus, over time, the storage space of the secondary storage system is occupied due to the large amount of storage space taken up by the unwanted data in the traditional secondary storage system. This is undesirable as it degrades the performance of the secondary storage system. Further, the cost of data storage, and all associated costs including the cost of storage hardware, remains a burden. Thus, how to efficiently replicate desired data in the secondary storage system remains a technical problem. Further, in some cases, it is desirable to replicate a virtual machine in a data format different from the data format executed in the host computing system. However, traditional techniques replicate the virtual machine in the same data format as the data format in the host computing system.

[0005] Accordingly, in light of the above discussion, there is a need to overcome the above-mentioned drawbacks associated with conventional techniques for copying data from a host memory to a secondary memory. SUMMARY

[0006] The present invention seeks to provide a method and system for selectively copying data of a host memory. The present invention seeks to provide a solution to the existing problem of inefficient data copying from a host memory to a secondary memory. It is an object of the present invention to provide a solution that at least partially overcomes problems encountered in the prior art and to provide an improved method and system that enables efficient data copying at a logical unit level by selectively copying data in a logical unit of a host memory (i.e. only copying required data portions in a logical unit or not copying data portions in a logical unit that are not required).

[0007] The objects of the present invention are achieved by the solutions provided in the independent claims. Advantageous implementations of the present invention are further defined in the dependent claims.

[0008] In a first aspect, the present invention provides a method for selectively copying data of a host memory, wherein the data is stored on one or more blocks of one or more logical units of the host memory, wherein the data is stored on one or more blocks of one or more logical units of the host memory, the method comprising: receiving, by a secondary memory, a request to selectively copy the data of the host memory; executing a command to receive a configurable set of parameters of the logical unit; selectively copying the one or more blocks storing the data from the host memory to the secondary memory in accordance with the received configurable set of parameters.

[0009] The method of the first aspect enables efficient data copying from a host memory to a secondary memory. Conventional techniques generally copy all data and in conventional techniques, copying is at a block level or at a level different from a logical unit level. In comparison to conventional techniques, the method is able to selectively copy only required data portions in a logical unit of a host memory. In comparison to conventional techniques, the method of the first aspect requires significantly less computational resources. Furthermore, a significant amount of storage memory of the secondary memory is saved from unrequired data, thereby making hardware storage costs relatively low. Furthermore, the method is able to directly selectively copy data without the need for external software applications in conventional techniques.

[0010] In an implementation, receiving the configurable set of parameters comprises receiving: a first identification value of one or more logical units comprising one or more blocks storing the data; a second identification value of one or more blocks storing the data; an indication to mark the one or more blocks storing the data.

[0011] The configurable set of parameters, such as the first identification value, the second identification value and the indication to mark one or more blocks, enables to determine the portion of data in the primary memory that needs to be replicated. Thus, according to the configurable set of parameters, the method enables to selectively replicate the required portion of data in one or more logical units.

[0012] In another implementation, the receiving the second identification value comprises receiving a vector, wherein the vector indicates a start and a size of the one or more blocks storing the data.

[0013] By receiving a vector, the one or more blocks of one logical unit in one or more logical units are accurately identified for selectively replicating the data stored in such blocks.

[0014] In another possible implementation, the auxiliary memory selectively replicating the data comprises periodically creating a copy of the logical unit comprising one or more blocks, performing a first parsing by parsing a file system of the created copy of the logical unit, marking the one or more blocks of the parsed copy of the logical unit for replication, replicating, by a replication engine, the marked one or more blocks of the logical unit to an auxiliary memory.

[0015] Creating a copy of a logical unit, performing a first parsing, marking one or more blocks and replicating the marked blocks enables to accurately identify the blocks to be replicated at a logical unit level, thereby selectively replicating only the identified blocks.

[0016] In another possible implementation, the marking the one or more blocks is performed by masking in or masking out the one or more blocks.

[0017] By masking in or masking out, the required blocks of one or more logical units are accurately identified for selective replication.

[0018] In another possible implementation, the receiving the request to selectively replicate the data of the primary memory comprises receiving a request to selectively replicate data of a host storage device, the host storage device comprising a virtual machine hypervisor running one or more virtual machines.

[0019] The one or more virtual machines are managed by a virtual machine hypervisor, wherein the one or more blocks are identified in association with the respective virtual machines and further, upon receiving a request to replicate a specific virtual machine, only the blocks of the specific virtual machine are selectively and accurately replicated.

[0020] In another possible implementation, receiving the parameter set further comprises receiving: a list of one or more virtual machines located in the virtual machine hypervisor; a location indication for identifying which of the one or more blocks belongs to which of the one or more virtual machines.

[0021] The location indication of the one or more blocks of the respective virtual machine enables accurate determination of such blocks and selective copying of only the blocks associated with the virtual machine selected to be copied.

[0022] In another possible implementation, the method further comprises: creating a snapshot of the one or more blocks of the copy of the logical unit; mounting the snapshot of the one or more blocks of the copy of the logical unit by the copy engine; performing a second parsing by parsing the file system of the copied logical unit; creating a file by copying the one or more blocks of the parsed file in the file system to a second file in the secondary storage.

[0023] The creation of the snapshot, the mounting of the snapshot, and the performing of the second parsing and the final creation of the file enable efficient copying of only selected blocks in the secondary storage in order to accurately copy and obtain entire files (e.g., all relevant data associated with a virtual machine distributed in different selected blocks) in the secondary storage.

[0024] In another possible implementation, the copying is performed by pointer manipulation within the secondary storage without moving data.

[0025] The copying by pointer without moving data enables efficient and accurate retrieval of data from the primary storage or restoration of data to the primary storage when needed.

[0026] In another possible implementation, the selective copying comprises: avoiding copying of one or more blocks of the primary storage; copying a single virtual machine of one or more virtual machines stored on a virtual machine file system of the virtual machine hypervisor; copying more than one virtual machine of all virtual machines stored on the virtual machine file system of the virtual machine hypervisor; copying files of the file system in a different format onto a secondary storage; or copying one or more files in a different file system than the file system of the primary storage.

[0027] Compared to conventional techniques that copy all blocks of all virtual machines, the method enables selective copying of only data stored in blocks associated with only one or more virtual machines selected for copying. Furthermore, the format of the copied files can be changed to a native file format of the secondary storage.

[0028] In a second aspect, the present application provides a system for selectively replicating data of a primary storage, wherein the data is stored on one or more blocks of one or more logical units of the primary storage, the system comprising a secondary storage for connecting to the primary storage, the secondary storage comprising: an interface for executing a command to receive a configurable set of parameters of the logical unit of the primary storage; a replication engine for selectively replicating one or more blocks storing the data from the primary storage to the secondary storage.

[0029] The system of the second aspect enables efficient data replication from the primary storage to the secondary storage. The conventional techniques generally replicate all data, and in the conventional techniques, the replication is at the block level or at a different level than the logical unit level. In comparison with the conventional techniques, the system is able to selectively replicate only the required data portion in the logical unit of the primary storage by using the replication engine. In comparison with the conventional techniques, the system requires much less computing resources. In addition, a large amount of storage memory of the secondary storage is saved from the unwanted data, thereby making the hardware storage cost relatively low. In addition, the system is able to directly selectively replicate the data without the need of the external software application in the conventional techniques.

[0030] In an implementation, the secondary storage is further configured to receive, through the interface: a first identification value of one or more logical units comprising one or more blocks storing the data; a second identification value of the one or more blocks storing the data; an indication for marking the one or more blocks storing the data.

[0031] The first and second identification values and the indication received by the secondary storage enable to determine the data portion in the primary storage that needs to be replicated. Therefore, according to the configurable set of parameters, the method is able to selectively replicate the required data portion in the one or more logical units.

[0032] In another implementation, the secondary storage is further configured to receive, through the interface: a list of one or more virtual machines located in the host storage device; a location indication for identifying which block in the one or more blocks belongs to which virtual machine in the one or more virtual machines.

[0033] The list of one or more blocks of the respective virtual machines and the location indication enable to accurately determine the blocks and selectively replicate only the blocks associated with the virtual machines selected to be replicated.

[0034] In another possible implementation, the secondary storage is further configured to selectively mark the one or more blocks for replication according to the received configurable set of parameters.

[0035] By the selective marking, the selected blocks of the one or more logical units for replication are accurately identified to selectively replicate the stored data in such selected blocks to the secondary storage.

[0036] In another possible implementation, the secondary storage is further configured to identify which of the one or more blocks storing the data of the one or more logical units of the primary storage belongs to which of the one or more virtual machines in the host storage device.

[0037] By the identification, the secondary storage can accurately identify which of the one or more blocks of the one or more logical units belongs to which of the virtual machines, and thus can selectively replicate the relevant data associated with a specific virtual machine distributed in different selected blocks, thereby ensuring data availability and data protection.

[0038] In a third aspect, the application provides a computer program for performing the method of the first aspect when executed on the secondary storage.

[0039] The computer program of the third aspect realizes efficient data replication from the primary storage to the secondary storage, in which only the relevant data part in the one or more blocks of the one or more logical units of the primary storage is accurately and selectively replicated. In addition, the third aspect realizes all the advantages and effects of the first aspect.

[0040] It should be noted that all the devices, elements, circuits, units and modules described in the present application can be realized in software or hardware elements or any type of combination thereof. All the steps performed by various entities described in the present application and the described functions to be performed by various entities are intended to indicate that the respective entities are adapted to or used for performing the respective steps and functions. Although in the following description of specific embodiments, the specific functions or steps performed by external entities are not reflected in the description of the specific detailed elements of the entity performing the specific step or function, but the skilled person should understand that these methods and functions can be realized in the corresponding hardware or software elements or any combination thereof. It should be understood that the features of the present application are easily combined in various combinations without departing from the scope of the present application defined by the appended claims.

[0041] Additional aspects, advantages, features and objects of the present application will become apparent to those skilled in the art from the detailed description of illustrative implementations, from the drawings and from the appended claims. BRIEF DESCRIPTION OF DRAWINGS

[0042] The above summary, as well as the following detailed description of illustrative embodiments, can be better understood when read in conjunction with the appended drawings. For the purpose of illustrating the application, exemplary constructions of the present application are shown in the drawings. However, the present application is not limited to the specific methods and tools disclosed herein. Additionally, one skilled in the art will understand that the drawings are not drawn to scale. Where possible, the same numbers are used in the drawings to indicate the same or similar elements.

[0043] Embodiments of the present application will now be described, by way of example only, with reference to the accompanying drawings in which:

[0044] Figure 1 is a flow diagram of a method for selectively replicating data of a primary memory provided by embodiments of the present application;

[0045] Figure 2A is a network environment diagram of a system for selectively replicating data of a primary memory provided by embodiments of the present application;

[0046] Figure 2B is a block diagram showing various exemplary components of a primary memory provided by embodiments of the present application;

[0047] Figure 2C is a block diagram showing various exemplary components of a secondary memory provided by embodiments of the present application;

[0048] Figure 3 illustrates an exemplary scenario related to a logical unit provided by embodiments of the present application;

[0049] Figure 4 illustrates an exemplary scenario related to a logical unit provided by another embodiment of the present application;

[0050] Figure 5 illustrates a system for selectively replicating data of a primary memory provided by another embodiment of the present application.

[0051] In the drawings, underlined numerals are used to designate items in the figures by their number and items adjacent the underlined numerals. Un-underlined numerals refer to items identified by the line connecting the un-underlined numeral with the item. When a numeral is un-underlined and has an associated arrow, the un-underlined numeral is used to identify the general item to which the arrow is pointing. DETAILED DESCRIPTION

[0052] The following detailed description illustrates embodiments of the present application and methods by which they can be implemented. While some modes for carrying out the present application have been disclosed, those skilled in the art will recognize that other embodiments for carrying out or practicing the present application can also be possible.

[0053] Figure 1is a flowchart of a method 100 for selectively copying data of a primary storage provided by embodiments of the present invention. In one aspect, the present invention provides a method 100 for selectively copying data of a primary storage, wherein the data is stored on one or more blocks of one or more logical units of the primary storage, the method 100 comprising:

[0054] receiving, by the secondary storage, a request to selectively copy the data of the primary storage;

[0055] executing a command to receive a configurable set of parameters of the logical unit;

[0056] selectively copying the one or more blocks storing the data from the primary storage to the secondary storage in accordance with the received configurable set of parameters.

[0057] In conjunction with Figure 1 , the method 100 is performed in a secondary storage as described in detail in, for example, Figure 2A The method 100 includes steps 102, 104, and 106. In step 102, the method 100 includes receiving, by the secondary storage, a request to selectively copy data of a primary storage. The term "request" herein refers to a request received by the secondary storage to initiate the selective copying of data. The request can be pre-programmed to be received by the secondary storage at a specific time. In one example, the secondary storage receives the request at a specific time every week or every month. Alternatively, the request can be a user request initiated by a user at any specific time desired by the user. In contrast to conventional techniques that copy all data of a primary storage, the secondary storage is used to copy only selected portions of data of the primary storage upon receiving the request, rather than copying all data of the primary storage. As a result, the secondary storage copies data faster and requires less storage space compared to conventional techniques. The data of the primary storage is stored on one or more blocks of one or more logical units. The term "logical unit" refers to a storage area in the primary storage, wherein each logical unit includes one or more blocks. The term "primary storage" used in the present invention can also be referred to as a primary storage or a primary storage system.

[0058] According to embodiments, each logical unit is identified by an identifier, which can also be referred to as a logical unit number (LUN). A logical unit number is an identifier used to label and designate a subsystem of physical or virtual storage. Typically, different logical unit numbers are assigned to different areas in a physical drive (i.e., storage system) so that data can be read, written, or retrieved when needed. Further, each of the one or more blocks is used to store a fixed amount of data. In one example, the one or more logical units are used to store data in the one or more blocks in a particular file system format, such as a virtual machine file system. In such an example, a virtual machine can be associated with the one or more blocks. Alternatively, the one or more blocks can store only one type of data, such as image data, video data, audio data, or text data, or one of a combination thereof. Data stored in the host storage device is created or altered in the host storage device by one or more software algorithms executed on the host storage device, such as photo editing software, data compression software, data encryption software, and the like.

[0059] In step 104, the method 100 further includes executing a command to receive a configurable parameter set for the logical unit. The command is executed through an interface provided in the secondary storage to receive the configurable parameter set. The interface is a user interface. User input is provided through the interface to receive the configurable parameter set for the logical unit. For example, in one embodiment, the interface is a graphical user interface (GUI) that is provided on a display of the secondary storage. The GUI is used to provide user input to the secondary storage to receive the configurable parameter set for the logical unit. Figure 2A The interface is described in detail in the DETAILED DESCRIPTION. The configurable parameter set enables identification of related data associated with a single object (e.g., a virtual machine) stored in different blocks of the one or more logical units in the host storage to be copied. Thus, only selective copying of data is performed. In one example, the parameter set enables identification of data associated with a particular virtual machine of a user, which is the virtual machine that needs to be selectively copied among two or more virtual machines present in the one or more logical units. In such an example, the user indicates the particular virtual machine to be copied through the configurable parameter.

[0060] In step 106, the method 100 includes selectively copying one or more blocks of stored data from the primary storage to the secondary storage according to the received configurable parameter set. The method 100 provides a solution to the problem of inefficient copying technique: copying a portion of a logical unit (i.e., one or more blocks of a logical unit) from one or more logical units to a secondary storage, and then using an efficient copying mechanism to copy only relevant data (i.e., data stored on the one or more blocks) from the copied logical unit to the file system. The data stored on the one or more blocks is potentially relevant data associated with a single object (e.g., a virtual machine). Thus, the solution provided by the method 100 can be broken down into three parts overall. The first part of the three parts is implemented by step 102, which allows a request to selectively copy data of the primary storage. In other words, a new interface is provided for block storage replication in the secondary storage, thereby allowing a request to copy only a portion of a logical unit. The second part of the solution is implemented by step 104, which includes a mechanism to decide which portions (i.e., which blocks) of a logical unit in one or more logical units should be copied. The mechanism to decide which portions (i.e., which blocks) of a logical unit in one or more logical units should be copied is implemented by executing a command to receive a configurable parameter set of the logical unit. The configurable parameter set indicates which portions (i.e., which blocks) of the logical unit should be copied. Finally, the third part of the solution is implemented by step 106, which solves the problem of how to utilize the logical unit copy for single object recovery in the secondary storage. Thus, one or more blocks of stored data are selectively and efficiently copied from the primary storage to the secondary storage according to the received configurable parameter set.

[0061] Beneficially, the method 100 of the present invention does not require any additional software to copy the one or more blocks. According to the received configurable parameter set, one or more blocks of a plurality of blocks of one or more logical units are identified and data stored in the one or more blocks are selectively copied. The data in the one or more blocks can belong to a single object (e.g., a virtual machine) being copied without copying other irrelevant data in other blocks. In one example, a replication engine can be used to selectively copy the one or more blocks. Thus, the method 100 is able to achieve efficient data replication from the primary storage to the secondary storage at the logical unit level. Since only relevant data is selectively copied, the method 100 requires much less computing resources compared to conventional techniques. Furthermore, a large amount of storage memory of the secondary storage is saved from unnecessary data, thereby making the hardware storage cost relatively low. Thus, the method 100 in the present invention is very efficient for the data replication process used to store backups in the secondary storage. Moreover, after the selective copying is completed, a confirmation request is sent to the primary storage associated with the primary storage.

[0062] According to one embodiment, receiving the configurable parameter set includes receiving a first identification value of one or more logical units that include one or more blocks of stored data. The first identification value refers to an identification value associated with identifying a logical unit to be selectively replicated. In one example, the first identification value belongs to a first logical unit among other logical units (e.g., a first logical unit, a second logical unit, a third logical unit, a fourth logical unit) in the primary storage. The first identification value, also referred to as a logical unit number (LUN), is an identification value (i.e., ID) of a particular logical unit.

[0063] According to one embodiment, receiving the configurable parameter set includes receiving a second identification value of one or more blocks of stored data. The second identification value refers to an identification value associated with identifying a block of each of the one or more logical units to be selectively replicated. In one example, the second identification value belongs to a second block and a third block among all blocks (e.g., a first block, a second block, a third block, a fourth block, etc.) of the corresponding logical unit present in the first identification value.

[0064] According to one embodiment, receiving the configurable parameter set includes receiving an indication for marking one or more blocks of stored data. The indication for marking the one or more blocks is capable of clearly identifying one or more blocks selected for selectively replicating data in the one or more blocks. The indication includes a Boolean value (e.g., true or false) that indicates whether a portion (e.g., one or more blocks) of a given logical unit should be replicated or not.

[0065] According to one embodiment, receiving the second identification value includes receiving a pair vector, where the pair vector indicates a start and a size of the one or more blocks of stored data. The start indicates which block to start from in a sequence of blocks in a given logical unit, and the size indicates a number of blocks to replicate from the start block. For example, the pair vector can be (5, 3). In this example, the value “5” refers to a sixth block (i.e., block 6, since blocks start from block 0) in a sequence of 10 blocks (e.g., block 0, block 1, block 2, block 3, block 4, block 5, block 6, block 7, block 8, and block 9) to have data replicated, and the value “3” of (5, 3) refers to a number of subsequent blocks (i.e., block 6, block 7, and block 8) to have data replicated. In another example, the pair vector can be (6, 3), in which case blocks 7, 8, and 9 are selected for selective replication.

[0066] According to one embodiment, the auxiliary memory selectively replicating data includes periodically creating a copy of a logical unit including one or more blocks. The copy of the logical unit is typically created in the primary memory. The copy of the logical unit can be created by creating a snapshot of the logical unit. One or more blocks in the logical unit can change over time, i.e., a block that was previously empty can currently have data, a block with data can become empty. Therefore, the copy of the logical unit is periodically created.

[0067] According to one embodiment, the auxiliary memory selectively replicating data includes performing a first parse by parsing a file system of a logical unit that creates a copy. The first parse is performed by a parser. In one example, the file system can be a virtual machine file system. The first parse is performed on the file system of a first virtual machine out of a first virtual machine, a second virtual machine, a third virtual machine, and a fourth virtual machine according to a received set of configurable parameters. In one example, the first parse is performed on the file system of a first virtual machine out of a first virtual machine, a second virtual machine, a third virtual machine, and a fourth virtual machine.

[0068] According to one embodiment, the auxiliary memory selectively replicating data includes marking one or more blocks of a parsed copy of a logical unit for replication. Marking the one or more blocks of the parsed copy of the logical unit enables the auxiliary memory to accurately identify the one or more blocks of the logical unit that need to be selectively replicated. In one example, the one or more blocks that are to be selectively replicated are marked. In another example, the one or more blocks that are not to be selectively replicated are marked to enable identification of blocks to be replicated and blocks not to be replicated. According to one embodiment, the auxiliary memory selectively replicating data includes copying, by a replication engine, the marked one or more blocks of the logical unit to the auxiliary memory. After marking the one or more blocks of the logical unit, data stored in the marked one or more blocks of the logical unit is selectively replicated from the primary memory to the auxiliary memory. Therefore, only the relevant data stored in the marked one or more blocks is replicated, rather than replicating all blocks of the logical unit. Therefore, the replication process is faster and requires less computing power compared to conventional techniques.

[0069] According to one embodiment, marking the one or more blocks is performed by either positive masking or negative masking the one or more blocks. The one or more blocks are positively masked when the Boolean value is 'true'. The one or more blocks are negatively masked when the Boolean value is 'false'. In one example, the one or more blocks in the vector are positively masked when the Boolean value is true. The one or more blocks that are positively masked are selected for replication, while the other blocks are not selected. In one example, the one or more blocks in the vector are negatively masked when the Boolean value is false. The one or more blocks that are negatively masked are not selected for replication, while the other blocks are selected for replication.

[0070] In one example scenario, at the first invocation (i.e., when the first command is executed), the first identification value selects the first logical unit (LU1) among other logical units in the main memory. Further, the second identification value has the pair vector (1, 2) and (5, 3). Further, the Boolean value of the flag indication is 'true'. In this scenario, the chunk sequence can be chunk 0, chunk 1, chunk 2, up to chunk 9. Thus, according to the pair vector, chunk 1 and chunk 2 and chunk 6, chunk 7 and chunk 8 are positively masked and selected for replication. Further, at the second invocation (i.e., when the second command can be executed), when the second identification value has the pair vector (2, 2) and the Boolean value of the flag indication is set to 'false', the inverse masking is performed. In this scenario, chunk 2 is inverse masked from all the chunks that are positively masked at the first invocation, thus finally only chunk 1, chunk 6, chunk 7 and chunk 8 (among chunk 0 to chunk 9) are selected for replication.

[0071] According to one embodiment, in case of a virtual machine, the data associated with the virtual machine is dynamic and increases over time, resulting in allocation of new chunks in the logical unit. Thus, it is more efficient to mark one or more chunks by inverse masking than by positive masking. In other words, inverse masking of chunks associated with a virtual machine that is not to be replicated is efficient compared to positive masking of chunks associated with a virtual machine to be replicated.

[0072] In one example implementation, the set of configurable parameters received in the secondary memory is received by a command (e.g., Mask_lu_replication command) represented by the command function (1) given below. The set of configurable parameters can be received through an interface of the secondary memory.

[0073] Mask_lu_replication (lu_id, vector (start_offset, length), bool mask_out) (1)

[0074] wherein,

[0075] 'lu_id' is the identification of the logical unit;

[0076] 'vector' is the pair vector;

[0077] 'start_offset' is the start of the chunk;

[0078] 'length' is the size of the chunk;

[0079] 'bool mask_out' is the indication of whether the chunk should be replicated or not.

[0080] According to one embodiment, receiving the request to selectively replicate data of the primary storage includes receiving the request to selectively replicate data of the primary storage, the primary storage including a virtual machine hypervisor running one or more virtual machines. The term "virtual machine hypervisor" refers to software, a combination of software and hardware, or firmware, for managing and running one or more virtual machines in a host storage device. The virtual machine hypervisor is used to enable operation of one or more operating systems through virtual machines on a single host storage device. Each of the one or more virtual machines running on the host storage device is configured with a dedicated memory, storage space, processor, interface of the host storage device for operation of the virtual machine. The secondary storage is configured to be connected with the virtual machine hypervisor.

[0081] According to one embodiment, receiving the parameter set further includes receiving: a list of one or more virtual machines located in the virtual machine hypervisor; a location indication for identifying which of the one or more blocks belongs to which of the one or more virtual machines. The virtual machine hypervisor can have a number of virtual machines associated therewith. Further, such virtual machines can have associated blocks at different locations of one or more logical units. The list of one or more virtual machines and the location indication enable accurate and faster identification of the virtual machines and their respective blocks in the one or more logical units of the primary storage, thereby improving the speed and accuracy of the secondary storage for selective replication.

[0082] According to one embodiment, the method further comprises creating a snapshot of the one or more blocks of the copy of the logical unit. The snapshot is an image of the given logical unit. The snapshot of the one or more blocks of the copy refers to the creation of a copy of the one or more blocks in the primary storage (in some cases, or directly in the secondary storage). According to one embodiment, the method further comprises mounting the snapshot of the one or more blocks of the copy of the logical unit by the replication engine. The snapshot of the one or more blocks of the copy is mounted on the storage space of the secondary storage. This mounting then creates a clone (i.e. a copy) of the snapshot. According to one embodiment, the method further comprises performing a second parsing by parsing the file system of the replicated logical unit. The second parsing enables the secondary storage space to identify the one or more blocks selected for selective replication. Such one or more blocks are then stored in the secondary storage in an appropriate location in such a way that the retrieval of the one or more blocks is accurate and fast when the primary storage device needs such replicated data in the secondary storage. In other words, for example, the secondary storage periodically creates a copy (i.e. a snapshot) of the replicated logical unit, then internally mounts the logical unit snapshot and parses the file system to know which blocks belong to the individual object (e.g. a particular virtual machine) to be replicated and protected. According to one embodiment, the method further comprises copying the one or more blocks of the parsed files in the file system to a second file in the secondary storage to create a file. The second file in the secondary storage only includes data associated with the individual object (e.g. a particular virtual machine). This second file is created by selectively and efficiently replicating only the data associated with the one or more blocks belonging to the individual object. Thus, using internal replication commands, the data of a particular virtual machine, or any changes to the data, are replicated from the file system of the primary storage to another file system of the secondary storage (as the secondary storage knows which data needs to be replicated to which location). Thus, this replication does not require additional software, thereby enabling an efficient replication process. For example, a copy of the virtual machine disk (i.e. all the user data of a particular virtual machine) is obtained in its native format in the secondary storage file system, regardless of the file format in the primary storage.

[0083] According to one embodiment, the replication is performed by pointer manipulation within the secondary storage without moving the data. In some embodiments, instead of actually moving the data from the primary storage to the secondary storage, pointers are stored indicating the location of the data belonging to the individual object (e.g. a particular virtual machine) in the one or more blocks. Thus, more storage space is saved in the secondary storage and such pointers enable accurate retrieval of the data stored in the secondary storage device when needed.

[0084] According to one embodiment, the selective replication includes avoiding replication of one or more blocks of the primary storage. The selective replication identifies one or more blocks to replicate to the secondary storage by selecting one or more blocks to replicate or selecting one or more blocks to avoid replication. In case of dynamic data (i.e., data changes or increases over time), one or more blocks are selected to avoid replication, thereby allocating data into new blocks. In one example, for data of a virtual machine stored in one or more blocks, one or more blocks are selected to avoid replication. According to one embodiment, the selective replication includes replicating a single virtual machine of one or more virtual machines stored on a virtual machine file system of a virtual machine hypervisor. The replication of only a single virtual machine among one or more virtual machines is based on a received set of configurable parameters, wherein the first and second identification values belong to one or more blocks of one or more logical units associated only with the single virtual machine. Thus, the method of the present invention replicates only a single virtual machine as compared to conventional techniques that replicate all user data of multiple virtual machines.

[0085] According to one embodiment, the selective replication includes more than one virtual machine of all virtual machines stored on a virtual machine file system of a virtual machine hypervisor. The replication of more than one virtual machine (e.g., 3 virtual machines) among all virtual machines (e.g., 10 virtual machines) is based on a received set of configurable parameters, wherein the first and second identification values belong to one or more blocks of one or more logical units associated with the more than one virtual machine. The method of the present invention replicates only selected virtual machines (i.e., user data of 3 virtual machines) as compared to conventional techniques that replicate all virtual machines (i.e., all 10 virtual machines).

[0086] According to one embodiment, the selective replication includes replicating files of a file system on the secondary storage in different formats. In conventional techniques, the files replicated in the secondary storage are in the same format as the files in the primary storage. The method of the present invention is capable of converting the format of the files replicated in the secondary storage as compared to conventional techniques. For example, data of a virtual machine to be replicated can be stored in a first format in the primary storage. Such data can be stored in a different format (e.g., a native file format of the secondary storage or a user-defined file format) when replicated in the secondary storage.

[0087] According to one embodiment, selectively replicating includes replicating one or more files in a file system that is different from the file system of the primary storage. Further, data of the virtual machine to be replicated can be stored in a virtual machine file system in the primary storage. When replicated in the secondary storage, such data can be stored in a different file system (e.g., a native file system of the secondary storage) that is different from the virtual machine file system. In conventional techniques, the file system of the one or more files replicated in the secondary storage is the same as the file system of the one or more files in the primary storage. In comparison with conventional techniques, the method of the present invention is capable of converting the file system of the one or more files replicated in the secondary storage.

[0088] Steps 102 to 106 are merely illustrative, and other alternatives can be provided where one or more steps are added, one or more steps are deleted, or one or more steps are provided in an order different from that described herein without departing from the scope of the claims herein.

[0089] In another aspect, the present invention provides a computer program for performing the method 100 when executed on the secondary storage. In yet another aspect, a computer program product is provided, comprising a non-transitory computer readable storage medium storing computer program code executable by a processor to perform the method 100. Examples of implementation of the non-transitory computer readable storage medium include, but are not limited to, electrically erasable programmable read-only memory (EEPROM), random access memory (RAM), read only memory (ROM), hard disk drive (HDD), flash memory, secure digital (SD) card, solid-state drive (SSD), computer readable storage medium, and / or CPU cache. The computer readable storage medium used to provide the non-transitory storage can include, but is not limited to, electronic, magnetic, optical, electromagnetic, semiconductor, or any suitable combination of the foregoing.

[0090] Figure 2A is a network environment diagram of a system for selectively replicating data of a primary storage provided by an embodiment of the present invention. Figure 2A In conjunction with Figure 1 described. In conjunction with Figure 2AFIG. 1 illustrates a system 100. The system 100 includes a primary storage 102 and a secondary storage 104. The secondary storage 104 is communicatively coupled to the primary storage 102 through a communication network 106. The secondary storage 104 includes an interface 108, a replication engine 110, and a parser 112. The primary storage 102 includes one or more logical units 116.

[0091] In another aspect, the present disclosure provides a system 100 for selectively replicating data of a primary storage 102, wherein the data is stored on one or more blocks 118 of one or more logical units 116 of the primary storage 102, the system 100 comprising a secondary storage 104 for connecting to the primary storage 102, the secondary storage 104 comprising:

[0092] the interface 108 for executing a command to receive a configurable set of parameters of a logical unit 116 of the primary storage 102;

[0093] the replication engine 110 for selectively replicating one or more blocks 118 of stored data from the primary storage 102 to the secondary storage 104.

[0094] The primary storage 102 includes suitable logic, circuitry, interfaces, and / or code for storing user data (e.g., virtual machine data or other data associated with various software applications executing on the primary storage 102). The primary storage 102 is configured to store data in various blocks of one or more logical units 116. The primary storage 102 refers to a block device or an electronic device that uses a block device for data storage. Examples of the primary storage 102 include, but are not limited to, a host server, a host production environment system, a thin client connected to a host server, a primary storage system, and a user device (such as a cellular phone, a personal digital assistant (PDA), a handheld device, a notebook, a personal computer, an Internet-of-Things (IoT) device, a smart phone, a machine type communication (MTC) device, a computing device, a drone, or any other portable or non-portable electronic device).

[0095] The secondary storage 204 includes suitable logic, circuitry, interfaces, and / or code to receive, store, process data received from the primary storage 202. The secondary storage 204 is used to store a backup of the data in the primary storage 202. The secondary storage 204 is used to store the data synchronously. The secondary storage 204 is used to provide the replicated data to the primary storage 202 in case of any data loss due to corruption of data in the primary storage 202, hardware or software failure, accidental deletion of data, hacking or malicious attack, and the like. The secondary storage 204 refers to a block device or an electronic device that uses a block device for data storage. Examples of the secondary storage 204 include, but are not limited to, a secondary storage system, a storage server, a cloud server, a web server, an application server, a backup server, or a combination thereof.

[0096] The communication network 206 includes a medium (e.g., a communication channel) through which the secondary memory 204 can communicate with the primary memory 202. The communication network 206 can be a wired or wireless communication network. Examples of the communication network 206 can include, but are not limited to, a wireless fidelity (Wi-Fi) network, a local area network (LAN), a wireless personal area network (WPAN), a wireless local area network (WLAN), a wireless wide area network (WW AN), a cloud network, a long term evolution (LTE) network, a plain old telephone service (POTS), a metropolitan area network (MAN), and / or the Internet. The secondary memory 204 and the primary memory 202 can be configured to connect to the communication network 206 according to various wired and wireless communication protocols. Examples of such wired and wireless communication protocols can include, but are not limited to, transmission control protocol and internet protocol (TCP / IP), user datagram protocol (UDP), hypertext transfer protocol (HTTP), file transfer protocol (FTP), ZigBee, EDGE, infrared (IR), IEEE 802.11, 802.16, long term evolution (LTE), light fidelity (Li-Fi), and / or other cellular communication protocols or Bluetooth (BT) communication protocols, including variants thereof.

[0097] The interface 208 of the secondary memory 204 refers to a user interface or a graphical user interface. The interface 208 is configured to receive user inputs and commands to perform corresponding actions. The interface 208 receives a set of configurable parameters as user inputs. According to an embodiment, the interface 208 can be presented on a display screen associated with the secondary memory 204. The set of configurable parameters received by the interface 208 enables the secondary memory 204 to identify the portion of data in the primary memory 202 to be selectively replicated.

[0098] The replication engine 210 of the secondary storage 204 includes suitable logic, circuitry, interfaces, and / or code to selectively replicate one or more blocks 218 of stored data from the primary storage 202 to the secondary storage 204. The selective replication is performed by the replication engine 210 in accordance with a configurable set of parameters received by the interface 208. In one implementation, the replication engine 210 can be implemented as replication circuitry. In another implementation, the replication engine 210 can be implemented as a software component or a combination of software and circuitry.

[0099] The parser 212 is to parse a file system, for example, to parse a copy (i.e., snapshot) of one or more logical units 216. The parser 212 can be implemented as a software component or circuitry to perform the parsing.

[0100] The virtual machine hypervisor 214 is software, a combination of software and hardware, or firmware to manage and run one or more virtual machines 234 on the host storage device 232.

[0101] Each of the one or more logical units 216 refers to a storage area in the primary storage 202, where each logical unit includes one or more blocks. Further, each logical unit is identified by an identifier, which can also be referred to as a logical unit number (LUN). A logical unit number is an identifier used to label and specify a subsystem of physical or virtual storage. Typically, different logical unit numbers are assigned to different areas in a physical drive (i.e., storage system) so that data can be read, written, or retrieved when needed.

[0102] In operation, the secondary storage 204 is to receive a request through the interface 208 to selectively replicate data of the primary storage 202. In one example, the request can be synchronously received by the secondary storage 204. In contrast to conventional techniques that replicate all data of the primary storage 202, the secondary storage 204 is to replicate only selected portions of data of the primary storage 202 in accordance with the request, rather than replicating all data of the primary storage 202. As a result, the secondary storage 204 replicates data faster and requires less storage space in comparison to conventional techniques.

[0103] The system 200 includes a secondary storage 204 to connect to a primary storage 202. The secondary storage 204 includes an interface 208 to execute a command to receive a configurable set of parameters of a logical unit of the primary storage 202. The command is executed to receive the configurable set of parameters. The configurable set of parameters enables identification of related data associated with a single object (e.g., virtual machine) in different blocks of the logical unit stored in one or more logical units 216 of the primary storage 202 to be replicated. The interface 208 is to receive the command as a user input.

[0104] The replication engine 210 is used to selectively replicate one or more blocks 218 of stored data from the primary storage 202 to the secondary storage 204. The replication engine 210 of the secondary storage 204 provides a solution to the problem of inefficient replication techniques: copying a portion of a logical unit (i.e., one or more blocks 218 of a logical unit) into the secondary storage 204 and then using an efficient replication mechanism to copy only the relevant data (i.e., the data stored on the one or more blocks 218) from the replicated logical unit to the file system. The data stored on the one or more blocks 218 is potentially relevant data associated with a single object (e.g., a virtual machine). Thus, it is beneficial that the solution provided by the secondary storage 204 of the system 200 can be broken into three parts. The first part of the three parts is implemented by the interface 208 configured for block storage replication, which can receive a request to selectively replicate data from the primary storage 202 (i.e., to replicate only a portion of a logical unit). The second part of the solution is also facilitated by the interface 208, which executes a command to receive a configurable set of parameters for a logical unit. This enables a decision to be made as to which portions (i.e., which blocks) of a logical unit of one or more logical units should be replicated. The mechanism that decides which portions (i.e., which blocks) of a logical unit of one or more logical units 216 should be replicated. Specifically, the configurable set of parameters indicates which portions (i.e., which blocks) of a logical unit should be replicated. Finally, the third part of the solution is implemented by the replication engine 210, which solves the problem of how to utilize the logical unit replication for single object recovery in the secondary storage 204. Thus, one or more blocks 218 of stored data are selectively and efficiently replicated from the primary storage 202 to the secondary storage 204 according to the received configurable set of parameters.

[0105] According to one embodiment, the secondary storage 204 is further configured to receive, via the interface 208, a first identification value of one or more logical units 216, the logical units 216 including one or more blocks 218 of stored data, a second identification value of the one or more blocks 218 of stored data, and an indication for marking the one or more blocks 218 of stored data. The first identification value received by the interface 208 of the secondary storage 204 includes an identification value associated with an identification of a logical unit to be selectively replicated. In one example, the first identification value belongs to the first logical unit among other logical units (e.g., the first logical unit, the second logical unit, the third logical unit, the fourth logical unit) in the primary storage 202. The first identification value, also referred to as a logical unit number (LUN), is an identification value of a given logical unit. The second identification value received by the interface 208 of the secondary storage 204 includes a vector of pairs, where the vector of pairs indicates a start and a size of the one or more blocks 218 of stored data. In one example, the second identification value belongs to the second and third blocks among all blocks (e.g., the first block, the second block, the third block, the fourth block, etc.) of the corresponding logical unit present in the first identification value. The start size indicates from which block in a sequence of blocks in a given logical unit to start, and the size indicates a number of blocks to replicate from the starting block. The indication for marking the one or more blocks clearly identifies the one or more blocks 218 of the one or more blocks 218 of stored data to be selectively replicated. The indication includes a Boolean value (e.g., true or false) that indicates whether a portion (e.g., the one or more blocks 218) of a logical unit should be replicated or not.

[0106] According to one embodiment, the secondary storage 204 is further configured to receive, via the interface 208, a list of one or more virtual machines located in the host storage device 232, and a location indication for identifying which block in the one or more blocks 218 belongs to which virtual machine in the one or more virtual machines. The list of one or more virtual machines and the location indication received by the secondary storage 204 via the interface 208 enable accurate identification of virtual machines and their corresponding blocks in the primary storage 202. The virtual machine hypervisor 214 includes one or more virtual machines 234 associated therewith. Further, such virtual machines can have associated blocks at different locations of the one or more logical units 216. The list of one or more virtual machines and the location indication enable accurate and faster identification of virtual machines and their corresponding blocks in the one or more logical units of the primary storage 202, thereby improving the speed and accuracy of selective replication by the secondary storage 204.

[0107] According to one embodiment, the auxiliary memory 204 is further configured to selectively mark one or more blocks 218 for replication based on the received configurable set of parameters. The auxiliary memory 204 is configured to positively or negatively mask the one or more blocks 218 selected for replication based on the marked one or more blocks 218 for replication. Positive masking of the blocks 218 enables identification of blocks for replication. Negative masking of the blocks 218 enables identification of blocks that are not replicated. The auxiliary memory 204 receives an indication to mark one or more blocks 218 in order to positively identify the one or more blocks 218. Typically, in the case of a virtual machine, the data associated with the virtual machine is dynamic and increases over time, resulting in allocation of new blocks in the logical unit. Therefore, marking the one or more blocks by negative masking is more efficient as compared to positive masking. In other words, negative masking of blocks associated with the virtual machine that are not replicated is efficient as compared to positive masking of blocks associated with the virtual machine that are to be replicated.

[0108] According to one embodiment, the auxiliary memory 204 is further configured to identify which of the one or more blocks 218 storing data of one or more logical units 216 of the primary memory 202 belongs to which of the one or more virtual machines in the host storage device 232. This identification is achieved based on the location indication received by the auxiliary memory 204 from the interface 208. This identification enables the auxiliary memory 204 to store the blocks in a manner that enables accurate and fast retrieval of the blocks.

[0109] According to one embodiment, in order to selectively replicate the data, the auxiliary memory 204 is further configured to periodically create a copy of the logical unit comprising the one or more blocks 218. This copy of the logical unit is typically created in the primary memory 202. The copy of the logical unit can be created by creating a snapshot of the logical unit. One or more blocks in the logical unit can change over time, i.e., a block that was previously empty can currently have data and a block having data can become empty. Therefore, the copy of the logical unit is periodically created.

[0110] According to one embodiment, to selectively replicate data, the secondary storage 204 is further configured to perform a first parse by parsing a file system of the logical unit that creates a copy (e.g., a virtual machine file system). The parser 212 is configured to perform the first parse in the primary storage 202. In one example, the file system can be a virtual machine file system. The first parse is performed on the file system according to a received set of configurable parameters. According to one embodiment, to selectively replicate data, the secondary storage 204 is further configured to mark one or more blocks 218 of the parsed copy of the logical unit 216 for replication. Marking the one or more blocks 218 of the parsed copy enables the secondary storage 204 to accurately identify the one or more blocks 218 that need to be selectively replicated. According to one embodiment, to selectively replicate data, the secondary storage 204 is further configured to replicate, by the replication engine 210, the marked one or more blocks 218 of the logical unit 216 to the secondary storage 204. Thus, the method of the present invention replicates only the marked one or more blocks 218, rather than replicating all blocks of the one or more logical units 216.

[0111] According to one embodiment, to selectively replicate data, the secondary storage 204 is further configured to avoid replicating one or more blocks 218 of the primary storage 202. In the case where the data is dynamic (i.e., the data changes or increases over time), the one or more blocks 218 are selected for avoidance for replication, thereby allocating the data into new blocks. In one example, the one or more blocks 218 are selected for avoidance for replication for storing data of a virtual machine in the one or more blocks. According to one embodiment, to selectively replicate data, the secondary storage 204 is further configured to replicate a single virtual machine of one or more virtual machines 234 stored on a virtual machine file system of the virtual machine hypervisor 214. Replicating the single virtual machine is performed by the secondary storage 204 through the replication engine 210. Replicating only the single virtual machine among the one or more virtual machines is based on a received set of configurable parameters, wherein the first identification value and the second identification value belong to one or more blocks 218 of one or more logical units 216 that are associated only with the single virtual machine.

[0112] According to one embodiment, to selectively replicate data, the secondary storage 204 is further configured to replicate one or more virtual machines of all virtual machines stored on a virtual machine file system of the virtual machine hypervisor 214. Replicating one or more virtual machines of all virtual machines is based on a received configurable set of parameters, wherein the first identification value and the second identification value belong to one or more blocks 218 of one or more logical units 216 associated with the one or more virtual machines. According to one embodiment, to selectively replicate data, the secondary storage 204 is further configured to replicate files of the file system in different formats on the secondary storage 204. The secondary storage 204 is further configured to replicate one or more files in a file system different from the file system of the primary storage 202.

[0113] According to one embodiment, the secondary storage 204 is further configured to create a snapshot of the replicated one or more blocks of the logical unit 216. The secondary storage 204 is further configured to mount the snapshot of the replicated one or more blocks of the logical unit 216 by the replication engine 210. The secondary storage 204 is further configured to perform a second resolution by resolving the file system of the replicated logical unit. The secondary storage 204 is further configured to create a file by copying one or more blocks of the resolved file in the file system to a second file in the secondary storage 204. According to one embodiment, the secondary storage 204 is further configured to perform replication by pointer manipulation within the secondary storage 204 without moving data.

[0114] Figure 2B is a block diagram illustrating various exemplary components of a primary storage, according to an embodiment of the present invention. In conjunction with Figure 2B , a primary storage 202 is shown. The primary storage 202 includes a first processor 220, a first transceiver 222, and a first memory 224 (e.g., a primary storage system). The first processor 220 can be communicatively coupled with the first transceiver 222 and the first memory 224. The first memory 224 further includes one or more logical units 216 including one or more blocks 218. The primary storage 202 is coupled with a secondary storage 204 through a communication network 206.

[0115] The first processor 220 is configured to provide data associated with one or more blocks 218 of one or more logical units 216 to the secondary storage 204. In one implementation, the first processor 220 is configured to execute instructions stored in the first memory 224. In one example, the first processor 220 can be a general-purpose processor. Other examples of the first processor 220 can include, but are not limited to, a microprocessor, a microcontroller, a complex instruction set computing (CISC) processor, an application-specific integrated circuit (ASIC) processor, a reduced instruction set (RISC) processor, a very long instruction word (VLIW) processor, a central processing unit (CPU), a state machine, a data processing unit, and other processors or control circuits. Moreover, the first processor 220 can refer to one or more separate processors, processing devices, processing units that are part of a machine (e.g., the main memory 202).

[0116] The first transceiver 222 includes suitable logic, circuitry, and interfaces that can be used to communicate with one or more external devices, such as the secondary storage 204. Examples of the first transceiver 222 can include, but are not limited to, an antenna, a telematics unit, a radio frequency (RF) transceiver, one or more amplifiers, one or more oscillators, a digital signal processor, a coder-decoder (CODEC) chipset, and / or a subscriber identity module (SIM) card.

[0117] The first memory 224 refers to a main storage system of the main memory 202. The first memory 224 includes suitable logic, circuitry, and interfaces that can be used to store instructions executable by the first processor 220. Examples of implementation of the first memory 224 can include, but are not limited to, an electrically erasable programmable read-only memory (EEPROM), a random access memory (RAM), a read only memory (ROM), a hard disk drive (HDD), a flash memory, a solid-state drive (SSD), and / or a CPU cache memory. The first memory 224 can store an operating system and / or other program products (including one or more operational algorithms) to operate the main memory 202.

[0118] Figure 2C is a block diagram showing various exemplary components of the secondary memory, in accordance with embodiments of the present invention. In conjunction with Figure 2C , the secondary memory 204 is shown. The secondary memory 204 also includes a second processor 226, a second transceiver 228, and a second memory 230. Also shown are the interface 208, the replication engine 210, and the parser 212. The second processor 226 can be communicatively coupled with the second transceiver 228, the interface 208, and the second memory 230. The secondary memory 204 is communicatively coupled with the main memory 202 through the communication network 206.

[0119] The second processor 226 is configured to execute instructions stored in the second memory 230. Examples of the second processor 226 include, but are not limited to, a microprocessor, a microcontroller, a CISC processor, an ASIC processor, a RISC processor, a VLIW processor, a CPU, a state machine, a data processing unit, and other processors or control circuitry. The interface 208 can receive a configurable set of parameters of one or more logical units of the main memory 202. The replication engine 210 is configured to replicate one or more blocks 218 of one or more logical units 216 of the main memory 202 to the second memory 230.

[0120] In one aspect, during operation, a second processor 226 of the auxiliary memory 204 is configured to receive one or more blocks from the main memory 202 and store the received one or more blocks as a file in the second memory 230. The second processor 226 is configured to receive a request to selectively copy data from the main memory 202. The second processor 226 is also configured to execute commands to receive a set of configurable parameters for the logical units of one or more logical units 216 of the main memory 202. The second processor 226 is further configured to selectively copy one or more blocks 218 of stored data from the main memory 202 to the auxiliary memory 204 according to the received set of configurable parameters.

[0121] On the other hand, in operation, the second processor 226 of the auxiliary memory 204 is used to execute commands via interface 208 to receive a set of configurable parameters for the logical units of one or more logical units 216 of the main memory 202. The second processor 226 is also used to selectively copy one or more blocks 218 of stored data from the main memory 202 to the auxiliary memory 204. The selective copying of one or more blocks 218 is performed using a copy engine 210. In yet another aspect, all operations (or functions) performed by the auxiliary memory 204 can be performed by the second processor 226.

[0122] Figure 3 An exemplary scenario 300 illustrating a descriptive logic unit provided by an embodiment of the present invention is shown. (In conjunction with...) Figure 3 The diagram illustrates the logic units in three states: first state 300A, second state 300B, and third state 300C. First state 300A describes the logic unit prior to receiving a selective replication request. Second state 300B and third state 300C describe the logic units following the receipt of a first request (i.e., after the first call) and a second request (i.e., after the second call) of data from the selective replication logic unit, respectively.

[0123] In exemplary scenario 300, the logic unit includes 10 blocks described as block 0 302A, block 1 302B, block 2 302C, block 302D, block 4 302E, block 5 302F, block 6 302G, block 7 302H, block 8 302I, and block 9 302J. In exemplary scenario 300, white blocks represent duplicate blocks, and patterned blocks (e.g., horizontal line patterns) represent blocks not in auxiliary memory (e.g.,...). Figure 2A The block copied in the auxiliary storage 204. Interface (e.g., Figure 2A Interface 208) can request the copying of only certain portions of the logic unit. The interface is used to execute commands to receive a set of configurable parameters for the logic unit. For example, auxiliary storage can be accessed via a command function (1) executed by the interface (e.g., ...). Figure 1the Mask_lu_replication command) receives a configurable set of parameters.

[0124] In the second state 300B, after receiving the first request (i.e., when the first call is executed), the interface is used to execute the following command (2) in the example scenario 300 to receive the configurable set of parameters.

[0125] Command (2): Mask_lu_replication (lu_1, vector ((1, 2), (5, 3)), true)

[0126] wherein,

[0127] ‘lu_1’ represents the first logical unit;

[0128] ‘(1, 2)’ represents the first block 302B, with a block size of 2;

[0129] ‘(5, 3)’ represents the starting block as the fifth block 302F, with a block size of 3;

[0130] ‘true’ is a Boolean value indicating that the selected blocks are to be unmasked.

[0131] Thus, the configurable set of parameters in the first call includes a first identification value of the logical unit (i.e., lu_1), and a second identification value including two pairs of vectors (i.e., (1, 2) and (5, 3)), wherein (1, 2) indicates that the starting block is the first block 302B by vector value 1, and the block size is 2 by vector value 2; (5, 3) indicates that the starting block is the fifth block 302F by vector value 5, and the block size is 3 by vector value 3. In addition, the configurable set of parameters in the first call includes an indication as a Boolean value “true” indicating that the selected blocks are to be positively masked. Thus, in the second state 300B of the logical unit in the example scenario 300, the first block 302B, the second block 302C, the fifth block 302F, the sixth block 302G, and the seventh block 302H of the logical unit 300B are unmasked to pattern the blocks as shown. Figure 3

[0132] In addition, to positively mask a particular block, a second call is executed (i.e., another command executed by the interface).

[0133] Command (3): Mask_lu_replication (lu_1, vector ((2, 2)), false)

[0134] wherein,

[0135] ‘lu_1’ represents the first logical unit;

[0136] ‘(2, 2)’ represents the second block, with a block size of 2.​

[0137] ‘false’ indicates that the block is to be masked in the example scenario 300.

[0138] Further, the set of configurable parameters in the second call (second request) includes a first identification value ‘lu l’ and a second identification value including a vector (2,2) which indicates that the start of the block is the second block 302C by the vector value 2 and the size of the block is 2 by the vector value 2. Further, the set of configurable parameters in the second call includes a flag indication as a Boolean value ‘false’ which indicates that the selected second block 302C is being masked. Accordingly, the second block 302C is positively masked and selected for copying, indicated by the white block of the second block 302C. Thus, the example scenario 300 illustrates how a request to copy only certain portions of a logical unit is performed.

[0139] Figure 4 An example scenario 400 is shown illustrating a logical unit provided by another embodiment of the present invention. In conjunction with Figure 4 , the logical unit is shown in a first state 400A and a second state 400B.

[0140] In the example scenario 300, the logical unit includes 20 blocks for storing data, such as data associated with two different virtual machines. The 20 blocks are depicted as a zeroth block 402A, a first block 402B, a second block 402C, a third block 402D, a fourth block 402E, a fifth block 402F, a sixth block 402G, a seventh block 402H, an eighth block 402I, a ninth block 402J, a tenth block 402K, an eleventh block 402L, a twelfth block 402M, a thirteenth block 402N, a fourteenth block 402O, a fifteenth block 402P, a sixteenth block 402Q, a seventeenth block 402R, an eighteenth block 402S, and a last nineteenth block 402T.

[0141] In the first state 400A, the third block 402D, the seventh block 402H, the tenth block 402K, the eleventh block 402L, the twelfth block 402M, the thirteenth block 402N, the fourteenth block 402O, the fifteenth block 402P, the sixteenth block 402Q, the seventeenth block 402R, the eighteenth block 402S, and the last nineteenth block 402T are empty blocks, which are free space for storing data. Further, in the first state 400A of the logical unit, as shown in Figure 4 , the first block 402B, the fifth block 402F, and the sixth block 402G store data associated with a first virtual machine (VM1) (also represented by the brick pattern in the first state 400A in Figure 4 ). Further, the zeroth block 402A, the second block 402C, the fourth block 402E, the eighth block 402I, the ninth block 402J store data associated with a second virtual machine (VM2) (also represented by the brick pattern in the first state 400A inFigure 4 (Represented by a small box-shaped pattern under the first state 400A). In this case, when data associated with multiple virtual machines is stored in the same logical unit, as shown under the first state 400A, if the user wants to copy only the first virtual machine (VM1) and not the second virtual machine (VM2), the user can do so through an interface (e.g., Figure 2A Interface 208 provides user input in the form of commands to receive a set of configurable parameters to unmask blocks associated with the second virtual machine, namely block 0 402A, block 2 402C, block 402E, block 8 402I, and block 9 402J. The user provides a set of configurable parameters to unmask blocks associated with the second virtual machine, rather than providing a set of configurable parameters to positively mask blocks associated with the first virtual machine, because the virtual machines are dynamic and new blocks associated with the first virtual machine can be allocated over time. For example, in the second state 400B of the logic unit (e.g.... Figure 4 As shown, the third block 402D is newly allocated to the second virtual machine. In this case, the user provides a set of configurable parameters to unmask the blocks associated with the second virtual machine, for example, further unmasking the newly allocated third block 402D to the second virtual machine so that data associated with the second virtual machine is not copied. Therefore, in total, the zeroth block 402A, the second block 402C, the third block 402D (newly allocated), the fourth block 402E, the eighth block 402I, and the ninth block 402J are not copied. The set of configurable parameters used for unmasking blocks is periodically changed over time based on the new block allocation for a particular virtual machine.

[0142] Figure 5 A system for selectively copying data from main memory, according to another embodiment of the present invention, is shown. (In conjunction with...) Figure 5 The diagram illustrates system 500. Main memory 202, host storage device, and secondary storage 204 are shown. A hypervisor 214 in the host storage device is used to run a first virtual machine 502 and a second virtual machine 504. Each virtual machine in the first virtual machine 502 and the second virtual machine 504 is associated with data stored in a first file system (such as a virtual machine file system) in main memory 202.

[0143] The main memory 202 includes logic cells in the second state 400B (the second state 400B of the logic cells is already in the second state 400B). Figure 4 (As described in the text). The logical unit in the second state 400B comprises 20 blocks, which are used for storage with the first virtual machine (by...). Figure 5 (represented by brick-shaped pattern blocks in the second virtual machine) and the second virtual machine (by Figure 5 The box-shaped pattern blocks in the image represent the associated data. A snapshot 506 of the logic cell in the second state 400B is created in the main memory 202.

[0144] The system 500 comprises an auxiliary memory 204 configured to connect to the primary memory 202 (in particular to the hypervisor 214) and to retrieve the list of virtual machines and the location of the virtual machine disks on logical units. The auxiliary memory 204 comprises an interface 208 configured to execute a command to receive a configurable parameter set of the logical units in the second state 400B in the primary memory 202. The command is executed to receive the configurable parameter set. The configurable parameter set enables to identify the relevant data associated with a single object, which is the first virtual machine (VM1) stored in different blocks of the logical units in the primary memory 202 in the second state 400B to be replicated. The interface 208 is configured to receive the command as a user input. The auxiliary memory 204 further comprises a replication engine 210 configured to selectively replicate the blocks storing data associated only with the first virtual machine 502 from the primary memory 202 to the auxiliary memory 204.

[0145] According to an embodiment, the auxiliary memory 204 is configured to periodically create a copy (e.g. a snapshot 506) of the logical units. The auxiliary memory 204 is further configured to perform a first parsing by the parser 212 by parsing the file system of the logical units to create the copy (i.e. the snapshot 506). The auxiliary memory 204 is further configured to mark the blocks belonging to the first virtual machine 502 of the parsed copy of the logical units for replication. To mark the blocks belonging to the first virtual machine 502, the auxiliary memory 204 uses the interface 208 to unmask the blocks belonging to the second virtual machine 504 in the case of virtual machines. The auxiliary memory 204 is further configured to replicate the marked block(s) of the logical units to the auxiliary memory 204 by the replication engine 210. Thus, the auxiliary memory 204 is configured to receive the replicated logical units 508 having only the blocks associated with the first virtual machine 502. The auxiliary memory 204 is further configured to create another snapshot of the replicated logical units 508, like the snapshot 510. The snapshot 508 is internally mounted in the auxiliary memory 204 by the replication engine 210. The auxiliary memory is further configured to perform a second parsing by the parser 212 to parse the file system of the replicated logical units 508 and to create the file 510 by replicating only the data associated with the first virtual machine 502 in the auxiliary memory 204.

[0146] Thus, the method and system of the present invention provide an efficient technical solution to the problem of inefficient replication techniques, wherein the solution can be divided into three parts. In the first part, a new interface (i.e. the interface 208) is provided for block storage replication to allow to request to replicate only a part of a given logical unit.

[0147] In the second part, a mechanism is provided that decides which parts (i.e., which blocks) of a given logical unit should be replicated. A configurable parameter set indicates which parts (i.e., which blocks) of the logical unit should be replicated. The secondary storage 204 is able to parse the file system in a given logical unit. Below is an example implementation to explain how the process works in a virtual machine file system (VMFS) and the process can also work in other file systems. The process works as follows: (1) the system can connect to the virtual machine hypervisor 214 and is able to retrieve the list of virtual machines and the location of the virtual machine disks on the logical unit (e.g., through the vCenter application programming interface (API), the VMware application, or through the System Center API when using Hyper-V); (2) the user can indicate the set of virtual machines that he or she wants to replicate through the interface 208; (3) the system (e.g., the secondary storage 204) starts replicating the complete logical unit that includes the VMFS that includes the virtual machines that the user wants to replicate; (4) the secondary storage 204 (e.g., the storage system software) periodically creates snapshots of the VMFS logical unit; (5) the secondary storage 204 (e.g., the storage system software or the parser 212) parses the file system (VMFS) in the logical unit and decides which parts (i.e., blocks) are related to the virtual machines that are replicated, i.e., which parts in the logical unit include data that belongs to one of the virtual machine disks (VMDK) that needs to be replicated; (6) in the case of virtual machines, since the virtual machine disks are dynamic (i.e., the size of the virtual machine disks can grow over time and new blocks are allocated in the storage), it is not recommended to select the blocks to replicate through a list of blocks that belong to the virtual machines. In this case, it is safe to unmask the blocks that belong to the virtual machines that do not need to be replicated (because blocks are only added to the virtual machines). The system (i.e., the secondary storage 204) marks all the blocks that belong to the non-replicated virtual machines as non-replicated blocks. In other words, parts (i.e., blocks) of the logical unit are masked to enable sub-object replication of the logical unit. Figure 4 An example scenario 400 is described in the middle that explains the selective replication of a single virtual machine (i.e., for single object recovery). Moreover, in the case where the objects (e.g., objects stored in blocks) are not dynamic, the system (i.e., the secondary storage 204) can use a white list and only mark the first virtual machine blocks (VM1) to replicate, but typically in VMFS systems (e.g., VMware systems), the volumes are dynamic.

[0148] Finally, the third part of the solution involves how to utilize the logical unit copy to do single object recovery in the secondary storage 204. Thus, one or more blocks of stored data are selectively and efficiently copied from the primary storage to the secondary storage according to the received configurable parameter set. The workflow (or process) of the third part is as follows: (1) copy parts (i.e., blocks) of the logical unit to the secondary storage 204, including the configuration of which blocks to copy; (2) the secondary storage 204 periodically creates a copy of the replication logic (i.e., snapshot 510) and internally mounts the snapshot 510, resolves the file system, and understands (i.e., identifies) which blocks belong to the protected virtual machine; (3) the system (i.e., the secondary storage 204) copies the virtual machine data, or uses internal copy commands to change the data to another file system (as the storage understands which data needs to be copied to which location). Thus, the secondary storage 204 has a copy of the virtual machine (VM) disk in its native format in the secondary storage file system.

[0149] Modifications can be made to the embodiments of the application described above without departing from the scope of the application as defined in the appended claims. Expressions such as "including", "containing", "comprising", "having", "including", "involved in", "comprised of", and the like are used herein to mean that the specified item is among the items that are present, but not necessarily all of the items that are present. Reference to items in the singular should be read to encompass the plural, unless otherwise indicated. The word "exemplary" is used herein to mean "serving as an example, instance, or illustration." Any implementation described as "exemplary" is not necessarily to be construed as preferred or advantageous over other implementations. The word "may" is used herein to mean "there is a possibility of" rather than "there is a necessity of." The following claims are hereby incorporated into the description of the application by this reference, and the appended claims are intended to be read in conjunction with the description of the application, including the drawings, the abstract, and the claims.

Claims

1. A method for selectively copying data of a main memory, characterized in that, The data is stored on one or more blocks of one or more logical units of the main memory, the method comprising: - receiving, by a secondary memory, a request to selectively replicate the data of the main memory; - executing a command to receive a configurable set of parameters of the logical unit; - selectively replicating, from the main memory to the secondary memory, the one or more blocks storing the data according to the received configurable set of parameters; the selective replication comprises replicating files of a file system in a different format on the secondary memory; the different format comprises: a native file format of the secondary memory or a user-defined file format.

2. The method of claim 1, wherein, Receiving the configurable set of parameters comprises receiving: - a first identification value of one or more logical units comprising one or more blocks storing the data; - a second identification value of one or more blocks storing the data; - an indication to mark the one or more blocks storing the data.

3. The method of claim 2, wherein, The receiving the second identification value comprises receiving a vector, wherein, The vector indicates a start and a size of the one or more blocks storing the data.

4. The method according to any of the preceding claims 1 - 3, characterized in that, The secondary memory selectively replicating the data comprises: - periodically creating a copy of the logical unit comprising one or more blocks; - performing a first parsing by parsing a file system of the created copy of the logical unit; - marking the one or more blocks of the parsed copy of the logical unit for replication; - replicating, by a replication engine, the marked one or more blocks of the logical unit to a secondary memory.

5. The method according to claim 2 or 3, characterized in that The marking the one or more blocks is performed by positive masking or negative masking the one or more blocks.

6. The method according to any of the preceding claims 1-3, characterized in that, Receiving the request to selectively replicate the data of the main memory comprises: receiving a request to selectively replicate data of a host storage device, the host storage device comprising a hypervisor running one or more virtual machines.

7. The method according to any of the preceding claims 1 - 3, characterized in that, Receiving the set of parameters further comprises receiving: - a list of one or more virtual machines located in the hypervisor; - a location indication to identify which block of one or more blocks belongs to which virtual machine of one or more virtual machines.

8. The method according to any of the preceding claims 1 - 3, characterized in that, The method further comprises: - creating a snapshot of the replicated one or more blocks of the logical unit; - mounting, by a replication engine, the snapshot of the replicated one or more blocks of the logical unit; - performing a second parsing by parsing the file system of the replicated logical unit; - creating a file by replicating the one or more blocks of the parsed file in the file system to a second file in the secondary memory.

9. The method of claim 8, wherein, The replication is performed by pointer manipulation within the secondary memory without moving data.

10. The method according to any of the preceding claims 1 - 3, characterized in that, The selective replication comprises: - avoiding replicating one or more blocks of the main memory; - replicating a single virtual machine of one or more virtual machines stored on a virtual machine file system of a hypervisor; - replicating more than one virtual machine of all virtual machines stored on the virtual machine file system of the hypervisor; or - copying one or more files in a file system different from the file system of the main memory.

11. A system for selectively replicating data of a main memory, characterized by The data is stored on one or more blocks of one or more logical units of the main memory, the system comprising a secondary memory for connecting to the main memory, the secondary memory comprising: - an interface for executing commands to receive a configurable set of parameters of the logical units of the main memory; - a copy engine for selectively copying one or more blocks storing the data from the main memory to the secondary memory; the selective copying comprises copying files of a file system in a different format on the secondary memory; the different format comprises: a native file format of the secondary memory or a user-defined file format.

12. The system of claim 11, wherein, The secondary memory is further for receiving, through the interface: - a first identification value of one or more logical units comprising one or more blocks storing the data; - a second identification value of one or more blocks storing the data; - an indication for marking the one or more blocks storing the data.

13. The system of claim 11 or 12, wherein, The secondary memory is further for receiving, through the interface: - a list of one or more virtual machines located in the host storage device; - a location indication for identifying which of the one or more blocks belongs to which of the one or more virtual machines.

14. The system of claim 11 or 12, wherein, The secondary memory is further for selectively marking the one or more blocks for copying according to the received configurable set of parameters.

15. The system of claim 11 or 12, wherein, The secondary memory is further for identifying which of the one or more blocks storing the data of one or more logical units of the main memory belongs to which of the one or more virtual machines in the host storage device.

16. A computer program product, characterised in that, The computer program product, when executed in a secondary memory, is for performing the method according to any one of claims 1-10. The computer program product, when executed in a secondary memory, is for performing the method according to any one of claims 1-10.

Citation Information

Patent Citations

  • Data synchronization

    US9959061B1