From owner-freebsd-geom@FreeBSD.ORG Thu Aug 28 15:17:03 2008 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 683751065678 for ; Thu, 28 Aug 2008 15:17:03 +0000 (UTC) (envelope-from sonic2000gr@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.157]) by mx1.freebsd.org (Postfix) with ESMTP id E99A18FC22 for ; Thu, 28 Aug 2008 15:17:02 +0000 (UTC) (envelope-from sonic2000gr@gmail.com) Received: by fg-out-1718.google.com with SMTP id l26so315456fgb.35 for ; Thu, 28 Aug 2008 08:17:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=bdUEcSnnnq8mz97oo6fHZpJrkEWJOC8sahOX9RdOafk=; b=vPIQjR9re6r728z0ZFM7ZNm4GEtTlmetldU4ahDgVuW6JqK/SQ73Rdv1ekyX7hb+IV L+0Eu8SNkFBeLDCX7u496oJqxlraJtoiK/BZlWYufdB4vRSSleMHvtHJt8IMxHDXRxsu WToyIRxsZrFPbLhII34buP1W8KZxP5b4lCZNo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=wmEV2ey30l3/EPZqra608wKvV7G7peinPH2UcrzPxFD9BXEPT8bGm7P5eexnTgQSUn p/Og7s84wP2Raug4PFhIRw04vGB4U7r4TmjZG2sCX+IxC7sDorSw39jIfxytfPfC3bCy iLOw21Xx5edbqiwr168Jxc0HiNjFl4hGkfs18= Received: by 10.180.240.10 with SMTP id n10mr2232425bkh.69.1219934675923; Thu, 28 Aug 2008 07:44:35 -0700 (PDT) Received: from atlantis.dyndns.org ( [87.203.65.104]) by mx.google.com with ESMTPS id 12sm845974fks.9.2008.08.28.07.44.34 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 28 Aug 2008 07:44:35 -0700 (PDT) Message-ID: <48B6B9D0.8060302@gmail.com> Date: Thu, 28 Aug 2008 17:44:32 +0300 From: Manolis Kiagias User-Agent: Thunderbird 2.0.0.14 (X11/20080703) MIME-Version: 1.0 To: Brian McCann References: <2b5f066d0808280705y3454c188v768efe46b388864b@mail.gmail.com> In-Reply-To: <2b5f066d0808280705y3454c188v768efe46b388864b@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions , freebsd-geom@freebsd.org Subject: Re: gjournal & fsck 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, 28 Aug 2008 15:17:03 -0000 Brian McCann wrote: > Hi all. I'm having some problems with several servers I've built > recently (7.0-RELEASE) that are using gjournal. I had two reboot a > few days ago (un-related to FreeBSD problems I think)...but when they > came back up, the file systems wouldn't mount since they were not > clean. Now, I understand that UFS knows nothing about the fact that > it's journaled, and the journaling knows nothing about UFS...but it's > my understanding that by using gjournal, you should really never need > to fsck a file system. However, the only way to get them to mount is > by doing the fsck. Is there something else I should be doing instead > of fsck? > > And since I know it will probably come up, I built the file systems > using the instructions and notes at > http://www.freebsd.org/cgi/man.cgi?query=gjournal&apropos=0&sektion=0&manpath=FreeBSD+7.0-RELEASE&format=html. > > Any help would be greatly appreciated! > Thanks! > --Brian > > You may wish to have a look at this article: http://www.freebsd.org/doc/en_US.ISO8859-1/articles/gjournal-desktop In particular, you should make sure you use tunefs to enable Journaling and disable soft update on the journaled filesystems, i.e.: tunefs -J enable -n disable /dev/ad0s1f.journal Mount them using the async option: /dev/ad0s1f.journal /usr ufs rw,async 2 2 Note that the pass # still indicates the filesystem should be checked. While I was writing the article, I was trying several scenarios were I had the pass # set to 0, thinking that a gjournaled filesystem would not need fsck at all. I would then press the reset button. In most cases, the system would refuse to mount them. However with the pass # set, the fsck would finish almost immediately, since the actual consistency check takes place when the gjournal module is loaded (you will get a "journal consistent" after a bad reboot) and before fstab is even parsed. All fsck does in this case is simply confirm to the system it is a clean volume. In short, leaving the pass # to something that would cause an fsck is the safe way to go. The fsck will be almost instant anyway.