You are not logged in.

#1 2009-01-07 18:07:57

big_gie
Member
Registered: 2005-01-19
Posts: 637

ext4 without journal?

Hi, is it possible to have ext4 fs without a journal on it? I'd like to replace ext2 on my SSD with it.
Thanx

Offline

#2 2009-01-07 18:14:46

defrysk
Member
From: Barrie, Ontario
Registered: 2008-12-15
Posts: 42
Website

Re: ext4 without journal?

ext3 and ext 4 are journaled file systems, without journal its ext2.  cool

Offline

#3 2009-01-07 18:18:32

big_gie
Member
Registered: 2005-01-19
Posts: 637

Re: ext4 without journal?

Well the main (maybe even only?) advantage of ext3 over ext2 is the journal. But ext4 has more "upgrades" which can be usefull.

But maybe they all depends on the journal...

Offline

#4 2009-01-07 18:49:57

Falcata
Member
From: Michiana
Registered: 2008-01-23
Posts: 501
Website

Re: ext4 without journal?

May be possible to get a low-capacity hard drive which would have all the journalling data written to a partition on it, instead of the SSD.  I don't know much about how ext3 or ext4 work though.  I just care that they DO work.

Offline

#5 2009-01-07 19:37:56

iBertus
Member
From: Greenville, NC
Registered: 2004-11-04
Posts: 2,228

Re: ext4 without journal?

Have you looked at the help/man page for mkfs.ext4? Look at the journal_dev option to place the journal on a different device.

Offline

#6 2009-01-08 15:14:13

big_gie
Member
Registered: 2005-01-19
Posts: 637

Re: ext4 without journal?

Hum... I still only have one device available: the SSD. I don't want to kill it with the journal...

Offline

#7 2009-01-08 16:02:36

andre.ramaciotti
Member
From: Brazil
Registered: 2007-04-06
Posts: 649

Re: ext4 without journal?

Maybe you can set the journal to /dev/null. I'm not sure if it'll work and how safe it is, though.


(lambda ())

Offline

#8 2009-01-08 16:23:25

D-Locked
Member
Registered: 2008-08-22
Posts: 33

Re: ext4 without journal?

big_gie wrote:

Hum... I still only have one device available: the SSD. I don't want to kill it with the journal...

How about using a USB stick / SD card for the journal? You could even use the extra space for a swap partition.

Offline

#9 2009-01-16 02:32:42

big_gie
Member
Registered: 2005-01-19
Posts: 637

Re: ext4 without journal?

I don't really need a swap... On all my machine its almost always at 0 use...

I'll try maybe to put it on a sd card...

Offline

#10 2009-01-16 02:41:47

big_gie
Member
Registered: 2005-01-19
Posts: 637

Re: ext4 without journal?

From the manpage:

man mkfs.ext4 wrote:

device=external-journal
Attach  the  filesystem  to the journal block device
located on external-journal.  The  external  journal
must already have been created using the command
    mke2fs -O journal_dev external-journal
Note  that  external-journal  must have been created
with the same block size as the new filesystem.

What does it mean? That the size should be the same? So I can't erase everything on an old 128MB SD card and put the journal of a 32GB SSD drive on it?

Offline

#11 2009-01-16 12:13:25

jacko
Member
Registered: 2007-11-23
Posts: 840

Re: ext4 without journal?

google it, but it has to do with how much space is left for each block of data on the disk. Less blocks means more data can be stored simultaneously on the disk in one spot, but if that data is less then the block size it is wasted space but will be reported as full.

there is always a sane default.

Offline

#12 2009-01-27 03:44:03

big_gie
Member
Registered: 2005-01-19
Posts: 637

Re: ext4 without journal?

http://lwn.net/Articles/313927/ wrote:

2.6.29 merge window, part 2
* It is now possible to create and run ext4 filesystems without a journal. One loses the benefits of journaling, obviously, but there is a notable increase in performance.

Wouhou!!! big_smile
Increased performances too!!! Great!!!

Offline

#13 2009-02-23 05:15:27

rsambuca
Member
From: Calgary, Canada
Registered: 2008-07-21
Posts: 143

Re: ext4 without journal?

Question:  How do you run ext4 without a journal???

I have read in many different places that ext4 without a journal is definitely possible, and also faster than ext2.  What I can't find, though, is what fstab option will run ext4 without a journal.

Offline

#14 2009-02-23 11:42:02

big_gie
Member
Registered: 2005-01-19
Posts: 637

Re: ext4 without journal?

I don't know either... I was waiting for .29 before checking that.
If I find something I'll post it here wink

Offline

#15 2009-03-13 05:25:34

Ashren
Member
From: Denmark
Registered: 2007-06-13
Posts: 1,229
Website

Re: ext4 without journal?

I'm interested in this too. Any news on how to enable?

And should we really worry? SSD Myths

Offline

#16 2009-03-13 07:20:51

dyscoria
Member
Registered: 2008-01-10
Posts: 1,007

Re: ext4 without journal?


