Optimized disk repository for the storage and retrieval of mostly sequential data

Information

  • Patent Grant
  • 7882081
  • Patent Number
    7,882,081
  • Date Filed
    Friday, August 30, 2002
    21 years ago
  • Date Issued
    Tuesday, February 1, 2011
    13 years ago
Abstract
A system for the storage and retrieval of data files includes a data disk, a configuration disk and a controller. Each data file includes one or more data blocks, each data block comprising a data section. The data disk stores the data blocks and is divided into a plurality of block groups. The configuration disk stores a copy of at least a portion of the corresponding meta-data. The controller controls both the data disk and the configuration disk.
Description
BACKGROUND

The present invention is generally related to storage systems. More particularly, the invention is directed to a disk-based storage system which is optimized for storage and retrieval of sequential data.


Typical disk file systems such as the Microsoft NTFS, Solaris UFS and the Veritas VxFS are designed for the general-purpose storage of data. In particular, disk file systems are architected to handle the simultaneous reading and writing of a large number of both small and large files. To do this efficiently, file systems must implement intricate locking techniques, must be able to cope with random behavior and must be able to perform effectively under a variety of different conditions. This general-purpose design is adequate for some applications but can lead to significant overhead in complexity, performance and capacity.


In practice, storage intensive applications can be severely limited by general-purpose file systems. This is particularly true for applications that rely on mostly sequential data. Storing and retrieving data in a disk-based backup and data protection environment is an example of a specialized application that suffers from limitations in general-purpose file systems. First, general-purpose file systems typically only scale to less than one terabyte, whereas backup data sets can be significantly larger. Second, general-purpose file systems are fragile, in that they have difficulties in dealing with partial failures. Third, general-purpose file systems handle large streams of data inefficiently. Finally, general-purpose file systems, by their nature, cannot implement special purpose functionality because a feature that may be advantageous for one application may be disastrous for another.


SUMMARY

The Journaled Object Store (JOS) system of the present invention is a disk repository for the storage of primarily sequential data. The JOS is optimized to handle sequential data, such as is handled by a physical tape drive or a virtual tape drive. The JOS system stores data in two places: 1) a data disk, where all the data together with self-describing meta-data is stored; and 2) a configuration disk, where configuration data and a copy of some of the meta-data are stored. The configuration disk is preferably resident on a non-volatile compact flash disk or other solid-state persistent storage medium. The JOS takes advantage of specialized knowledge of usage patterns to provide levels of reliability, robustness, performance, scalability, availability and data integrity exceeding that of a standard disk file system.





BRIEF DESCRIPTION OF THE DRAWING(S)


FIG. 1 is Journaled Object Store (JOS) system in accordance with an embodiment of the invention.



FIG. 2 shows the layout of a data disk in accordance with an embodiment of the invention.



FIG. 3 shows a data block in accordance with an embodiment of the invention.



FIG. 4 shows the format of the configuration disk in accordance with an embodiment of the invention.



FIG. 5 shows the format of a transaction record in accordance with an embodiment of the invention.



FIG. 6 is a procedure for generating a written transaction record in accordance with an embodiment of the present invention.





DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT(S)

The present invention will be described with reference to the drawing figures where like numerals represent like elements throughout. It should be noted that the terminology “appliance” as used hereinafter refers to any electronic system which implements the present invention, including the controller and the disk. An example of such an appliance is an Intel-based server running virtual tape library software. In this example the JOS is the storage repository for virtual tape and virtual tape library data. In another example, the JOS is the core of a high performance multimedia server for recording and streaming digital media over a network.


It should also be noted that the term “meta-data” is the data that describes where on a disk, (i.e. on which block regions), a particular data file is stored, along with other aspects of the data file. Meta-data does not include the contents of the data file. Meta-data is essentially data that describes the data file. The terminology “configuration data” is typically associated with system settings and behavior. For example, the number of block groups used by a system could be configuration data, if this number is configurable. The use of the term meta-data herein is intended to encompass both meta-data and configuration data.


The system of the present invention uses one or more data disks for storing data in the form of data objects. As will be described in detail hereinafter, the layout of the data disk plays an important role in providing reliable and efficient operation of the system.


Referring to FIG. 1, the JOS system 8 of the present invention comprises a primary unit 10, having a data disk 12 comprising one or more hard disks 12a-12n, a controller 14 and a configuration disk 18. The hard disks 12a-12n could be RAID disk arrays, disk arrays, small computer system interface (SCSI) disks, advanced technology attachment (ATA) disks, Serial ATA, fiber channel (FC) disks, partitions of a single disk and any other present or future developments in storage technology. The configuration disk 18 is preferably a non-volatile flash disk or other non-volatile disk.


The controller 14 communicates with the data disk 12 and the configuration disk 18 via a communication interface 22 (or bus). As those of skill in the art are aware, there are many types of communication interface technologies that enable data to move between PCs or servers and peripherals, such as hard disk drives. SCSI is a bus architecture which allows multiple devices such as disks, tape drives, libraries, etc. to be daisy-chained. This technology is typically found in high-end storage devices. ATA, which is typically found in PCs, is less costly than SCSI but is also slower for random access and less flexible. Fibre Channel (FC) is a network technology for block-oriented streams, used in storage area networks, which allows for further distances and more complex and flexible topologies.


The JOS system 8 receives data via an external communication interface 30, (which may be the same or a different type of technology than the communication interface 12), and selectively stores the data and related configuration data into two separate places: 1) the data disk 12; and 2) the configuration disk 18. Both of these storage mediums will be described in further detail hereinafter. It should also be noted that although the data disk 12 and the configuration disk 18 will be described as physically separate components, they may actually be located on the same disk and separated logically via one or more disk partitions.


