Loading...

Monday, April 2, 2007

Transaction file system and COW

NTFS is a transaction based file system. Is it a joke? No, NTFS is such a file system although it performed so badly. The use of activity logging and transaction management of file system changes allows the file system to maintain its internal integrity by preventing incomplete transactions from being implemented. One key to the operation of the transaction system is the process that is employed to check for and undo transactions that were not properly completed. This is sometimes called transaction recovery. Recovery is performed on NTFS volumes each time they are mounted on the system. Most commonly, this occurs when the system is booted or rebooted.

ZFS is also a file system based on transaction. Comparing with NTFS, ZFS only performs copy-on-write operations.This means that the blocks containing the in-use data on disk are never modified. The changed information is written to alternate blocks, and the block pointer to the in-use data is only moved once the write transactions are complete. This happens all the way up the file system block structure to the top block, called the uberblock.


As show in picture above, transactions select unused blocks to write modified data and only then change the location to which the preceding block points. If the machine were to suffer a power outage in the middle of a data write, no corruption occurs because the pointer to the "good" data is not moved until the entire write is complete. (Note: The pointer to the data is the only thing that is moved.) This eliminates the need for a journaling or logging file system and any need for a fsck or mirror resync when a machine reboots unexpectedly.

0 comments:

Fast, Safe, Open, Free!
Open for business. Open for me! » Learn More
 
 

Video Bar

Loading...