5

What is the difference between disabling journal on ext4 file system using:

tune2fs -O ^has_journal /dev/sda1

and using data=writeback when mounting? I thought ext4 - journal = ext2. means when we remove journal from a ext4 file system, it is automatically converted to ext2(thus we can not benefit from other ext4 features)

2
  • 2
    ext3 minus Journaling equals ext2, but I have never heard that applies to ext4. Are you sure about that one?
    – Tim
    Commented Jun 13, 2012 at 13:18
  • To disable it you can mount -o norecovery ... (or noload). This means: "mount without journalling"
    – user373503
    Commented Jun 15, 2020 at 15:44

1 Answer 1

10

The two are in no way equivalent. Disabling the journal does exactly that: turns journaling off. Setting the journal mode to writeback, on the other hand, turns off certain guarantees about file data while assuring metadata consistency through journaling.

The data=writeback option in man(8) mount says:

Data ordering is not preserved - data may be written into the main filesystem after its metadata has been committed to the journal. This is rumoured to be the highest- throughput option. It guarantees internal filesystem integrity, however it can allow old data to appear in files after a crash and journal recovery.

Setting data=writeback may make sense in some circumstances when throughput is more important than file contents. Journaling only the metadata is a compromise that many filesystems make, but don't disable the journal entirely unless you have a very good reason.

1
  • 5
    Does completely disabling journal makes throughput high like data=writeback? Commented Jun 15, 2012 at 5:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .