Data storage administrators have long used system backups to ensure protection of valuable data. Backups have conventionally been performed during shutdown of other applications, a process that often performed at night or off-hours. The highly desirable utility of continuously available storage systems is not available for such traditional backup operations.
Snapshot techniques have been developed to facilitate backup operations that avoid disruption of other operations. A snapshot image may be used as a source of the backup. A snapshot is commonly taken by quiescing applications and performing a copy that is created nearly instantly so that a use notices essentially no delay.
A common reason to restore information is user error, such as inadvertent deletion or modifications to a file that the user subsequently would like to reverse. Snapshot techniques enable the capability to retain a stored copy of the data in ready availability for fast and efficient data location and restoration.
In accordance with an embodiment of a data storage system, a method of protecting data includes distributing data across a plurality of snapshots of a parent logical unit (LUN) when data of the parent LUN diverges from the snapshots.
Embodiments of the invention relating to both structure and method of operation, may best be understood by referring to the following description and accompanying drawings.
Storage devices can be configured in a manner that enables improved performance and reliability. For example, storage devices in the form of Redundant Arrays of Independent Disks (RAID) use two or more storage drives in combination to attain fault tolerance and performance. RAID storage arrays can be grouped into two types including traditional and virtual RAID storage array types. Traditional arrays are defined by a rigid mapping of address space from a host computer to physical media. Accordingly, in a traditional array, given the address at which the host computer accesses a particular piece of data, the data can be physically located on the actual storage drives that make up the RAID array. In a virtual array, at least one level of indirection, also called virtualization, exists between the address that the host computer uses to access a particular piece of data on that array and the actual physical location of that data on the storage drives that make up the RAID array. In the virtual array in which the specific host address for the data piece is known, the actual physical location of that data can be on any of the drives in the array. The layer of indirection that exists in the virtual array is generated by a mapping from host-based addresses to the physical location of data on the storage drives.
Mappings enable virtual array functionality and can be used to assist in a capability to make snapshot copies of stored data volumes. A snapshot copy saves information enabling a point-in-time copy of a selected data set. In a traditional array, a snapshot copy is attained by suspending writes to the volume being copied, preserving the volume state at the point-in-time, followed by copying of every piece of data from the volume being copied to the new address space that represents the point-in-time copy. Only after every data piece from the original volume is copied are writes to the volume being copied resumed. Depending on the snapshot size, for example the amount of data copied, the process can take an unacceptable amount of time.
With a virtual array, the snapshot process can be greatly simplified. As a byproduct of virtualization, maps from the original volume of addresses to the associated physical locations already exist. Using the virtualization mappings, a point-in-time copy can be created simply by copying the maps to the new address space that represents the point-in-time copy. In a typical implementation, both the original host address and the associated snapshot copy address are mapped to the same physical locations on the storage devices. Thus, a snapshot completes in the small amount of time taken to copy the maps. The virtual arrays enable snapshot functionality that proceeds much more quickly than the traditional array operation of copying all data from one physical location to another.
However, the virtual array snapshot technique does leave unresolved the problem of subsequent data modification. Modification of the original data can occur under two conditions. In a first condition, illustrated in the schematic block diagrams shown in
The technique is functional when the granularity of the array's maps is the same as the granularity of divergence. In an alternative condition, shown in
One example of a data modification that can have a dramatic effect on performance is deletion of the original data, possibly causing numerous data pieces to be copied in a very short time period. The problem compounds if multiple snapshots are taken of the same data. In a traditional system, when a parent logical unit (LUN) is deleted, data is written to the first shapshot and all other shapshots are pointed to the first. If the first snapshot is then deleted, the data will all be rewritten to the next, for example second, snapshot and all remaining shapshots will then be pointed to the second shapshot. If the second snapshot is subsequently deleted, then the same operation is again performed with all data will again be rewritten to subsequent shapshots. In this manner, all of the data in a given snapshot can be copied numerous times depending on when particular snapshots are deleted, thereby wasting time and resources in unproductive copying.
According to various embodiments of an improved storage system and storage system handling techniques, when divergence occurs, instead of copying all of the data to one snapshot, a portion of the data is distributed across multiple snapshots. Data divergence can occur, for example, when a parent logical unit (LUN) is deleted. Referring to
Various types of parent LUN data divergence conditions can be selected for detection including deletion of a parent LUN, data write operations to the parent LUN, and failure of the parent LUN. Following detection of divergence of the parent LUN data, the diverged data can be distributed into a plurality of portions and the distributed data portions written to the plurality of shapshots. In some embodiments, the data can be distributed across the plurality of snapshots in substantially equal proportions.
The number of snapshots can vary over time. Upon modification of the number of snapshots, the data can be distributed substantially evenly over the plurality of snapshots. Data is distributed substantially or approximately equally over the snapshots not only for conditions of mathematically-precise allocation of data, but also includes situations in which exact precision is not possible or desirable. For example, the data may not be equally divisible into a particular number of snapshots at a particular granularity of data. Accordingly, the data may be distributed to allocated snapshots in the data in a roughly equal distribution.
The snapshot data can be stored on any suitable media including, for example, magnetic disks, optical disks, compact disk (CD), CD-R, CD-RW, diskettes, tapes, tape cartridges, and the like.
By responding to data divergence and copying a portion of the data to each snapshot of multiple snapshots, the particular snapshot that “owns” any particular part of the data varies and, if a single snapshot is deleted, only a portion of the data is to be recopied. Benefits of the technique increase as the number of snapshots increases. For example, a system configured with a single snapshot has no advantage, but as the number of snapshots increases to two or more, performance is improved.
The conditions illustrated in
In contrast, the technique illustrated in
Although the illustrative example describes a divergence event as deletion of a parent LUN, the technique is similarly applicable to any circumstance that causes the parent LUN and the snapshot to diverge. Divergence events also include diverging writes to the parent LUN as well as other events. Accordingly, the technique can be used to distribute data as diverging writes are sent to the parent LUN in another example. Thus, one diverging write can be used to copy original data to one snapshot and a next diverging write can copy the copied data to the next snapshot and so on so that individual snapshots “own” essentially equal portions of the diverging data.
At any given time, data is distributed essentially evenly over only the existing snapshots, thereby reducing the copying burden of the snapshot managing system. In an example in which a parent LUN already has two existing shapshots, over time the two snapshots evenly share all of the diverged data from the parent LUN. When a third snapshot of the parent is taken, the new snapshot need not be “favored” to eventually receive as much diverged data as the original two snapshots because the third snapshot does not share any of the diverged data previously received by the original two snapshots. Thus, at the time the third snapshot comes into existence, the diverging writes are only then distributed evenly over the three snapshots. Events occurring prior to the creation of the third snapshot are irrelevant to the current distribution. The distribution allocation is only determined by the number of snapshots currently in existence.
The concept of distributing data substantially evenly across multiple snapshots of a parent LUN when data of the parent LUN diverges from the snapshots is capable of generalization to any reason, circumstance, or condition that results in divergence between the parent LUN and the snapshot. The technique can be further generalized to any suitable storage method that supports snapshot functionality, possibly including various Redundant Array of Independent Disk (RAID) types including one or more of RAID0, RAID1, RAID2, RAID3, RAID4, RAID5, RAID6, RAID7, RAID10, and the like. Similarly, the technique can be used for any suitable storage media that supports snapshot functionality, perhaps including various magnetic disks, optical disks, compact disk (CD), CD-R, CD-RW, diskettes, tapes, tape cartridges, and the like. Also, the technique may be further generalized to any appropriate divergence origin, condition, storage method or media that supports snapshot functionality in future developments.
Referring to
In various embodiments, the physical store 402 and logical store 408 can store snapshot data on a media selected from among magnetic disks, optical disks, compact disk (CD), CD-R, CD-RW, diskettes, tapes, tape cartridges, and the like.
The storage system 400 can also include one or more map pointers 416 in the snapshot volume 410 that points to data in the physical store 402 and multiple snapshot pointers 418 capable of pointing to data in the snapshot index 412. The snapshot subsystem 414 distributes diverged data into a plurality of snapshot portions in the snapshot index 412 and writes the distributed data portions to the plurality of shapshots.
In some embodiments or conditions, the snapshot subsystem 414 distributes data across the plurality of snapshots in substantially equal proportions. The snapshot subsystem 414 can also be configured to detect parent LUN data divergence conditions selected from among including deletion of the parent LUN, data write operations to the parent LUN, failure of the parent LUN, and the like.
The snapshot subsystem 414 may also be configured to modify the number of snapshots over time and distribute data substantially evenly among the plurality of snapshots beginning at each modification.
The snapshot subsystem 414 enables a fast and efficient capability to create a point-in-time copy of storage container data. The snapshot freezes a map of the container's data that can be isolated from other snapshots and used for backup, archiving, data protection, testing, and other manipulation without compromising the original data. After a snapshot is taken, the original data can continue to be updated and used while the snapshot copy maintains the selected point-in-time.
When a duplicate copy of a particular point-in-time is desired, the snapshot subsystem 414 directs acquisition of a data snapshot at the selected instant. Typically, a snapshot subsystem 414 can acquire multiple snapshots, enabling repeated acquisitions. The snapshot capability avoids some of the overhead associated with data mirroring and cloning.
Referring to
The processor 516 can implement a mapping logic that defines the base volume 506 and allocates the physical blocks 508 to the base volume 506, and creates pointers from the snapshot volume 512 to selected physical blocks 508 and to the snapshot index 514.
A processor 516 that executes snapshot management functionality can be located in any suitable device in a network. As illustrated, the processor 516 can be contained within a storage controller. In other embodiments, a processor capable of executing snapshot functionality can be in a host, a suitable control device within a storage array network (SAN), a network appliance attached to a network, array firmware, or any other level of execution that can perform a point-in-time copy.
The process of data distribution to a plurality of snapshots can be implemented in various operations, such as programmable operations, including copy-before-write operations, copy-on-write operations, and the like.
The processor 516 can further execute a mapping logic that generates one or more map pointers in the snapshot volume 512 that points to data in the physical store 504 and one or more snapshot pointers capable of pointing to data in the snapshot index 514. The processor 516 can further execute a snapshot logic that distributes diverged data into a plurality of snapshot portions in the snapshot index 514 and writes the distributed data portions to the multiple shapshots. Data can be most efficiently distributed across the multiple snapshots in equal or approximately equal proportions.
The processor 516 can detect one or more parent LUN data divergence conditions including deletion of a parent LUN, data write operations to a parent LUN, failure of a parent LUN, and the like.
The processor 516 can execute a snapshot handler that modifies the number of snapshots over time and distributes data substantially evenly among the plurality of snapshots beginning at each modification. Typically, the system allocates a particular maximum number of snapshots and begins creating snapshots upon selected events, such as timing intervals, activations signals, monitored conditions, and the like. The number of snapshots is typically limited to a selected number, although some implementations may support virtually unlimited snapshots.
The physical store 504 may include any storage devices that are suitable for snapshot functionality and may include various media such as magnetic disks, optical disks, compact disk (CD), CD-R, CD-RW, diskettes, tapes, and tape cartridges.
The various functions, processes, methods, and operations performed or executed by the system can be implemented as programs that are executable on various types of logic, processors, controllers, central processing units, microprocessors, digital signal processors, state machines, programmable logic arrays, and the like. The programs can be stored on any computer-readable medium for use by or in connection with any computer-related system or method. A computer-readable medium is an electronic, magnetic, optical, or other physical device or means that can contain or store a computer program for use by or in connection with a computer-related system, method, process, or procedure. Programs can be embodied in a computer-readable medium for use by or in connection with an instruction execution system, device, component, element, or apparatus, such as a system based on a computer or processor, or other system that can fetch instructions from an instruction memory or storage of any appropriate type. A computer-readable medium can be any structure, device, component, product, or other means that can store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
The illustrative block diagrams and data structure diagrams depict process steps or blocks that may represent modules, segments, or portions of code that include one or more executable instructions for implementing specific logical functions or steps in the process. Although the particular examples illustrate specific process steps or acts, many alternative implementations are possible and commonly made by simple design choice. Acts and steps may be executed in different order from the specific description herein, based on considerations of function, purpose, conformance to standard, legacy structure, and the like.
While the present disclosure describes various embodiments, these embodiments are to be understood as illustrative and do not limit the claim scope. Many variations, modifications, additions and improvements of the described embodiments are possible. For example, those having ordinary skill in the art will readily implement the steps necessary to provide the structures and methods disclosed herein, and will understand that the process parameters, materials, and dimensions are given by way of example only. The parameters, materials, and dimensions can be varied to achieve the desired structure as well as modifications, which are within the scope of the claims. Variations and modifications of the embodiments disclosed herein may also be made while remaining within the scope of the following claims. For example, the illustrative snapshot techniques may be implemented in any types of storage systems that are appropriate for such techniques, including any appropriate media. Similarly, the illustrative techniques may be implemented in any appropriate storage system architecture.