Method and apparatus for maintaining data consistency in raid
AssigneeSun Microsystems, Inc.
InventorsRobert S. Gittins, Dale R. Passmore
Life of this patent
Estimating the term…
Abstract
A method and apparatus for storing associated data in a computing system having two or more storage devices arranged in a RAID configuration. The storage devices have a prewrite area for pre-storage of the data, and data region for persistent storage of the data. A scoreboard memory structure is created for monitoring the state of the prewrite area, and data in the prewrite area is conditionally invalidated based upon the information contained in the scoreboard memory structure. By conditionally invalidating the prewrite data, the write performance of the RAID storage system is improved.
Claims15
A method for writing new data in a computing system having a system memory and at least two storage devices located remote from the system memory and arranged in a RAID configuration, a first storage device and a storage device of said at least two storage devices each having first and second prewrite slots for pre-storage of data and parity information, the method of comprising the steps of:
- providing a structure in the system memory for tracking a state of said first and second prewrite slots, located remote from the system memory;
- calculating a new parity from the new data, an old parity value, and an old data value stored in the computing system;
- allocating one of said first and second prewrite slots for recording the new data in said first storage device and the new parity in said second storage device;
- detecting at said structure provided in the system memory during said step of providing and responsive to states of said first and second prewrite slots, of an overlap condition associated with said prewrite slots, each prewrite slot to which the overlap condition is associated defined to be an overlapped prewrite slot;
- conditionally invalidating said prewrite slots, said prewrite slots invalidated if detected during said step of detecting to be overlapped prewrite slots;
- otherwise
- storing, in said prewrite slot allocated by said allocation step, the new data to said first storage device and the new parity to said second storage device;
- writing the new data to said first storage device;
- and
- writing the new parity to said second storage device.
An apparatus for storing data in a computing system, the apparatus comprising:
- a first and second storage device for storage of the data, each storage device having at least a first and second prewrite slot for pre-storage of the data;
- a memory structure coupled to, and formed remote from said first and second storage devices for tracking a state of said first and second prewrite slots;
- a detection module coupled to said memory structure, said detection module for monitoring said memory structure to detect an overlap condition associated with at least one of said first and second prewrite slots;
- an allocation module, coupled to said memory structure and to said first and second storage devices, for allocating one of said first and second prewrite slots for pre-storing said data in said slot;
- and
- an invalidation module, coupled to said detection module and to said first and said second storage device, said invalidation module for marking at least one of said first and second prewrite slots invalid responsive to detection by said detection module of the overlap condition.
A computer program storage medium readable by a computing system and encoding a computer program of instructions for executing a computer process for writing new data in a computing system having a system memory and at least two storage devices located remote from the system memory and arranged in a RAID configuration, a first storage device and a storage device of said at least two storage devices each having first and second prewrite slots for pre-storage of data and parity information, the computer process comprising the steps of:
- providing a structure in the system memory for tracking a state of said first and second prewrite slots;
- calculating a new parity from the new data, an old parity value, and an old data value stored in the computing system;
- allocating one of said first and second prewrite slots for recording the new data in said first storage device and the new parity in said second storage device;
- detecting at said structure, provided in the system memory during said step of providing and responsive to states of said first and second
- prewrite slots, of an overlap condition associated with said prewrite slots, each prewrite slot to which the overlap condition is associated
- defined to be an overlapped prewrite slot;
- conditionally invalidating said prewrite slots, said prewrite slots invalidated if detected during said step of detecting to be overlapped prewrite slots;
- storing, in said prewrite slot allocated by said allocation step, the new data to said first storage device and the new parity to said second storage device;
- writing the new data to said first storage device;
- and
- writing the new parity to said second storage device.
Dependencies are inferred from the claim text.