Should I choose btrfs or ext4 installing to a HDD?

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
TEMPPART
Level 1
Level 1
Posts: 1
Joined: Sun Jul 25, 2021 12:14 pm

Should I choose btrfs or ext4 installing to a HDD?

Post by TEMPPART »

btrfs seems to have a lot of improvements over ext4 but someone said that it's cow, so it will have fragmentation problem on HDDs. Is this true?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
t42
Level 11
Level 11
Posts: 3734
Joined: Mon Jan 20, 2014 6:48 pm

Re: Should I choose btrfs or ext4 installing to a HDD?

Post by t42 »

-=t42=-
Reddog1
Level 7
Level 7
Posts: 1937
Joined: Wed Jun 01, 2011 2:12 pm

Re: Should I choose btrfs or ext4 installing to a HDD?

Post by Reddog1 »

If you want to use btrfs, all I have to say is, 'Are you feeling lucky'? Your choice if you want to 'live on the edge'.
ajgringo619

Re: Should I choose btrfs or ext4 installing to a HDD?

Post by ajgringo619 »

It really depends on why you want to use BTRFS. I use it extensively; the near-instantaneous snapshots are hard to beat. In fact, the only partition I'm not using BTRFS on is my virtual machine storage (but all the Linux VMs do use BTRFS). If you use Timeshift, you'll be shocked at how fast the snapshots are taken/restored.

@Reddog1 - I see these statements/arguments come up all the time. Are you seeing anything recent that would even hint at "feeling lucky"? BTRFS has been around for a long time; it's not like it was just developed. Or, I could just be the luckiest old geezer alive! :P
ajgringo619

Re: Should I choose btrfs or ext4 installing to a HDD?

Post by ajgringo619 »

Curious why you posted this link - are you saying that you should defrag BTRFS partitions? I never have - just asking.
Moonstone Man
Level 16
Level 16
Posts: 6054
Joined: Mon Aug 27, 2012 10:17 pm

Re: Should I choose btrfs or ext4 installing to a HDD?

Post by Moonstone Man »

ajgringo619 wrote: Sun Jul 25, 2021 10:33 pm Curious why you posted this link - are you saying that you should defrag BTRFS partitions? I never have - just asking.
Until t42 tells the OP what to make of that link, and whenever people post a solitary link with no reason given or commentary on what points to consider, I always assume that they have nothing to say whatsoever.
t42
Level 11
Level 11
Posts: 3734
Joined: Mon Jan 20, 2014 6:48 pm

Re: Should I choose btrfs or ext4 installing to a HDD?

Post by t42 »

ajgringo619 wrote: Sun Jul 25, 2021 10:33 pm
Curious why you posted this link - are you saying that you should defrag BTRFS partitions? I never have - just asking.
OP question - 'I'm interested in btrfs but not sure about fragmentation' Reply: 'If it even is the case it's manageable'
My answer with a link (and your (unwilling?) elaboration of it) are the only direct answer to the original question in this thread.
This board is noticeable for deviating from the initial questions, usual scenario: Q: how ...? A: don't do it.
-=t42=-
t42
Level 11
Level 11
Posts: 3734
Joined: Mon Jan 20, 2014 6:48 pm

Re: Should I choose btrfs or ext4 installing to a HDD?

Post by t42 »

Kadaitcha Man wrote: Sun Jul 25, 2021 11:11 pm I always assume that they have nothing to say whatsoever.
That's me exactly, thanks...
-=t42=-
Reddog1
Level 7
Level 7
Posts: 1937
Joined: Wed Jun 01, 2011 2:12 pm

Re: Should I choose btrfs or ext4 installing to a HDD?

Post by Reddog1 »

I actually use btrfs on some of my hosts, the ones where I run a lot of virtual machines. For regular users it will certainly work, but if something happens to go wrong getting help isn't as easy because btrfs is, for now, much less known than ext4. If you don't have a specific reason to use btrfs, use ext4. I give the same advice for disk encryption.
mikeflan
Level 17
Level 17
Posts: 7106
Joined: Sun Apr 26, 2020 9:28 am
Location: Houston, TX

Re: Should I choose btrfs or ext4 installing to a HDD?

Post by mikeflan »

Should I choose btrfs or ext4 installing to a HDD?
I'll preface my answer with "I have no direct experience with btrfs. I have never used it".

My answer: Use EXT4. Your incremental snapshot creation times will be less than 2 minutes in most cases. So you are not saving much time. Restoring a snapshot does take 4 minutes or so on EXT4. Maybe even a little more. But again, that is not much time to save. btrfs is too much of an unknown for me.

Is the answer different between an HDD and a SSD? I'm thinking No, but I don't know.
SimonPeter
Level 5
Level 5
Posts: 579
Joined: Tue Jul 13, 2021 5:13 am

Re: Should I choose btrfs or ext4 installing to a HDD?

Post by SimonPeter »

TL; DR
Use ext4 when in doubt.

ext4 is more stable but has lesser features.
btrfs is less stable and has more features.

Losing your important data due to an unstable filesystem is really a bitter experience.

Defragmentation is normally unnecessary (and may even be counterproductive) for most (if not all) cases , if you use a Linux filesystem.

BTW: On linux, I use ext4 (almost exclusively) and I have NEVER defragmented any Linux filesystem (ext4, ext3, ext2, btrfs, xfs)
Locked

Return to “Installation & Boot”