Ext4 Users Report Data Loss

The Ubuntu User Forum reports users with data loss after installing applications on the ext4 filesystem. Kernel developer Ted Ts'o is already on top of it.

A user reported as bug #317781 the data loss problem involving a Kubuntu Jaunty installation on the ext4 filesystem: "The first time I had this problem was a few days ago when after a power loss ktimetracker's config file was replaced by a 0 byte version." The problem recurred during a system failure: "After a clean reboot pretty much any file written to by any application (during the previous boot) was 0 bytes." In his case the KDE and Plasma configuration data was reset and MySQL files vanished. Another user ran into the same issue with a Gentoo installation on ext4.

As it became clear that the issue was hitting a number of users, kernel expert and pioneer ext4 developer Theodore Ts'o rushed into the discussion: "The short answer is (a) yes, I'm aware of it, (b) there is a (partial) solution, (c) it's not yet in mainline, and as far as I know, not in an Ubuntu Kernel, but it is queued for integration at the next merge window, after 2.6.29 releases, and (d) this is really more of an application design problem more than anything else."

Ts'o, current chief technologist at the Linux Foundation, took time in his responses to the bug to explain his work on ext4 and hands-on approaches to resolving the data loss problem (especially in this reply). He sees the cause of the problem to be the delayed allocation before a data commit in ext4 of 60 seconds (designed to enhance security and performance). The ext3 interval used to be 5 seconds, which Ts'o says began to be an expectation among developers: "Since ext3 became the dominant filesystem for Linux, application writers and users have started depending on this, and so they become shocked and angry when their system locks up and they lose data --- even though POSIX never really made any such guaranteed."

Related content

Linus Torvalds, Ted Ts'o, Alan Cox, Ingo Molnar, Andrew Morton and other Linux kernel developers are embroiled in a contentious discussion over the sense -- or nonsense -- of journaling and delayed allocation before a commit in the ext3 and ext4 filesystems. Heavy words are flying.

The extended filesystem has been part of the Linux kernel since 0.96c – a faithful companion of the free operating system. With its developments – or, rather, rebirths – through ext2, ext3, and ext4, it is one of the oldest Linux-specific software projects.