Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 01 Sep 2011 18:06:21 +0200
From:      "Hartmann, O." <ohartman@zedat.fu-berlin.de>
To:        Ian FREISLICH <ianf@clue.co.za>
Cc:        Garrett Cooper <yanegomi@gmail.com>, Niclas Zeising <niclas.zeising@gmail.com>, freebsd-current <freebsd-current@freebsd.org>
Subject:   Re: howto: enabling journaling on softupdates
Message-ID:  <4E5FAD7D.9030608@zedat.fu-berlin.de>
In-Reply-To: <E1Qz5Pj-0000ZA-TB@clue.co.za>
References:  <4E5F65CC.1090200@gmail.com> <4E5E70AF.2080806@zedat.fu-berlin.de> <CAGH67wR_MJY1pq23t%2BPLbNJq08o=wSJZ493AW_YRe_n45qDQ0A@mail.gmail.com> <4E5E773E.4050806@zedat.fu-berlin.de> <E1Qz5Pj-0000ZA-TB@clue.co.za>

next in thread | previous in thread | raw e-mail | index | archive | help
On 09/01/11 13:26, Ian FREISLICH wrote:
> Niclas Zeising wrote:
>> Can you please detail a little more the steps you took to enable SU+J
>> and your experience with it? It sounds like a good start for a howto or
>> an inclusion in the handbook.
> It's really simple...
>
> You need a kernel compiled with
> options         SOFTUPDATES             # Enable FFS soft updates support
>
> In single-user mode or unmounted filesystems:
>
> tunefs -j enable<device>
>
> Ian
>
Yes, it is really "THAT SIMPLE". But after enabling SU+J, I ran a "fsck" 
on the filesystem in
question and I was asked wether I want to enable journaling and I had to 
type either
n for NO or y for YES. One can avoid this by issuing "fsck -y". This is 
for selective
enabling SU+J. If your're about to enable a bunch of filesystems, boot 
box in in singleuser,
then type "tunefs -j enable /dev/gpt/blabla or whatever your partition 
in question is
located at or simply the last mountpoint referred to in /etc/fstab.After 
having done this, issuing
the command "fsck -y" performs a filsesystem check and enables SU+J. It 
is assumed, that suoftupdates are
configured in the kernel via "options SOFTUPDATES", which is at least 
default in FreeBSD's
GENERIC kernel config file for FreeBSD 9.0 and 8.2, as far as I know. 
And it is assumed that the
filesystem in question on which you are about to enable 
softupdates-journaling already has
softupdates enabled. If this isn't the case, perform all the steps above 
execpt issuing the tunefs-command sequence as follows: tunefs -n enable 
-j enable /dev/gpart/fsystem (/dev/gpt/ is used in my case since I 
switched on UFS2 filesystems to
GPT partition tables). Beware! when reading the
man page of tunefs, the first option for journaling that comes to your 
field of view is
the capitalized "-J" which stands for journaling via GEOM/GJOURNAL, 
another method.
Scroll further and you'll pick up the lower letter "-j", which is the 
option we are talking
about here. It is a little bit confusing for the first approach).

Once done, you can force on a non-important, big filesystem a crash. I 
switched of one
of my server boxes with a 3 TB harddrive for test purposes and was 
amazed how fast, compared to
unjournaled UFS2, the fsck now is performed.
Since *BSDs UFS2/FFS filesystem is still, even for large 
disks/partitons, a competetive filesystem
and still a slightly better performing filesystem compared to ZFS and 
its memory consumption,
this efford is really worth "a must have". I'm simply overwealmed at 
this moment by this little pieces of
more security and performance (in case of a crash on / and large 
partitions). A small piece, a great effect - I think.
maybe naiv thinking, but who cares. Thanks to those who gave this pieces 
of bonbon to the community.

Oliver



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4E5FAD7D.9030608>