this post was submitted on 04 May 2024
97 points (100.0% liked)

Linux

1259 readers
68 users here now

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

Related Communities

Community icon by AlpΓ‘r-Etele MΓ©der, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

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 πŸ˜ƒ

top 50 comments
sorted by: hot top controversial new old
[–] harsh3466@lemmy.ml 84 points 6 months ago (1 children)

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

[–] GolfNovemberUniform@lemmy.ml 19 points 6 months ago (3 children)

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

[–] 2xsaiko@discuss.tchncs.de 45 points 6 months ago (1 children)

We're not in 2014 anymore.

[–] GolfNovemberUniform@lemmy.ml 5 points 6 months ago (1 children)

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

[–] 2xsaiko@discuss.tchncs.de 17 points 6 months ago (7 children)

Yeah, but it isn't noticeably "less stable" if at all anymore* unless you mean stable as in "essentially in maintenance mode", and clearly good enough for SLES to make it the default. Stop spreading outdated FUD and make backups regularly if you care about your documents (ext4 won't save you from disk failure either which is probably the more likely scenario).

* not talking about the RAID 5/6 modes, but those are explicitly marked unstable

[–] boredsquirrel@slrpnk.net 20 points 6 months ago* (last edited 6 months ago)

My short BTRFS history

  1. Installed on a 1TB NVME
  2. used for 2 years
  3. Rebased my system a ton, used rpm-ostree a ton (which uses BTRFS for the snapshots I think?)
  4. Physically broke the SSD by bending (lol used a silicon cooler pad but it bent it) which resulted in hardware crashes
  5. With dd barely managed to get all the data onto a 1TB SATA SSD
  6. dd-ed the SATA SSD onto a 2TB NVME
  7. deleted and restored the MBR, resized the BTRFS partition to max, resized the BTRFS filesystem to max, balanced it

Still works, never had a single failure

load more comments (6 replies)
[–] Mereo@lemmy.ca 10 points 6 months ago* (last edited 6 months ago) (8 children)

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.

load more comments (8 replies)
[–] lemmyreader@lemmy.ml 7 points 6 months ago* (last edited 6 months ago) (1 children)

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 :)

load more comments (1 replies)
[–] yozul 38 points 6 months ago (1 children)

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.

load more comments (1 replies)
[–] Mereo@lemmy.ca 36 points 6 months ago (2 children)

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.

[–] boredsquirrel@slrpnk.net 5 points 6 months ago (1 children)

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

[–] narc0tic_bird@lemm.ee 5 points 6 months ago

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

load more comments (1 replies)
[–] Adanisi@lemmy.zip 24 points 6 months ago (4 children)

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.

[–] mbirth@lemmy.mbirth.uk 10 points 6 months ago

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

load more comments (3 replies)
[–] rotopenguin@infosec.pub 20 points 6 months ago (1 children)

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.

load more comments (1 replies)
[–] OsrsNeedsF2P@lemmy.ml 18 points 6 months ago (1 children)

As someone who ran BTRFS for years, I'm personally switching back to EXT4. Yes, the compression and other features are nice, but when things go wrong and you have to do a recovery, it's not worth the complexity

[–] possiblylinux127@lemmy.zip 11 points 6 months ago (1 children)

I've found it much easier and way more reliable. If I pull out the power on ext4 it is likely to cause corruption and sometimes you can't fix it.

Btrfs is pretty much impossible to completely corrupt. I've had drives fail and I didn't lose anything

[–] OsrsNeedsF2P@lemmy.ml 18 points 6 months ago

Lemme say this - While complex, I can vouch for recovering files on BTRFS. I can't vouch for recovering files on ext4, because I never had to.

[–] tearsintherain@leminal.space 17 points 6 months ago (1 children)

ext4 unless you need features offered by another FS.

[–] billgamesh@lemmy.ml 5 points 6 months ago

Especially just getting into linux. Ext4 works well enough, when you learn enough to care about what it doesn't do well try something then

[–] muhyb@programming.dev 13 points 6 months ago

I personally use ext4 everywhere but it is recommend to have BTRFS for your OS partition if you take snapshots often.

[–] Andromxda@lemmy.dbzer0.com 12 points 6 months ago (2 children)

Btrfs is cool because it supports snapshots, if you don't plan on using these, just go with ext4

[–] Eyck_of_denesle@lemmy.zip 6 points 6 months ago

I don't use snapshots but i love the compression.

load more comments (1 replies)
[–] darklamer@lemmy.dbzer0.com 12 points 6 months ago

If you don't actually have an opinion, just go with the default, ext4 really is a very good file system, but if you want to have an opinion and not go with the default, zfs is truly a fantastic file system.

[–] verdigris@lemmy.ml 11 points 6 months ago

Ext4 for most home users, because it's simple and intuitive. Btrfs for anyone who has important data or wants to geek out about file systems. It's got some really cool features, but to actually use most of them you'll have to do some learning.

[–] cmnybo@discuss.tchncs.de 11 points 6 months ago (2 children)

I would recommend using btrfs on SSDs and ext4 on hard drives.

