Just a simple question : Which file system do you recommend for Linux? Ext4…?

EDIT : Thanks to everyone who commented, I think I will try btrfs on my root partition and keep ext4 for my home directory 😃

120 points

If you’re just doing a vanilla Linux install, ext4 is the way to go.

permalink
report
reply
-46 points

Upvoted. Not everyone wants to rely on backups and restore broken system every month like on BTRFS

permalink
report
parent
reply
72 points

We’re not in 2014 anymore.

permalink
report
parent
reply
-4 points

File system is a core component of any electronic system. Even if it’s just 1% less stable than other ones, it’s still less stable. Maybe it’s faster in some cases and supports better backups but ehh idk if it’s worth it. Losing documents is something you probably want to avoid at all costs

permalink
report
parent
reply
13 points
*

I disagree. My partition is ext4, but Timeshift saved my ass when an upgrade went wrong. I just had to restore the system from a previous snapshot taken before the upgrade.

permalink
report
parent
reply
-9 points

Of course updates can break stuff. What I don’t understand is why would you intentionally go for a less stable FS that can break and corrupt all files? It’s especially bad on old machines with limited space where full backups are not possible

permalink
report
parent
reply
9 points

And LVM is more than good enough for occasional snapshots before a major upgrade.

permalink
report
parent
reply
1 point

What’s lvm like compared to btrfs?

permalink
report
parent
reply
8 points
*

Good that you mentioned that. Reminded me that I have an Arch Linux install here where I forgot that I did choose BTRFS during installation. Within maybe a month I noticed FS errors. Looked scary. Nervously searching for documentation was even more scary :

https://wiki.archlinux.org/title/btrfs#btrfs_check -> This article or section is out of date. (Discuss in Talk:Btrfs) Warning: Since Btrfs is under heavy development, especially the btrfs check command, it is highly recommended to create a backup and consult btrfs-check(8) before executing btrfs check with the --repair switch.

What is this? My beloved Arch Wiki is not 100% perfect!

Then found this :

WARNING: Using ‘–repair’ can further damage a filesystem instead of helping if it can’t fix your particular issue.

Warning

Do not use --repair unless you are advised to do so by a developer or an experienced user, and then only after having accepted that no fsck successfully repair all types of filesystem corruption. E.g. some other software or hardware bugs can fatally damage a volume.

I figure this explains the popularity of BTRFS snapshot configurations. Luckily I had some backups :)

permalink
report
parent
reply
4 points

Filesystem snapshots won’t help, if the filesystem itself corrupts. But I’ve been using BTRFS for 6 years now and haven’t had a file system corruption, so mileage may obviously vary.

permalink
report
parent
reply
47 points

In my opinion, it depends. If a distro has BTRFS configured to automatically take a snapshot when upgrading (like OpenSuse Tumbleweed), then BTRFS.

If not, for a beginner, ext4 + timeshift to take snapshots of your system in case an upgrade goes wrong will be fine.

permalink
report
reply
1 point

But you can also just use BTRFS without any fancy setup and not use its features, it will still be faster.

permalink
report
parent
reply
6 points

Btrfs has many advantages over ext4, but being faster isn’t one of them.

permalink
report
parent
reply
1 point
*

Btrfs is slower than ext4, xfs, and f2fs in pretty much every metric. Noticeably slower app opening times is the reason I switched to F2FS for good.

permalink
report
parent
reply
1 point

Edit: BTRFS has advantages that likely make it better for me.

It has compression and allows flexible partition sizes. The compression may explain the speed decreases.

permalink
report
parent
reply
1 point

Very interesting. I heard F2FS has no journalling, but afaik Fedora Atomic doesnt rely on it?

It might be worth looking into, as it beat many tests.

permalink
report
parent
reply
0 points

Mint doesn’t default to btrfs, but will use it if you so choose during install. And it integrates fantastically with Timeshift. I’ve set up daily and weekly snapshots and have peace of mind.

permalink
report
parent
reply
37 points

Honestly, unless there’s some specific thing you’re looking for just use your distro’s default. If your distro doesn’t have a default I’d probably default to ext4. The way most people use their computers there’s really no noticeable advantage to any of the others, so there’s no reason not to stick with old reliable. If you like to fiddle with things just to see what they can do or have unusual requirements then btrfs or zfs could be worth looking into, but if you have to ask it probably doesn’t matter.

permalink
report
reply
1 point

Agreed, ext4 is a perfectly fine default for the os. Xfs is also a good choice. I have my os on ext4 and data on xfs and I’ve never had issues. My only headache is LVM, because I don’t actually need the additional flexibility it offers. (And mdraid is flaky, but I think that’s because of how I set it up. Maybe you aren’t supposed to use a whole drive, you’re supposed to partition it first?)

permalink
report
parent
reply
1 point

Correct, you want partitions. Some motherboards will helpfully “fix” your partition table when they see that.

permalink
report
parent
reply
35 points

ext4 has been battle-tested for many years and is very stable. Doesn’t have the same fragmentation and data loss issues certain other filesystems like NTFS have.

permalink
report
reply
16 points

And it has repair tools that actually work and can make the filesystem usable again.

permalink
report
parent
reply
-6 points

Until you pull the power at the wrong time. Its better to use Btrfs as others have said.

permalink
report
parent
reply
3 points

But pulling the power on a btrfs drive at the wrong time results in you not even being able to mount it as read only. No snapshotting can help you there.

permalink
report
parent
reply
-2 points

I have not had that experience

permalink
report
parent
reply
26 points

Btrfs. Just format as one big partition (besides that little EFI partition of course) and don’t worry about splitting up your disk into root and home. Put home on its own subvolume so that root can be rolled back separately from it. You can have automatic snapshots, low-overhead compression, deduplication, incremental backups. Any filesystem can fsck its own metadata, but btrfs is one of the few that also cares if your data is also intact.

permalink
report
reply
1 point

It cares so much that when it goes wrong you can’t even mount the partitions as readonly to try get your data back. It will stubbornly hold on to it and refuse any access at all. Boy I am so glad it didn’t let me access a potentially corrupted byte somewhere!

permalink
report
parent
reply

Linux

!linux@lemmy.ml

Create post

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

  • Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
  • No misinformation
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

Community stats

  • 8.8K

    Monthly active users

  • 5.4K

    Posts

  • 150K

    Comments