18

I've seen a lot of information on btrfs lately. I have been considering ext4 for my next filesystem, but am tempted by btrfs instead. How widely used is btrfs? What are the pro's and con's?

Coops
  • 5,967
  • 1
  • 31
  • 52
mdpc
  • 11,698
  • 28
  • 51
  • 65
  • 1
    Pro: According to [this interview](http://www.linuxfoundation.org/news-media/blogs/browse/2009/06/conversation-chris-mason-btrfs-next-generation-file-system-linux), it's perfectly acceptable to refer to the filesystem as ButterFS. – Kyle Smith Jun 30 '11 at 18:05

8 Answers8

14

Absolutely not. And here's why:

From the Btrfs Wiki:

Note that Btrfs does not yet have a fsck tool that can fix errors. While Btrfs is stable on a stable machine, it is currently possible to corrupt a filesystem irrecoverably if your machine crashes or loses power on disks that don't handle flush requests correctly.

When it's pushed out as the default root filesystem in Fedora Core (which is pretty bleeding edge) I think I'll start experimenting with Btrfs on testing machines. When it starts to stabilize sometime after, I think I'll begin to use it on new non-mission critical production machines.

I never like to be in a hurry to lose my data.

valse-triste
  • 103
  • 3
  • Your information is plainly wrong; Fedora 18 was in the discussion of making btrfs the default system, but they skipped it. Until today, meaning Fedora 20, Btrfs is not the default file system of Fedora. Maybe it will make it in Fedora 21 as the default file system. Until today, you though have Btrfs as an option in Fedora's installer. – Marc Stürmer Aug 10 '14 at 18:12
  • @MarcStürmer Please edit my answer then to correct it. –  Aug 18 '14 at 16:53
  • I removed the incorrect info on Fedora as you guys suggested a couple years ago. Fedora still has not moved to btrfs for the default fs, including the upcoming Fedora 24. – valse-triste Jun 19 '16 at 21:55
  • 1
    Apparently, `btrfsck` has been replaced with `btrfs check` but [the manpage](https://btrfs.wiki.kernel.org/index.php/Manpage/btrfs-check) basically says don't use `btrfs check --repair` unless you know the internals of btrfs or have been told to by someone who does, which is not a production-ready stance. – kbolino Mar 29 '18 at 14:51
  • And just 9 years after this answer was written, Fedora has indeed [switched default filesystem to btrfs](https://fedoramagazine.org/btrfs-coming-to-fedora-33/). – hlovdal Dec 28 '20 at 19:23
9

Speaking of 2014: no, it is definitely not production ready yet!

Performance of it is still sub par in some areas, common commands like "df" are still being broken on purpose (you need "btrfs fi" instead), and I still wouldn't trust it my important data.

Also if you are in need of a filesystem putting your images of virtual machines on or databases, you should simply skip it. Btrfs is not really suited very well for that kind of stuff, that's stuff you should put on Ext3/4 or XFS instead.

Give it two more years or three to mature and then it might be in a production ready state.

If you are really in need of a production ready COW file system right now, take ZFS! You could use the native Linux port or just an OS which supports it straight from the Kernel like FreeBSD.

And take a look at the official Gotchas! page, where the developers are publishing the actual gotchas and how to avoid those:

https://btrfs.wiki.kernel.org/index.php/Gotchas

Also keep in mind that the official advise from the getting started page until today is to keep a backup of your important data and to be prepared for all kind of hiccups (https://btrfs.wiki.kernel.org/index.php/Getting_started).

They do consider the core functionality by now to be stable enough for daily use, but they are still fiddling around with newer features and if newer features do come up, they will definitely need a few releases (meaning six two twelth months I presume) until they are mature enough.

Edit: Russel Coker from Australia has been using Btrfs for some time and posts his experiences from time to time (e.g. http://etbe.coker.com.au/2014/07/31/btrfs-status-july-2014/). He uses it on some of this servers and it shows though while it is not all doom and gloom, you normally need to stay with the most recent kernels e.g., something that's not easy to do on a server, and yes, there are still problems around.

Also worthwhile to read some of the comments, too.

So this means by definition it is still being work in progress, which never had time until today to mature as a whole.

Edit: according to this blog post even with kernel 3.16 Btrfs can still deadlock. http://marc.merlins.org/perso/btrfs/post_2014-10-05_Btrfs-Tips_-Catch-Btrfs-Deadlocks.html

Marc Stürmer
  • 1,894
  • 12
  • 15
6

Personally, I would consider it production ready when (and if) the likes of Canonical and Red Hat implement it in their supported products. I'm sure it'll all work fine, most of the time, but I would say that for putting it in production it is a bit too early still.

Update: Assuming people will come here more often now that Oracle released the UEK R2 with btrfs support (20120315): no, the fact that Oracle now supports it, does not make it thoroughly tested enough for an enterprise environment. The fact that there still isn't a publicly available fsck tool and it still hasn't had sturdy testing in the likes of OpenSuSE, Fedora and all doesn't help either. Stay away for now.

wzzrd
  • 10,269
  • 2
  • 32
  • 47
  • Compared to RedHat & Canonical, Oracle is also in a unique position because they employ the primary Btrfs developers. If a customer has a support issue, it can be escalated internally to the Btrfs engineers. At least, that's the theory. Not sure how well that will work in reality. In addition, Oracle may be releasing Btrfs prematurely so that they can get more real world experience with Btrfs, and apply pressure on the developers to get things done. – Stefan Lasiewski Mar 15 '12 at 15:58
  • 2
    Sure they have Chris Mason working there, but it is still a relatively untested filesystem on which I would *not* put any production data. I'd like to give it a spin and test it out a bit, but not without an open and working fsck tool. – wzzrd Mar 16 '12 at 08:26
5

In short no.

• The only RAID support is currently 0,1,10.
• No file system repair is available (yet)

Checkout this podcast with one of the developers...very cool things are coming soon!
http://streaming.oracle.com/ebn/podcasts/media/10491325_Btrfs_071311.mp3

I am planning on installing on a home VM without important data for testing, but that's as comfortable as I can be with it's current state.

SkinnyGeek1010
  • 446
  • 5
  • 16
3

if you have backups, and can tolerate a few hours downtime, got for it. I'm planning to use it on my next workstations. Not servers yet, because most of my volumes are several terabytes, so restoring from backup takes too long time.

Javier
  • 9,078
  • 2
  • 23
  • 24
2

For RHEL7 Red Hat is calling btrfs a technology preview and XFS is the default. Make of that what you will.

John Mahowald
  • 30,009
  • 1
  • 17
  • 32
1

personally, its ready when it supports RAID-5.

Sirex
  • 5,447
  • 2
  • 32
  • 54
  • You can sit btrfs above a RAID 5 device, the RAID 5 support listed in the wiki is about moving the multi-device support from the block layer to the file system. – Steve-o Aug 29 '11 at 03:18
  • 1
    yea, but that's what i'd really want in it as a technology. – Sirex Sep 02 '11 at 11:15
  • 2
    [RAID-5 support for btrfs is in Linux 3.9](http://www.h-online.com/open/features/Kernel-Log-Coming-in-3-9-part-1-Filesystems-and-storage-1831197.html) – Janus Troelsen Mar 29 '13 at 13:07
1

For my workstations, it is.

Running Fedora, luks and brtfs

pbacterio
  • 276
  • 2
  • 6
  • 3
    Hi, please extend your answer, as if you mean that now fedora use brtfs by default, it could be a valid answer, as else it look more a comment. Thanks ! – yagmoth555 Feb 18 '19 at 17:07
  • 2
    It would be nice if you could back this up with... anything – endolith Feb 18 '19 at 18:02