Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Aug 2011 02:35:18 -0700
From:      perryh@pluto.rain.com
To:        conrads@cox.net
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Enabling gjournal without destroying a filesystem?
Message-ID:  <4e4e2e56.bMLoyidwVf4PG00s%perryh@pluto.rain.com>
In-Reply-To: <20110818174341.65a0859b@cox.net>
References:  <20110818174341.65a0859b@cox.net>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
"Conrad J. Sabatier" <conrads@cox.net> wrote:

> Is there any way to enable gjournal on an already existing
> filesystem without destroying it?

Yes, provided the existing filesystem is not using the last block
of its provider (partition), but you'll have to put the journal on
a separate provider from the data.  See the explanation of the -s
switch in gjournal(8) to determine the necessary size of the journal
provider, but don't specify -s in the "gjournal label" command
because the size of the journal is implicitly set by the the size
of its provider when separate from the data provider.  (-s is used
when a single provider is used for both journal and data.)  Also
read the explanation of the -f switch, but don't actually specify
-f unless you are sure you know what you're doing :)

Something like this [untested]:

  # umount [existing filesystem]
  # gjournal label [existing filesystem] [journal provider]
  # tunefs -J enable -n disable [existing filesystem].journal
  # mount -o async [existing filesystem].journal [mountpoint]

and edit /etc/fstab accordingly.



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?4e4e2e56.bMLoyidwVf4PG00s%perryh>