setup journaling for root partition

s m sam.gh1986 at
Thu May 23 05:53:49 UTC 2013

thanks Michael for your quick reply:)
yes, i can boot from usb freebsd flash and use fixit mode.
i have root, var, tmp, usr and swap on my system. i create an extra swap
partition to use it as journal provider for root partition.

in fixit mode, first i run two below command in order to abel load gjournal:

ln -s /dist/lib /lib
ls -s /dist/boot/kernel /boot/modules

"gjournal load"

and after that: "gjournal label -f ad3s1a ad3s1g" (ad3s1a is root partition
and ad3s1g is swap partition for journal provider)

but this error is shown:
"gjournal cannot clear metadata on ad3s1a: operation not permitted"
what is wrong here??? i really don't know how to fix it:((((

On Thu, May 23, 2013 at 10:12 AM, Michael Sierchio <kudzu at>wrote:

> On Wed, May 22, 2013 at 10:27 PM, s m <sam.gh1986 at> wrote:
>> thanks Michael, but in all documentation about journaling, tunefs is used
>> as below: "tunefs -J enable ad3s1X.journal". ad3s1X.journal is created by
>> gjournal command: "gjournal label ad3s1a ad3s1g" that assign ad3s1g as
>> journal provider for ad3s1a and create ad3s1a.journal which contains ad3s1a
>> as data provider and ad3s1g as journal provider.
>> my problem is, i can not run gjournal command for root partition in fixit
>> mode nor single user mode. you mean, i should just use tunefs command on
>> ad3s1X (root partition)? if yes, then where journal provider for root
>> partition is located? in root partition?
> Ah, sorry -  lack of careful reading on my part.  Can you boot from
> installation media and use the fixit mode?  This still won't work if the
> last sector of the partition is in use by the filesystem....  You'll need a
> spare partition of some size to be the journal provider, as in the example.
> The very best approach is to create a gjournal and then newfs.  How is
> your disk organized?  One big root partition with everything on it?
> - M

More information about the freebsd-questions mailing list