What is /.journal?

Rick Stevens rstevens at vitalstream.com
Wed Dec 28 01:35:37 UTC 2005


On Wed, 2005-12-28 at 01:07 +0200, Kostas Sfakiotakis wrote:
> Greetings Rick ,
> 
> Rick Stevens wrote:
> > On Tue, 2005-12-27 at 20:04 +0300, A.Fadyushin at it-centre.ru wrote:
> > 
> >>The /.journal file is created when the _existing_ EXT2 filesystem is
> >>converted to EXT3 filesystem. 
> 
> I  never had ext2 filesystems . Anaconda created  ext3 ones from scratch .
> 
> That file contains the filesystem journal
> >>used by EXT3. The file is only created during the conversion EXT2->EXT3
> >>because it is impossible to create separate region on the existing EXT2
> >>filesystem for the journal - therefore, the journal is placed in the
> >>file /.journal (which is similar to regular files but is unremovable
> >>under EXT3). When the EXT3 filesystem is created anew, the journal is
> >>placed on disk separately from the space used for files' data, so there
> >>is no need to reserve that space via special file entry.
> > 
> > 
> > Perfect answer, Alexey.  That is correct.  If you convert an ext2 to
> > an ext3 filesystem, the system must put the journal somewhere, so it
> > creates a ".journal" file in the root of the filesystem and puts the
> > journal there.  A freshly created ext3 filesystem reserves space OUTSIDE
> > the namespace for the journal, hence it doesn't show up in a directory
> > listing.
> > 
> > It is important that you NOT delete the ".journal" file (permissions are
> > set so it's difficult to do anyway), because if you do, you will cease
> > to have an ext3 filesystem and you may even have issues mounting it
> > since the ext3 module wants a journal and won't be able to find it.
> 
> 
> So i guess you mean that after the ext3 filesystem is created , this
> file get's deleted , so it ceases to exist . Well i mean all my filesystems
> are ext3 ones but a /.journal file is nowhere to be found

No.  If you create an ext3 filesystem from scratch ("mke2fs -j"), space
is reserved for the journal that is NOT part of the filesystem's
namespace, so you'll never see the journal.

If you CONVERT an ext2 to an ext3 ("tune2fs -j"), there is no
uncommitted space to put the journal into, so tune2fs creates a
".journal" file in the root of the filesystem and gives it permissions
that make it difficult to delete.  This is typically the "i" attribute.
See "man chattr" for details on the "i" (immutable) attribute.

----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer     rstevens at vitalstream.com -
- VitalStream, Inc.                       http://www.vitalstream.com -
-                                                                    -
----------------------------------------------------------------------




More information about the Redhat-install-list mailing list