SU+J Lost files after a power failure

Charles Swiger cswiger at mac.com
Mon Oct 14 22:21:19 UTC 2013


On Oct 14, 2013, at 12:41 PM, RW <rwmaillists at googlemail.com> wrote:
> On Mon, 14 Oct 2013 11:48:18 -0700 Charles Swiger wrote:
>> Yes.  Without journalling, you'd normally perform the full
>> timeconsuming fsck in the foreground.
> 
> Journalling removes the need for the background fsck which only recovers
> lost space. 

That and inode link changes (ie, adding or removing files from a directory).

>> With journalling, it should be able to do a journal replay to restore
>> the filesystem to an OK state,
> 
> My understanding is that the journal does nothing to restore the
> filesystem other than keep track of orphaned memory. In all other
> respect it's the job of soft-updates to keep the filesystem in an OK
> state.

Yes, SU is supposed to reorder filesystem operations to provide some level
of "ACID" transaction semantics-- and the journal helps that by avoiding
the need for bgfsck.

> When it doesn't you need a foreground check.
> 
>> but sometimes that doesn't restore consistency, in which case it
>> usually fires off a background fsck rather than the foreground fsck.
> 
> I think if the journal fails, you would really need to run at least a
> foreground preen, maybe a full fsck. 

Yes.

Regards,
-- 
-Chuck



More information about the freebsd-questions mailing list