5

I'm fairly new to both GNU/Linux and btrfs, but I've decided I want to make my next computer (a desktop with one HDD) use Linux with btrfs as the filesystem. However, I've seen some advice online that says that I shouldn't use btrfs for my /home partition; some sources say it's not safe enough, and others say it might slow the system down in some way related to writing small files. I've also noticed that openSUSE's default is to have a separate /home partition using XFS.

Is there anything to this, or some other reason why I shouldn't use btrfs for /home? Even if I use a separate partition for /home, is there a reason I shouldn't use btrfs on that separate partition?

horizonbrave
  • 183
  • 2
  • 3
  • 9
  • This site's format works best if you keep to one question per question. It seems to me your main question is "why not use btrfs for `/home`"; I've suggested an edit to your post along those lines. "Why should I put `/home` on its own partition" is its own question, and isn't related to btrfs (it's standard advice for any filesystem, not just btrfs, for reasons detailed in [this question](http://superuser.com/questions/30216/why-create-many-partitions)). – cpast Jan 05 '15 at 04:18
  • There is no much real world experience with btrfs yet. That probably is the main reason to be caucious (higher risk of data loss because of bugs). Unless You are doing heavy I/O there is no too much difference in performance, whatever filesystem You use. – kestasx Jan 05 '15 at 07:17

1 Answers1

7

As for now (2015 Jan) we already have a status of Btrfs:

Stability status

The filesystem disk format is no longer unstable, and it's not expected to change unless there are strong reasons to do so. If there is a format change, file systems with a unchanged format will continue to be mountable and usable by newer kernels.

The main thing is to use latest Linux kernels to avoid old kernel Btrfs implementation. Now, lot of development efforts are pushed to Btrfs development and most probably it will become next generation default FS for Linux, a successor of EXT4.

To have best performance use noatime mount option, and I also recommend to use mount option recovery, which allows Btrfs to automatically make recovery operations in case of power or system failure.

Mount options such as compress are not recommended for a heavily used mount point (i.e. /home).

If you are willing not to take any "risk" now, and wait until it may become default Linux FS, then choose EXT4 as FS option, which has direct migration (conversion) path to Btrfs. Even more, it allows you to revert conversion in case you are not happy with it.

Jawa
  • 3,619
  • 13
  • 31
  • 36
Arunas Bartisius
  • 1,480
  • 14
  • 19
  • Nice job Arunas. @averageuser, this should be accepted as the answer. I.e., what you saw btrfs being not safe enough was history now. I've been using btrfs for about half years now, since btrfs was announced stable enough for prime time use, and I never have any problem so far. Oh, BTW @Arunas, I saw people suggest `space_cache` option as well, any comment on that please? – xpt Feb 08 '15 at 22:24
  • 1
    Hi Jawa, the mount option `space_cache` now is the default on recent kernels. It provides better performance, when creating new files or writing new data to disk. Please see [link](http://superuser.com/questions/855506/what-is-btrfss-disk-space-caching/869027#869027). You can disable it by adding `nospace_cache` mount option. – Arunas Bartisius Feb 10 '15 at 04:21
  • This was an interesting read, especially for people with old laptops: https://www.phoronix.com/scan.php?page=article&item=btrfs_old_linux31 – thdoan Apr 14 '20 at 09:15