[–] caseyweederman@lemmy.ca 4 points 6 months ago (3 children)

Ok but please explain subvolumes, the information has failed to latch onto my brain

load more comments (3 replies)
load more comments (1 replies)
[–] bjoern_tantau@swg-empire.de 10 points 6 months ago (1 children)

Just go with whatever is the default of your distribution.

That said I've come to love the automatic snapshots OpenSUSE gives me with BTRFS. I think they use snapper to automate that. It does a snapshot before and after every packet install, update or removal. And it has some system to delete snapshots that aren't needed anymore but it always keeps enough to give you peace of mind, especially when you're experimenting.

I should look into keeping some snapshots of my ~ as well. And I should implement that especially for my family.

load more comments (1 replies)
[–] LiamMayfair@lemmy.sdf.org 10 points 6 months ago

Btrfs. It was the default filesystem already when I used Fedora on both my personal and work laptops. Not a single problem. It is true I don't really make much use of most of its advanced features like snapshotting, CoW, etc., but I also didn't notice any difference whatsoever in stability compared to ext4 so I'm pretty happy with it as my new default.

[–] savvywolf@pawb.social 10 points 6 months ago* (last edited 6 months ago)

For standard use, ext4. If you want to tinker and use fancy features, btrfs (or maybe zfs?).

[–] thingsiplay 7 points 6 months ago

Ext4: It's the most common used and most mature filesystem we have. You can use any rescue system without pitfalls, in case your system fails. Some other filesystems have edge cases or a special setup is required. I am not saying they are bad or so, just saying if you have to ask this question to a public forum, then it's probably more safe to just use the default Ext4 system. It's battle tested for ages.

[–] LeFantome@programming.dev 7 points 6 months ago (3 children)
[–] possiblylinux127@lemmy.zip 3 points 6 months ago

Don't use it quite yet

load more comments (2 replies)
[–] john89@lemmy.ca 7 points 6 months ago

ext4, just keep it simple.

[–] kixik@lemmy.ml 7 points 6 months ago* (last edited 6 months ago) (2 children)

How about bcachefs. I'm waiting for it to support swapfiles, which seems to be in the TODO list, but so far doesn't work. If you use swap partition[s], or prefer not to have swap at all (I never fell for this, and besides swap is required for hibernation if that's a thing for you), then bcachefs is ready for you. It's already part of linux since 6.7, and on Artix, current linux is 6.8.9...

To me is the FS to use. I'm still on luks + ext4 (no LVM) and do entire home backups with plain rsync to an external device. I'd have to learn new stuff, since ext4 is really basic and easy to configure if in need, but I think bcachefs is worth it, and as mentioned, just waiting for it to support swapfiles, :)

load more comments (2 replies)
[–] therealjcdenton@lemmy.zip 6 points 6 months ago

Do what OpenSUSE Tumbleweed suggests, make a brtfs partition for your system and xfs/ext4 for home parition

[–] Zoidberg@lemm.ee 6 points 6 months ago (1 children)

I love zfs. Started using it for my data storage pool and now I have it on root as well. It has some rough edges but overall it is very stable and has amazing features.

load more comments (1 replies)
[–] KindaABigDyl@programming.dev 5 points 6 months ago

Ext4 is, afaik, the fastest as it's the most understood

Btrfs has compression and you can make snapshots to roll back to if something goes wrong (not necessary on immutable distros or NixOS tho)

There are many other options, but I've only ever had a need for those two

[–] boredsquirrel@slrpnk.net 4 points 6 months ago* (last edited 6 months ago) (3 children)

BTRFS is not more performant than EXT4.

I personally dont use any features of BTRFS manually though, as Fedora Kinoite does that for me.

[–] Corgana@startrek.website 3 points 6 months ago* (last edited 6 months ago) (3 children)

2008 is not "damn old" in terms of filesystems.

load more comments (3 replies)
load more comments (2 replies)
[–] communist 4 points 6 months ago (2 children)

I use f2fs on ssd's and ext4 on hdd's

I don't see the need for snapshots, I backup externally

load more comments (2 replies)
[–] penquin@lemm.ee 4 points 6 months ago (2 children)

I have 3 drives in my pc. I have btrfs for root so I can do my snapshots, and the rest are on ext4. I've heard very good things about xfs, too, but I'm more familiar with btrfs and ext4

load more comments (2 replies)
[–] SaltyIceteaMaker@lemmy.ml 3 points 6 months ago* (last edited 6 months ago) (3 children)

So i normally go with ext4, however windows can't really access ext4 drives so you'd need to find a file system that both support if you want to access the drive/partition from windows. My drive with all the games is ntfs for example which works in Windows and Linux. (At least for normal storage, idk if you can boot linux from it although i wouldn't see why not)

[–] bjoern_tantau@swg-empire.de 11 points 6 months ago (3 children)

NTFS can't handle Linux file permissions. It is not suited as a system drive.

And supposedly it can give you problems if you use it to store your Steam games. I never cared to test that, though.

load more comments (3 replies)
load more comments (2 replies)
load more comments
view more: next β€Ί