Each time electricity goes down, my desktop (without UPS) loses some temporary information.

  • Opera can lose settings, history, cache, or mail accounts (Thanks heavens I was wise to use IMAP). Partially or all together.
  • a whole file (complete and save) in Geany appeared empty (and I didn't commit it to Git)
  • rhythmbox lost all podcasts subscription data

I'm afraid there are other losses I just didn't see.

What's the reason? A memory files cache, a mem-disk? Or non-atomic file writes in xfs? I have Ubuntu 9.10 and XFS on both / and /home partitions.

Is ext4 safer in such circumstances? I've seen ext3 is faster. Is it as safe as *4?

Given that the apartment I rent is connected to a common bus and 1 safety switch for several apartments, and the neighbors - alone or together - overload it at least once every week, the lights go down often enough for this to be an issue.

  • FYI; XFS is a journaling filesystem. – user53562 Oct 26 '10 at 8:48
  • @abc FYI XFS journals metadata for file system integrity only, it does not have block journaling. See en.wikipedia.org/wiki/Comparison_of_file_systems – kmarsh Oct 26 '10 at 14:50
  • By chance do you have any special performance tuning going on such as noatime, disabled write-barriers, or anything else other than vanilla mkfs and mount? – Earlz Nov 12 '12 at 20:25

Answer Updated...

XFS is not a data journaling filesystem, such as ext3 and ext4, it is a meta-data journaling filesystem. The result is a trade-off that (usually) favors speed over reliability.

This article has a good discussion of the current state of XFS. When reading, keep in mind all filesystems are compromises between speed and reliability.

Given your lack of control of the situation, you are a good candidate for buying a small UPS.

  • I thought of that, but I think the next thing I'll buy is a laptop, and before I'll change the fs type. Desktop becomes more like a pet: requires too much care. :) – culebrón Dec 17 '09 at 7:24
  • Why did change to xfs, I wonder... I must have read a very biased opinion and trusted it... – culebrón Dec 17 '09 at 7:26
  • Generally it is a good idea to use what the installation program suggests, unless you really have a very good reason not to. This ensures that you are using the same as everyone else, which in turn means that errors are found and fixed faster. – Thorbjørn Ravn Andersen Oct 26 '10 at 10:01
  • XFS is not a journaling filesystem... Wikipedia and the XFS homapge tell me something different...maybe you should elaborate on what you mean? – Bobby Nov 12 '12 at 12:44
  • I've been using XFS for years. My computer has both crashed and had the power disconnected. The only problem I've ever had with data integrity is a RAID-1 volume becoming unsynchronized. (which was completely unrelated to XFS as that volume was even using ext2). – Earlz Nov 12 '12 at 20:23

XFS is and always has been a journalling file system. It does not truncate files to a zero length and is the base file system for many enterprise storage appliances.

You do need correctly configured hardware (specifically to make sure volatile write caches are correctly handled in your storage with the barrier mount options).

If you see data loss on any file system, please open a bug report with either your vendor or the upstream developers of the specific file system so we can investigate and try to correct any issue.



for the record, i still frequently see this issue on vms years after...

the bug is not acknowleged by pretty much anyone and most likely comes from idiotic reordering that occur either in the linux vfs layer or possibly in my case in vmware since i've only observed this on vms.

basically the filesystem writes the data to a block and then changes the metadata mapping to point to that block rather than the previously used one, which is then freed.

when operations get randomly reordered in the linux vfs layer in some kind of messy way that involves issuing braind dead reordered transactions while hoping barriers set in the wrong places will help, and additionally using vmware which ignores said barriers, there are little chances things will not end up broken.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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