Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Jan 2007 08:03:07 -0600
From:      Eric Anderson <anderson@freebsd.org>
To:        Oliver Fromme <olli@lurza.secnetix.de>
Cc:        vd@freebsd.org, silby@silby.com, xride@x12.dk, freebsd-geom@freebsd.org
Subject:   Re: Where to start?
Message-ID:  <45B6159B.8050703@freebsd.org>
In-Reply-To: <200701231010.l0NAAcp6017303@lurza.secnetix.de>
References:  <200701231010.l0NAAcp6017303@lurza.secnetix.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On 01/23/07 04:10, Oliver Fromme wrote:
> Vasil Dimov wrote:
>  > [discussion moved from freebsd-hackers@ to freebsd-geom@]
>  > Oliver Fromme wrote:
>  > > Vasil Dimov wrote:
>  > > > Mike Silbersack wrote:
>  > > > > Soeren Straarup wrote:
>  > > > > [...]
>  > > > > > I'm looking for a project.
>  > > > > [...]
>  > > > > I'd like to see the ability to run gjournal without reformatting.
>  > > > > If you could create a dummy file inside the filesystem, then use
>  > > > > that area for the journal, it might be possible.  I'm sure that
>  > > > > would let a lot more people see if journalling is right for them.
>  > > > 
>  > > > I am not sure about gjournal internals but what if a system crash
>  > > > occurs in the middle of a transaction and the fs gets corrupted and
>  > > > the data, necessary to fix it is in the journal, but you cannot
>  > > > access the journal because the file, which contains the journal,
>  > > > is on a corrupted fs?
>  > > 
>  > > I think you should still be able to mount the file system
>  > > read-only, even if it's not "clean", so there's no problem
>  > > locating the journal file.  Particularly, note that the
>  > > journal file should probably be located in the root of the
>  > > file system, and it will have a constant size and should
>  > > be allocated from the start (i.e. it never grows nor
>  > > changes allocation), which means there is no way that its
>  > > meta data could be damaged.
>  > [...]
>  > 
>  > With gjournal not only the metadata is journaled but also the actual
>  > data (e.g. files' contents). So writes to the journal file (which is a
>  > "regular file" on the FS) should bypass the journaling stuff. Otherwise
>  > they will get journaled themselves and it will end up in an endless
>  > loop.
> 
> Right.  That's a point I forgot.  The journal file would
> be required to have its data be exempt from being journaled.
> That's probably not trivial to implement, I'm afraid (but
> I could be wrong).
> 
>  > This thing still looks to me like roping your chest to your leg (instead
>  > of to an unmovable object) in order to avoid falling, but I might be
>  > wrong...
> 
> True, it's certainly not a clean nor efficient solution.
> But Mike has a valid point that it would enable people to
> turn on journaling on existing file systems, without the
> need for repartitioning or adding a disk.  It would be a
> nice way to _quickly_ set up journaling, for testing
> purposes, or simply for curiosity.

Why not disable swap, use the swap partition as the new journaling 
device, and then enable vn-backed swap for the system?


> BTW, I think in Solaris you can also add journaling to an
> existing UFS partition on the fly, without the need for
> newfs or adding space.  (Provided that there is enough
> free space inside the existing file system, of course.)

Sure - many journaling fs have that ability.  There's been several 
attempts in the past to add journaling to our UFS2, without completion.


Eric






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45B6159B.8050703>