[Ocfs2-users] [Fwd: Re: Unable to fix corrupt directories with fsck.ocfs2]

Sunil Mushran sunil.mushran at oracle.com
Wed May 20 16:24:21 PDT 2009


Brian Kroth wrote:
> Luis Freitas <lfreitas34 at yahoo.com> 2009-05-20 10:46:
>>    I am not aware of any filesystem that can withstand a online fsck.
>>    Sun ZFS can do online correction, but it doesnt have a fsck tool.
> I hear btrfs will support this.  It may be a feature that's easier to
> accomplish with copy on write.

Yes. fsck in non-cow file systems scan the volume multiple times each time
starting from a different point. Then it matches the collected data and
looks for inconsistencies.  Say it finds an inode but it is not in any
directory. It will add it to lost+found. Or, that inode is not allocated
in the appropriate bitmap. It will allocate it. etc. etc. For this to work,
it needs the ondisk image to be frozen. If the volume is mounted, then it
will have to lock out all nodes... which is effectively umount.

Remember that the fs has journaling. The journal is replayed as part of
node recovery and/or mount. So fsck is more an added security than anything
else.



More information about the Ocfs2-users mailing list