gjournal questions and observations

Pawel Jakub Dawidek pjd at FreeBSD.org
Tue Nov 10 19:02:20 UTC 2009


On Sat, Nov 07, 2009 at 10:56:29PM -0600, Ross Gohlke wrote:
> KUDOS
> Congratulations to all GEOM contributors. While I am new to GEOM, so far 
> I am very impressed with the way it is designed and the capabilities 
> (both realized and anticipated) the design offers.
> 
> QUESTIONS
> 1. What is the best way to journal whole disks whose slices (without 
> partitions) are used by gconcat and gmirror? Does the same apply for gvinum?
> The ultimate scenario seems to be journaling another GEOM class such as 
> gmirror because gjournal handles the synchronization of all mirror 
> consumers. You can turn off autosync on the mirror, thus saving CPU 
> cycles and improving disk access. (Am I right?)

You should always gjournal top-most provider, so you always put UFS on
top of <name>.journal provider. Don't do anything with <name>.journal
besides of file system configuration.

> 2. How should gjournal and gmirror be configured when the journal is 
> outside, instead of inside, the mirror?
> The above scenario only seems possible if a) you are willing to journal 
> slices, which is not best practice [1] [2] or b) you use whole disks in 
> your mirrors, which is not very realistic.
> Further I am on PowerPC and don't even have bsdlabel, so journaling 
> slices and mirroring partitions is not an option anyway.
> My thought was to journal each disk separately, outside the mirror, and 
> keep autosynchronization on for the mirror.
> 
> [1] 
> http://lists.freebsd.org/pipermail/freebsd-questions/2008-April/173501.html
> [2] 
> http://unix.derkeiler.com/Mailing-Lists/FreeBSD/questions/2008-11/msg00247.html

See above.

You can safely gmirror disks, slices or partition and put gjournal on
top of gmirror and file system on top of gjournal.

> 3. What is the best way to completely remove a whole disk journal such 
> that re-issuing
> % gjournal label /dev/ad0
> does not require -f?
> I have tried gpart destroy/create and newfs -E. I have not tried 
> blanking the whole disk with dd, nor have I tried newfs -E on the whole 
> disk.

gjournal stop <name>.journal (or <name>); gjournal clear <name>

> 4. Does it matter whether gjournal is loaded when gjournal label is issued?
> Originally I was journaling slices, and I was unable to properly stop a 
> particular slice.
> % gjournal stop ad0s6.journal
> % gjournal list
> Showed the slice still loaded, but under a different name:
> ie, ufsid/48x6x1bxc39394x7

You provider is accessible by few different names. This ufsid/ thing
(which I don't like) is one of them. Once you stop gjournal on one name
it is recreated using another name. Besides of using -h option to
gjournal label and hardcoding provider name there is not much we can do.

> While gjournal man page states journaling an existing file system 
> REQUIRES a separate device for storing the journal, it appears to work 
> without specifying a second device. At least
> % gjournal label -f /dev/ad0
> seems to work, using the end of /dev/ad0 to store the journal whether a 
>  slice occupies those sectors or not. (Consequently, trying to gmirror 
> the last slice when it occupies journal sectors will fail.)

It will eventually work until your UFS will start to use space gjournal
is using for journal. Absolutely don't do that. Its like creating 4GB
file system on 3GB provider - at some point you will need the missing
1GB..

-- 
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd at FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-geom/attachments/20091110/a07a404b/attachment.pgp


More information about the freebsd-geom mailing list