Referring to FIG. 2, the layout of the data disk 12 is shown. Each data disk 12 is a logically self-contained storage unit, such as a RAID array, a disk subsystem or an individual disk/partition. The storage capacity is preferably divided into a number of block groups BG1-BGM. A preferred embodiment is shown in FIG. 2 where M block groups are used. As will be explained in detail hereinafter, the use of block groups BG1-BGM helps to provide contiguous allocations of data blocks for storage of data. As such, the number of block groups BG1-BGM can either be fixed, or can be adjusted dynamically depending on external parameters, such as the number of available logical unit number (LUN) groups on the data disk 12 or other practical considerations. A single device can consist of multiple sub-components or units. For example, a disk array can consist of multiple RAID groups. In order to address a specific group on an FC network, an application needs to specify the SCSI ID, (which is the ID of the disk array), along with the LUN that specifies the exact unit within the array. Because each RAID group (LUN) can handle a single disk failure, storing certain information on multiple LUNs greatly improves fault-tolerance. But more importantly, by spreading out disk operations to multiple LUNs, performance is greatly increased. Each block group BG1-BGM includes a disk label block DL1-DLN, a deleted universally unique identifier (Uuid) block DU1-DUN and a plurality of data blocks DB1-DBN.


The “objects” stored on the data disk 12 comprise data files DF. A data file DF is a logical chain of one or more data blocks DB. Although it is preferable that the chain of data blocks are contiguously located, this is not a requirement. For example, a chain of data blocks DB1-DBn−1 have been graphically highlighted as a data file DF1. A data file DF can span across multiple hard disks 12a-12n, depending on space and bandwidth availability. As will be explained in detail hereinafter, data streams are accepted sequentially and a large area, (i.e., 1 GB or greater), is allocated at a time. Within that area the 1 MB data blocks are generally contiguous. However, since multiple sequential data streams can come in at the same time, it is possible to get slight fragmentation, especially as the data disk 12 gets full or when files are deleted. Accordingly, to further promote locality of access, a plurality of block groups BG1-BGM are used. For example, if four (4) data streams are incoming and four (4) block groups BG1-BG4 are used, each data stream goes to a different block group BG1-BG4.


A block allocation procedure implemented by the controller 14 allocates different data files DF to different block groups BGs when a request, (i.e., the first “write” operation, or a “create file” operation) is received. This is essentially a request that comes in from an outside entity to place a data file DF onto the data disk 12 (or “object store”). In the case where the system is implemented on a virtual tape library, the request comes in as a write to tape and the system 8 converts it in the appliance to a write to the data disk 12.


Once the first write occurs, the block allocation procedure prefers to keep additional data blocks DB of a particular data file DF, within the same block group BG to promote locality for efficient access. For example, when a request for storage of the first data block DB1 of the first data file DF1 comes in, it is stored in the first block group BG1. Subsequent data blocks DB2-DBn are forwarded to the first block group BG1 to be sequentially stored with the data file DF1. However, when the first data block DBn+1 of the second data file DF2 comes in, it is preferably stored in the second block group BG2 even though there may be remaining open data blocks in the first block group BG1, (for example, data block n). Subsequent data files DF are sent to different block groups BGs as new data streams are accepted. For example, if five (5) data streams and only four (4) block groups BGs exist, the fifth data stream could be forwarded to the first block group BG1.


The block allocation procedure applies heuristics when routing data files DF to the data disk 18. First, the block allocation procedure distributes data files DFs equally among block groups BGs, for example in a “round robin” fashion. Alternatively, the block allocation procedure may be based upon the file size and may attempt to use approximately the same amount of space in each block group BG. Second, once the block group BG is determined, the block allocation procedure allocates a large area (such as 1 GB) of memory to the data file DF instead of just a single 1 MB block of memory, and writes the data block at the beginning of this large allocation area. For further data blocks DBs of the same data file DF, the controller 14 writes them contiguously into the same large allocation area. Once the allocation area is full, a new large allocation area of is allocated, ideally contiguously to the first one. The block allocation procedure in accordance with the present invention improves the chances for an efficient layout for specific access pattern; a comparably small number of large sequential reads and writes.


The disk label block DL1-DLN identifies the disk size and format version information. The disk label DL also contains the appliance identification as well as other parameters that define the disk layout. A data disk 12 with a Securitus I identifier in the disk label DL is henceforth referred to simply as a JOS disk. To assist with data recovery in case of disk label DL damage, the disk label DL1-DLN is preferably repeated at the beginning of each block group BG1-BGM. Possible disk label meta-data and its purpose are shown in Table 1.


It should be noted that although the meta-data listed in the tables and explained in accordance with the present invention may be utilized by the present invention in a novel manner, the definition of each type of meta-data is well-known in the art.










TABLE 1





Disk Label Meta-Data
Purpose







Device Magic No.
For validation of disk


Version
Layout version refers to how blocks are



laid out on disk. When a disk is imported,



it is important to know the version of the



layout to be able to find all the data


Device uuid
Uuid for the device


Data Store uuid
For identifying the storage pool, which is a



collection of multiple physical disks in one



logical pool. Sometimes it is useful to



assign specific disks to specific uses or



customers to keep the data separate or to



route time critical data to a pool of SCSI



disks and other data to a pool of ATA



disks.


H/W uuid
For identifying the actual physical



hardware


Appliance uuid
For identifying the appliance (i.e., the



entire set of hardware and software)


BandWidth
Current bandwidth used


BlockSize
The size of the block


Total blocks on the disk
Total number of blocks on the disk


Category
This flag differentiates between RAID



arrays and JBODs, (Just a Bunch Of



Disks). In essence, this indicates whether



or not the disks are in a fault-tolerant



configuration.


Function
In the case of RAID array, (particularly



RAID 3 or 4), it is useful to know which



disks are used for data and which disk



stores the parity information. In RAID 5,



both data as well as parity is stored on all



disks.









In order to make the system more efficient, the disk label block DL1-DLM is written at a known location on each data disk 12. Although it is shown in FIG. 2 as being repeated at the beginning of each block group BG1-BGM, this information may be written to multiple different locations. When a JOS disk gets imported into the system, the first thing the system 8 does is to look for the disk label block DL1-DLM to confirm that it is a JOS disk and to confirm the version of the software used to create the JOS disk. Writing the disk label blocks DL1-DLM to a specific location increases efficiency since the system 8 would otherwise need to scan the entire data disk 12 before finding the necessary disk label blocks DL1-DLM. This location is reserved and does not interfere with any other component of the system 8.


