Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Is it safe to use btrfs in Ubuntu 12.04?

Linux kernel version: 3.2.0-24-generic
Architecture: x86_64 (64-bit)

share|improve this question
    
Related: askubuntu.com/q/113318/18612 –  WarriorIng64 May 8 '12 at 21:38
2  
The guys in btrfs kernel mailing list specifically discouraged me to use btrfs with 3.2 kernel. They suggested to always use the latest 3.5 or 3.6 kernels. You can easily grab one from kernel.ubuntu.com/~kernel-ppa/mainline –  Adam Ryczkowski Oct 29 '12 at 10:29

5 Answers 5

up vote 12 down vote accepted

Novell Suse SLES11 people think so, because this enterprise distribution skips write support for ext4 in favour of btrfs. I've tested btrfs a couple of weeks ago (with a 3.0 kernel) and I managed get 2 snapshots that could not be removed, within 20 minutes experimenting.

I don't think you should trust your most valuable assets (photo's, music tracks, development files ...) to btrfs unless you are absolutely sure you have proper backups. If you don't need btrfs for its features, don't use it for other purposes than testing.

share|improve this answer
1  
Notice that times are changing. This answer is 2 years old and a lot has happened since. I am not familiar with current BTRFS reliability, but still not all major distributions are support it. To get a good impression of current status, look at the enterprise distributions. If enterprise distributions (RHEL, SLES) use it main stream, then it is apparently OK. At the moment of writing we haven't deployed nor have plans to deploy BTRFS for enterprise customers, but we are closely watching the developments lately. –  jippie Feb 23 at 20:48

The filesystem btrfs is no longer a technology preview in the kernel but as eager as I am to use it, I'm not switching just now. Here is why I would also advise not to do it (note that this answer might be out-dated shortly) by order of importance

  • the file system check utility is too recent and not enough mature.
  • btrfs is still in active development with new features added often, that's not what I called stable.
share|improve this answer
1  
Exactly, after reading about the current status of btrfs on the H, I would at least give it another year. Though now that it has enterprise guinea pigs it will probably mature faster than expected ;-) h-online.com/open/features/… –  LiveWireBT May 8 '12 at 22:21
    
I largely agree with you Huygens, I have parked btrfs for a year too, but developing newly added features is in my opinion not necessarily bad. Features can usually easily be turned off or need explicitly being turned on. You are right about the file system check utility ... scary. –  jippie May 9 '12 at 15:00
    
Right if you can selectively activate them (which was the case for online defragmenting for instance). And to go on the file system check ;) here is the news announced by the btrfs team: "btrfsck can now repair some forms of filesystem breakage" (26 March 2012) –  Huygens May 9 '12 at 15:50
3  
On the official BTRFS web site ;) btrfs.wiki.kernel.org/index.php/Main_Page#News –  Huygens May 11 '12 at 12:11
1  
btrfs fsck is not mature enough to fix some forms of file system damage, so I would still treat it as an experimental file system at the moment. Tests that I've conducted show that I it is not as resilient as ext4 in cases such as power loss. –  Colin Ian King Oct 9 '12 at 14:34

It is absolutely NOT safe to use Btrfs. Just performed my 5th re-install of Ubuntu 12 within a week. Btrfs is unstable as an alpha and crashes after each little update. Having /boot as btrfs results in not finding kernel files. Having / as btrfs results in major damage to the root system.

Don't ever use the autorecovery and compression functions as they actually make things worse. Compression causes lot of file errors and autorecovery is STILL not working.

Lots of error reports on Launchpad and developers, as usually, are dismissing most of them as not relevant.

share|improve this answer
1  
I don't use Btrfs for /, I mainly use it for LXC containers (lxc-create makes good use of subvol and snapshot features, cool. Most of them are -d raid1 mirrored config) and store non-critical data. So far so good. I have to say use Btrfs for / is still a bit risky. –  Terry Wang Nov 22 '12 at 5:23
    
I'm using Btrfs for / right now on Ubuntu 12.10 on the laptop I intesively use for work every day. I'd any trouble 'til now. I'm thinking about using it for my /home filesystem but I'm a bit conservativa about that. –  the brx in the walls Jan 15 '13 at 9:28

If you are going to use btrfs, then you should use the newest kernel available. It would likely be advisable to run Ubuntu 12.10 in favor of Ubuntu 12.04 so that you get a newer kernel by default.

share|improve this answer

Oracle considers Btrfs production ready.

In Oracle Linux 6.3 (6u3), you can use Btrfs for / (need UEK2 2.6.39 - in fact based on 3.0 kernel). And 6.3's boot & rescue ISO comes with Btrfs, it also provide the utility to convert ext{3, 4} to Btrfs by using btrfs-convert provided.

I would recommend at least use raid1 for data (you need at least 2 block devices - partitions in this case), metadata is by default duplicated across devices (don't use -m single for a single device). I've been using Btrfs for testing purpose in several internal production environment, so far so good, I haven't encountered any serious problem (scrubbing is cool!).

BTW: Btrfs works perfectly well with LXC!

See this doc: http://docs.oracle.com/cd/E37670_01/E37355/html/ol_btrfs.html

Keep it in mind, always back up your data. Safe and unsafe, it's relative;-)

share|improve this answer

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.