Claims
- 1. A method for maintaining a consistent file system, wherein said file system is stored in stripes of blocks in a RAID array, that allows for recovery of the file system to a consistent state after a disk failure and a system failure occur prior to successful completion of writing new data to one or more blocks of a stripe of said RAID array, said disk failure rendering a block of said stripe in said RAID array unreadable, comprising the steps of:
- prior to writing new data to one or more blocks of a stripe in said RAID array, reading said one or more blocks of said stripe to obtain prior data stored in said one or more blocks of said stripe, said prior data stored in said stripe storage means comprising a prior parity value read from a parity block of said stripe and prior data read from one or more data blocks of said stripe;
- storing said prior data stored in said one or more blocks of said stripe in stripe storage means;
- initiating the writing of said new data to said one or more blocks of said stripe; and
- if said writing of said new data to said one or more blocks of said stripe in said RAID array is successfully completed, clearing said prior data from said one or more blocks of said stripe from said stripe storage means; otherwise, performing the steps of:
- after a failure has occurred, checking said stripe storage means to determine whether said stripe storage means contains any prior data for any stripe;
- when said stripe storage means contains prior data for any stripe, performing the steps of:
- determining whether said block of said stripe in said RAID array rendered unreadable by said disk failure is one of said data blocks of said stripe in said RAID array for which prior data has been stored in said stripe storage means;
- if said block of said stripe in said RAID array rendered unreadable by said disk failure is one of said data blocks of said stripe in said RAID array for which prior data has been stored in said stripe storage means, performing the steps of:
- reading data from each remaining readable data block of said stripe in said RAID array other than said data block rendered unreadable by said disk failure;
- recomputing a parity value for said stripe based on said prior data stored in said stripe storage means for said data block rendered unreadable by said disk failure and on said data read from said each remaining readable data block of said stripe; and
- writing said recomputed parity value for said stripe to said parity block of said stripe in said RAID array.
- 2. A method for maintaining a consistent file system, wherein said file system is stored in stripe of blocks in a RAID array, that allows for recovery of the file system to a consistent state after disk failure and system failure occur prior to completion of writing new data to one or more blocks of a stripe of said RAID array, said disk failure rendering a block of said stripe in said RAID array unreadable, comprising the steps of:
- prior to writing new data to one or more blocks of a stripe in said RAID array, reading said one or more blocks of said stripe to obtain prior data stored in said one or more blocks of said stripe, said prior data stored in said stripe storage means comprising a prior parity value read from a parity block of said stripe and prior data read from one or more data blocks of said stripe;
- storing said prior data stored in said one or more blocks of said stripe in stripe storage means;
- initiating the writing of said new data to said one or more blocks of said stripe; and
- if said writing of said new data to said one or more blocks of said stripe in said RAID array is successfully completed, clearing said prior data from said one or more blocks of said stripe from said stripe storage means; otherwise, performing the steps of:
- after a failure has occurred, checking said stripe storage means to determine whether said stripe storage means contains any prior data for any stripe;
- when said stripe storage means contains prior data for any stripe, performing the steps of:
- determining whether said block of said stripe in said RAID array rendered unreadable by said disk failure is one of said data blocks of said stripe in said RAID array other than said one or more data blocks for which prior data has been stored in said stripe storage means;
- if said block of said stripe in said RAID array rendered unreadable by said disk failure is one of said data blocks of said stripe in said RAID array other than said one or more data blocks for which prior data has been stored in said stripe storage means, performing the steps of:
- reading data from each remaining readable data block of said stripe in said RAID array other than said one or more data blocks of said stripe for which prior data has been stored in said stripe storage means;
- computing data for said data block rendered unreadable by said disk failure based on said data read from said each remaining data block of said stripe in said RAID array other than said one or more data blocks of said RAID array for which prior data has been stored in said stripe storage means and on said prior data or said one or more data blocks of said stripe and said prior parity value for said parity block of said stripe stored in said stripe storage means;
- reading data from said data blocks of said stripe in said RAID array for which prior data has been stored in said stripe storage means;
- recomputing a new parity value based on said computed data for said data block rendered unreadable by said disk failure, said data read from said data blocks of said stripe in said RAID array for which prior data has been stored in said stripe storage means; and said data read from said each remaining readable data block of said stripe in said RAID array other than said one or more data blocks for which prior data has been stored in said stripe storage means; and
- writing said new parity value for said stripe to said parity block of said stripe in said RAID array.
- 3. A method for maintaining a consistent file system, wherein said file system is stored in stripes of blocks in a RAID array, that allows for recovery of the file system to a consistent state after disk failure and system failure occur prior to completion of writing new data to one or more blocks of a stripe of said RAID array, said disk failure rendering a block of said stripe in said RAID array unreadable, comprising the steps of:
- prior to writing new data to one or more blocks of a stripe in said RAID array, reading said one or more blocks of said stripe to obtain prior data stored in said one or more blocks of said stripe, said prior data stored in said stripe storage means comprising a prior parity value read from a parity block of said stripe and prior data read from one or more data blocks of said stripe;
- storing said prior data stored in said one or more blocks of said stripe in stripe storage means;
- initiating the writing of said new data to said one or more blocks of said stripe; and
- if said writing of said new data to said one or more blocks of said stripe in said RAID array is successfully completed, clearing said prior data from said one or more blocks of said stripe from said stripe storage means; otherwise, performing the steps of:
- after a failure has occurred, checking said stripe storage means to determine whether said stripe storage means contains any prior data for any stripe;
- when said stripe storage means contains prior data for any stripe, performing the steps of:
- determining whether said block of said stripe in said RAID array rendered unreadable by said disk failure is one of said data blocks of said stripe in said RAID array other than said one or more data blocks for which prior data has been stored in said stripe storage means;
- if said block of said stripe in said RAID array rendered unreadable by said disk failure is one of said data blocks of said stripe in said RAID array other than said one or more data blocks for which prior data has been stored in said stripe storage means, writing said prior data for said one or more data blocks of said stripe and said prior parity value stored in said stripe storage means to said stripe in said RAID array.
- 4. A method for maintaining a consistent file system, wherein said file system is stored in stripes of blocks of a RAID array, that allows for recovery of the file system to a consistent state after a disk failure and a system failure occur prior to successful completion of writing new data to one or more blocks of a stripe of said RAID array, said disk failure rendering a block of said stripe in said RAID array unreadable, comprising the steps of:
- prior to writing new data to one or more blocks of a stripe in said RAID array, reading any other blocks of said stripe in said RAID array other than said one or more blocks to which new data is to be written to obtain prior data stored in said other blocks of said stripe;
- storing said prior data stored in said other blocks of said stripe in stripe storage means;
- initiating the writing of said new data to said one or more blocks of said stripe in said RAID array; and
- if said writing of said new data to said one or more blocks of said stripe is successfully completed, clearing said prior data from said other blocks of said stripe from said stripe storage means; otherwise performing the steps of:
- after a failure has occurred, checking said stripe storage means to determine whether said stripe storage means contains any prior data for any stripe;
- when said stripe storage means contains prior data for any stripe, performing the steps of:
- determining whether said block of said stripe in said RAID array rendered unreadable by said disk failure is one of said data blocks of said stripe in said RAID array for which prior data has been stored in said stripe storage means;
- if said block of said stripe in said RAID array rendered unreadable by said disk failure is one of said data blocks of said stripe in said RAID array for which prior data has been stored in said stripe storage means, performing the steps of:
- reading data from each remaining readable data block of said stripe in said RAID array other than said data block rendered unreadable by said disk failure;
- recomputing a new parity value for said stripe based upon said data read from said each remaining readable data block of said stripe in said RAID array and said prior data stored in said stripe storage means for said data block rendered unreadable by said disk failure; and
- writing said new parity value for said stripe to a parity block of said stripe in said RAID array.
- 5. A method for operating a file system that provides protection against corruption of the file system upon writing new data to the file system after a disk failure has rendered unreadable a data block in a stripe of RAID array wherein file system is stored, and that allows recovery of the file system to a consistent state when a system failure occurs prior to all of said new data being successfully written and comprising the steps of:
- prior to writing new data to one or more blocks of said stripe, reading all readable blocks of said stripe in said RAID array;
- computing data for said unreadable block based upon said readable blocks;
- storing said computed data in stripe storage means;
- initiating the writing of said new data to said one or more blocks of said stripe in said RAID array; and
- if said writing of said new data to said one or more blocks of said stripe is successfully completed, clearing said computed data from said stripe storage means; otherwise, performing the steps of:
- after said system failure has occurred, checking said stripe storage means to determine whether said stripe storage means contains any computed data for any unreadable data block of any stripe;
- when said stripe storage means containing computed data for an unreadable data block of a stripe, performing the steps of:
- reading data from each readable data block of said stripe failure in said RAID array other than said data block rendered unreadable by said disk;
- recomputing a parity value for said stripe based on said computed data for said unreadable data blocks of said strip stored in said stripe storage means and said data read from said remaining readable data blocks in said stripe in said RAID array; and
- writing said recomputed parity value for said stripe to a parity block of said stripe in said RAID array.
CROSS-REFERENCE TO RELATED APPLICATION
This is a file-wrapper continuation of patent application Ser. No. 08/071,798, filed Jun. 4, 1993, now abandoned.
US Referenced Citations (52)
Foreign Referenced Citations (1)
Number |
Date |
Country |
0 321 723 |
Jun 1989 |
EPX |
Continuations (1)
|
Number |
Date |
Country |
Parent |
071798 |
Jun 1993 |
|