What filesystem is currently best for a single nvme drive with regard to performance read/write as well as stability/no file loss? ext4 seems very old, btrfs is used by RHEL, ZFS seems to be quite good… what do people tend to use nowadays? What is an arch users go-to filesystem?
Hi all. Apologies to hijack this thread. Figured it should be OK since it’s also on the topic of file systems.
Long story short, I need to reinstall Nobara OS and I plan to install Nobara on my smaller SSD drive with btrfs and set my /home folder to my larger nvme. I’m thinking of using ext4 for my /home and have snapshots of the main system stored on the nvme. Looking for a sanity check to see if this is OK or if I should be doing things differently. Thanks.
So you’re going to make snapshots of the ext4 filesystem onto the BTRFS one?
On the contrary, my intention is to make snapshots of the OS (btrfs) and my idea is to store the snapshots on the /home nvme drive (ext4).
I don’t know if that’s the standard practice or if I’m over complicating things. My SSD is only 240Gb (I think) while my nvme is a 1Tb drive, thus the intention to store snapshots on the nvme. Maybe the 240Gb is sufficient for say a month’s worth of snapshots plus the OS?
Yes, that’s true. Then again, I’m mainly using my PC for gaming and most of what will be in /home will be game installs. I have my photos and music backups in a separate HDD.
I think at the end of the day, what I’m trying to achieve with the btrfs snapshots is to be able to roll back my OS in case a system update goes wrong, or I did something I shouldn’t have. :p
No, that’s a very bad idea. BTRFS has deduplication, without that the snapshots would take up way to much space. Also it’s too many writes since ext4 doesn’t use cow and would have to do distinct writes for every snapshot.
The 240 gb are plenty for a root system without /home and years worth of snapshots on a btrfs volume, only the changes take up space so the amount of snapshots hardly matters.
For /home either ext4, xfs or btrfs is fine. Personally I only use a single btrfs volume and put certain folders in their own subvolumes so they can have different settings for snapshots(no snapshots for /home, tmp and cache folders).
Noted. Thanks for your clear response. I’ll just keep it simple have the OS snapshots on the same partition.
oh I just read up on this last knight. Yes ext4 is old but it is used because it is still works quite well. btrfs, dis anyone say that as butfarts, can handle much larger partitions ext4 maxes out at a few tb while btfrs can get much larger. ZFS can handle a around a billion tb but it needs a lot more resources to to even start
eh which ever value it is smaller then btfrs or zfs
FAT32
Great for USBs
I have two drives in my machine, nvme and a sata. Nvme is my root partition and it is set to btrfs, because I love snapshots, they are just a must for me. The sata is my home partition and it is on ext4. Ext4 and is tried and true and I don’t want to risk losing my personal files.
We’re moving towards more btrfs - or at least LVM+<other FS> where there’s no btrfs support - on as much of our server fleet as we can, since the lack of snapshotting on the other filesystems is making consistent backups way too expensive resource- and time-wise.
With LVM it’s at least possible to take a block-level snapshot - which is really inefficient compared to a file-level snapshot, but it at least provides a stable point for backups to run from, without having to pause all writes during the backup or risk running out a sliding window if allowing writes to continue.For a home user (especially one who’s not as well versed in Linux or don’t have tinkering time), I’d personally suggest either ext4 - since it’s been the default for a while and therefore often what’s assumed in guides, or btrfs where distros include it as a default option - since they should be configured with snapshots out of the box in that case, which make it much harder for the system to break due to things like unexpected shutdowns while running updates.
I’d personally stay away from ZFS for any important data storage on home computers, since it’s officially not supported, and basically guaranteed never to be either due to licensing. It can remain a reasonable option if you have the know-how - or at least the tinkering time to gain said know-how, but it’s probably going to be suboptimal for desktop usage regardless.
Thank you
I find btrfs pretty good for desktop use mostly due to convenience it offers with managing devices(adding new device or migrating data is trivial and does not need any downtime) and subvolumes(different mount options or excluding some data from snapshots).
It depends, for a normal user? Ext4, maybe btrfs because in terms of stability is the best {but u lose some functions like the ability to make a swap file, wich today isn’t really that useful, but u lose the ability to make one). Want something really fast fort large files? ZFS, but if u experience an energy loss it could be really catastrophic.
Ext in general is so good that even to this day android it’s still using EXT2, 2!
You can make a swap file on btrfs.
First of all, thanks this r news for me. But I don’t think is a good idea to use the swap file in btrfs.
It is supported since kernel 5.0
There are some limitations of the implementation in BTRFS and Linux swap subsystem:
filesystem - must be only single device filesystem - must have only single data profile subvolume - cannot be snapshotted if it contains any active swapfiles swapfile - must be preallocated (i.e. no holes) swapfile - must be NODATACOW (i.e. also NODATASUM, no compression)
With active swapfiles, the following whole-filesystem operations will skip swapfile extents or may fail:
balance - block groups with extents of any active swapfiles are skipped and reported, the rest will be processed normally resize grow - unaffected resize shrink - works as long as the extents of any active swapfiles are outside of the shrunk range device add - if the new devices do not interfere with any already active swapfiles this operation will work, though no new swapfile can be activated afterwards device delete - if the device has been added as above, it can be also deleted device replace - ditto
Yes, there are some limitations to be aware of, with how it interacts with certain features. But EXT4 doesn’t have any of those features at all. It doesn’t have CoW, or balance, or multi-device, or snapshots.
If the filesystem, is single-device, and you have the swapfile on it’s own nocow subvolume, preallocate the swapfile, and don’t try to take snapshots of it, it should be fine.
Ext4 is all I use, except for boot partitions that require different filesystems.
Been using BTRFS for all disks and purposes for a few years, I would recommend it with the requirement that you research it first. There are things you should know, like how/when to disable CoW, how to manage snapshots, how to measure filesystem use, and what the risks/purposes of the various btrfs operations are. If you know enough to avoid doing something bad with it, it’s very unlikely to break on you.
Huh. I just realized the problem with “don’t use upvotes to show agreement.” It means encouraging low-effort “me-too” posts.
I don’t have much to add to your comment, just… me too.
I usually just use EXT4, but perhaps you should check out F2FS. It’s designed for solid state storage mediums, as while most were created with traditional spinning hard discs in mind
ITT 5 answers by 4 people
ext4 works perfectly fine for me and most people.
btrfs is great for system stability because of snapshots. You can set it up to automatically make snapshots at a timed interval or every time you run pacman.
If something breaks, you can just revert to a previous snapshot. You can even do this from grub. It’s a bit hard to set up, so if you want, you could use an arch based distro which automatically sets it up like GarudaOS.
Too bad btrfs still doesn’t support encryption natively, unlike ext4.
How much is ext4 filesystem-level encryption actually used though?
I guess not much on desktop Linux, but every Android phone uses it. Really wish every Linux desktop would start encrypting their /home partition by default, which is the standard by many other operating systems.
Android on many OEMs migrated to EROFS from F2FS for system partition.
Got any source for that? Android has traditionally always used ext4 afaik, not sure if that changed in the last few years.
Wiki says:
Motorola Mobility has used F2FS in their Moto G/E/X and Droid phones since 2012. Google first used F2FS in their Nexus 9 in 2014. However Google’s other products didn’t adopt F2FS until the Pixel 3 when F2FS was updated with inline crypto hardware support.
Huawei has used F2FS since the Huawei P9 in 2016. OnePlus has used F2FS in the OnePlus 3T. ZTE has used F2FS since the ZTE Axon 10 Pro in 2019.
I assume since Google is involved that more and more Android phones will adopt F2FS in the future.
So only a handful of devices support F2FS right now and is not the default
Wow, first time I’ve seen GarudaOS recommended by someone who’s not me. Awesome distro, daily driver on my gaming rig.
There are dozens of us. Dozens!
Or OpenSUSE , all setup out of the box for btrfs, snapshots, grub rollback, and cleanup timers, etc.
I’m using btrfs for my desktop and laptop (and its snapshots have saved me a couple of times), and ZFS for my NAS and router. Both seem pretty robust.