From owner-freebsd-questions@FreeBSD.ORG Tue Oct 21 09:37:31 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F1821065672 for ; Tue, 21 Oct 2008 09:37:31 +0000 (UTC) (envelope-from freebsd-questions@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id B2C4E8FC0A for ; Tue, 21 Oct 2008 09:37:30 +0000 (UTC) (envelope-from freebsd-questions@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1KsDg8-0001TX-32 for freebsd-questions@freebsd.org; Tue, 21 Oct 2008 09:37:28 +0000 Received: from utwig.xim.bz ([195.184.197.130]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 21 Oct 2008 09:37:28 +0000 Received: from c.kworr by utwig.xim.bz with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 21 Oct 2008 09:37:28 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-questions@freebsd.org From: Volodymyr Kostyrko Date: Tue, 21 Oct 2008 12:37:19 +0300 Lines: 62 Message-ID: References: <48FD6665.5000102@telus.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: utwig.xim.bz User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; ru-RU; rv:1.8.1.17) Gecko/20081001 SeaMonkey/1.1.12 In-Reply-To: <48FD6665.5000102@telus.net> Sender: news Subject: Re: gjournal: journaled slices vs. journaled partitions X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Oct 2008 09:37:31 -0000 Carl wrote: > My goal is to build a 2-disk server configured with gmirror and gjournal > for maximum reliability. There will never be a second operating system > on the system, but I prefer not to freak out any non-FreeBSD repair > tools that might be used, so I will use compatibility instead of > dangerously dedicated mode. This means I need one slice, but see no > reason for more. Inside that one slice will be the usual array of > partitions (ie. /, swap, /var, /tmp, /usr, /data). > > Now, I think gmirror allows me to mirror the entire drive rather than > forcing me to do per-slice or even per-partition mirroring. I'm looking > for the simplest in-field replacement procedure when one of the drives > dies and I imagine a whole drive mirror achieves this. Am I right? > > gjournal, OTOH, has me really confused. The man page for gjournal(8) > specifically does not recommend that small partitions be journaled. I > assume that's because the journal provider rivals the partition in size > and is therefore overhead heavy. It seems to me, though, that if I can > journal the slice as a whole instead of per-partition journaling, that > there will essentially then be only one journal provider for the > combination of all partitions (ie. slice) and that the aforementioned > overhead becomes minor. Having smaller partitions included in journaling > seems like a good thing to me. So how do I achieve per-slice journaling > instead of per-partition? Every time I read up on someone else's > gjournal implementation, it seems to end with adding .journal > entries to /etc/fstab. Am I trying to achieve the impossible or > ill-advised here? I have some setups were gjournal was put on device rather the on partition, i.e.: [umgah] ~> gmirror status Name Status Components mirror/umgah0 COMPLETE ad0 ad1 [umgah] ~> gjournal status Name Status Components mirror/umgah0.journal N/A mirror/umgah0 [umgah] ~> glabel status Name Status Components ufs/umgah0root N/A mirror/umgah0.journala label/umgah0swap N/A mirror/umgah0.journalb ufs/umgah0usr N/A mirror/umgah0.journald ufs/umgah0var N/A mirror/umgah0.journale [umgah] ~> mount /dev/ufs/umgah0root on / (ufs, asynchronous, local, noatime, gjournal) devfs on /dev (devfs, local) /dev/md0 on /tmp (ufs, asynchronous, local) /dev/ufs/umgah0var on /var (ufs, asynchronous, local, noatime, gjournal) /dev/ufs/umgah0usr on /usr (ufs, asynchronous, local, noatime, gjournal) devfs on /var/named/dev (devfs, local) And yes, mirror autosynchronization is turned off, gjournal takes care of that too. It's not stated in manual, but gjournal is typically transparent for any type of access, just in case of UFS file system is marked as journaled so any metadata writes can be distinguished from data writes. Without that gjournal does literally nothing. -- Sphinx of black quartz judge my vow.