The deleted Uuid block DU1-DUM records the identity of data files DF that have previously used data blocks DB1-DBN and have later been deleted. For the provision of reliable disaster recovery, the deleted Uuid blocks DU1-DUM are preferably also repeated in each block group BG1-BGM. The deleted Uuid blocks DU1-DUM preferably store the identity of deleted data files DFs that previously used data blocks DBs in that particular block group BG1-BGM. Alternatively, the deleted Uuid blocks DU1-DUM may store the identity of deleted data files DFs (or deleted data blocks DBs) that previously used data blocks DBs in all of the block groups BG1-BGM. In this case, the deleted Uuid blocks DU1-DUM will be identical, and are just repeated in each block group BG1-BGM. Storing the information repeatedly increases fault tolerance at the expense of performance.


The deleted Uuid blocks DU1-DUM identify blocks which have a consistent header and trailer but belong to data blocks DB1-DBN that have been deleted. During disaster recovery, the information in the header and trailer of data blocks DBs can be used during reconstruction of the configuration of the appliance prior to the last consistent state prior to the crash. The problem is that deleted data blocks DBs on a disk look exactly the same as non-deleted data blocks DBs. Accordingly, during disaster recovery, a data recovery system typically has no way of knowing which data blocks DBs are still active and which data blocks DBs are deleted. However, in accordance with the present invention, the system 8 determines the active data blocks DBs by looking at the deleted Uuid blocks DU1-DUM. The system 8 then knows that only the data blocks DBs that have a header and trailer and are not part of the deleted Uuid blocks DU1-DUM are valid data. Accordingly, the Uuid blocks UB1-UBM are not used to recreate the data, but only to indicate that particular data block DB is no longer important.


The data blocks DB1-DBN will be explained with reference to FIG. 3. A data block DB1-DBN is the base unit of storage space on the data disk 12. Preferably, each data block DB1-DBN is defined to be 1 MB in size. Such large block sizes are well suited for efficient storage and retrieval of mostly sequential data. However, greater or lesser sizes may be allocated in order to maximize efficiency of the system 8 for a particular application. As shown in FIG. 3, in a preferred embodiment, each data block DB1-DBN includes a header 100 and trailer 120, both of which are embedded within the 1 MB boundary. The header 100 may be extended for variable length data. This provides the system 8 with the ability to handle certain information about files, (the file type, etc.), which could have a variable length. The header 100 and trailer 120 sections verify the integrity of a particular data block DB. The meta-data of the stored data block DB1-DBM is written in the header 100. Preferably, headers 100 and trailers 120 are written in a non-proprietary XML format and contain the device Uuid.


Different types of meta-data of the data block DB1-DBN are shown in Table 2, along with their primary purpose. Some of the meta-data types (identified as TAPE) are specific to a particular application (i.e., a virtual tape library application), but they can easily be changed to fit other needs by a person skilled in the art. The other meta-data types (identified as JOS) are particular to the system 8 of the present invention. It should be understood that these are examples of types of meta-data that may be utilized by the system 8 of the present invention without departing from the spirit and scope of the present invention.










TABLE 2





Data Block Meta-Data
Purpose







Block Header



JOS Magic No.
Unique identifier


JOS Data File Uuid
Identifies the file the block is part of


JOS Storage Device Uuid
Identifies the storage device


JOS Volume Uuid
Identifies the volume w/in the storage



device


TAPE Appliance Uuid
Identifies the appliance


JOS Volume Pool Uuid
Identifies the volume pool (mult. vols)


TAPE Customer Name
Appliance user information


TAPE Customer Uuid
User identifier


TAPE Library Name
Name of the particular tape library


TAPE Library Uuid
Library identifier


JOS Used
Size of used blocks


JOS Capacity
Total available capacity


JOS Bandwidth
Available bandwidth


JOS Write Protected
Flag for write protection


JOS Label
Disk Label


TAPE Quick Load
Performance enhancement flag


TAPE Imported
Indicates if part of appliance


TAPE File Marks
Records tape file marks


TAPE Record Marks
Records tape record marks


JOS Header Length
Indicates the length of the header


JOS File Offset
Indicates the offset w/in the file


JOS DataFile Sequence Change
Ordered sequence number, indicates


Number (SCN)
where the block belongs in the file


JOS Resource Fork Length
Indicates the length of the header



extension


Block Trailer Meta-Data


JOS Data File Uuid
Identifies the file the block is part of


JOS Storage Device Uuid
Identifies the storage device


JOS Header Length
Indicates the length of the header


JOS File Offset
Indicates the offset w/in the file


JOS DataFile Sequence Change
Ordered sequence number, indicates


Number (SCN)
where the block belongs in the file


JOS Resource Fork Length
Indicates the length of the header



extension


JOS Unused bytes in the block
Slack space before the trailer









As explained hereinbefore, the data blocks DB1-DBN are coupled together as a logical chain of blocks to generate a single stream of data associated with a particular data file DF, (i.e., an object). Each single chain of associated data blocks DBs is defined as a data file DF, (for example, DF1), and has a unique identifier (Uuid). The header 100 and trailer 120 of each data block DB1-DBN belonging to a data file DF1 contains the Uuid of the particular data file DF1-DFN. The data file DF1 maintains a monotonically increasing sequence of numbers, called sequence change numbers (SCNs) (or some other ordering scheme), to establish a unique ordering across data blocks DB1-DBN. As each data block DB1-DBn for a data file DF1 is stored, it gets a unique ascending sequence number within that data file DF1. The SCN helps identify the most recent data blocks DB1-DBn even if the SCN within the data file DF1 does not match or for any reason is not consecutive.


Upon reading a data file DF1, the data blocks DB1-DBn are read back in sequence from the first data block DB1 to the last data block DBn. To the person or application reading the data file DF1 it appears as a single data stream for this single data file DF1. However, in the background, one data block DB1-DBn at a time is read. Of course, “read-ahead” strategies can be employed to make this process even more efficient.


The secure storage of meta-data is an important aspect of the present invention. In addition to the detailed meta-data stored within the data blocks DB1-DBN, a copy of a subset of the meta-data is also stored centrally for greater reliability and performance. This central repository is the separate configuration disk 18. Preferably, a compact flash disk or flash disk is used as the configuration disk 18. A flash disk is an ideal medium to store all of an appliance's configuration data, as it provides fast and reliable read and write operations. Typically, the reliability of a flash disk is an order of magnitude greater than that of comparable disk media because of the absence of moving parts.


Preferably, the configuration disk 18 is a self-contained storage unit which provides a circular buffer function; whereby outdated data is eventually overwritten by the latest data. As will be explained in detail hereinafter, data stored on the configuration disk 18 is recorded to the configuration disk 18 in the form of transactional records, (i.e., a self-contained record comprising a header followed by the stored data and a trailer).


