Wednesday 11 October 2017

linux - XFS and loss of data when power goes down


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.



Answer



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.


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...