From owner-freebsd-geom@FreeBSD.ORG Sun Nov 8 05:14:36 2009 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 81CB6106568B for ; Sun, 8 Nov 2009 05:14:36 +0000 (UTC) (envelope-from ross@grinz.com) Received: from mail.boomhaus.com (emerson.grinz.com [64.219.233.251]) by mx1.freebsd.org (Postfix) with ESMTP id 577108FC08 for ; Sun, 8 Nov 2009 05:14:36 +0000 (UTC) Received: from [192.168.2.2] (cpe-66-25-201-82.sw.res.rr.com [66.25.201.82]) by mail.boomhaus.com (Postfix) with ESMTPSA id 726B713504 for ; Sat, 7 Nov 2009 22:33:17 -0600 (CST) Message-ID: <4AF64F7D.8020802@grinz.com> Date: Sat, 07 Nov 2009 22:56:29 -0600 From: Ross Gohlke User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090707) MIME-Version: 1.0 To: freebsd-geom@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: gjournal questions and observations X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Nov 2009 05:14:36 -0000 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?) 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 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. 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 I don't know if it was related to the originally issued gjournal label command or that gjournal was loaded before the slice was labeled. I believe what fixed it was: % dd if=/dev/zero of=/dev/ad0s6 OBSERVATIONS GJOURNAL These may seem obvious to you but were hard won by me. 1. Never try to store a whole disk's journal on a slice of the same disk. 2. When journaling a whole disk and keeping the journal on the same disk, not only must the very last sector of the disk be reserved, but also the last gig (or whatever the size of your journal). Just leave it as free space when you create slices with gpart. 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.) Regards, Ross Gohlke