Software RAID has many advantages, especially the cost. However, it has a tradeoff between I/O performance and reliability. The use of an internal cache in software RAID increases the I/O performance, but it also makes the software RAID prone to be damaged by sudden power failure. In this paper, we present two kinds of software mechanisms based on the Ext3 File System that guarantees the consistency of software RAID in the case of sudden power failure.
The first proposed mechanism is called Synchronized Software RAID Cache Destaging Mechanism(SRCD). Though the mechanism cannot keep all the data in the cache in case of power failure, it preserves all crucial data for the software RAID filesystem consistency by synchronizing the cache at the two points in the middle of the Ext3 File System write process: (1) just before the transaction commit block of a transaction is written into the software RAID; and (2) just before Ext3 File System updates the table of valid transactions in the journal (deletes transactions from the journal).
The second one is Tag-based Synchronized Software RAID Cache Destaging Mechanism (T-SRCD). SRCD can not avoid performance degradation is certain workloads which have localized characteristic in more than one region. T-SRCD compromises the inevitable performance degradation of SRCD. Instead of destaging all the data in RAID cache, it delays the destaging of transactions` commit blocks and the blocks invalidating transactions in journal area of Ext3 File System. (1) each commit block is allowed to be destaged when rest of the blocks in the transaction are destaged naturally by RAID destaging algorithm. (2) Transaction invalidate block can be destaged if the metadata and data inside the transacion to be deleted have been fully destaged.
We implemented SRCD and T-SRCD on the x86-Linux Platform and our own software RAID driver called ``LORE`` which has an size-adjustable internal cache. Experimental results show that the performance of ...