Referring to FIG. 4, a configuration disk (CD) header 300 is written to the configuration disk 18, before any data files DFs are actually written to the data disk 12, and a CD trailer 310 is written to the configuration disk 18 as the last transaction is completed. Transaction records are recorded on the configuration disk 18 as data files DFs are stored on the data disk 12. These transaction records are later used to restore the appliance to its latest consistent state in the event of an unexpected failure or outage. As is well known by those of skill in the art, a consistent state is defined by every transaction being either done or not done, but nothing is half-way done. For example, if a data block DB is being written and the appliance crashes during the write operation, the last known “consistent state” is before that data block DB was written, since it cannot be guaranteed that the last data block DB was correctly written. If a data file DF with many data blocks DBs is being written and, after some of the data blocks DBs are stored the appliance 8 crashes, then the last known consistent state is that the data file DF was not yet written. It should be noted that this is a high level of granularity in that the data file DF is completely written or it is not written at all; it doesn't matter that some of the data blocks DB were successfully written. Of course, this granularity may be changed to the data block DB level if desired.


In addition to meta-data, the configuration disk 18 may be used to store application-specific data. For example, application-specific data could be the size of a tape library if the system 8 was being used in this context. Alternatively, it could be the number of cars that passed the assembly line if the system 8 was being utilized in a car factory.


In the embodiment of FIG. 4, the configuration disk 18 uses 512 bytes per data block. The first data block in the configuration disk 18 is the CD header record 300 and the last data block is the CD trailer record 310. In between the CD header and trailer records 300, 310 are data blocks 302-306 that begin with either a TG header record 302 or TG continue record 304 followed by a TG trailer record 306. This facilitates a systematic and efficient method verifying and retrieving meta-data. In this embodiment, the TG continue record 304 is used if the meta-data exceeds 512 bytes (i.e. one data block). The configuration disk 18 is a transaction log implemented as a circular buffer. Each transaction group includes a TG header record 302 and a TG trailer record 306. Once the configuration disk 18 is used up, the very next transaction group is recorded at the beginning of the configuration disk 18. Accordingly, in order for the system 8 to know where to start writing a new transaction group. The CD header record 300 comprises a pointer to the last transaction.


In operation, the CD header record 300 is read to determine where to start writing in the configuration disk 18. A TG header record 302 is then written. Once the transaction is completed, such as one or more disk writes, a TG trailer record 306 is written and the CD header 300 is updated to the new location, which is now after the latest transaction. The CD trailer record 310 signifies the end of the configuration disk 18. For redundancy, a copy of some or all of the information stored in the CD header record 300 may also be stored there.


The information stored in the TG header and trailer records 302, 306 is also used during restart. By matching the information in each of the TG header records 302 and the corresponded TG trailer records 306, the system 8 can ensure the data between the TG header and TG trailer records 302, 306 is valid. This is because updates are made sequentially, and the pairing of a TG header record 302 and a TG trailer record 306 therefore ensure standard transactional properties. These standard transactional properties are well known in the art as: atomicity, consistency, isolation and durability, (i.e., ACID properties). During recovery, any TG header record 302 without a corresponding trailer record 306 is assumed to never have happened, (i.e. the transaction is rolled back). The data file DF with the last written TG trailer record 306 is the latest known consistent state.


Referring to FIG. 5, between the TG header record 302 and the TG trailer record 306 are one or more state stream (SS) records 308. Preferably, these SS records 308 are written in the same data block, unless a TG continue record 304 extends it to the next data block. In the example of FIG. 5 illustrating data on the configuration disk 18, the data block is 512 bytes long. The size of the transaction group is always a multiple of the block size (in the present example N*512 bytes, where N is an integer greater than or equal to one). Each of these SS records 308 contains the updated or new meta-data related to the appliance.


The essential purpose of the configuration disk 18 is to provide a journaled object store, (hence JOS), or transaction-based, persistent storage repository for configuration and system-wide meta-data (i.e., configuration data that is relevant for the entire JOS, for example for all block groups BGs rather than just one block group BG). Since all write operations are stored as transactions, the configuration disk 18 is extremely robust.


In the event of an abnormal shutdown, the configuration disk 18 will be accurate up to the point of the last completed transaction. Any transactions that started after that point may not have finished and need to be rolled back. If the TG trailer record 306 has been successfully written to the configuration disk 18, the entire transaction must have been successful. This is because every sub-transaction (i.e., SS record 308) is written sequentially after the TG header record 302. Accordingly, if the header record 302 is present without a matching trailer record 306, it is an indication that some part of the transaction must have gone wrong. When the trailer record 306 is written, it is an acknowledgement, (i.e. a receipt or guarantee), that the meta-data was written to the configuration disk 18 and the actual data to the data disk 12. If this guarantee is not received, the system 8 doesn't know how much of the data file DF was written and, in fact, has to assume that none of the data file DF was written.


Table 3 sets forth the different types of meta-data identified above along with their associated function.












TABLE 3







Meta-Data
Purpose
















Configuration Disk Header and Trailer Records










Magic
Self-identifiable magic number



Uuid
Configuration disk Uuid



Tgid
The expected TransGroup Id to be found




in the offset in configuration disk



Tid
The expected Transaction Id to be found




at the offset in configuration disk



Offset
Offset configuration disk location where




the first and subsequent TransGroup




records are found



Block Size
Disk block size, which is 512



Size
Size of the configuration disk







Transaction Group Header, Continue and Trailer










Magic
Self-identifiable magic number



TransType
Identifies which of three record types:




header, continue or trailer



Tgid
Identification for this TransGroup




record



Uuid
Uuid of the configuration disk



Length
Relative offset to the next TransGroup




record



Data_length
Relative offset to end of the TransGroup




Trailer record







Transaction Record










Magic
Self-identifiable magic number



Tid
Identification for this Transaction




record



Length
Relative offset to the next Transaction




record







State Stream Record










Uuid
Uuid of the configurable object



Status
Active or Deleted



Length
Length of the State Stream record










The TG header and trailer records 302, 306 comprise two consolidation points which enable the system 8 to restore the appliance to its latest consistent state. During a disaster recovery, the system 8 retrieves all the TG header and trailer records 302, 306 to ensure that they are all paired and to determine which pair is the most current. The CD header 300 contains a pointer to the TG trailer record 306 of the last completed transaction.


