this post was submitted on 05 Feb 2024
46 points (97.9% liked)

Selfhosted

40084 readers
583 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
46
submitted 9 months ago* (last edited 9 months ago) by [email protected] to c/[email protected]
 

A year ago I set up Ubuntu server with 3 ZFS pools on my server, normally I don't make copies of very large files but today I was making a copy of a ~30GB directory and I saw in rsync that the transfer doesn't exceed 3mb/s (cp is also very slow).

What is the best file system that "just works"? I'm thinking of migrating everything to ext4

EDIT: I really like the automatic pool recovery feature in ZFS, has saved me from 1 hard drive failure so far

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 27 points 9 months ago (4 children)

Ext4 does not have snapshots, COW or similar features. I am very happy with BTRFS. It just "works" out of the box.

[–] [email protected] 14 points 9 months ago (1 children)

I use BTRFS on everything too nowadays. The thing that made me switch everything to BTRFS was filesystem compression.

[–] [email protected] 2 points 9 months ago (1 children)

Yes compression is cool. Zstd level 3 to 6 is very quick too 😋

[–] [email protected] 2 points 9 months ago

I use zstd too, didn't specifiy a level tho, so it's just using the default. I only use like ⅔ of the disk space I used before and I don't feel any difference in performance at all.

[–] [email protected] 6 points 9 months ago (1 children)

FWIW lvm can give you snapshots and other features. And mdadm can be used for a raid. All very robust tools.

[–] [email protected] 6 points 9 months ago (1 children)

Yes but BTRFS can this out of the box without extra tools. Both ways have their own advantage, but I would still prefer BTRFS

[–] [email protected] 4 points 9 months ago (1 children)

I'm in BTRFS, and wish I wasn't.

Booting into a failed mdadm RAID1 is normal,

whereas booting into a failed BTRFS RAID1 requires competent manual intervention, and special parameters given to the boot-kernel.

mdadm & lvm, with a fixed version of ZFS would be my preference.

ZFS recently had a bug discovered that was silently corrupting data, and I HOPE a fix has been got in.

Lemme see if I can find something on both of these points..


https://linuxnatives.net/2015/using-raid-btrfs-recovering-broken-disks

https://www.theregister.com/2023/11/27/openzfs_2_2_0_data_corruption/


_ /\ _

[–] [email protected] 2 points 9 months ago

Never had problems, but I wish you all the best for your ZFS problem 🤗

[–] [email protected] 3 points 9 months ago (4 children)

Yes and BTRFS, unlike Ext4, will not go corrupt on the first power outage of slight hardware failure.

[–] [email protected] 5 points 9 months ago

Wut? Ext4 is quite reliable.

[–] [email protected] 3 points 9 months ago

I've run btrfs for years and never had a issue. They one time my system wouldn't boot it was due to a bad drive. I just swapped the drive and rebalanced and I was back up and running in less than a half an hour.

[–] [email protected] 2 points 9 months ago

Corruption on power only regularly happened to me on xfs a few years ago. That made me swear to never use that fs ever again. Never seen it on my ext4fs systems which are all I have for years in multiple computers.

[–] [email protected] 1 points 9 months ago (1 children)

This will also happen to Ext4. You just wouldn't know it.

[–] [email protected] 2 points 9 months ago (2 children)

I'm confused with your answer. BTRFS is good and reliable. Ext4 gets fucked at the slightest issue.

[–] [email protected] 1 points 9 months ago

Never had an issue with EXT4.

Had a problem on a NAS where BTRFS was taking "too long" for systemD to check it, so just didn't mount it... bit of config tweaking and all is well again.

I use EXT* and BTRFS where ever I can because I can manipulate it with standard tools (inc gparted).

I have 1 LVM system which was interesting, but I wouldn't do it that way in the future (used to add drives on a media PC)

And as for ZFS ... I'd say it's very similar to BTRFS, but just slightly too complex on Linux with all the licensing issues, etc. so I just can't be bothered with it.

As a throw-away comment, I'd say ZFS is used by TrusNAS (not a problem, just sayin'...) and... that's about it??

As to the OPs original question, I agree with the others here... something's not right there, but it's probably not the filesystem.

[–] [email protected] 0 points 9 months ago (2 children)

Yes both BTRFS and Ext4 are vulnerable to unplanned powerloss when writes are in flight. Commonly knows as a write hole.

For BTRFS since it use of Copy of Write, it is more vulnerable. As metadata needs to be updated and more. Ext4 does not have CoW.

[–] [email protected] 3 points 9 months ago (1 children)

Ext4 does not have CoW.

That's the only true part of this comment.

As for everything else:

Ext4 uses journaling to ensure consistency.

btrfs' CoW makes it resistant to that issue by its nature; writes go elsewhere anyways, so you can delay the "commit" until everything is truly written and only then update the metadata (using a similar scheme again).

Please read https://en.wikipedia.org/wiki/Journaling_file_system.

[–] [email protected] 1 points 9 months ago (1 children)

BTRFS is currently not Journaling

https://lore.kernel.org/linux-btrfs/[email protected]/T/#m46f1e018485e6cb2ed42602defee5963ed8c2789

Qu Wenruo did a write up on some of the edge cases. Partial write being one of them.

[–] [email protected] 2 points 9 months ago

What you just posted concerns the experimental RAID5/6 mode which, unlike all other block group modes, did not have CoW's inherent safety.

As it stands, there is no stable RAID5/6 support in btrfs. If we're talking about non-experimental usage of btrfs, it is irrelevant.

[–] [email protected] 1 points 9 months ago* (last edited 9 months ago) (1 children)

For BTRFS since it use of Copy of Write, it is more vulnerable. As metadata needs to be updated and more. Ext4 does not have CoW.

This is where theory and practice diverge and I bet a lot of people here will essentially have the same experience I have. I will never run an Ext filesystem again, not ever as I got burned multiple times both at home/homelab and at the datacenter with Ext shenanigans. BTRFS, ZFS, XFS all far superior and more reliable.

[–] [email protected] 1 points 9 months ago

I run BTRFS my self.

And I agree BTRFS , is superior.

[–] [email protected] -2 points 9 months ago

ZFS will perform better on a NAS