From owner-freebsd-questions@FreeBSD.ORG Tue Nov 4 15:43:07 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 784FF1065670 for ; Tue, 4 Nov 2008 15:43:07 +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 EC71F8FC16 for ; Tue, 4 Nov 2008 15:43:06 +0000 (UTC) (envelope-from freebsd-questions@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1KxO3b-0006DY-Ji for freebsd-questions@freebsd.org; Tue, 04 Nov 2008 15:43:03 +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, 04 Nov 2008 15:43:03 +0000 Received: from c.kworr by utwig.xim.bz with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 04 Nov 2008 15:43:03 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-questions@freebsd.org From: Volodymyr Kostyrko Date: Tue, 04 Nov 2008 17:42:50 +0200 Lines: 135 Message-ID: References: <48FD6665.5000102@telus.net> <48FD6803.7080802@shopzeus.com> <48FE6C64.7060606@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: <48FE6C64.7060606@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, 04 Nov 2008 15:43:07 -0000 Carl wrote: > Volodymyr Kostyrko wrote: > >> 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 > > Does the above suggest that you've ended up with individual journal > providers for each partition anyway? If so, where are they and have you > really achieved anything functionally different? Are they at the end of > their individually associated partitions or all together somewhere else? > Has the ill-advised journaled small partition issue been successfully > overcome through what you've done? First, there is only one journal - for /dev/mirror/umgah0 and it is named /dev/mirror/umgah0.journal. Anything else is just a bsdlabel partitions, there are four of 'em. > >> [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. > > And what does this mean for your swap partition? Just nothing, it's just swap. It can't be journaled. > Laszlo Nagy wrote earlier: >> Another tricky question: why would you journal a SWAP partition? > > Volodymyr, does your assertion that gjournal does nothing when a file > system is not UFS mean that there is no penalty with regard to your swap > partition despite the existence of "mirror/umgah0.journalb"? I haven't seen any perfomance decrease in this configuration. And according to manual and articles about gjournal it should work this way. > Any chance you'd like to share your command sequence for constructing > your gmirror'd and gjournal'd filesystem, Volodymyr? :-) If we have two disks (ad0, ad1) it should look like this: > gmirror label -b load -n umgah0 ad1 We are getting all drive gmirrored without synchronization (we don't need it - journal would take care of any discrepancies) and with load balance (load was fixed not so long ago in stable and should be fine to go with). > gjournal label mirror/umgah0 We are creating a journal on top of our gmirror. It eats 1G from the end of the disks and gives us the rest to use. > bsdlabel -wB mirror/umgah0.journal We are writing the standard bsdlabel to the disk and making it bootable. After that we will get one partition 'a'. Yes, no fdisk. I don't think this old piece of rough junk is ever needed on machine running FreeBSD solely. It just takes space, it requires compatibility to forgotten-and-abandoned standards and gives nothing more. You have your server dual-booting Windows or Linux? This is the only case you need fdisk for. > bsdlabel -e mirror/umgah0.journal Now we are splitting our journal to some partitions. I did it this way: # /dev/mirror/umgah0.journal: 8 partitions: # size offset fstype [fsize bsize bps/cpg] a: 524288 16 4.2BSD b: 16777216 * swap c: 779325614 0 unused 0 0 # "raw" part, don't edit d: 33554432 * 4.2BSD e: * * 4.2BSD After that we can format this filesystems: > newfs -J -L umgah0root /dev/mirror/umgah0.journala > newfs -J -L umgah0var /dev/mirror/umgah0.journald > newfs -J -L umgah0usr /dev/mirror/umgah0.journale And label the swap: > glabel label umgah0swap /dev/mirror/umgah0.journalb You can skip all this glabel thing, I just prefer to have slim fstab, as slim as possible. /dev/label/umgah0swap none swap sw 0 0 md /tmp mfs rw,-s1024m,-S,-oasync 0 0 /dev/ufs/umgah0root / ufs rw,async,noatime 0 1 /dev/ufs/umgah0var /var ufs rw,async,noatime 0 2 /dev/ufs/umgah0usr /usr ufs rw,async,noatime 0 2 There's a lot more here to describe from moving system to newly created partitions to inserting and rebuilding our first disk to gmirror. All this issues are described in handbook or other articles found on the net. -- Sphinx of black quartz judge my vow.