Apparatus and method for managing data storage
11327843 · 2022-05-10
Assignee
Inventors
Cpc classification
G06F16/1847
PHYSICS
G06F2201/84
PHYSICS
International classification
G06F11/14
PHYSICS
Abstract
Provided are an apparatus and method for managing data storage. A first log structured array stores data in a storage device. A second log structured array in the storage device stores metadata for the data in the first log structured array, wherein the second log structured array storing the metadata for the first log structured data storage system is nested within the first log structured array, and wherein the first and second log structured arrays comprise separate instances of log structured arrays. Address space is allocated in the second log structured array for metadata when the allocation of address space is required for metadata for data stored in the first log structured array.
Claims
1. A system in communication with data storage, for storing data, and comprising: a first log structured array storing data in a storage device; a second log structured array, in the storage device, storing metadata for the data in the first log structured array, wherein the first and the second log structured arrays comprise separate instances of log structured arrays; and a non-transitory computer readable medium having computer readable instructions that when executed allocates address space in the second log structured array for metadata for data stored in the first log structured array in response to demand to use the metadata not in use.
2. The system of claim 1, wherein the second log structured array is nested within the first log structured array.
3. The system of claim 1, wherein the second log structured array provides a track data area to store metadata for the first log structured array.
4. The system of claim 3, wherein the track data area in the second log structured array is approximately 1000 times smaller than a track data area of the first log structured array.
5. The system of claim 1, further comprising a third log structured array for storing further metadata, wherein the third log structured array is nested within the second log structured array.
6. The system of claim 1, wherein the first log structured array provides a virtual address space and the second log structured array allocates physical storage for metadata for the virtual address space when needed by the first log structured array.
7. The system of claim 1, further comprising a data deduplication component comprising: a hashing component for creating and storing a hash value of a data entity; a comparator for comparing hash values of a pair of data entities; and a write control component responsive to an output of said comparator for selectively writing a non-duplicate data entity and for creating a snapshot of a duplicate data entity.
8. A method, comprising: a first log structured array storing data in a storage device; a second log structured array, in the storage device, storing metadata for the data in the first log structured array, wherein the first and the second log structured arrays comprise separate instances of log structured arrays; and allocating address space in the second log structured array for metadata for data stored in the first log structured array in response to demand to use the metadata not in use.
9. The method of claim 8, wherein the second log structured array is nested within the first log structured array.
10. The method of claim 8, wherein the second log structured array provides a track data area to store metadata for the first log structured array.
11. The method of claim 8, further comprising a third log structured array for storing further metadata, wherein the third log structured array is nested within the second log structured array.
12. The method of claim 8, wherein the first log structured array provides a virtual address space and the second log structured array allocates physical storage for metadata for the virtual address space when needed by the first log structured array.
13. The method of claim 8, further comprising performing, by a data deduplication component: a hashing component for creating and storing a hash value of a data entity; a comparator for comparing hash values of a pair of data entities; and a write control component responsive to an output of said comparator for selectively writing a non-duplicate data entity and for creating a snapshot of a duplicate data entity.
14. A non-transitory computer readable storage medium including a computer program, that when loaded into a computer system and executed thereon, causes the computer system to communicate with a storage device and to perform operations, the operations comprising: providing a first log structured array storing data in a storage device; providing a second log structured array, in the storage device, storing metadata for the data in the first log structured array, wherein the first and the second log structured arrays comprise separate instances of log structured arrays; and allocating address space in the second log structured array for metadata for data stored in the first log structured array in response to demand to use the metadata not in use.
15. The computer storage readable medium of claim 14, wherein the second log structured array is nested within the first log structured array.
16. The computer storage readable medium of claim 14, wherein the second log structured array provides a track data area to store metadata for the first log structured array.
17. The computer storage readable medium of claim 16, wherein the track data area in the second log structured array is approximately 1000 times smaller than a track data area of the first log structured array.
18. The computer storage readable medium of claim 14, further comprising a third log structured array for storing further metadata, wherein the third log structured array is nested within the second log structured array.
19. The computer storage readable medium of claim 14, wherein the first log structured array provides a virtual address space and the second log structured array allocates physical storage for metadata for the virtual address space when needed by the first log structured array.
20. The computer storage readable medium of claim 14, further comprising a data deduplication component comprising: a hashing component for creating and storing a hash value of a data entity; a comparator for comparing hash values of a pair of data entities; and a write control component responsive to an output of said comparator for selectively writing a non-duplicate data entity and for creating a snapshot of a duplicate data entity.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1) A preferred embodiment of the present invention will now be described, by way of example only, with reference to the accompanying drawing figures, in which:
(2)
(3)
(4)
(5)
(6)
(7)
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
(8) A preferred embodiment of the present invention will now be described, with reference to the figures. As described above,
(9) A conventional LSA as shown in
(10) Now, the scalability problem outlined above (the “second significant problem”) is that to support a very large virtual address space, the track data area has to be quite large (about 1000th as big as the virtual address space) so if a system is needed which will scale to a really large virtual address space then it is necessary to start with a very large track data area and if it is necessary to allocate it upfront then the customer has to buy storage to hold all the data. So the solution is not to allocate the track data area upfront but to allocate extents of it when they are required. This means that the track data area is not simply written to a contiguous range of sectors on disk but is stored in a data structure which will support sparse allocation on demand.
(11) One approach to this problem is to use a b-tree, as shown in
(12) The problem with implementing the b-tree is that to do it in a fault tolerant way requires considerable design and coding effort to add to the already significant effort of implementing the conventional LSA.
(13) In the preferred embodiment of the present invention, therefore, the b-tree solution is not adopted. Instead, the concept of an “iterative LSA” or “nested LSA” is introduced, whereby a first LSA is implemented as normal, but its control data or metadata is, in turn, stored in a second LSA nested within the first. This arrangement is shown in
(14) Thus, in
(15) Now, as the track data area of the lower LSA instance 306B is about 1000× smaller than the track data area for the upper instance, there is a saving of about a factor of 1000 in the amount of storage space if the track data area of the lower instance is allocated upfront. 406b
(16) Further advantageously, it is possible to iterate to as many levels as necessary and, with the addition of each level, the amount of upfront storage allocation by the lowest level shrinks by a factor of about 1000.
(17) So, it would be possible to have three levels of LSA, as shown in
(18) In
(19) With enough levels, it is possible to present a very large address space with only a very small upfront allocation of storage for the lowest level.
(20) Aside from actually implementing a conventional LSA, there is one difficulty with this iterative or nested LSA architecture: that of dynamically sharing the segment data area 308 and 408 (
(21)
(22) The fourth problem described as part of the background discussion above was that of the performance impact of performing metadata writes. As will be clear to one of ordinary skill in the art, once the metadata itself is stored in an LSA it is automatically collated into segments and is written out with fewer disk head movements, and thus the performance problem is alleviated. In a further improvement, the metadata could also be compressed which should further improve performance.
(23) The first problem described in the Background section above was about trying to take snapshot backups which preserved snapshot information and could be restored onto the same amount of storage as they came from In a preferred embodiment of the above-described iterative LSA architecture, this problem may be addressed by reserving half of the track data area address space of each level for backup state (this reduces the 1000 factor described above to 500 and might require the addition of another level to the multi-level LSA arrangement). Then, using the snapshot functionality of each level, it is possible to make a t0 (or point-in-time backup) which preserves snapshot relationships as follows: 1) Customer data I/O is quiesced and any cached data flushed to the LSA. 2) The working half of each track data area is snapshot copied to the backup half starting with the track data area at the lowest level and working all the way up to the virtual address space containing the customer data. This process makes a snapshot copy of the working LSA state at this time (each snapshot modifies the working state of the level below but, because the snapshots are from the bottom up, by the time it is performed the original working state of that level has already been captured). 3) Customer data I/O may be restarted. It will be possible to arrange that backup snapshots are on large power of two boundaries so the backup window should be sub-second after the customer application is stopped and the cache flushed. 4) While the customer application runs on the working copy, a process may traverse the backup state of the LSA extracting records to append to the backup image. By examining the backup copy of the metadata of the lowest level and working upwards as necessary the backup process can return the most compact set of records for describing the LSA state. 5) Records could be of three types: zero extent records indicate that an extent contains only zeroes; snapshot records indicate that an extent is a snapshot of an extent which has already been fully described; track records indicate that a track has been encountered for the first time and must be fully backed up. 6) The backup image consists of a series of these records as they are emitted by the traversal process. The traversal process might easily emit tracks which were already compressed so there would be no need for decompression and subsequent recompression before writing to the backup medium. 7) Restoration starts with a new LSA (which need not have the same underlying storage configuration as long as there is at least the same amount of storage as in the original LSA) and proceeds by replaying the backup image. Zero records are replayed by performing a discard extent operation (or whatever operation the LSA has to free up physical storage) but would only be required for incremental backups as a new LSA would already be zeroed. Snapshot records are replayed by performing the snapshot and track records by writing the track.
(24) Incremental backups can be performed by preventing the traversal process from emitting records which are dated before the time of the last backup (date information might be stored as a sequence number in every segment which would almost certainly be required for other reasons anyway).
(25)
(26) Extent backup can be performed by starting the traversal process at an offset into the LSA and stopping it before reaching the end. Extent backups performed this way will have the desired property that they will stand alone and not reference any data not contained in the backup even if the original data in the LSA in the extent backed up contained snapshots of data outside the backup extent.
(27) Full and incremental backups of part of the LSA are guaranteed to fit back into the space that they previously occupied when restored provided the original data did not contain snapshots of data outside the backup extent. Backups of data containing snapshots of data outside the backup extent will cause those snapshots to diverge on restoration which will require extra free space to be available for restoration to be successful.
(28) Full and incremental backups of the entire LSA are guaranteed to fit back onto the LSA as in this case there is no possibility of snapshots within the backup extent referencing data outside the backup extent.
(29) Snapshot of the track data area can essentially be decomposed into a duplication of one part of the metadata associated with it (the upper tier of the two-tier LSA directory) and incrementing the reference counts in another part (the lower tier). It is not really necessary to know the exact reference count of a track in an LSA; it is only necessary to know when the reference count drops to zero so that the track can be freed.
(30) In a system of iterated LSA levels, duplication of metadata is the same as asking the next lower LSA instance to carry out a snapshot operation and once this has been performed, the required reference count information can be obtained without incrementing the reference counts in the lower tier of the directory but instead by taking into consideration the reference count of the track belonging to the LSA level below which contains the upper tier of the directory for the current LSA level.
(31) Thus a large snapshot can be propagated down the stack of LSA instances and converted into a much smaller snapshot operation for a lower level and very much less work needs to be done.
(32) A snapshot can only be propagated down a level if it covers an extent large enough to cover a whole track worth of metadata and is correctly aligned otherwise it must be performed like a conventional LSA snapshot. This means that in general each level of the stack will perform a small amount of conventional snapshotting for incorrectly aligned bits of the snapshot at the beginning and end of the extent and pass the middle portion down to be performed more efficiently by the level below. This amounts to a logarithmic scaling of the amount of work with the size of the extent.
(33) In a refinement of the iterative LSA of the preferred embodiment, it is possible to implement deduplication for arbitrary non-zero data as well as for all-zeros data.
(34) This form of deduplication may be incorporated into the nested LSA scheme by reserving an extent of the underlying metadata address space for a b-tree of track hashes and using that to determine whether a track is a duplicate, choosing to either implement a write for non-duplicates or a track snapshot for duplicates when the track is written.
(35) The nested LSA implementation of the preferred embodiment requires write caching at each level for performance, and so the data deduplication operation can be performed off the critical path by doing it on cache destage rather than when the write arrives.
(36) It will be clear to one of ordinary skill in the art that all or part of the method of the preferred embodiments of the present invention may suitably and usefully be embodied in a logic apparatus, or a plurality of logic apparatus, comprising logic elements arranged to perform the steps of the method and that such logic elements may comprise hardware components, firmware components or a combination thereof.
(37) It will be equally clear to one of skill in the art that all or part of a logic arrangement according to the preferred embodiments of the present invention may suitably be embodied in a logic apparatus comprising logic elements to perform the steps of the method, and that such logic elements may comprise components such as logic gates in, for example a programmable logic array or application-specific integrated circuit. Such a logic arrangement may further be embodied in enabling elements for temporarily or permanently establishing logic structures in such an array or circuit using, for example, a virtual hardware descriptor language, which may be stored and transmitted using fixed or transmittable carrier media.
(38) It will be appreciated that the method and arrangement described above may also suitably be carried out fully or partially in software running on one or more processors (not shown in the figures), and that the software may be provided in the form of one or more computer program elements carried on any suitable data-carrier (also not shown in the figures) such as a magnetic or optical disk or the like. Channels for the transmission of data may likewise comprise storage media of all descriptions as well as signal-carrying media, such as wired or wireless signal-carrying media.
(39) A method is generally conceived to be a self-consistent sequence of steps leading to a desired result. These steps require physical manipulations of physical quantities. Usually, though not necessarily, these quantities take the form of electrical or magnetic signals capable of being stored, transferred, combined, compared, and otherwise manipulated. It is convenient at times, principally for reasons of common usage, to refer to these signals as bits, values, parameters, items, elements, objects, symbols, characters, terms, numbers, or the like. It should be noted, however, that all of these terms and similar terms are to be associated with the appropriate physical quantities and are merely convenient labels applied to these quantities.
(40) The present invention may further suitably be embodied as a computer program product for use with a computer system. Such an implementation may comprise a series of computer-readable instructions either fixed on a tangible medium, such as a computer readable medium, for example, diskette, CD-ROM, ROM, or hard disk, or transmittable to a computer system, via a modem or other interface device, over either a tangible medium, including but not limited to optical or analogue communications lines, or intangibly using wireless techniques, including but not limited to microwave, infrared or other transmission techniques. The series of computer readable instructions embodies all or part of the functionality previously described herein.
(41) Those skilled in the art will appreciate that such computer readable instructions can be written in a number of programming languages for use with many computer architectures or operating systems. Further, such instructions may be stored using any memory technology, present or future, including but not limited to, semiconductor, magnetic, or optical, or transmitted using any communications technology, present or future, including but not limited to optical, infrared, or microwave. It is contemplated that such a computer program product may be distributed as a removable medium with accompanying printed or electronic documentation, for example, shrink-wrapped software, pre-loaded with a computer system, for example, on a system ROM or fixed disk, or distributed from a server or electronic bulletin board over a network, for example, the Internet or World Wide Web.
(42) In one alternative, the preferred embodiment of the present invention may be realized in the form of a computer implemented method of deploying a service comprising steps of deploying computer program code operable to, when deployed into a computer infrastructure and executed thereon, cause said computer system to perform all the steps of the method.
(43) In a further alternative, the preferred embodiment of the present invention may be realized in the form of data carrier having functional data thereon, said functional data comprising functional computer data structures to, when loaded into a computer system and operated upon thereby, enable said computer system to perform all the steps of the method.
(44) It will be clear to one skilled in the art that many improvements and modifications can be made to the foregoing exemplary embodiment without departing from the scope of the present invention.