Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Jun 2006 10:57:52 +0200 (CEST)
From:      Oliver Fromme <olli@lurza.secnetix.de>
To:        freebsd-fs@FreeBSD.ORG
Subject:   Re: Journaling UFS with gjournal.
Message-ID:  <200606200857.k5K8vqh9052501@lurza.secnetix.de>
In-Reply-To: <freebsd-fs.4496EDB2.5040706@cytexbg.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Niki Denev <nike_d@cytexbg.com> wrote:
 > [long quote snipped]
 > I wonder if it's possible to use gjournal on
 > existing file system with the journal on a vnode/(swap?) backed md(4) device?
 > (i want to test on a existing installation without free unpartitioned space)

I think it should be possible.  First umount the file
system, then create an md(4) device with mdconfig(8),
then specify the /dev/md* device as the journal provider
to gjournal, and finally mount the file system again
with the "gjournal" option.

However, note that you should use a vnode-backed md(4)
device only.  If you use a malloc(9)-backed or swap-
backed one, you will lose the journal upon a crash or
power failure, defeating the whole purpose of gjournal.

It is probably a good idea to put the backing file for
the md(4) device on a different file system than the
one being journaled.

 > And if it is possible, how can i do this for the root filesystem? i'll need the md(4)
 > device before mounting of the root fs which seems hard/impossible?
 > What's going to happen if my root mount is gjournal labeled and has gjournal option in
 > fstab but at boot time the journal GEOM provider does not exist?

I guess that doesn't currently work, but it shouldn't
be too difficult to implement.  Pawel, please correct
me if I'm wrong.

 - First, the kernel mounts the root file system read-
   only, which should always work, no matter if it is
   dirty or clean, or if it was gjournalled before or
   not.
 - Then -- as usual -- the kernel starts /sbin/init
   which runs /etc/rc (assuming going multi-user mode),
   which starts the rcNG framework.
 - In the course of performing the rcNG stuff, an md(4)
   device for the gjournal has to be configured (just
   similar to the way md(4) devices are configured for
   /tmp and other such file systems).
 - After that, the root file system is re-mounted (-u)
   with the gjournal and read-write options.

With proper rcNG ordering it should work fine.

 > When finished, this will certainly make FreeBSD much more competitive :)

Definitely.

Best regards
   Oliver

-- 
Oliver Fromme,  secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing
Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

One Unix to rule them all, One Resolver to find them,
One IP to bring them all and in the zone to bind them.



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