Best filesystem?
I am going to install Arch on my XPS 13 and was wondering which file system are the best.
I hear that ext4, btrfs and F2FS are among the best. Are there any others that are better and which one would be the best?
About this post
- Posted
- Archived
- Score
- 0 · 100% up
- Kind
- Text
- ID
- 5hanip
32 comments
If you're relatively new to Linux, I would install ext4 and move on to learning the other aspects of Linux and Arch. FS worries right now is not the best use of time IMO.
Good luck and welcome to Arch.
I like btrfs
Any filesystem that supports snapshots really. They are a lifesaver once you set up automatic rolling snapshots.
Which would you say then?
Someday I hope BTRFS will be there, but even with all the hassle of using ZFS in linux, I currently pick ZFS.
But, I also run FreeBSD servers, and only use linux on desktop/laptop, so ZFS makes more sense for me so I can have a common filesystem everywhere.
If you don't mind having a DKMS module try ZFS first. Has a degree of learning to it. Be warned, in case of filesystem corruption your data is most likely doomed, so have it backed up. This is an filesystem built for enterprise first and is missing a few bells and whistles that would be really nice to have on consumer PCs, but are not present.
If ZFS isn't available (x64 only for now) go with an up to date kernel and btrfs. Also a slight learning curve. Avoid RAID5/6 since it is not yet fully stable.
XFS as far as I know does not support snapshots just yet. When it does, I would recommend it over Btrfs.
Edit:
If you will try to use ZFS for your root partition it takes some juggling to get the system bootstrapped. If you don't manage it, I do recommend Btrfs which Linux can install to natively as root.
ZFS
Best filesystem overall: ZFS, if you have enough ECC ram to run it.
Best Linux native: Btrfs, parity raid is buggy but raid 0/1 work fine.
Ext4 is less resource hungry and can be faster in some cases, though it doesn't have the advanced features.
Every filesystem needs ECC ram to prevent corruption from background radiation, there's nothing special about ZFS that requires it. Similarly, most of the memory ZFS uses is just cache on ram, other filesystems report it as kernel usage.
Hmm.. I'd think that the filesystem that makes the most use of ram would benefit the most from ECC.. I'll take your word for it though and build my next pool on non-ecc.. The 1GB ram per TB of storage is still recommended though right?
As said archover, if you are new to Linux, use ext4, it's a simple, but reliable filesystem, it's the default on a lot of distributions. it's a safe, reliable choice.
yet if you want to learn, btrfs is a very good filesystem, one of his most interesting feature is subvolumes : on a single partition, you can hold your
/and your/home, which is nice if you are short on disk space. You can also “snapshot” a subvolume to get back to it latter while only the changes occupy disk space, neat, but now, the awesome : is is writable, too. snapshot your root subvolume, and reboot into it, try things, install cinnamon and gnome shell at the same time, try wayland, mess up things. you can destroy the whole system without damage : just reboot, delete the “root-experimental” subvolume, and everything will be fine.there is also some other nice things, like the « your data is compressed on your disk, but is given decompressed when you ask for it » option, which let you save disk space and speed up HDD whic, the built-in support for raid 0 and 1 (5 and 6 are coming, but still experimental), or the fact that there is a defragmentation utility (ext4 don't have any)
Good thing, btrfs is considered stable since 2014 (it was born in 2007), and if you don't want to mess around, just create 2 subvolumes, @root and @home, and use it like if it was an ext4 disk. unlike ZFS, you don't need to install kernel modules or such, it is built-in the Linux kernel
They are drawbacks, sure, due to the “only changes are saved” and the compression thing, it can be a bit tricky to know how much thing you can still put in it, and it is not possible to use swapfiles with it, so you will have to use a swapfile (or no swap at all).
But it definitely worth it.
I like btrfs for all the reasons listed above.
I started using btrfs about a year ago, and so far, I have had no file-related problems. None. Admittedly, I'm just using it on my personal computers and storage devices, and I'm not subjecting my drives to data-center punishment. (Nor am I using RAID 5/6, which is reportedly problematic on btrfs.)
Snapshots and subvolumes are great, and I really appreciate the "scrub" function. I haven’t found any bit-rot yet, but it’s reassuring to have a way to check.
My only disappointment with btrfs is that it doesn't yet support native file encryption. But for me, btrfs has been working great with LUKS, so no problem.
As for not supporting swapfiles, also not a problem. I just use a separate LUKS-encrypted swap partition.
Indeed, and I am using both a luks-encrypted btrfs and swap partition :-)
Hijacking your comment for a quick question - is it feasible to convert ext3 partitions to ext4 with a minimal risk of data loss?
Well, from ext3 to 4 ? Honestly, I don't know, but I'm not sure it would give more positive than negative, because if there is a solution, even reliable, the interests of switching from ext3 to 4 aren't very big (they would have if switching from 2 to 4).
If you want to find one, I'd suggest you to google it.
If you were thinking “ext* to btrfs”, however, there is an utility, btrfs-convert out here, which just takes a bit of free space and let you rollback in case of mistake.