Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Jornaling filesystem? (was Re: Defrag OS X Server?)



Hans Besjes writes:

>Now I have heard about "journaling filesystems" before, but I don't what
>they are. Can you (or anybody else for that matter) explain what this,
>and how it works?

A journaling file system (or the lack thereof) is the only thing standing
between me and a recommendation to my client that they switch their
operations to MacOSX Server when they retire their mini in a couple of
years.

More generically, what's usually meant by a journaling file system is a
file system which has two specific external characteristics:

1. Operations begin in order can be completed in order, and

2. Multiple operations can be treated atomically, such that
either all are completed or none are completed.

Usually, this is accomplished by journaling: when a process begins an
atomic modification, the original contents of the disc blocks that will
be modified are written to a journal "file" (usually not a file, but a
reserved disc area) before the modified block is written. The I/O on the
journal file is forced to complete before the modified blocks are
written. Once the last modified block is posted to disc, the atomic
transaction is considered complete and the journal is reset for the next
operation.

If the system crashes or loses power in the middle of this atomic
transaction, the file system can inspect the journal upon mounting and
restore the disc to the state it had before the start of the atomic
operation. Thus, code living "above" the file system never sees an
incomplete transaction.

Typically, the transaction management features offered by the file system
are integrated into the database layer as well, so that appliations that
use the database's transaction management are protected at the file
system level as well. This guarantees data integrity all the way up to
the application level.

When the system works, it completely eliminates the need to check and
preen the file system in the event of an unplanned shutdown. Moreover, it
does so in a way that guarantees that no properly-written application
will ever see data in an inconsistent state. This is vital for
high-availability systems. Journaled file systems are the norm on "big
iron".

I *hope* that journaling hooks are built into HFS+, so that journaling
can be implemented in the near future. Now that Linux has ext3, a
journaling file system with UFS semantics, MacOS X is lagging in this
area.

-- Bruce

--------------------------------------------------------------------------
Bruce Toback Tel: (602) 996-8601| My candle burns at both ends;
OPT, Inc. (800) 858-4507| It will not last the night;
11801 N. Tatum Blvd. Ste. 142 | But ah, my foes, and oh, my friends -
Phoenix AZ 85028 | It gives a lovely light.
email@hidden | -- Edna St. Vincent Millay
_______________________________________________
macos-x-server mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macos-x-server
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.