The procedure for generating a written transaction record in accordance with the present invention is shown in FIG. 6. As each data block DB is received by the system 8, a transaction group is stored in the configuration disk 18 as follows: a TG header 302 is written to the configuration disk 18 at the beginning of the next available 512-byte block to initiate the transaction (step 204). Data is written to the data disk 12 one 1-MB block at a time (step 206). For simplicity, this description of the method 200 does not differentiate between data block headers 100, data blocks DB1-DBM and data block trailers 120. For each data block DB, an SS record 308 is written to the configuration disk 18 to indicate the progress or sub-transactions (step 208). If at any time the size of the SS records 308 exceed the size of the 512-byte configuration disk block, the transaction group is extended with a TG continue record 304 (step 210). This could happen multiple times for a large transaction group. Once all SS records 308 are written, (i.e. when the data file DF is completely stored on the data disk 12), a TG trailer record 306 is written to the configuration disk 18 (step 12). This finalizes the transaction and the write is acknowledged.


As aforementioned, the CD header 300 and trailer 310 are not used to store transactional information. Their function is to identify the currently active region within the configuration disk 18. It should also be noted that the SS records 308 could also identify sub-transactions other than writing a block to the configuration disk 18. The SS records 308 simply denote one entry in the transaction group.


When the system 8 recovers from a failure, the latest consistent state can be recovered as fine-grained as desired. For example, for an application as a tape library, very coarse grained recovery can be used and the system 8 rolls back to the latest file mark, (i.e., a TG trailer record 306 in the configuration disk 8). To implement a recovery, the system ignores all of the disk transaction records that occurred after the last TG trailer record 306. This is appropriate for backup applications that expect transaction boundaries to be file marks; either the data file DF was backed up or it wasn't. If only parts of the data file DF were backed up it is considered not to be backed up at all.


The ability of the present invention to handle large sequential data files provides significant advantages over regular file systems.


With respect to performance, the present invention writes detailed meta-data with each data block DB. Typical prior art data storage systems distinguish between meta-data and regular data, and store meta-data in different data blocks. Since meta-data blocks are kept separate from the actual data blocks, they are typically spread out throughout the disk. This means that every data file write actually involves at least two writes; one that updates the data and at least another one that updates the meta-data. In the system of the present invention, there is only a single write for data and meta-data that is stored together. Since there is no “seeking” of meta-data blocks, a single contiguous write is used.


Additionally, a reduced set of all of the meta-data within each of the data blocks DBs is also stored together on the configuration disk 18. Writes to the configuration disk 18 are negligible compared to data disk 12 writes because the writes are much smaller and the configuration disk 18 is typically a non-volatile memory that is significantly faster than the data disk 12. The configuration disk 18 keeps a reduced set of the meta-data of each large allocation area, (i.e., the 1 GB blocks referred to hereinbefore), rather than every data block DB. For example, a 40 GB hard drive would require only 40 entries in the configuration disk.


Another performance enhancement feature of the present invention is related to the large block size. Since the block size is orders of magnitude larger than the block size of ordinary file systems, the advantages of the invention are further magnified. Typical prior art file systems cannot use such large blocks because the block size is the smallest logical unit the file system can write. If many small data files need to be stored, as is typical for an enterprise system, each data file still takes up at least the size of one block. For example, a 1 kb file would take up 1 MB of space, 1023 kb are wasted. Clearly, this is not acceptable for general-purpose systems. In contrast, the system of the present invention is optimized specifically for large sequential data files because backup applications group together these 1 kb files into large, contiguous data files. With these types of access patterns, a large percentage of space will rarely be wasted.


Prior art disk caches often have to be disabled since it is possible that the disk acknowledges a write before it has propagated from the disk cache to a persistent state. If many small files are written, the file system has to flush the disk cache constantly for consistency before it acknowledges the write to the file. This happens so frequently when many small files are stored that disk caches are simply disabled. In contrast, since the present invention expects a small number of large files, it can make full use of disk caches. Cache flushes become infrequent, (i.e. only at the end of a file to finalize the transaction). This can improve sequential write performance by an order of magnitude.


Another significant advantage of the present invention is increased reliability in the ability to recover from a corrupted configuration disk 18. Detailed meta-data is written along with each data block, less detailed meta-data into the configuration disk 18. The configuration disk 18 contains a list of the large 1 GB allocation areas that are used to store individual data blocks DBs of a data file DF. One data file DF could cover one or more of these areas. It is not necessary to store detailed meta-data, (for example a list of each data block DB that belongs to a data file DF), into the configuration disk 18 because all of the detailed meta-data is already stored with the data on the data disk 12. In order to access a data file DF, the configuration disk 18 is read to find the first allocation area of the data file DF. Due to this architecture, it is very easy to recover from a corrupt configuration disk 18. The data disk 12 is scanned, and from the detailed meta-data stored in the data blocks DBs, a list of allocation blocks for each data file DF is created again to recover the meta-data of the configuration disk 18. This is not possible in typical prior art file systems because the meta-data is spread throughout the disk. If certain blocks of this meta-data are lost, the disk becomes useless.


In the same manner, the system of the present invention can easily cope with removable or corrupt disks. If one of the data disks 12 is removed, the data disk 12 contains all of its detailed meta-data. If the disk is imported into another JOS system, it can be scanned and used there. Also, because only meta-data that is specific for data on that particular data disk 12 is removed from the JOS, the system 8 still has all the necessary information to continue running in this degraded state. All data files DFs that are stored on other data disks 12 are guaranteed to still be fully operational. Typical prior art file systems cannot handle such a situation since meta-data is spread over all disks. Accordingly, if one disk is removed, the entire file system is corrupt.


Finally, with respect to scalability, file systems almost always keep data structures that can address every block on the disk. For example, a 32 bit system with 1 k data blocks can address 232−1*1 Kb (about 2 tera bytes—a small/medium sized tape library). Since the present invention uses 1 MB blocks, it can address several peta bytes, using the same logic, (larger than some of the largest tape libraries). To even further increase this address space, the configuration disk only contains pointers to 1 GB allocation units.