flack 2.0.6: menu-driven BASH script to easily tag FLAC files (AUR)
knock-once 1.2: BASH script to easily create/send one-time sequences for knockd (forum/AUR)

Offline

#17 2009-03-13 10:44:00

Bogart
Member
From: Madrid, Spain
Registered: 2005-06-22
Posts: 272

Re: ext4 without journal?

It's interesting to read Ted Ts'o (the lead ext4 developer) on the subject.

Offline

#18 2009-04-01 00:44:12

big_gie
Member
Registered: 2005-01-19
Posts: 637

Re: ext4 without journal?

Interesting read indeed. On this small machine I still prefer to "risk" "loosing" data but have a faster system (and a little bit longer life smile )

Offline

#19 2009-04-15 13:57:43

big_gie
Member
Registered: 2005-01-19
Posts: 637

Re: ext4 without journal?

I can't find information on _how_ to achieve this. Everybody talks about it being possible, but nobody says how :S
I think it might be a tune2fs options:
tune2fs -O ^has_journal  /dev/sda1
Is it the best way or is there a mount options?

Offline

#20 2009-05-02 00:47:46

tcx
Member
From: Porto, Portugal
Registered: 2005-07-31
Posts: 3

Re: ext4 without journal?

big_gie wrote:

I think it might be a tune2fs options:
tune2fs -O ^has_journal  /dev/sda1
Is it the best way or is there a mount options?

It is.
You might try to edit /etc/mke2fs.conf

 $ cat /etc/mke2fs.conf 
[defaults]
    base_features = sparse_super,filetype,resize_inode,dir_index,ext_attr
    blocksize = 4096
    inode_size = 256
    inode_ratio = 16384

[fs_types]
    ext3 = {
        features = has_journal
    }
    ext4 = {
        features = has_journal,extents,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize
        inode_size = 256
    }
    ext4dev = {
        features = has_journal,extents,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize
        inode_size = 256
        options = test_fs=1
    }
    small = {
        blocksize = 1024
        inode_size = 128
        inode_ratio = 4096
    }
    floppy = {
        blocksize = 1024
        inode_size = 128
        inode_ratio = 8192
    }
    news = {
        inode_ratio = 4096
    }
    largefile = {
        inode_ratio = 1048576
        blocksize = -1
    }
    largefile4 = {
        inode_ratio = 4194304
        blocksize = -1
    }
    hurd = {
         blocksize = 4096
         inode_size = 128
    }

and add someting like

    ext4ssd = {
        features = extents,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize
        inode_size = 256
    }

and create then a new filesystem.
To tune an existing one your option is the best.
Still take this advice, do not put auto as fs_type in fstab for that filesystem.
As of 2.6.29 the kernel is not able to recognize an ext4 superblock without journal as an ext4 type for auto fs_type purposes.
Apart from that just tune the fs as you said and use it.
And yes, it works like wonders.

Offline

#21 2009-05-02 04:20:52

big_gie
Member
Registered: 2005-01-19
Posts: 637

Re: ext4 without journal?

Thanx a lot! wink
I will change my /home with tunefs, and convert my / from ext2 to ext4 soon.
Thanx for the advice on auto vs ext4 in fstab to wink
I have this for now:
/dev/sdb1   /home/me ext4 defaults,noatime,nodiratime,barrier=0   0 1

Offline

#22 2009-05-02 17:20:47

Neo_The_User
Member
From: The Matrix
Registered: 2009-03-30
Posts: 96
Website

Re: ext4 without journal?

I have ext4 set at writeback. its much quicker. for those interested:

Example (/etc/fstab):

/dev/sda2 / ext4 noatime,defaults,data=writeback 0 1
/dev/sda5 swap swap defaults 0 0
/dev/sda1 /boot ext2 defaults 0 1

Example (/boot/grub/menu.lst)

timeout   0
default   0

title  Arch Linux
root   (hd0,0)
kernel /vmlinuz-zen root=/dev/sda2 ro rootflags=data=writeback

It's so wicked quick with ext4!!!

Yet... dangerous if your power goes out.

Last edited by Neo_The_User (2009-05-02 17:21:06)


AMD Phenom II X4 955 with Optimized Kernel
5 GB DDR2 RAM
320 GB SATA Hard Drive + 160 GB SATA Hard Drive
ATi RadeonHD 5830 GIGABYTE

Offline

#23 2009-05-10 19:23:58

scrawler
Member
Registered: 2005-06-07
Posts: 318

Re: ext4 without journal?

howdy guys,

if I remove journaling, what steps do I have to take to insure my computer will boot?  I did the steps outlined here and it didn't...

Offline

#24 2009-05-10 21:52:12

big_gie
Member
Registered: 2005-01-19
Posts: 637

Re: ext4 without journal?

I don't think it should influence boot process... At least I though...

Offline

#25 2009-05-11 00:43:22

scrawler
Member
Registered: 2005-06-07
Posts: 318

Re: ext4 without journal?

I removed the journal and when I rebooted it dropped me into a recovery shell.

Offline

Board footer

Powered by FluxBB