BACKGROUNDTechnical Field
Embodiments described herein relate to storage systems, and more particularly, to techniques for optimizing replication in a storage system.
Description of the Related Art
Various applications executing on a computer system may store and access data stored on one or more storage devices of a storage system. As the data is modified over time, the storage system needs to keep track of the changes, update mappings, and free up storage locations corresponding to deleted data so that these storage locations can be used for new data.
Accordingly, a typical storage system may execute garbage collection and/or read optimization processes to reduce the complexity of the mappings and data stored on the storage system. These processes tend to mimic user activity, and as these processes move data and create new mappings, original metadata associated with the data may be deleted. As a result, old data that was relocated for the purposes of garbage collection or read optimization may look like new data from the storage system's perspective. Accordingly, relocated data may be sent to another storage system during replication even if this data already exists on the other storage system. Therefore, techniques for tracking relocated data and performing more efficient replication are desired.
SUMMARYVarious embodiments of systems and methods for tracking relocated data and performing more efficient replication in a storage system are contemplated.
In one embodiment, a storage system may include one or more storage arrays, with each storage array including a storage controller and one or more storage devices. In one embodiment, the storage controller may utilize volumes and mediums to track stored client data. A medium may be defined as a logical grouping of data. In various embodiments, each volume may be mapped to a single anchor medium, and the anchor medium for a given volume may be mapped to any number of levels of underlying mediums in a medium hierarchy of the given volume.
During operation of a storage system, data that already exists in a medium hierarchy of a given volume may be relocated to another portion higher up in the medium hierarchy of the given volume. In one embodiment, this relocation may be the result of read optimization operations. The storage controller may be configured to differentiate between system activity that mimics user writes, such as relocation of data, and actual user writes. In one embodiment, the storage controller may achieve this differentiation by maintaining a tag for each write operation to identify when the write operation was performed and/or which entity is the owner of this write operation. In various embodiments, the tag may be a sequence number, timestamp, original medium ID, transaction ID, snapshot ID, or other identifier. When a portion of data is relocated due to a read optimization operation, the storage controller may retain the one or more tags which are associated with this portion of data. The storage controller may also be configured to maintain a medium history table which records the history of each of a plurality of medium hierarchies rather than the evolution of the medium hierarchies. The medium history table in combination with the tags may allow the storage controller to perform replication without copying previously replicated data.
In one embodiment, the tag may be a sequence number, and the storage controller may store a sequence number for each mapping table entry corresponding to a portion of a medium. In one embodiment, the sequence number may be a monotonically increasing number which is assigned to each write operation. When data is relocated as part of read optimization operations, the mapping table entries of the data may be reassigned to a new medium higher up in the medium hierarchy. However, these mapping table entries may retain their sequence number to identify when the data was originally written.
In one embodiment, when a new medium is allocated in the storage system, the storage controller may record the highest sequence number in existence at the moment when the new medium was allocated. This highest sequence number may then be stored with the new medium in the medium history table. When a request to replicate the new medium is generated, the storage controller may only replicate data of the new medium which corresponds to mapping table entries with sequence numbers higher than the sequence number stored for the new medium in the medium history table. The storage controller may prevent data from being replicated if the data corresponds to mapping table entries with sequence numbers less than or equal to the new medium's stored sequence number. In this way, the storage controller may replicate only the new data of the new medium and prevent old data that has been relocated into the new medium from being replicated.
These and other embodiments will become apparent upon consideration of the following description and accompanying drawings.
BRIEF DESCRIPTION OF THE DRAWINGSFIG. 1 is a generalized block diagram illustrating one embodiment of a storage system.
FIG. 2 is a logical block diagram illustrating a volume being replicated from a first array to a second array.
FIG. 3 is a logical block diagram illustrating a volume and corresponding mapping table entries.
FIG. 4 illustrates a logical block diagram of one embodiment of a volume and corresponding mappings.
FIG. 5 is a logical block diagram of one embodiment of a volume after read optimization has been performed.
FIG. 6 is a logical block diagram of one embodiment of a replication operation.
FIG. 7 is a generalized flow diagram illustrating one embodiment of a method for creating a new medium and remapping data.
FIG. 8 is a generalized flow diagram illustrating one embodiment of a method for replicating a dataset.
FIG. 9 is a generalized flow diagram illustrating one embodiment of a method for remapping a portion of a medium.
While the methods and mechanisms described herein are susceptible to various modifications and alternative forms, specific embodiments are shown by way of example in the drawings and are herein described in detail. It should be understood, however, that drawings and detailed description thereto are not intended to limit the methods and mechanisms to the particular form disclosed, but on the contrary, are intended to cover all modifications, equivalents and alternatives apparent to those skilled in the art once the disclosure is fully appreciated.
DETAILED DESCRIPTIONIn the following description, numerous specific details are set forth to provide a thorough understanding of the methods and mechanisms presented herein. However, one having ordinary skill in the art should recognize that the various embodiments may be practiced without these specific details. In some instances, well-known structures, components, signals, computer program instructions, and techniques have not been shown in detail to avoid obscuring the approaches described herein. It will be appreciated that for simplicity and clarity of illustration, elements shown in the figures have not necessarily been drawn to scale. For example, the dimensions of some of the elements may be exaggerated relative to other elements.
This specification includes references to “one embodiment”. The appearance of the phrase “in one embodiment” in different contexts does not necessarily refer to the same embodiment. Particular features, structures, or characteristics may be combined in any suitable manner consistent with this disclosure. Furthermore, as used throughout this application, the word “may” is used in a permissive sense (i.e., meaning having the potential to), rather than the mandatory sense (i.e., meaning must). Similarly, the words “include”, “including”, and “includes” mean including, but not limited to.
Terminology. The following paragraphs provide definitions and/or context for terms found in this disclosure (including the appended claims):
“Comprising.” This term is open-ended. As used in the appended claims, this term does not foreclose additional structure or steps. Consider a claim that recites: “A system comprising a storage controller . . . ” Such a claim does not foreclose the system from including additional components (e.g., a network, a server, a display device).
“Configured To.” Various units, circuits, or other components may be described or claimed as “configured to” perform a task or tasks. In such contexts, “configured to” is used to connote structure by indicating that the units/circuits/components include structure (e.g., circuitry) that performs the task or tasks during operation. As such, the unit/circuit/component can be said to be configured to perform the task even when the specified unit/circuit/component is not currently operational (e.g., is not on). The units/circuits/components used with the “configured to” language include hardware—for example, circuits, memory storing program instructions executable to implement the operation, etc. Reciting that a unit/circuit/component is “configured to” perform one or more tasks is expressly intended not to invoke 35 U.S.C. § 112, paragraph (f), for that unit/circuit/component. Additionally, “configured to” can include generic structure (e.g., generic circuitry) that is manipulated by software and/or firmware (e.g., an FPGA or a general-purpose processor executing software) to operate in a manner that is capable of performing the task(s) at issue. “Configured to” may also include adapting a manufacturing process (e.g., a semiconductor fabrication facility) to fabricate devices (e.g., integrated circuits) that are adapted to implement or perform one or more tasks.
“Based On.” As used herein, this term is used to describe one or more factors that affect a determination. This term does not foreclose additional factors that may affect a determination. That is, a determination may be solely based on those factors or based, at least in part, on those factors. Consider the phrase “determine A based on B.” While B may be a factor that affects the determination of A, such a phrase does not foreclose the determination of A from also being based on C. In other instances, A may be determined based solely on B.
Referring now toFIG. 1, a generalized block diagram of one embodiment of astorage system100 is shown.Storage system100 may includeoriginal storage array105,replica storage array160, andsource storage array170.Original storage array105 may includestorage controller110 andstorage device groups130 and140, which are representative of any number of storage device groups. Although not shown inFIG. 1,replica storage array160 andsource storage array170 may also include one or more storage controllers and one or more storage device groups. It is noted thatstorage arrays105,160, and170 may also be referred to as storage subsystems or storage systems.
As shown,storage device group130 includesstorage devices135A-N, which are representative of any number and type of storage devices (e.g., solid-state drives (SSDs)).Storage controller110 may be coupled directly toclient computer system125, andstorage controller110 may be coupled remotely overnetwork120 toclient computer system115.Clients115 and125 are representative of any number of clients which may utilizestorage controller110 for storing and accessing data insystem100. It is noted that some systems may include only a single client, connected directly or remotely tostorage controller110. It is also noted thatoriginal storage array105 may include more than one storage controller in some embodiments.
Storage controller110 may include software and/or hardware configured to provide access tostorage devices135A-N. Althoughstorage controller110 is shown as being separate fromstorage device groups130 and140, in some embodiments,storage controller110 may be located within one or each ofstorage device groups130 and140.
Storage controller110 may include or be coupled to a base operating system (OS), a volume manager, and additional control logic for implementing the various techniques disclosed herein.
Storage controller110 may include and/or execute on any number of processors and may include and/or execute on a single host computing device or be spread across multiple host computing devices, depending on the embodiment. In some embodiments,storage controller110 may generally include or execute on one or more file servers and/or block servers.Storage controller110 may use any of various techniques for replicating data acrossdevices135A-N to prevent loss of data due to the failure of a device or the failure of storage locations within a device.Storage controller110 may also utilize any of various deduplication techniques for reducing the amount of data stored indevices135A-N.
Storage controller110 may be configured to create and manage mediums insystem100. Accordingly, a set of mediums may be recorded and maintained bystorage controller110. The term “medium” as is used herein is defined as a logical grouping of data. A medium may have a corresponding identifier with which to identify the logical grouping of data. Each medium may also include or be associated with mappings of logical block numbers to content location, deduplication entries, and other information. In one embodiment, medium identifiers may be used by the storage controller but medium identifiers may not be user-visible. A user (or client) may send a data request accompanied by a volume ID to specify which data is targeted by the request, and the storage controller may map the volume ID to a medium ID and then use the medium ID when processing the request.
A medium may be virtual such that it is identified by a unique ID, and all blocks stored to a volume while the corresponding medium is open for writing may be recorded as <medium, block number>. Each medium logically comprises all of the blocks in the medium. However, only the blocks that were written to the medium from the time the medium was created to the time the medium was closed are recorded and mappings to these blocks may also be maintained with the medium.
The term “medium” is not to be confused with the terms “storage medium” or “computer readable storage medium”. A storage medium is defined as an actual physical device (e.g., SSD, HDD) that is utilized to store data. A computer readable storage medium (or non-transitory computer readable storage medium) is defined as a physical storage medium configured to store program instructions which are executable by a processor or other hardware device. Various types of program instructions that implement the methods and/or mechanisms described herein may be conveyed or stored on a computer readable medium. Numerous types of media which are configured to store program instructions are available and include hard disks, floppy disks, CD-ROM, DVD, flash memory, Programmable ROMs (PROM), random access memory (RAM), and various other forms of volatile or non-volatile storage.
In various embodiments, multiple mapping tables may be maintained bystorage controller110. These mapping tables may include a medium mapping table, a volume-to-medium mapping table, a medium history table, an address translation table, a deduplication table, an overlay table, and/or other tables. In some embodiments, the information stored in two or more of these tables may be combined into a single table. The medium mapping table may be utilized to record and maintain the mappings between mediums and underlying mediums and the volume-to-medium mapping table may be utilized to record and maintain the mappings between volumes and anchor mediums. In one embodiment, a volume may be mapped to an anchor medium which is in a read-write state. The anchor medium may then be mapped to any number of underlying mediums (or portions of mediums) in the medium mapping table. A sector or other portion of a medium may be referred to as “underlying” a volume if the sector or portion of the medium is included within the volume. In other words, a given sector of a medium may “underlie” a volume if the anchor medium of the volume maps to the given sector.
The address translation table may include a plurality of entries, with each entry holding a virtual-to-physical mapping for a corresponding data component. This mapping table may be used to map logical read/write requests from each of theclient computer systems115 and125 to physical locations instorage devices135A-N. A “physical” pointer value may be read from the mappings associated with a given medium or snapshot during a lookup operation corresponding to a received read/write request. This physical pointer value may then be used to locate a physical location within thestorage devices135A-N. It is noted that the physical pointer value may be used to access another mapping table within a given storage device of thestorage devices135A-N. Consequently, one or more levels of indirection may exist between the physical pointer value and a target storage location.
In various embodiments, the address translation table may be accessed using a key comprising a medium or snapshot ID, a logical or virtual address, a sector number, and so forth. A received read/write storage access request may identify a particular volume, sector, and length. The volume ID may be mapped to a medium or snapshot ID using the volume to medium mapping table. A sector may be a logical block of data stored in a medium, with a sector being the smallest size of an atomic I/O request to the storage system. In one embodiment, a sector may have a fixed size (e.g., 512 bytes) and the mapping tables may deal with ranges of sectors. For example, the address translation table may map a medium in sector-size units. The areas being mapped may be managed as ranges of sectors, with each range consisting of one or more consecutive sectors. In one embodiment, a range may be identified by <medium, start sector, length>, and this tuple may be recorded in the address translation table and medium mapping table. In one embodiment, the key value for accessing the address translation table may be the combination of the medium ID and the received sector number. A key is an entity in a mapping table that distinguishes one row of data from another row. In other embodiments, other types of address translation tables may be utilized.
In one embodiment, the address translation table may map mediums and block offsets to physical pointer values. Depending on the embodiment, a physical pointer value may be a physical address or a logical address which the storage device maps to a physical location within the device. In one embodiment, an index may be utilized to access the address translation table. The index may identify locations of mappings within the address translation table. The index may be queried with a key value generated from a medium ID and sector number, and the index may be searched for one or more entries which match, or otherwise correspond to, the key value. Information from a matching entry may then be used to locate and retrieve a mapping which identifies a storage location which is the target of a received read or write request. In one embodiment, a hit in the index provides a corresponding virtual page ID identifying a page within the storage devices of the storage system, with the page storing both the key value and a corresponding physical pointer value. The page may then be searched with the key value to find the physical pointer value.
The deduplication table may include information used to deduplicate data at a fine-grained level. The information stored in the deduplication table may include mappings between one or more calculated hash values for a given data component and a physical pointer to a physical location in one of thestorage devices135A-N holding the given data component. In addition, a length of the given data component and status information for a corresponding entry may be stored in the deduplication table. It is noted that in some embodiments, one or more levels of indirection may exist between the physical pointer value and the corresponding physical storage location. Accordingly, in these embodiments, the physical pointer may be used to access another mapping table within a given storage device of thestorage devices135A-N.
Networks120 and150 may utilize a variety of techniques including wireless connection, direct local area network (LAN) connections, wide area network (WAN) connections such as the Internet, a router, storage area network, Ethernet, and others.Networks120 and150 may further include remote direct memory access (RDMA) hardware and/or software, transmission control protocol/internet protocol (TCP/IP) hardware and/or software, router, repeaters, switches, grids, and/or others. Protocols such as Fibre Channel, Fibre Channel over Ethernet (FCoE), iSCSI, and so forth may be used innetworks120 and150. Thenetworks120 and150 may interface with a set of communications protocols used for the Internet such as the Transmission Control Protocol (TCP) and the Internet Protocol (IP), or TCP/IP.
Client computer systems115 and125 are representative of any number of stationary or mobile computers such as desktop personal computers (PCs), servers, server farms, workstations, laptops, handheld computers, servers, personal digital assistants (PDAs), smart phones, and so forth. Generally speaking,client computer systems115 and125 include one or more processors comprising one or more processor cores. Each processor core includes circuitry for executing instructions according to a predefined general-purpose instruction set. For example, the x86 instruction set architecture may be selected. Alternatively, the ARM®, Alpha®, PowerPC®, SPARC®, or any other general-purpose instruction set architecture may be selected. The processor cores may access cache memory subsystems for data and computer program instructions. The cache subsystems may be coupled to a memory hierarchy comprising random access memory (RAM) and a storage device.
It is noted that in alternative embodiments, the number and type of storage arrays, client computers, storage controllers, networks, storage device groups, and data storage devices is not limited to those shown inFIG. 1. At various times one or more clients may operate offline. In addition, during operation, individual client computer connection types may change as users connect, disconnect, and reconnect tosystem100. Further, the systems and methods described herein may be applied to directly attached storage systems or network attached storage systems and may include a host operating system configured to perform one or more aspects of the described methods. Numerous such alternatives are possible and are contemplated.
Turning now toFIG. 2, a logical block diagram illustrating a volume being replicated from a first array to a second array is shown. It may be assumed for the purposes of this discussion thatvolume200A has been replicated fromoriginal storage array105A toreplica storage array170A.Original storage array105A andreplica storage array170A are intended to representoriginal storage array105 and replica storage array170 (ofFIG. 1), respectively, at a later point in time.
The replicated version ofvolume200A onreplica storage array170A is labeled as “volume200B” so as to differentiate from theoriginal volume200A onoriginal storage array105A. Similarly, the replicated versions ofanchor medium230A and medium225A onreplica storage array170A are labeled as “anchor medium230B” and “medium225B”, respectively, to differentiate from the original versions onoriginal storage array105A.
The depiction ofvolume200A illustrates the mediums which underlievolume200A and the mappings between these mediums. For example,anchor medium230A underliesvolume200A, and any changes tovolume200A may be recorded inanchor medium230A. Each arrow shown involume200A indicates a mapping between anchor medium230A and medium225A, with an arrow indicating that a lookup of a given sector is mapped throughmedium225A rather than throughanchor medium230A. Since an arrow is shown pointing to medium225A for each sector ofanchor medium230A, this indicates that nothing has yet been written to anchor medium230A. Rather, at this point in time, all of the contents ofanchor medium230A are mapped throughmedium225A. It is noted that the size of sectors0-3 may vary depending on the embodiment. It is also noted that in other embodiments, volumes and mediums may have other numbers of sectors besides four.
Althoughvolume200A has only two underlying mediums in its medium hierarchy, it should be understood that other volumes may have additional levels of underlying mediums. For example, in another embodiment, there may be one or more levels of mediums belowmedium225 in the medium hierarchy ofvolume200A. It is noted that the medium hierarchy of a volume refers to all of the mediums which are referenced by the volume and which underlie the volume. The anchor medium of a given volume is at the top of the medium hierarchy, while the oldest medium referenced by the given volume is at the bottom of the medium hierarchy. There may be any number of levels in the medium hierarchy between the anchor medium and the oldest medium, depending on the number of snapshots which have been taken of the corresponding volume.
In one embodiment, medium225A andmedium225B may have the same global content ID but may have separate local IDs onoriginal storage array105A andsource storage array170A. For example, the local ID of medium225A onoriginal storage array105A may map to theglobal content ID225 and the local ID of medium225B onsource storage array170A may also map to theglobal content ID225. In this way, a given storage array may be able to identify which of its mediums are also present on other storage arrays. Similarly,anchor mediums230A and230B may have the same global content ID but may have separate local IDs onoriginal storage array105A andsource storage array170A.
Referring now toFIG. 3, a logical block diagram of one embodiment of a volume and corresponding mapping table entries are shown.Volume200A (ofFIG. 2) is shown again inFIG. 3 along with a portion of the mappings corresponding tovolume200A which may be maintained by the storage controller (not shown) oforiginal storage array105A.
In one embodiment, mapping table300 may include an entry for each sector ofmedium225A, and each entry may include a sequence number. In another embodiment, each sector may not be explicitly associated with a different sequence number. For example, if all of the sectors in a segment are written at about the same time they may be assigned the same sequence number, and only one number may be recorded in mapping table300 rather than giving each sector its own number. In one embodiment, the sequence number may be used to indicate the ordering of writes tooriginal storage array105A. The sequence number may be a monotonically increasing number, and the sequence number may be incremented for each write operation performed tooriginal storage array105A. In some cases, write operations that occur close in time may share the same sequence number. The sequence number may be locally unique or globally unique depending on the embodiment.
In one embodiment, mapping table300 may be an address translation table. It is noted that although mapping table300 is shown as having a separate entry for each sector ofmedium225, in other embodiments, each entry of mapping table300 may correspond to a range of sectors which is an integral number of sectors. It should be understood that the entries of mapping table300 and medium history table305 show only pertinent attributes to avoid cluttering the figure. In other embodiments, mapping table300 and medium history table305 may be organized in a different manner and/or may include other information. It is also noted that any suitable data structure may be used to store the mapping table information of mapping table300 and medium history table305 in order to provide for efficient searches (e.g., b-trees, binary trees, hash tables, etc.). All such data structures are contemplated.
As shown in table300, the entries for sector0-3 ofmedium225A have sequence numbers311-314, respectively. It should be understood that multiple sequence numbers may be used for writes to the same sector, although only a single sequence number is shown for each sector in the entries of table300. This is shown merely for ease of illustration. In other embodiments, table300 may include other types of tags which provide a relative indication as to when the sectors were created and/or were first written to. In these other embodiments, an original medium ID, transaction ID, other identifier, or an actual timestamp may be used as the tag, rather than using the sequence number. In some embodiments, multiple tags may be maintained for each sector and/or for each entry in the mapping tables.
In one embodiment, medium history table305 may include an entry for each medium. In other embodiments, medium history table305 may include entries at other levels of granularity. For example, in another embodiment, medium history table305 may include an entry for each sector, for ‘N’ blocks, wherein ‘N’ is an integer and is programmable, or for each medium range.
As shown inFIG. 3, medium history table305 includes an entry formedium225A and an entry formedium230A. These entries show the medium IDs asnumbers225 and230 without the suffix “A” for ease of illustration. Each entry may include a field for the sequence upper allocation number and a field for the sequence upper replacement number. The sequence upper allocation number indicates the highest sequence number which was used at the time the medium was created. Formedium225A, it may be assumed that the highest sequence number assigned to any range of sectors was310 when medium225A was created. Accordingly,310 is recorded in the sequence upper allocation field for entry ofmedium225A in table305.
It may be assumed for the purposes of this discussion that sequence numbers311-314 were generated by the storage controller for writes to sectors0-3, respectively, ofmedium225A. It may also be assumed thatsequence number314 was the highest sequence number which was used by the storage controller oforiginal storage array105A at the time a snapshot was taken ofmedium225A. Therefore,sequence number314 is recorded as the sequence upper replacement value for the entry formedium225A in table305.
It may be assumed that anchor medium230A was created at the same time the snapshot was taken ofmedium225A, and so sequencenumber314 may be recorded as the sequence upper allocation number formedium230A. At the point in time indicated by the logical depiction ofvolume200A shown inFIG. 3,anchor medium230A is in the read-write state and is able to receive write operations to any of its sectors. Therefore, the sequence upper replacement field of its entry in table305 is unfilled at this point in time, but when a snapshot ofanchor medium230A is taken, the highest sequence number used at that point in time may be entered into the sequence upper replacement field of the corresponding entry in table305.
Turning now toFIG. 4, a logical block diagram of one embodiment of a volume and corresponding mappings are shown.Volume200C is shown inFIG. 4 as being stored onoriginal storage array105B, andvolume200C andoriginal storage array105B are intended to representvolume200B andoriginal storage array105A (ofFIG. 2), respectively, at a later point in time. It may be assumed that since the previous point-in-time representation ofvolume200B, a snapshot was taken ofvolume200C, and after the snapshot was taken, one or more write operations were performed tosector0 ofvolume200C. Therefore, as shown inFIG. 4,volume200C has anew anchor medium405 which points to theprevious medium230C, while medium230C points tomedium225A.Medium230C is intended to representanchor medium230A (ofFIG. 2), at a later point in time.
It may be assumed for the purposes of this discussion that the writeoperations targeting sector0 ofvolume200C were performed after the snapshot ofvolume200B was taken. Therefore, the writeoperations targeting sector0 ofvolume200C have caused the previous mapping ofsector0 of anchor medium405 to no longer be mapped tomedium230C. The last entry of mapping table400 formedium405 corresponds to these write operations, and this entry has asequence number369 assigned to it. The other entries of mapping table400 are the same as the entries of mapping table300 ofFIG. 3.
Similarly, the last entry of medium mapping table410 is assigned tomedium405 and has a sequence upper allocation number of355. This indicates that the highest sequence number in use at the point in time when medium405 was created was355. The other entries of medium mapping table410 are the same as the entries of medium mapping table305 ofFIG. 3.
Referring now toFIG. 5, a logical block diagram of one embodiment of a volume after read optimization has been performed is shown.Original storage array105C andvolume200D are intended to representoriginal storage array105B andvolume200C (ofFIG. 4), respectively, at a later point in time after read optimization has been performed onvolume200C. Similarly, anchor medium405A is intended to represent anchor medium405 (ofFIG. 4) at a later point in time. Read optimization operations may create new address translation entries for anchor medium405A for sectors1-3 to make lookups tovolume200D more efficient. Previously, sectors1-3 ofanchor medium405 were mapped throughmediums230C and225A. However, the read optimization operations may break the links fromanchor medium405 to medium230C and instead map everything throughanchor medium405A. It is noted that at a future point in time,mediums230C and225A may be garbage collected if no other mediums or volumes are mapped to these mediums. Garbage collection may be defined as a process in which storage locations are freed and made available for reuse by the system.
Generally speaking, read optimization operations make future lookups of volumes and mediums more efficient by simplifying the mappings of volumes and mediums. However, read optimization operations may make changes to the mappings which mimic user activity. This may cause old data to be replicated if the storage controller mistakenly decides that the old data is new data based on the changes made to the mappings of the old data by read optimization operations.
Turning now toFIG. 6, a logical block diagram of a replication operation is shown. It may be assumed for the purposes of the discussion regardingFIG. 6 that a request to replicatevolume200D has been detected. In response to detecting this request, the storage controller oforiginal storage array105C may determine which sectors ofvolume200D to replicate to sourcestorage array170B.Source storage array170B,volume200E, and anchor medium230D are intended to representsource storage array170A,volume200B, and anchor medium230B (ofFIG. 2), respectively, at a later point in time.
The storage controller oforiginal storage array105C may determine which sectors ofvolume200D to replicate to sourcestorage array170B by querying mapping table500 ofFIG. 5. As noted previously, the entries formedium405 in mapping table500 make it appear as though all sectors ofmedium405 have been updated by user writes. However, to avoid replicating sectors which do not need to be replicated, the storage controller may compare the sequence numbers of the entries formedium405 in table500 to the highest sequence number in use thelast time volume200A was replicated to sourcestorage array170A (as shown inFIG. 2). It may be assumed that the highest sequence number was314 whenvolume200A was replicated fromoriginal storage array105A to sourcestorage array170A. Therefore, storage controller may only replicate sectors with a sequence number higher than314. Accordingly,sector0, with a sequence number of369, will be the only sector replicated to sourcestorage array170B.Sector0 ofanchor medium230D is shown with diagonal lines to indicate it has been replicated fromoriginal storage array105B to sourcestorage array170B. The storage controller may prevent sectors1-3 from being replicated since their sequence numbers are less than or equal to314.
Referring now toFIG. 7, one embodiment of amethod700 for creating a new medium and remapping data is shown. The components embodied insystem100 described above (e.g., storage controller110) may generally operate in accordance withmethod700. In addition, the steps in this embodiment are shown in sequential order. However, some steps may occur in a different order than shown, some steps may be performed concurrently, some steps may be combined with other steps, and some steps may be absent in another embodiment.
In one embodiment, a storage controller may create a new medium (block705). The storage controller may create the new medium as a result of any of a variety of operations or detected conditions. For example, in one embodiment, a storage controller may create the new medium as a result of taking a snapshot of an existing volume. In this case, the new medium may be a new anchor medium for the existing volume. In other embodiments, the new medium may be created for a new volume or for any of a variety of other reasons. In response to creating the new medium, the storage controller may be configured to determine a current sequence number and store this sequence number in the sequence upper allocation field of a medium history table entry corresponding to the new medium (block710). In other embodiments, the current sequence number may be stored in other tables and/or other locations. If an older medium (e.g., the previous anchor medium of the volume) is being made stable at the same time the new medium is created, then the current sequence number may also be stored in the sequence upper replacement field of a medium history table entry corresponding to the old medium.
Next, the storage controller may remap one or more existing data blocks directly through the new medium (block715). These one or more existing blocks may already be stored in the storage array and mapped through an older medium, and these one or more existing blocks may be remapped such that they now are mapped directly through the new medium. For example, in one embodiment, the one or more existing blocks may be remapped directly through the new medium as part of read optimization and/or garbage collection operations. In other embodiments, the one or more existing blocks may be remapped directly through the new medium as part of other types of operations. It is noted that the storage controller may remap data at other levels of granularity than blocks in other embodiments. For example, the storage controller may remap data of existing sectors, existing portions of mediums, or other amounts of data stored in the storage array.
As part of remapping the one or more blocks directly through the new medium, the storage controller may create a new mapping for each remapped block (block720). The one or more mappings may include one or more entries in an address translation table, a medium history table, a medium mapping table, and/or one or more other tables. Next, the storage controller may create a tag for each of the one or more blocks which have been remapped (block725). The tag may include one or more fields which allow the storage controller to determine when the one or more blocks were originally written, and/or with which medium or volume they were originally associated, and/or if the one or more blocks have been previously replicated. In one embodiment, the storage controller may create the tag from information stored in an original mapping associated with the one or more blocks. For example, in one embodiment, the storage controller may copy the sequence number from an existing mapping into the new mapping for the one or more blocks. Then, at a later point in time, the storage controller may utilize the tags to determine whether to replicate the remapped blocks during a replication operation (block730). For example, if each tag is a sequence number, the storage controller may compare each sequence number to the highest sequence number in use during a prior replication operation. Then, the storage controller may only replicate data with sequence numbers larger than this previously recorded highest sequence number in use. Afterblock730,method700 may end.
Turning now toFIG. 8, one embodiment of amethod800 for replicating a dataset is shown. The components embodied insystem100 described above (e.g., storage controller110) may generally operate in accordance withmethod800. In addition, the steps in this embodiment are shown in sequential order. However, some steps may occur in a different order than shown, some steps may be performed concurrently, some steps may be combined with other steps, and some steps may be absent in another embodiment.
A request to replicate a first dataset from a first storage array to a second storage array may be detected (block805). In one embodiment, the first dataset may be a volume. Next, it may be determined if the first dataset has been previously replicated from the first storage array to the second storage array (conditional block810). If the first dataset has not been previously replicated from the first storage array to the second storage array (conditional block810, “no” leg), then all of the contents of the first dataset may be replicated to the second storage array (block815).
If the first dataset has been previously replicated from the first storage array to the second storage array (conditional block810, “yes” leg), then the storage controller may retrieve a first tag associated with the most recent replication of the first dataset (block820). The first tag may identify a time, original medium ID, and/or sequence number associated with the most recent replication of the first dataset from the first storage array to the second storage array. Next, the storage controller may step through the mappings of the first dataset and replicate only the data which is younger than the first tag (block825). Also, the storage controller may prevent data which is older than the first tag from being replicated (block830). Afterblock830,method800 may end.
Referring now toFIG. 9, one embodiment of amethod900 for remapping a portion of a medium is shown. The components embodied insystem100 described above (e.g., storage controller110) may generally operate in accordance withmethod900. In addition, the steps in this embodiment are shown in sequential order. However, some steps may occur in a different order than shown, some steps may be performed concurrently, some steps may be combined with other steps, and some steps may be absent in another embodiment.
In one embodiment, a storage controller may perform read optimization operations on a first medium of a first dataset (block905). As part of the read optimization operations, a first portion of the first medium may be remapped to a second medium, wherein the second medium is younger than the first medium (block910). The first portion of the first medium may be a block, sector, or region, depending on the embodiment.
As part of the remapping of the first portion of the first medium to the second medium, the storage controller may retain a tag of the first portion, wherein the tag preserves a history associated with the first portion (block915). In various embodiments, the tag may be a sequence number, timestamp, original medium ID, or other ID. At a later point in time, the storage controller may utilize the tag to prevent the remapped first portion from being replicated as part of a replication operation of the first dataset (block920). For example, the storage controller may utilize the tag to identify the first portion with a previously replicated version of the first dataset. In other words, the storage controller may determine that the first portion had been previously replicated even though the first portion has been remapped to the second medium since the previous replication operation was performed. Afterblock920,method900 may end.
It is noted that the above-described embodiments may comprise software. In such an embodiment, the program instructions that implement the methods and/or mechanisms may be conveyed or stored on a non-transitory computer readable medium. Numerous types of media which are configured to store program instructions are available and include hard disks, floppy disks, CD-ROM, DVD, flash memory, Programmable ROMs (PROM), random access memory (RAM), and various other forms of volatile or non-volatile storage.
In various embodiments, one or more portions of the methods and mechanisms described herein may form part of a cloud-computing environment. In such embodiments, resources may be provided over the Internet as services according to one or more various models. Such models may include Infrastructure as a Service (IaaS), Platform as a Service (PaaS), and Software as a Service (SaaS). In IaaS, computer infrastructure is delivered as a service. In such a case, the computing equipment is generally owned and operated by the service provider. In the PaaS model, software tools and underlying equipment used by developers to develop software solutions may be provided as a service and hosted by the service provider. SaaS typically includes a service provider licensing software as a service on demand. The service provider may host the software, or may deploy the software to a customer for a given period of time. Numerous combinations of the above models are possible and are contemplated.
Although the embodiments above have been described in considerable detail, numerous variations and modifications will become apparent to those skilled in the art once the above disclosure is fully appreciated. It is intended that the following claims be interpreted to embrace all such variations and modifications.