Slashdot Mirror


MIT's New File System Won't Lose Data During Crashes

jan_jes sends news that MIT researchers will soon present a file system they say is mathematically guaranteed not to lose data during a crash. While building it, they wrote and rewrote the file system over and over, finding that the majority of their development time was spent defining the system components and the relationships between them. "With all these logics and proofs, there are so many ways to write them down, and each one of them has subtle implications down the line that we didn’t really understand." The file system is slow compared to other modern examples, but the researchers say their formal verification can also work with faster designs. Associate professor Nickolai Zeldovich said, "Making sure that the file system can recover from a crash at any point is tricky because there are so many different places that you could crash. You literally have to consider every instruction or every disk operation and think, ‘Well, what if I crash now? What now? What now?’ And so empirically, people have found lots of bugs in file systems that have to do with crash recovery, and they keep finding them, even in very well tested file systems, because it’s just so hard to do.”

10 of 168 comments (clear)

  1. But is it useful? by Junta · · Score: 4, Interesting

    slow compared to other modern examples, but the researchers say their formal verification can also work with faster designs

    If we can accept 'slow', it's not that difficult to build an always consistent filesystem. While they can formally verify a faster design should one exist, there remains the question of whether it's possible to be formally proven to be resilient to data loss while taking some of the utterly required performance shortcuts for acceptable performance. I suspect the answer is that some essential performance 'shortcuts' will fail that verification.

    --
    XML is like violence. If it doesn't solve the problem, use more.
  2. Linux File Systems by Anonymous Coward · · Score: 5, Interesting

    I find some of the current file systems to be adequately reliable. Even their performance is acceptable. But, the Linux systems are lacking.

    Is there a reliable Linux file system such as EXT4 that has an easy to use copy on write(CoW) feature to allow instant recovery of any file changed at any time?

    rm ./test
    restore --last test ./

    dd if=/dev/random of=./test bs=1M count=10
    restore --datetime test ./

    Novell Netware FS did all this and more in 1995 FFS! Fifteen years later and Linux doesn't seem to be able to do this. NTFS doesn't seem to be able to do this either. Yet Novell is dead?

    1. Re:Linux File Systems by swb · · Score: 4, Interesting

      I still think Netware's filesystem permission model was better than anything out there now, at least for filesharing.

      The feature I miss the most is allowing traversal through a directory hierarchy a user has no explicit permissions for to get to a folder they do have permissions for. I find the workarounds for this in other filesystems to be extremely ugly.

      I think NDS was better in a lot of ways than AD, although it would have been nice if there had been something better than bindery mode for eliminating the need for users to know their fully qualified NDS name.

      I also kind of wish TCP/IP had used the network:mac numbering scheme that IPX used. The rest of IPX/SPX I don't need, but there'd be no talk of address exhaustion of IPv4 if that scheme had been adopted, little need for DHCP address assignment and the addressing scheme would scale to the larger broadcast domains enabled by modern switching (avoiding the need to renumber legacy segments completely when they exhausted a /24 space and expansion via mask reduction wasn't possible due to linear numbering on adjacent segments).

    2. Re:Linux File Systems by Christian+Smith · · Score: 3, Interesting

      I find some of the current file systems to be adequately reliable. Even their performance is acceptable. But, the Linux systems are lacking.

      Is there a reliable Linux file system such as EXT4 that has an easy to use copy on write(CoW) feature to allow instant recovery of any file changed at any time?

      NILFS2 provides continuous point in time snapshots, which can be selectively mounted and data recovered. Not quite as instant recovery as your use case examples, but it's only a few commands/wrapper scripts away.

    3. Re:Linux File Systems by nbvb · · Score: 3, Interesting

      Bah, forget NetWare, VINES and StreetTalk did everything you ask for and then some way before NDS was even a thought.

      VINES' ACL's were beautifully granular ...

  3. Re:Well it won't lose data... by Anonymous Coward · · Score: 1, Interesting

    Or – more likely – until they find a flaw in their assumptions, like a lower-level software stack that swears "yes, this data has been committed to storage" slightly before that's actually true.

  4. Is it really THAT hard? by ledow · · Score: 4, Interesting

    Write zero to a flag.
    Write data to temporary area.
    Calculate checksum and keep with temporary area.
    When write is complete, signal application.
    Copy data from temporary area when convenient.
    Check checksum from temporary to permanent is the same.
    Mark flag when finished.

    If you crash before you write the zero, you don't have anything to write anyway.
    If you crash mid-write, you've not signalled the application that you've done anything anyway. And you can checksum to see if you crashed JUST BEFORE the end, or half-way through.
    If you crash mid-copy, your next restart should spot the temporary area being full with a zero-flag (meaning you haven't properly written it yet). Resume from the copy stage. Checksum will double-check this for you.
    If you crash post-copy, pre-flagging, you end up doing the copy twice, big deal.
    If you crash post-flagging, your filesystem is consistent.

    I'm sure that things like error-handling are much more complex (what if you have space for the initial copy but not the full copy? What if the device goes read-only mid-way through?) but in terms of consistency is it really all that hard?

    The problem is that somewhere, somehow, applications are waiting for you to confirm the write, and you can either delay (which slows everything down), or lie (which breaks consistency). Past that, it doesn't really matter. And if you get cut-off before you can confirm the write, data will be lost EVEN ON A PERFECT FILESYSTEM. You might be filesystem-consistent, but it won't reflect everything that was written.

    Journalling doesn't need to be mathematically-proven, just logically thought through. But fast journalling filesystems are damn hard, as these guys have found out.

  5. Re:Proving Coq itself by TheRaven64 · · Score: 4, Interesting

    If you actually want an answer, I suggest that you go and read the Coq papers. You might learn something.

    --
    I am TheRaven on Soylent News
  6. Yeah, right. by dargaud · · Score: 4, Interesting
    In the words of Knuth the Great: "Beware of bugs in the above code; I have only proved it correct, not tried it."

    It reminds me of a story from the late 80s (?) at a tech conference. The makers of a real-time OS with real-time snapshots would periodically pull the plug on their systems, plug it back in and it would resume exactly what it was doing, to the delight and amazement of all the techies in the assistance. In the much larger and much more expensive booth in front of them was a richer vendor. The techies started coaxing them to do the same. After much hand wringing, they did, and after a very long rebuild time the system came back as a mess. Conclusion: the 1st vendor went out of business, the 2nd one is still very big.

    --
    Non-Linux Penguins ?
  7. Re:Tough environments by mlts · · Score: 3, Interesting

    I personally encountered a drive array driver cause an entire array to get overwritten by garbage. I was quite glad that I had tape backups of the computers and the shared array, so a recovery was fairly easy (especially with IBM sysback.)

    Filesystems are one piece of a puzzle, but an important one. If that array decided to just write some garbage in a few sectors, almost no filesystem would notice that, allowing propagating of corrupted data to backups. The only two that might notice it would be a background ZFS task doing a scrub and noticing a 64 bit checksum is off, or ReFS doing something similar. Without RAID-Z2, the damage can't be repaired... but it can be found and relevant people notified.