Trying filesystems

I have been spending too much time rearranging deck chairs on the Titanic - or, rather, filesystems on the main computer. I’ve ended up with this one here - and I like it so far.

TARGET                                SOURCE     FSTYPE       OPTIONS
/                                     /dev/nvme0n1p8
│                                                f2fs         rw,noatime,lazytime,background_gc=on,discard,no_heap,user_xattr,inline_xa
├─/boot                               /dev/nvme0n1p4
│                                                ext4         rw,noatime
│ └─/boot/efi                         /dev/nvme0n1p1
│                                                vfat         rw,noatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortna
└─/mnt/data                           zdata      zfs          rw,xattr,noacl

Anyone trying odd combinations - and if so, why? :grin:

1 Like

i dont like f2fs. has given me problems i couldnt fix with the tools provided. same with btrfs. zfs cant be resized or moved. reiser was my go to back in the day but that has been gone for some time. ext4 seems to fit my needs very well all the time every time. I have had devices formatted with f2fs in particular that failed to run but reformatted with ext4 are still going strong years later.

2 Likes

I have to assume that your f2fs troubles were back a while. I haven’t seen much recent about any - not even on Android. I only use it on ‘replaceable’ system sections anyway… such as those that get rewritten by a re-install. No failures to run as yet… :crossed_fingers:

As for ZFS - it is used as an entire drive, so grow and shrink are not in play. In fact I believe they COULD be grown - and the ‘pool’ can be grown anytime by adding more drives. I am using it for data only, where it’s COW and redundancy features are a plus - not to mention the snapshots if desired. Admittedly I have the world’s simplest ZFS setup (single drive) so I shouldn’t run into too many oddities!

I agree with ext4 being the best ‘all-rounder’ though, and most of my systems are sticking to that, apart from a btrfs (ZFS wannabe?) on a Garuda install. Not sure if the current lockdown has something to do with trying it out, either :grin: Gotta have ‘projects’…

Nope. 5.10 kernel introduced a regression that could (and did) corrupt F2FS file systems.

Ext is virutally bullet proof, great for root and home partitions, and for data only storage islands ZFS and XFS are the best options IMHO.

ZFS is tried and tested and XFS is Red Hat’s enterprise storage go to. Both super scalable and very reliable, but there is a learning curve.

Wannabe is right, poor imitation is possibly a better description.

ZFS pools do not need to take an entire disk. You can put them in a partition. They can also be expanded if you expand the underlying partition. You can’t shrink them. However, you can create new smaller partition and send the snapshots to it and then destroy the original.

2 Likes

Yeah - I was a little imprecise there! What I meant is that I couldn’t see a reason to give it less than a disk (and probably several in most cases). Many systems can grow but not shrink…

I agree with the title of the thread. File systems are trying.

When I upgraded from ssd to m2 sata I just copied the partitions over to the new drive chrooted in and updated grub. Easy Peasy

There is some dichotomy between easy and ‘best’ when it comes to filesystems. My recommendation for others would always be ext4, if no special cases apply.

f2fs is fairly easy to implement (in the kernel) - and only needs a separate boot if you won’t use grub (me). ZFS, on the other hand - needs to set up in every setup you reference it from - and with the key games you have to play with the [archzfs] repo at the moment… :grin:

Still - theoretically it should be worth it for the longer term…

1 Like

When I started with Linux (again) back in 2018, I did some intense research and according to a large number of (other people’s) benchmarks modern ext4 is actually FASTER than f2fs on SSDs and has been for a number of years. It also has automatic trimming since several years back.

1 Like

ZFS can also be installed on a partition along with other partitions and other filesystems on the same drive. This is useful for example if you need a separate swap partition to hibernate and resume from. The downside of this is that the kernels i/o scheduler is being set for the whole drive and not for each partition. ZFS prefers the kernels “none” scheduler because it comes with its own scheduler. But “none” is probably not what you want for the other non-ZFS partitions. So you would probably pick deadline or bfq scheduler for that drive and this would be an extra burden for the ZFS partition. But on the other side that is not really a big deal.

1 Like

Yup - this is not a speed move - though the differences in speed seem small. The difference is in the number and frequency of writes (don’t forget the journaling) - which can actually wear out flash-style memory in normal use. This is also the reason I usually write ‘storage’ USB sticks with ext2 - to skip the journaling (sticks don’t need it for their usual purpose…)

Nothing is a perfect solution, of course - but it’s doing its part to keep me learning…

1 Like