Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Jan 2007 19:57:22 +0100
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        John Nielsen <lists@jnielsen.net>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Best practices for using gjournal with gmirror?
Message-ID:  <20070112185722.GA90718@garage.freebsd.pl>
In-Reply-To: <200701102321.01562.lists@jnielsen.net>
References:  <200701102321.01562.lists@jnielsen.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--2fHTh5uZTiUOsy+g
Content-Type: text/plain; charset=iso-8859-2
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Jan 10, 2007 at 11:21:01PM -0500, John Nielsen wrote:
> I have a few questions for pjd (or anyone else) about using gjournal,=20
> particularly when used with gmirror.
>=20
> 1) I'm running 6-STABLE and plan to test with gjournal6_20061030.patch (f=
rom=20
> the mailing list; updated version of 20061024 that applies cleanly). Is=
=20
> there a better/newer version for -STABLE that I should use instead?

There probably should be a newer version as there were some minor
changes after I committed the code to HEAD. I'll try to create a new
patch during the weekend.

> 2) When using gjournal and for a gmirror volume, does the journal need to=
 be=20
> mirrored as well to maintain redundancy? If so, when storing the journal =
on=20
> the same physical disks as the mirror, is it better to mirror at the slic=
e=20
> level (journal and fs on different partitions in the same mirror) or at t=
he=20
> partition level (journal and fs each have their own mirror) or does it=20
> matter?

The problem with mirroring each partition/slice separately is that when
you have a crash, on boot, gmirror will start to rebuild all partitions
at once, which may be problematic. On the other hand, when you mirror
each partition/slice separately, and some partitions weren't modified in
last few seconds before the crash, gmirror will not resync them on boot,
so not entire disk will be synchronized.

When you run gjournal on top of gmirror/graid3 there is no need for
resync after a crash, so bascially all cons against mirroring the whole
disks and against mirroring partitions are no longer true. Both
configurations will work the same. In that case I'd suggest mirroring
the whole disks, because when one of your disks dies, you may just
replace it and be down with it. If you mirror partitions separately, you
first have to create partitions and insert each of them into their
mirrors, which is more complex than simple 'gmirror insert foo newdisk'.

> 3) I remember reading where pjd said that gjournal plus gmirror or graid3=
=20
> would eliminate the need to re-sync the array after a crash. While clearl=
y=20
> a design goal, is that actually the case with the version of the patch=20
> mentioned above? If so, are any config changes needed or will it just=20
> happen automagically?

No, you need to:

	# gmirror configure -F <mirror_name>

> 4) In the same vein as 3)--does a gjournal volume need to be fsck'ed afte=
r a=20
> crash? If not, will it just work (e.g. fsck -p sees that the filesystem i=
s=20
> clean) or does it need to be disabled somehow?

Gjournaled file system has to be fscked, but only to handle orphaned
files. Such fsck on multiterabyte provider takes seconds, not hours.

> 5) Finally, how dangerous is this code? I realize it's experimental and o=
nly=20
> plan to use it with data that has recent backups, but how much should I=
=20
> worry about it blowing up my system or corrupting my files?

I'm using it in production, my customer using it in production on large
number of FreeBSD servers and I also have heard already many success
stories, BUT I still consider the code to be experimental.

--=20
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd@FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!

--2fHTh5uZTiUOsy+g
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (FreeBSD)

iD8DBQFFp9oSForvXbEpPzQRAv89AJ4u9p5zh+63oPL2yUJ9lCTAtId/GgCg0MQd
2wZV3Qy5cK7UjiDtCz9wcNs=
=M3O6
-----END PGP SIGNATURE-----

--2fHTh5uZTiUOsy+g--



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