Is ext4 a better option than btrfs for home partition?

just a question

The most compelling reason to use Btrfs is because it has a lot of extra features not present in ext4 or other filesystems. A good example of this that you may be familiar with is the support for filesystem snapshots. If you enable snapshots on your home partition, you can make a change to any file in your home directory and have access to both the changed file, and the file before it was changed for example.

If you are interested in learning more about the many features Btrfs has, there is a ton of information available in the docs or elsewhere online. See here, for example: BTRFS — The Linux Kernel documentation

If you aren’t going to take advantage of any Btrfs features in your home directory, ext4 is a good choice because it is known for being very reliable and is faster than Btrfs for certain use cases.

4 Likes

thank you

1 Like

You should do some research. Garuda is basically cutting edge, so they usually pick the ‘latest and greatest,’ but with that said, ext4 has been around for a long time, so it is highly supported/stable, yadda, yadda.

I think the downside (and I haven’t looked into this for awhile) with BTRFS is it does fragment files, so compare how that is against ext4. I think Garuda use to have a defragment option if I remember correctly, not sure if that is still a thing or if it has been automated?? Just some questions to ponder/research.

Funny side note, I think there was recently a hacker thing exploiting ext4 announced in the news, but with linux, it was patched immediately.

Just to be technical here (:nerd_face:), both filesystems are prone to fragmentation. I’m not sure if one is more prone to fragmentation than the other; it most likely depends on the specific workload and usage patterns.

The difference you may be thinking of is Btrfs can suffer a performance penalty on a disk which has become heavily fragmented, even on an SSD. Tracking all the extents on a fragmented disk can translate to a lot of IOPS and become extra work for the CPU. This is why some folks recommend periodically defragmenting a Btrfs disk, even if it is on an SSD.

It may be worth mentioning that a lot of folks choose to not do this (it’s probably not a noticeable performance hit for most common use cases).

On an SSD using ext4 (or any non-COW filesystem) fragmentation doesn’t really matter that much; a common recommendation is to skip defragmentation altogether to spare the disk some write cycles.

In the case of spinning rust, all filesystems perform worse with a fragmented disk.

4 Likes

I think we can all agree that as long as it’s not NTFS, it’s better. Unless it’s created and maintained by some lunatic who goes off the rails and kills his wife. Lookin’ at you, Hans Reiser. :wink:

I prefer the “comfort” of ext4, personally. :smiley:

3 Likes

For external data storage drives I prefer Ext4 for its rock solid stability. However, it also has another advantage that no one has mentioned, data recovery. If you ever experience a failure, data recovery software is far more supported on Ext4 than btrfs.

For my system partitions I use BTRFS, then I simply symlink my large storage drives into my home directory.

4 Likes

To add what the others have said, snapshots can be a real time saver.

Even though it was a test VM I setup snapshots. I installed some updates to software I was testing and it broke waybar. I had a snapshot so I rolled back my home dir and everything was restored.

Automatics snapshots on updates is a huge feature.

Regards,

how do you use snapshots with you home partition ?

You’ve mentioned Reiser so many times lately, I’m beginning to think you’re going to be testifying at his parole board hearing. You don’t need to be ashamed, most famous psychopathic killers have a bevy of prison pen pals, (many looking for marriage) these days. :rofl:

4 Likes

Easy, same as the default setup for root. I used btrfs-assistant-launcher

Create a new config for /home Set the schedule, enable the schedule, apply systemd changes and save. I have regular daily snapshots and usually before a big software change that changes my config files I do a manual snapshot

But you can do that for other subvolumes also.

Don

3 Likes

OMG, am I that obvious?

I was running on ReiserFS at the time he, well, you know. If Linus did the same–and who knows?–everyone would take another look at their kernel, at least.

At least Btrfs & Ext4 don’t have spouses (I think).

2 Likes