Ext4 Users Report Data Loss

Mar 12, 2009

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."

To help ease the file loss problem, Ts'o recommends for both ext3 and ext4, "If you want to force things to be stored on disk, you must use fsync() or fdatasync()." As an aside, Linux Magazine Online recently aired a video of Ts'o describing the stability of ext4 and its advantages over the experimental btrfs filesystem.

Related content

  • Linus Torvalds Upset over Ext3 and Ext4

    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.

  • Boot and Work Faster: Kernel 2.6.30 has arrived

    Thanks to the already implemented fastboot patches, the new Kernel 2.6.30 has the ability to recognize hard disks simultaneously and therefore significantly quicker. Ext 4 operates more securely, and Ext 3 increases performance.

  • Linux Foundation End User Summit: New BtrFS Filesystem and Knowledge Center

    The Linux Foundation got positive results from its first ever End User Summit in New York October 14 and 15. Its concept of "end user" ended up including not only private users but many enterprises and organizations.

  • Kosmos FS

    Distributed filesystems effortlessly juggle enormous files in the gigabyte and terabyte ranges. The Kosmos filesystem plans to impress its competitors.

  • Free Software Projects

    Although a couple of scratches are visible, you can read from the backup CD. The question is, for how long? Cdck measures the sector access times to give you an idea. Have you overwritten the bootloader on your disk? Super Grub Disk to the rescue!

comments powered by Disqus

Issue 170/2015

Buy this issue as a PDF

Digital Issue: Price $9.99
(incl. VAT)

News