Claims
  • 1. A method comprising: receiving a data container to be stored to a first nonvolatile storage device, wherein the first nonvolatile storage device contains a plurality of block groups;selecting a block group from the plurality of block groups, wherein each of the plurality of block groups allows sequential allocation of data blocks for storing the data container to the first nonvolatile storage device;storing data and associated metadata of the data container together to the selected block group of the plurality of block groups as a single write to contiguous data blocks within the selected block group;storing a transactional record to a second nonvolatile storage device physically separate from the first nonvolatile storage device, wherein the transactional record corresponds to the single write and contains a header and a corresponding trailer, wherein the header and trailer contain a copy of a subset of the metadata of the data container, wherein the transactional record enables storage of a subset of the metadata in the second nonvolatile storage medium in addition to storage of a complete copy of the metadata in the first non-volatile storage medium, wherein the header is stored to the separate second nonvolatile storage device at a time before the storing of the data container to the first nonvolatile storage device, and the trailer is stored to the separate second nonvolatile storage device at a time after the storing of the data container to the first nonvolatile storage device, and wherein successfully storing the trailer to the second nonvolatile storage device indicates the write has completed without errors;checking to determine whether the trailer was successfully stored in the second nonvolatile storage device;committing the storing of the data container to the first nonvolatile only when the trailer has been determined to be successfully stored in the second nonvolatile storage device; andnullifying the storing of the data container to the first nonvolatile storage device upon failure to successfully store the trailer to the second nonvolatile storage device, wherein failure to store the trailer to the second nonvolatile storage device indicates at least part of the data container has failed to be stored to the selected block group of the plurality of data blocks without errors.
  • 2. The method as recited in claim 1, further comprising: during disaster recovery, upon detecting the transactional record having the header without the corresponding trailer, rolling-back the storing of the data container to the plurality of data blocks to restore the first nonvolatile storage device to a consistent state.
  • 3. The method as recited in claim 1, further comprising: retrieving the plurality of data blocks in a single data stream by using a sequential change number (SCN) stored in each of the plurality of data blocks.
  • 4. The method as recited in claim 1, wherein the block group is selected round-robin from the plurality of block groups.
  • 5. The method as recited in claim 1, wherein the block group contains metadata of the first nonvolatile storage device, and the metadata can be used for recovery of the first nonvolatile storage device.
  • 6. The method as recited in claim 1, wherein each of the plurality of block groups contains metadata of the first nonvolatile storage device allowing recovery of the first nonvolatile storage device upon recovery of the metadata from any one of the plurality of block groups.
  • 7. The method as recited in claim 1, wherein the block group contains an identifier for deleted data containers, and the identifier identifies data blocks that have been previously used by the deleted data containers.
  • 8. The method as recited in claim 1, wherein the header and a trailer are used for verifying the integrity of the corresponding data block.
  • 9. The method as recited in claim 8, wherein the header and the trailer of the corresponding data block contain metadata capable of being used for recovery of the corresponding data block.
  • 10. The method as recited in claim 8, wherein the header and the trailer of the corresponding data block contain metadata capable of being used for recovery of the data container stored on the corresponding data block.
  • 11. The method as recited in claim 1, wherein data of the data container and metadata of the data container are stored in the corresponding data block in a single contiguous write transaction.
  • 12. The method as recited in claim 1, wherein at least some of the metadata of the first nonvolatile storage device is duplicated in the configuration disk.
  • 13. The method as recited in claim 1, wherein the second nonvolatile storage device stores data in a circular buffer fashion by overwriting outdated data with most recent data.
  • 14. The method as recited in claim 1, wherein the header and the trailer of the transactional record contain metadata of the data container capable of being used for recovery of the data container.
  • 15. The method as recited in claim 1, wherein the data container is a data file.
  • 16. A system comprising: a data disk for storing a data container, wherein the data disk contains a plurality of block groups, each of the plurality of block groups allows sequential allocation of data blocks for storing the data container to the data disk;a configuration disk physically separate from the data disk for storing a transactional record corresponding to the storing of the data container to the data disk, wherein the transactional record contains a header and a corresponding trailer to be stored in the configuration disk separate from data of the data container stored in the data disk, wherein the header is stored to the separate configuration disk at a time before the storing of the data container to the data disk, and the trailer is stored to the separate configuration disk at a time after the storing of the data container to the data disk, wherein successfully storing the trailer to the configuration disk indicates .the write has completed without errors; anda controller configured to: select one of the plurality of block groups from the data disk;sequentially allocate a plurality of data blocks from the selected block group;to store data and associated metadata of the data container together to the plurality of data blocks as a single write to contiguous blocks within the selected one of the plurality of block groups;to store the transactional record to the configuration disk wherein the transactional record corresponds to the single write and contains a header and a corresponding trailer, wherein the header and trailer contain a copy of a subset of the metadata of the data container, wherein the transactional record enables storage of a subset of the metadata in the configuration disk in addition to storage of a complete copy of the metadata in the separate data disk;to check whether the trailer was successfully stored in the configuration disk; andto commit the storing of the data container to the data disk only when the trailer of the has been successfully stored to the separate configuration disk, andto nullify the storing of the data container to the data disk upon failure to successfully store the trailer to the configuration disk, wherein failure to successfully store the trailer to the configuration disk indicates at least part of the data container has failed to be stored to the selected block group of the plurality of data blocks without errors.
  • 17. The system as recited in claim 16, wherein during disaster recovery, the controller rolls back the storing of the data container to the plurality of data blocks upon detecting the transactional record having the header without the corresponding trailer.
  • 18. The system as recited in claim 16, wherein each of the plurality of block groups contains metadata of the data disk, and the metadata can be used for recovery of the data disk.
  • 19. The system as recited in claim 16, wherein each of the plurality of data blocks contains metadata of the data container, and the metadata can be used for recovery of the data container.
  • 20. The system as recited in claim 16, wherein the configuration disk contains metadata of the data disk, and the metadata can be used for recovery of the data disk.
  • 21. A method comprising: receiving a data container to be stored to a first non-volatile storage medium, wherein the first non-volatile storage medium contains a plurality of block groups;selecting a block group from the plurality of block groups, wherein each of the plurality of block groups allows sequential allocation of data blocks for storing the data container to the first non-volatile storage medium;storing data of the data container and associated metadata together to contiguous data blocks in the selected block group of the first non-volatile storage medium as a single contiguous write, the metadata including one or more of a UUID associated with the first non-volatile storage medium, an offset indicator associated with the data container, a sequence change number associated with the data container, a resource fork length associated with the storage container, or an indicator of unused memory within a given block group;storing a transactional record to a second nonvolatile storage medium, wherein the second nonvolatile storage medium is physically separate from the first non-volatile storage medium and has access characteristics different from those of the first nonvolatile storage medium, wherein the transactional record contains a header and a corresponding trailer associated with the write, wherein the header and trailer contain a copy of a subset of the metadata of the data container, wherein the transactional record enables storage of a subset of the metadata in the second nonvolatile storage medium in addition to storage of a complete copy of the metadata in the first non-volatile storage medium, wherein the header is stored to the second nonvolatile storage medium at a time before the storing of the data container to the first nonvolatile storage medium and the trailer is stored to the second nonvolatile storage medium at a time after the storing of the data container to the first nonvolatile storage medium, and wherein successfully storing the trailer to the second nonvolatile storage medium indicates the write has completed without error;checking to determine whether the trailer was successfully stored in the second nonvolatile storage medium; andcommitting the storing of the data container and associated metadata to the first non-volatile storage medium only when the transactional record was successfully stored to the second non-volatile storage medium; andnullifying the storing of the data container to the data disk upon failure to store the trailer to the second nonvolatile storage medium at the time after the storing of the data container to the data disk, wherein failure to store the trailer to the second nonvolatile storage medium indicates at least part of the data container has failed to be stored to the selected block group of the plurality of data blocks without errors.
  • 22. The method as recited in claim 21, further comprising, during disaster recovery and upon detecting the transactional record having the header without the corresponding trailer, rolling-back the storing of the data container to the plurality of data blocks to restore the first non-volatile storage medium to a consistent state.
  • 23. The method as recited in claim 22, wherein each of the plurality of block groups contains metadata of the first non-volatile storage medium allowing recovery of the first non-volatile storage medium upon recovery of the metadata from any one of the plurality of block groups.
  • 24. The method as recited in claim 22, wherein the block group contains an identifier for deleted data containers, and the identifier identifies data blocks that have been previously used by the deleted data containers.
  • 25. The method as recited in claim 22, wherein the header and the corresponding trailer are used for recovery of the data container stored in the corresponding data block.
  • 26. The method as recited in claim 22, wherein the second non-volatile storage medium is a configuration disk that stores data in a circular buffer by overwriting outdated data with most recent data.
  • 27. The method as recited in claim 22, wherein the data container is a data file.
