From owner-freebsd-geom@FreeBSD.ORG Thu Aug 10 22:54:11 2006 Return-Path: X-Original-To: freebsd-geom@freebsd.org Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1B03016A51F for ; Thu, 10 Aug 2006 22:54:11 +0000 (UTC) (envelope-from bryants@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7121843D6E for ; Thu, 10 Aug 2006 22:54:05 +0000 (GMT) (envelope-from bryants@gmail.com) Received: by py-out-1112.google.com with SMTP id c59so1100709pyc for ; Thu, 10 Aug 2006 15:54:04 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=XVLRl63MpCDcXhrAo2IXweB0uQ23Eq8vTxJoeYXJi8y0rijMTg3WPty1Yy6pkrkfjBL+HEvp/AJl1sK5su04zvFblsAGicyluLRXfRCGxsnRsHZJCvnpRsIaiGOPeJat0vbbRt13dibUrK/AjwdXdP3O7rHQeb2FOGwY7sugoa8= Received: by 10.65.211.16 with SMTP id n16mr3224631qbq; Thu, 10 Aug 2006 15:54:04 -0700 (PDT) Received: by 10.65.20.2 with HTTP; Thu, 10 Aug 2006 15:54:04 -0700 (PDT) Message-ID: Date: Thu, 10 Aug 2006 18:54:04 -0400 From: "Sean Bryant" To: "Pawel Jakub Dawidek" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20060808195202.GA1564@garage.freebsd.pl> Cc: freebsd-fs@freebsd.org, freebsd-current@freebsd.org, freebsd-geom@freebsd.org Subject: Re: GJournal (hopefully) final patches. 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: Thu, 10 Aug 2006 22:54:11 -0000 On 8/10/06, Sean Bryant wrote: > On 8/8/06, Pawel Jakub Dawidek wrote: > > Hi. > > > > I'm pleased to announce hopefully the final gjournal patches. > > > > The biggest change is removal of magic .deleted/ directory. Now orphaned > > objects (files/directories which were deleted, but are still open) are > > handled in a different way - in every CG there is a counter which tells > > how many such orphaned objects are there in the given CG. There is also > > a global unreferenced inodes counter in the superblock. > > > > On power failure or system crash, fast fsck version will be run on > > journaled file system which only checks CG for unreferenced inodes. > > Multi terabyte file system is checked in few minutes, but it depends on > > how many such objects we have. The global counter in the superblock > > allows to stop scanning CGs when it goes to 0. > > > > Another change is that now from a configuration point of view gjournal > > is threated simlar to soft-updates - you need to specify -J flag at > > newfs(8) time or use 'tunefs -J enable '. 'gjournal' is no longer > > a mount option. > > > > To create journaled UFS file system on ad0s1d partition: > > > > # gjournal load > > # gjournal label ad0s1d > > # newfs -J /dev/ad0s1d.journal > > # mount -o noatime,async /dev/ad0s1d.journal /mnt > > > > On reboot 'fsck_ffs -p /dev/ad0s1d.journal' will perform fast check. One > > can still run regular check by not giving the -p option. > > > > BTW. This should allow to have root file system on gjournal partition, > > but haven't verified it yet - just a theory. > > > > Patches for 7-CURRENT: > > > > http://people.freebsd.org/~pjd/patches/gjournal_20060808.patch > > > > Patches for 6-STABLE: > > > > http://people.freebsd.org/~pjd/patches/gjournal6_20060808.patch > > > > To apply the patches: > > > > # cd /usr/src > > # mkdir sys/geom/journal sbin/geom/class/journal sys/modules/geom/geom_journal > > # patch < gjournal_20060808.patch > > > > Now you need to recompile the world and the kernel. Remember to add > > 'options UFS_GJOURNAL' to your kernel configuration file. > > > > If there will be no bug reports nor strong objections, I'd like commit > > gjournal in a week or two first to 7-CURRENT and then to 6-STABLE (maybe > > before 6.2-RELEASE, but it depends on testing and feedback from users). > > > > Enjoy! > > > > -- > > Pawel Jakub Dawidek http://www.wheel.pl > > pjd@FreeBSD.org http://www.FreeBSD.org > > FreeBSD committer Am I Evil? Yes, I Am! > > > > > > > > Okay I have applied the latest patches. And everything works fine on a > new filesystem (newfsing). > > Trying to add it to an existing file system I'm getting problems. This > might be my fault. So I'll give it another go before reporting back my > problems. > > -- > Sean Bryant > Alright. After testing I've found the problem. You can enable journaling on an existing filesystem, provided the journaling provider is not the data provider. I could not do the following: tunefs -J enable ad4s1e gjournal label ad4s1e fsck_ffs -p ad4s1e I would get cannot read BLK XXXX. And various other problems. I don't see where you've actually stated this. I did have much success with the following: tunefs -j enable ad4s1e gjournal label ad4s1e ad6 (which is an used volume) fsck_ffs -p ad4s1e.journal I should note I tried this in a varity of ways. With only the previous resulting in a success existing filesystem using gjournal. During each of the trials I would set the configuration back to the original before attemping any more experimenation. Results: [failed] tunefs -J enable ad4s1e gjournal label ad4s1e fsck_ffs -p ad4s1e // failed [failed] gjournal label ad4s1e tunefs -J enable ad4s1e fsck_ffs -p ad4s1e // failed [failed] gjournal label ad4s1e tunefs -J enable ad4s1e.journal fsck_ffs -p ad4s1e // falied [passes and verified] tunefs -j enable ad4s1e gjournal label ad4s1e ad6 -- Sean Bryant