Hello everyone. I’m going to build a new PC soon and I’m trying to maximize its reliability all I can. I’m using Debian Bookworm. I have a 1TB M2 SSD to boot on and a 4TB SATA SSD for storage. My goal is for the computer to last at least 10 years. It’s for personal use and work, playing games, making games, programming, drawing, 3d modelling etc.

I’ve been reading on filesystems and it seems like the best ones to preserve data if anything is lost or corrupted or went through a power outage are BTRFS and ZFS. However I’ve also read they have stability issues, unlike Ext4. It seems like a tradeoff then?

I’ve read that most of BTRFS’s stability issues come from trying to do RAID5/6 on it, which I’ll never do. Is everything else good enough? ZFS’s stability issues seem to mostly come from it having out-of-tree kernel modules, but how much of a problem is this in real-life use?

So far I’ve been thinking of using BTRFS for the boot drive and ZFS for the storage drive. But maybe it’s better to use BTRFS for both? I’ll of course keep backups but I would still like to ensure I’ll have to deal with stuff breaking as little as possible.

Thank you in advance for the advice.

0 points
*

Ten years is a long time. In ten years 4Tb storage will be less than a crappy thumb drive.

For reliant storage I personally would get two hdd for a price of one ssd, slap a software raid1 with ext4 on them and forget about them until the mdadm alerts

permalink
report
reply
4 points

Moore’s Law is not really in effect anymore. At least the growth is no longer at an exponential rate.

permalink
report
parent
reply
1 point

BTRFS - easy, fast, reliable, snapshots, compression, usable RAID, CoW, online resizing… ZFS - hard to get into, reliable, snapshots, compression, state of the art RAID, CoW…

Everything else, particularly Ext4 should be avoided. Your life will be a lot easier once you discover snapshotting and also how more robust and reliable BTRFS and ZFS are. I got into BTRFS a few years ago in order to survive power losses as I had issues with Ext3 and Ext4 regularly with that. My experience with Ext4 disks was always: if something goes slightly wrong your data is… puff gone.

permalink
report
reply
22 points

Ext4 with backups

permalink
report
reply
15 points

This for sure. As a general rule of thumb, I use XFS for RPM-based distros like Red Hat and SuSE, EXT4 for Debian-based.

I use ZFS if I need to do software RAID and I avoid BTRFS like the plague. BTRFS requires a lot of hand holding in the form of maintenance which is far from intuitive and I expect better from a modern filesystem (especially when there are others that do the same job hassle free). I have had FS-related issues on BTRFS systems more than any other purely because of issues with how it handles data and metadata.

In saying all that, if your data is valuable then ensure you do back it up and you won’t need to worry about failures so much.

permalink
report
parent
reply
3 points

Hey, thanks for the help. Can you elaborate on what kind of issues BTRFS gave you? What caused them, too?

permalink
report
parent
reply
1 point

It needs a bit of periodic maintenance, the btrfs-assistant and btrfsmaintenance packages will set it up and from then on it’s automatic.

permalink
report
parent
reply
2 points

Sure, I’ve used it both in Server and NAS scenarios. The NAS was where we had most issues. If the maintenance tasks for BTRFS weren’t scheduled to run (balance, defrag, scrub and another one i can’t recall), the disk could become “full” without actually being full. If I recall correctly it’s to do with how it handles metadata. There’s space, but you can’t save, delete or modify anything.

On a VM, its easy enough to buy time by growing the disk and running the maintenance. On a NAS or physical machine however, you’re royally screwed without adding more disks (if its even an option). This “need to have space to make space” thing was pretty suboptimal.

Granted now I know better and am aware of the maintenance tasks, I simply schedule them (with cron or similar). But I still have a bit of a sour taste from it, lol. Overall I don’t think it’s a bad FS as long as you look after it.

permalink
report
parent
reply
2 points

OpenSUSE, both Leap and Tumbleweed, use btrfs by default. Do you switch those to xfs during installation?

I’ve had btrfs snapshots pull me out of the fire multiple times on my home machines, but I don’t fully trust any file system at all, so I rsync stuff to two local network destinations and an off-site location as well. Those, too, have come in handy.

permalink
report
parent
reply
2 points

Yep, sure do. I’ve no real benefit for the features it adds, or I’m completely ignorant to the benefits is probably more accurate :)

For the things you’ve mentioned it is useful. I think the main thing I’ve been warned to never do with BTRFS is use it for RAID and to use md under it instead. That said, that could be old info and it may be fixed now.

permalink
report
parent
reply
4 points

ZFS is great but I wouldn’t recommend it for single volume setups. I’ve never lost data with it but the parity has always been the saviour.

Never used BTRFS.

I avoid XFS due to performance reasons as most my systems are comprised of many smaller files which XFS isn’t great for. But the usage I’ve had with it, it’s been great

EXT4 is always my go-to for normal usage. Unless I need to be supporting older machines then it’s ext2/3.

permalink
report
parent
reply
13 points
*

Zfs, absolutely, because you can send the data where you need.

I disagree completely with btrfs, because if something goes wrong, that’s it, recovery is not pleasant. Zfs isn’t perfect, but it has recovery modes.

Alternately, ext4, it’s recoverable, safe, and with journaling it’s solid on power loss.

edit: Other poster was right about bitrot and checksumming, stick with zfs, xfs is good too so long as you’re not running a db.

permalink
report
reply
2 points

btrfs can also send volumes to whatever you want, even a file.

permalink
report
parent
reply
2 points

How do you typically recover things on zfs vs btrfs? Also, is the out-of-tree kernel modules thing something you have to deal with or take into account?

permalink
report
parent
reply
2 points
*

The out-of-tree thing is annoying, but most distros have zfs support as modules already.

I’ve never had to worry about zfs recovery when it wasn’t a raid, it seems to be automatic, but you have zpool checkpoints, scrubs, snapshots, really a ton of ways to go back to a working state, and you can also try to recover bad files if you use the right techniques.

Look at zdb, it’s pretty intense.

permalink
report
parent
reply
10 points

I’ve been running ZFS for around 12 years (on FreeBSD and Linux) and I’m not sure why anyone would ever use anything else.

It’s got the age, community, and wide acceptance that makes it a proven safe & reliable option.

permalink
report
reply
1 point

I agree that ZFS is a very solid choice. The only thing that can be slightly painful is the out of tree modules.

permalink
report
parent
reply

Linux

!linux@lemmy.ml

Create post

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

  • Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
  • No misinformation
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

Community stats

  • 8.5K

    Monthly active users

  • 6.3K

    Posts

  • 173K

    Comments