Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

As ext4 was introduced as more reliable than ext3 with block journals, is there any chance to suppose it 100% reliable? What if enabling block journaling on it, which is disabled by default?

As friend's guide to explain my case in more detail: I have an embedded linux device, after installation keyboard and monitor is detached and it works standalone.

My duty is to make sure it has reliable file-system so with errors there is no way for manual correct faults on device. I can't force my customer to use a ups with each device to ensure no fault by power-failure.

What more can ext4 offer me besides block journaling?

Thanks in advance.

share|improve this question
    
i know i have some trade off enabling features like block journaling, but i am sticked in to reliability and am ready to pay for it –  amin Mar 7 '11 at 8:07
    
See also: serverfault.com/questions/244095/how-to-make-ext4-more-reliable , closed for being too ambiguous. –  Olli Mar 7 '11 at 11:06
    
yes i asked my question there and there were no help just closed! my linux system is an embedded system with no monitor or keyboard attached. so i want it to be more reliable in case of power failure, etc ... i know block journaling is a way but i want to know if there is any more option. i can't offer my customer to have a ups for each device. –  amin Mar 7 '11 at 12:34
1  
@amin The information about your usecase would be more useful in your question, that's probably why it was closed for being to ambiguous; add more info to your question! –  Jorge Castro Mar 7 '11 at 13:25
2  
Question is too vague. What does "100% reliable" mean? Assuming that by "block jounrnaling" you mean data=journal, then that is just a giant waste of time. The FS is inherently reliable; a journal just makes sure you don't have to wait through a lengthy fsck after a crash. –  psusi Mar 7 '11 at 14:55

2 Answers 2

up vote 8 down vote accepted

No. You can never suppose something to be 100% reliable.

Journaling file systems minimise data loss in the event of an unexpected outage. Extents and barriers help even more, but cannot eliminate all associated problems. Personally, I've never experienced data loss because of file system corruption when using journaling file systems.

Also, journaling is not disabled by default.

Here's a good overview of ext4 and its improvements: http://kernelnewbies.org/Ext4

share|improve this answer
1  
+1 for "you can never suppose something to be 100% reliable" –  Lekensteyn Mar 8 '11 at 13:31
    
as Comparison_of_file_systems block journaling is off while metadata journaling is on, that's trade off between reliability and speed –  amin Mar 9 '11 at 6:41
    
I just had a server reboot in order to find massive data corruption on ext4 where files contain invalid data. This could not have happened on zfs or btrfs because data has checksums. –  user239558 Apr 23 at 7:10

A new feature added to ext4 and introduced with kernel 3.5 is what is known as 'metadata checksums', which is another feature of ext4 that is supposed to improve the reliability and the integrity of the structure of the file system.

The overall implementation is well explained at Kernel newbies:

Modern filesystems such as ZFS and Btrfs have proved that ensuring the integrity of the filesystem using checksums is a valuable feature. Ext4 has added the ability to store checksums of various metadata fields. Every time a metadata field is read, the checksum of the read data is compared with the stored checksums, if they are different it means that the medata is corrupted (note that this feature doesn't cover data, only the internal metadata structures, and it doesn't have "self-healing" capabilities).

Any ext4 filesystem can be upgraded to use checksums using the "tune2fs -O metadata_csum" command, or "mkfs -O metadata_csum" at creation time. Once this feature is enabled in a filesystem, older kernels with no checksum support will only be able to mount it in read-only mode.

Articles such as this one at kernel.org discuss further in great technical detail how using metadata checksums can prevent corrupted metadata from damaging the file system structure.

However the article also warns that:

The metadata checksumming code started going into mainline in Linux 3.5, and as of 3.7-rc1 it is undergoing some user testing. This code is not yet rock solid.

It is not enabled by default in Ubuntu 12.10, and is probably best not to enable it for the moment after the recent issues with the ext4 filesystem, as noted here.

share|improve this answer

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.