US Referenced Citations (182)
Number Name Date Kind
4635145 Horie et al. Jan 1987 A
4727512 Birkner et al. Feb 1988 A
4775969 Osterlund Oct 1988 A
5212784 Sparks May 1993 A
5235695 Pence Aug 1993 A
5297124 Plotkin et al. Mar 1994 A
5325695 Seo et al. Jul 1994 A
5438674 Keele et al. Aug 1995 A
5455926 Keele et al. Oct 1995 A
5485321 Leonhardt et al. Jan 1996 A
5579516 Van Maren et al. Nov 1996 A
5666538 DeNicola Sep 1997 A
5673382 Cannon et al. Sep 1997 A
5745748 Ahmad et al. Apr 1998 A
5774292 Georgiou et al. Jun 1998 A
5774643 Lubbers et al. Jun 1998 A
5774715 Madany et al. Jun 1998 A
5805864 Carlson et al. Sep 1998 A
5809511 Peake Sep 1998 A
5809543 Byers et al. Sep 1998 A
5832515 Ledain et al. Nov 1998 A
5854720 Shrinkle et al. Dec 1998 A
5859979 Tung et al. Jan 1999 A
5864346 Yokoi et al. Jan 1999 A
5872669 Morehouse et al. Feb 1999 A
5875479 Blount et al. Feb 1999 A
5911779 Stallmo et al. Jun 1999 A
5913062 Vrvilo et al. Jun 1999 A
5949970 Sipple et al. Sep 1999 A
5961613 DeNicola Oct 1999 A
5963971 Fosler et al. Oct 1999 A
5974424 Schmuck et al. Oct 1999 A
5974503 Venkatesh et al. Oct 1999 A
6021408 Ledain et al. Feb 2000 A
6023709 Anglin et al. Feb 2000 A
6029179 Kishi Feb 2000 A
6041329 Kishi Mar 2000 A
6044442 Jesionowski Mar 2000 A
6049848 Yates et al. Apr 2000 A
6061309 Gallo et al. May 2000 A
6061820 Nakakita et al. May 2000 A
6067587 Miller et al. May 2000 A
6070224 LeCrone et al. May 2000 A
6098148 Carlson Aug 2000 A
6128698 Georgis Oct 2000 A
6131142 Kamo et al. Oct 2000 A
6131148 West et al. Oct 2000 A
6163856 Dion et al. Dec 2000 A
6173359 Carlson et al. Jan 2001 B1
6195730 West Feb 2001 B1
6225709 Nakajima May 2001 B1
6247096 Fisher et al. Jun 2001 B1
6260110 LeCrone et al. Jul 2001 B1
6266784 Hsiao et al. Jul 2001 B1
6269423 Kishi Jul 2001 B1
6269431 Dunham Jul 2001 B1
6282609 Carlson Aug 2001 B1
6289425 Blendermann et al. Sep 2001 B1
6292889 Fitzgerald et al. Sep 2001 B1
6301677 Squibb Oct 2001 B1
6304880 Kishi Oct 2001 B1
6304882 Strellis et al. Oct 2001 B1
6317814 Blendermann et al. Nov 2001 B1
6324497 Yates et al. Nov 2001 B1
6327418 Barton Dec 2001 B1
6336163 Brewer et al. Jan 2002 B1
6336173 Day et al. Jan 2002 B1
6339778 Kishi Jan 2002 B1
6341329 LeCrone et al. Jan 2002 B1
6343342 Carlson Jan 2002 B1
8336173 Day et al. Jan 2002
6353837 Blumenau Mar 2002 B1
6354748 Vrvilo Mar 2002 B1
6360232 Brewer et al. Mar 2002 B1
6385706 Ofek et al. May 2002 B1
6389503 Georgis et al. May 2002 B1
6408359 Ito et al. Jun 2002 B1
6487561 Ofek et al. Nov 2002 B1
6496791 Yates et al. Dec 2002 B1
6499026 Rivette et al. Dec 2002 B1
6546384 Shaath et al. Apr 2003 B2
6557073 Fujiwara Apr 2003 B1
6557089 Reed et al. Apr 2003 B1
6578120 Crockett et al. Jun 2003 B1
6615365 Jenevein et al. Sep 2003 B1
6625704 Winokur Sep 2003 B2
6654912 Viswanathan et al. Nov 2003 B1
6658435 McCall Dec 2003 B1
6690268 Schofield et al. Feb 2004 B2
6694447 Leach et al. Feb 2004 B1
6725331 Kedem Apr 2004 B1
6766520 Rieschl et al. Jul 2004 B1
6779057 Masters et al. Aug 2004 B2
6779058 Kishi et al. Aug 2004 B2
6779081 Arakawa et al. Aug 2004 B2
6816941 Carlson et al. Nov 2004 B1
6816942 Okada et al. Nov 2004 B2
6834324 Wood Dec 2004 B1
6850964 Brough et al. Feb 2005 B1
6877016 Hart et al. Apr 2005 B1
6915397 Lubbers et al. Jul 2005 B2
6931557 Togawa Aug 2005 B2
6938089 Slaby et al. Aug 2005 B1
6950263 Suzuki et al. Sep 2005 B2
6957291 Moon et al. Oct 2005 B2
6959368 St. Pierre et al. Oct 2005 B1
6973369 Trimmer et al. Dec 2005 B2
6973534 Dawson Dec 2005 B2
6978325 Gibble Dec 2005 B2
6988109 Stanley et al. Jan 2006 B2
7032126 Zalewski et al. Apr 2006 B2
7032131 Lubbers et al. Apr 2006 B2
7055009 Factor et al. May 2006 B2
7072910 Kahn et al. Jul 2006 B2
7096331 Haase et al. Aug 2006 B1
7100089 Phelps Aug 2006 B1
7107417 Gibble et al. Sep 2006 B2
7111136 Yamagami Sep 2006 B2
7117324 Scheid Oct 2006 B2
7127388 Yates et al. Oct 2006 B2
7127577 Koning et al. Oct 2006 B2
7143307 Witte et al. Nov 2006 B1
7152077 Veitch et al. Dec 2006 B2
7155586 Wagner et al. Dec 2006 B1
7200546 Nourmohamadian et al. Apr 2007 B1
7389313 Hsieh et al. Jun 2008 B1
20010047447 Katsuda Nov 2001 A1
20020004835 Yarbrough Jan 2002 A1
20020016827 McCabe et al. Feb 2002 A1
20020026595 Saitou et al. Feb 2002 A1
20020095557 Constable et al. Jul 2002 A1
20020099907 Castelli et al. Jul 2002 A1
20020133491 Sim et al. Sep 2002 A1
20020144057 Li et al. Oct 2002 A1
20020163760 Lindsey et al. Nov 2002 A1
20020166079 Ulrich et al. Nov 2002 A1
20020171546 Evans et al. Nov 2002 A1
20020174244 Beckwith et al. Nov 2002 A1
20020191608 Lenell et al. Dec 2002 A1
20020199129 Bohrer et al. Dec 2002 A1
20030004980 Kishi et al. Jan 2003 A1
20030014568 Kishi et al. Jan 2003 A1
20030037211 Winokur Feb 2003 A1
20030044834 Daly et al. Mar 2003 A1
20030061456 Ofek et al. Mar 2003 A1
20030097462 Parent et al. May 2003 A1
20030108164 Laurin et al. Jun 2003 A1
20030120476 Yates et al. Jun 2003 A1
20030120676 Holavanahalli et al. Jun 2003 A1
20030126388 Yamagami Jul 2003 A1
20030135672 Yip et al. Jul 2003 A1
20030149700 Bolt Aug 2003 A1
20030182301 Patterson et al. Sep 2003 A1
20030182350 Dewey Sep 2003 A1
20030188208 Fung Oct 2003 A1
20030217077 Schwartz et al. Nov 2003 A1
20030225800 Kavuri Dec 2003 A1
20040015731 Chu et al. Jan 2004 A1
20040098244 Dailey et al. May 2004 A1
20040181388 Yip et al. Sep 2004 A1
20040181707 Fujibayashi Sep 2004 A1
20050010529 Zalewski et al. Jan 2005 A1
20050044162 Liang et al. Feb 2005 A1
20050063374 Rowan et al. Mar 2005 A1
20050065962 Rowan et al. Mar 2005 A1
20050066118 Perry et al. Mar 2005 A1
20050066222 Rowan et al. Mar 2005 A1
20050066225 Rowan et al. Mar 2005 A1
20050076070 Mikami Apr 2005 A1
20050076261 Rowan et al. Apr 2005 A1
20050076262 Rowan et al. Apr 2005 A1
20050076264 Rowan et al. Apr 2005 A1
20050144407 Colgrove et al. Jun 2005 A1
20060047895 Rowan et al. Mar 2006 A1
20060047902 Passerini Mar 2006 A1
20060047903 Passerini Mar 2006 A1
20060047905 Matze et al. Mar 2006 A1
20060047925 Perry Mar 2006 A1
20060047989 Delgado et al. Mar 2006 A1
20060047998 Darcy Mar 2006 A1
20060047999 Passerini et al. Mar 2006 A1
20060143376 Matze et al. Jun 2006 A1
Foreign Referenced Citations (16)
Number Date Country
1333379 Apr 2006 EP
1 671 231 Jun 2006 EP
1 671231 Jun 2006 EP
1671231 Jun 2006 EP
WO 9903098 Jan 1999 WO
WO 199903098 Jan 1999 WO
WO 9906912 Feb 1999 WO
WO 199906912 Feb 1999 WO
WO 2005031576 Apr 2005 WO
WO 2006023990 Mar 2006 WO
WO 2006023991 Mar 2006 WO
WO 2006023992 Mar 2006 WO
WO 2006023993 Mar 2006 WO
WO 2006023994 Mar 2006 WO
WO2006023995 Mar 2006 WO
WO 2006023995 Mar 2006 WO
Related Publications (1)
Number Date Country
20040044705 A1 Mar 2004 US