Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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)

share|improve this question
1  
ext3 minus Journaling equals ext2, but I have never heard that applies to ext4. Are you sure about that one? –  Tim Jun 13 '12 at 13:18
add comment

1 Answer

up vote 2 down vote accepted

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.

share|improve this answer
    
Does completely disabling journal makes throughput high like data=writeback? –  Majid Azimi Jun 15 '12 at 5:37
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.