BTRFS Filesystem

The problems I was facing then have been fixed. Things are getting more stable noy

I donā€™t have a particularly ambitious setup but Iā€™ve been running BTRFS for a month now, and no-oneā€™s diedā€¦ yet. Was planning on using it on my home desktop when I re-install Manjaro in the coming days.

2 Likes

But those can not really be considered as show-stoppers, as seen from openSUSE or Fedora. I would not even consider it unstable features only because built-in encryption is missing, TLP requiring a certain config option to be set and the tool btrfs check still having issues with the recommendation of not being used for the time being.

I am currently facing exactly that dilemma, coming from Manjaro XFCE installed on EXT4 with TimeShift running in RSYNC mode with the intention to move to Manjaro KDE on BTRFS mainly for being able to boot into snapshots with grub-btrfs and using Timeshift in BTRFS mode.

Looking at the pros and cons, Iā€™d say the benefit of being able to boot into snapshots alone outweighs any possible disadvantage. The filesystem BTRFS itself is already considered to be stable after all, isnā€™t it?

I assume the recommended way to give it a try is by installing using Manjaro Architect?

I still have to do more research first, especially on partition layout with swap file for hibernation, subvolumes and mount options. This is about a couple of laptops / netbooks and Iā€™m not interested in using snapper, but Timeshift instead.

Any more hints are very much appreciated.

1 Like

The same for me : i use BTRFS for my root partition, with Timeshift / Timeshift-autosnap / grub-btrfs activated. And XFS for my Home partition. Itā€™s a thing i take from OpenSuse install and now that i run a Manjaro Distro i use it tooā€¦

1 Like

Why? Wouldnā€™t a @home BTRFS subvolume make more sense?

I choose BTRFS because of its snapshots capabilities. I associate it with Timeshift so i can easily reverse back to a previous state of my system if an upgrade or an install goes wrong.
I do not want my home partition to go to a previous state as i already make real backups of my personal data. So BTRFS make no sense for me on my home partition.

BTRFS offers more benefits than just the ability to work with snapshots. So my take on that filesystem considered to be stable enough for production use (as long as you are aware of the current caveats) coupled with a proper backup strategy should do fine for /home as well.

Still being in the preparations phase, I am now wondering about the following limitation concerning Timeshift in BTRFS mode:

BTRFS snapshots are supported only on BTRFS systems having an Ubuntu-type subvolume layout (with @ and @home subvolumes).

Does that mean that these two are the only allowed subvolumes for Timeshift to work, or does it mean that other subvolumes can be used as well as long as these two are setup that way?

Because I was thinking of using a swapfile for hibernation on a dedicated subvolume, which seems to be the only way with using a swapfile on BTRFS.

Any other recommendations for a BTRFS subvolume setup with just the EFI and one BTRFS partition?

I still would prefer to use timeshift + timeshift-autosnap instead of snapper + snap-pac despite its limitation, because thatā€™s what I already know and use (in RSYNC mode though).

I have exactly that setup: dedicated swap volume with a swap file in it. In fact, you must do it like this because you want to turn off COW on the swap file and turning off COW on a file in the @ volume breaks the snapshot process.

The statement concerning the subvolume layout only means that timeshift always does snapshots of @ and you have the option of turning on snapshots for @home. You cannot change these names in timeshift.

@thht, so the dedicated swap volume does not interfere with Timeshift then?

Because I read somewhere that it refused to work after systemd has added some subvolumes (VM and docker related?), but I canā€™t find that information anymore.

So the remaining question is, which other subvolums (besides @, @home and @swap) make sense in that particular setup and do not interfere with Timeshift functionality?

No, not at all. Just make sure to add x-systemd.requires-mounts-for=/swap to the fstab entry for your swapfile (assuming you mount the @swap volume at /swap).

here are the relevant lines from my fstab:

/dev/mapper/luks-a6499c14-69db-4c8a-8c2e-05654a39772c /swap          btrfs   subvol=@swap,defaults,noatime,space_cache 0 2

/swap/swapfile none swap defaults,x-systemd.requires-mounts-for=/swap 0 0

and i have never experienced any timeshift issues (in fact any issues at all) with this layout. i have been running it for more than half a year now and it has already saved my butt quite a few times.

and besides the @swap volume, i do not have any others. it might make sense to put stuff like /var/cache and/or /var/log on separate volumes, thereby avoiding them getting snapshottedā€¦ but on the other hand, i am not short on ssd space so i never botheredā€¦

2 Likes

and btw: i run docker with the btrfs backend so it actually creates and mounts lots of btrfs subvolumes and i never ever ran into issues.

3 Likes

You can omit some stuff - the big one for me is plex, not so much for the space it takes up, but for the time it takes to handle the lists for a few million extra files - especially in the /var/lib/plex/Plex Media Server/Cache/***, that list can scroll for about 8 minutes on itā€™s own!!!

Makes more sense to me to have BTRFS instead of ext4, etc.
BTRFS avoids bitrot conditions, which can happen on any other filesystem, except ZFS or HAMMER.

1 Like

BTRFS issues are mostly related to RAID configurations.
Itā€™s already production ready for regular use.

3 Likes

Is there any news from Manjaro team?

With ext4 i have had problems after powerdown / reset. I had lost files (existing, but with len=0), corrupted files, corrupted dirs (and i had to use my backup more than once). One time i had to reinstall.

With btrfs i did not. Btrfs has some techniques other fsā€™s donā€™t have. You may use raid1 or snapshots or compression (zsd). You donā€™t have to use raid5 or other techniques that are experimental.

With btrfs i did rollbacks, backups, multidevice with up to 7 or more devices/partitions, multidevice with moving data from old disks/partitions to new ones. I do backups, but since i use btrfs i did not have to use them.

Even when one btrfs-filesystem broke and could not be repaired, it could be mounted readonly, so i was able to copy all ā€œdataā€ into a new installed manjaro without using my backup.

If someone installs new, i do always recommend using btrfs with snapper,

3 Likes

As of version 21.2.0 ( Qonos ), BTRFS is now an option during install!
Thanks for listening, Manjaro team!

1 Like

It even was in 21.1.

Was it? With the full Timeshift integration and correct partitioning?

Yes. Iā€™ve been using it on my laptop.

1 Like