Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Related to this.

I'd like to take advantage of an OS switch to upgrade to BTRFS.

  • BTRFS claims to offer a lot (data-loss resiliency, self-healing if RAID, checksumming of metadata and data, compression, snapshots). But it's slow when used with fsync-intensive programs such as dpkg (I know eatmydata and the crappy apt-btrfs-snapshot programs) and I won't setup a RAID :p.

  • EXT4 allow metadata check-summing only and doesn't compress data.

In 6 years, I had to reinstall my OS twice because of HDD corruption (after flight trips). The first making the laptop unbootable, the second bunch of corruptions was identified thanks to a corrupted film and then md5sum check of the OS binaries. (SMART tells me the disk is sane). The lappy currently behave quite strangely. I don't know if the hardware or the software is to blame but I suspect the hardware (it all began right after a flight, once again).

Would you advise to switch to BTRFS for a laptop because of data compression and check-summing or should I stick with EXT4?

(I don't care about which is "best" relative to whatever variable but I have almost no experience with BTRFS and would like some feedback)

EDIT:

Let's be clearer: BTRFS is still flagged as experimental, I know, but SUSE says it shouldn't anymore. So does Oracle (I know who Oracle is). And a bunch of distributions already propose BTRFS for installation and most of them are planning to switch to it in the next few months.

Two facts:

  • Backups of corrupted data are worthless. I don't understand why I seem to be the only one to bother. Isn't that common sense? In the meanwhile:
    • Stop telling me I should do backups: I already do.
    • Stop implying backups are just enough to keep my data safe except if you are willing to give me TBs of free space to do years worth of backups.
  • A corrupted file =/=> Linux complaining. So:
    • Don't assume your system/data are sane just because the OS is booting.
    • I hope you understand that I prefer (meta)data checksumming to an over-engineered and bloated piece of software that would inconveniently do half as a good job as BTRFS to check the data integrity.

Is that more clear now that I am not asking for which FS is "better"? The question is, given that I regularly do backups, is BTRFS still too experimental to be used for its data-integrity checking functions or should I stick to EXT4?

share|improve this question
1  
It seems like a backup strategy would be a better way to prevent data corruption and OS reinstalls. This also has the advantage of providing a global undo function. My suggestion: Use a well-tested filesystem you know how to use and fix, buy an external HDD for backups, don't bother with complicated setups (e.g. RAID), instead use something simple, e.g. an rsync every night. –  Marco Mar 6 '13 at 18:06
1  
+1 to @Marco, yet a note: do not rely on external HDDs to store your backups. Burn DVDs or use tape; HDDs can (and usually do) fail spectacularly. –  Deer Hunter Mar 6 '13 at 19:02
    
I do backups : my data are always in sync with a remote RAID. Plus, the data and the result of their processing are rsynced away from my laptop once a day on another backup system. Plus my whole home folder rsynced about once a week to yet another disk. But prevention is better than cure: if a file system is known to be more resilient to data-loss, I'll pick it. An OS is long to install and configure, even with backups. RAID is not a backup, and i don't think of it as something complicated but as something not applicable in this case. What i do no have is a fs telling me it is corrupted. –  Gael Mar 6 '13 at 20:39
    
I'd like to stress that: even if I did full backup -with dd and all- of my whole hdd, I still don't know if the programs that I'm currently using are corrupted or not. But BTRFS might still be too young for this time... If I talked about RAID, it was just to say that I, in a data-loss prevention perspective, (not backup), this would have been useful to solve small corruption problems... But this is not applicable in this case. –  Gael Mar 6 '13 at 20:55
1  
I think that if you did a just a little bit of research you would have found that btrfs is not for production use. If you want to use it for data that you might lose and not care about ... go for it. –  mdpc Mar 7 '13 at 2:19
show 4 more comments

2 Answers 2

up vote 2 down vote accepted

I agree with vonbrand, btrfs is not yet to the maturity level of ext* or XFS or JFS to name a few. I would not use it on a laptop with precious data unless I have a reliable backup that can be done also on the go.

Btrfs can detect corruptions but it won't do anything more than reporting the detection unless you have an available uncorrupted copy of the same data, which means you either need RAID or duplication of data on the volume.

That said, I am considering using it (using RAID-1) for one machine, but I also do have Crashplan running on this machine!

For a long time, I have been using JFS on my laptop. One reason was the lower CPU usage compare to XFS or ext3 when doing file operations. I have never verified if it saved power consumption as well, but that was my assumption. I found JFS pretty stable and safe, never lost data while using it.

share|improve this answer
    
As I said, I have copies. Unfortunately these are not of an infinite number. If a file is corrupted today, I'd love my kernel to say "Ooops! $FILE is corrupted" instead of just figuring it out in two months from now, when all my backups will contain the corrupted data. The problem with rsync is that it has no clue of whether a file should have changed or not. Is that more clear? –  Gael Mar 7 '13 at 9:21
    
Q&A sites are a way for a user to ask a question and get an answer, and for other users to find an already answered question. So I am sorry if I state that you should backup, perhaps you do, but someone else might not. I do care regarding file corruption, that is why my NAS (Synology w/ ext4) has a sha512sum files in various places and duplicated data so I can manually do data corruption check. I did not wait for ZFS or Btrfs! However, I am now considering having this in the FS to save me admin time! –  Huygens Mar 7 '13 at 20:56
    
I understand that. I's just that it has been stated in the comments and, more importantly, it gives the wrong impression that all I need is to backup things. While I think backups are mandatory if you care even just a little bit about your data, proper integrity checking seems to be mandatory too. I'm also currently using hand-made hash check scripts that are triggered prior to the backup scripts. The problem is it is limited to my data only, not my system/home folder/etc. And it's admin time and it's not really portable... I'll stick with EXT4 a couple more years then. –  Gael Mar 8 '13 at 8:57
    
For the system data, it is annoying when it gets corrupted, but it is not unsolvable as usually the data is downloadable. Check this interesting blog post: blogs.oracle.com/ksplice/entry/attack_of_the_cosmic_rays1 –  Huygens Mar 8 '13 at 9:47
    
@Gael it is maybe a wise choice. One other drawback of btrfs today is because it is marked as experimental, there is no guarantee that the structure on-disk might not change in a future kernel update. This can bring headaches when booting the filesystem with a system rescue CD that has a different kernel, as it could change the structure on disk if not careful enough. Some big players are providing support for it, so if you pay they might help you out if they support such events. If you don't pay you are on your own ;-) Anyway interesting question! –  Huygens Mar 8 '13 at 9:51
add comment

The "common wisdom" of filesystem developers is that it takes some 5 years of beating to consider a filesystem stable enough for non-experimental use. BTRFS hasn't accumulated 5 years yet, so it is considered strictly for experimental use right now. If the data on the machine aren't critical, and a rigurous backup scheme is in place, go wild. Be prepared to report strange things happening.

Fedora 18 (current release) doesn't have BTRFS, and it isn't scheduled for Fedora 19 as of yet. And given that one of Fedora's objectives is to track newest technologies aggressively should tell you something...

share|improve this answer
    
This is incorrect. Fedora 18 ships BTRFS, and it's the default for new installations. –  Michael Hampton May 13 '13 at 22:42
2  
Fedora (as of 19) does not use BTRFS as the default. See docs.fedoraproject.org/en-US/Fedora/19/html/Installation_Guide/… –  sciurus Aug 3 '13 at 17:49
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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