BTRFS and Ext4 on same disk

Looking at various btrfs videos, I never see example, where one ext4 data partition would be on the same disk, where is btrfs. Is this normal setup or it is not advisable to go this route?

If btrfs and ext4 on same disk is ok, what order should I have, btrfs before ext4 or other way around?

Also, I’m used on regular systems, to set up partitions first with gparted, then I start installer and through it, I’m assigning partitions. How should I proceed here? Should I do all the steps within installer? Or I can set up btrfs system and subvolumes with gparted? What is suggested, best, simplest route?

This is going to be my first time ever going out of ext4 world. My setup will be simple, no encryption, no compression, nothing extra or fancy

It isn’t “normal” but you can do it if you want. Out of curiosity, why would you want that?

Yes, no problem.

Whichever you prefer.

Setup your partitions using the installer. It will create the subvolumes for you.

2 Likes

No problem my $HOME partition is ext4 and the EFI partition is vfat, on my other machine desktop I have btrfs, ext4 and ntfs partitions for data that is shared with an old windows installation, note that my $HOME is partition 4, partition 5 btrfs was created after resizing partition 4, however I avoided moving it to the correct position as my important data is there, so the order of creation doesn’t really matter.

Captura de tela de 2022-07-08 23-47-59

2 Likes

I have (1) ext4 partition setup for my virtual machines; don’t need/want btrfs snapshots with them. Every thing else is btrfs.

1 Like

Nice setup!

1 Like

Thank you! This extra data desire is probably result of me not quite understand the whole thing :wink: I typically (on ext4) have multi boot, 2-3 installations each with home, then I have one separate data partition for all the data and each install have access to this data partition. Then I have another disk, where is a copy, backup of data partition. That way I have data on two disks.

May I ask you one more question, as someone who created that btrfs helper. From view point of someone completely new in btrfs world, (I don’t even know what are default settings, beside I need to have root and home subvolumes), would your helper be beneficial for complete noob or would be better to get familiar with btrfs first? I plan to use timeshift for simplicity.

1 Like

Thank you, I see there are all kind of possibilities.
I plan to have home as default (btrfs subvolume), just thinking of separate data partition. Still not sure the route I will go. Less I complicate, better should be he-he

Yes, that was my thought, something that will not be included in snapshot.
Good, thanks

Btrfs Assistant is designed to make btrfs and snapper easier to use.

Snapper has always been a far more functional solution than timeshift for btrfs snapshots but it’s complexity made it hard for many users. Btrfs Assistant attempts to give you flexibility of snapper with the simplicity of timeshift.

Of course, it has expended over time so now it also contains some functions for advanced users. However, keeping it easy to use has always been part of the focus.

2 Likes

I have $HOME on ext4 & the system root on btrfs mounted with these settings for btrfs:

defaults,noatime,autodefrag,compress=zstd

I have snapper setup but have never needed to boot from a snapshot in the 7-8 years I’ve been running btrfs on root.

In my experience ext4 for HOME is a sensible choice - it’s rock solid stable.

NB: I run a zfs array & mount datasets inside my $HOME - I did have a bad experience with dropbox on btrfs filling up the disk so fully a reinstall was required.

1 Like

There are some reasons Btrfs is useful for some parts of Home.

  • Configurations are accidentally changed incorrectly somewhere in home directory, e.g. KDE environment looks crooked and difficult to adjust manually. Rollback with snapshot is a solution.

  • Malware example “WannaCry” targets only home data and encrypts or corrupts all documents and data in home directory. Rollback could help.

  • Using btrfs send/receive or btrbk to create multiple home backups to other disks and is faster and more efficient than EXT4 with rsync

Non-essential heavy data is a large part of Home example ISO in Downloads, multimedia, VM images and Steam games. They go to other partition EXT4 and are mounted with Home, they don’t need to be processed by Btrfs balance and snapshot creation.

Yes, for me, btrfs is much more valuable on /home than on the root.

  • The ability to take inexpensive snapshots frequently is much more useful to me on home
    • This gives you access to recent history in case you need something back.
      • If things get messy you can rollback the entire subvolume
      • More usefully, you can easily access individual files to either diff or restore an older version
  • Applying transparent compression to your /home or sections of it can not only save space but improve performance
  • The ability to carve up /home into many subvolumes can be useful. Especially if you use snapshots or multi-boot.
  • As stated above, it can be part of backup strategy using btrfs send/btrfs receive
  • If you have parts of home that you don’t want snapshots of or don’t want the overhead of CoW you can disable those features but still get the sharing benefits of subvolumes.
1 Like

What compression level do you apply/recommend? Can we have different compression levels for home and root?

I currently have a single home subvolume that I snapshot. This idea is of carving up home is awesome. Because mostly I just want to roll back my .config subvolume. How do I go about carving up home now i.e. can we do this after the installation?

I suppose it depends on your hardware. I usually just use zstd:3 or zstd:1.

Not unless they are in different filesystems

Yes, both my workstation and my primary laptop have at least 50 subvolumes/datasets.

If using a nested subvolume:

  • Create a subvolume at ~/.config-new
  • mv all the data from ~/.config to ~/.config-new
  • mv ~/.config-new ~/.config

If using a flat subvolume:

  • Create a subvolume
  • mv the data from ~/.config into it
  • Mount the subvolume at ~/.config
  • Add an entry in /etc/fstab or create mount unit.

If you are multi-booting, the flat layout will probably be better. If not, it is up to personal preference if you prefer flat, nested or a hybrid approach.

What method do you use/prefer. Do all the methods work well with brfs-assistant?

I definitely prefer flat. The only thing I keep nested are the .snapshot subvolumes created by snapper.

Yes.

Thank you everyone, lots of good info to process and to learn.
I got my btrfs system installed, all looks good.
Will install brfs-assistant next and start playing around.
This is testing disk, just for this learning purposes, so I don’t have to be too careful :grinning:

And I got an answer to another question - so you can have multi boot within btrfs, cool, will try that to one day…

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.