cross-posted from: https://programming.dev/post/9319044

Hey,

I am planning to implement authenticated boot inspired from Pid Eins’ blog. I’ll be using pam mount for /home/user. I need to check integrity of all partitions.

I have been using luks+ext4 till now. I am hesistant hesitant to switch to zfs/btrfs, afraid I might fuck up. A while back I accidently purged ‘/’ trying out timeshift which was my fault.

Should I use zfs/btrfs for /home/user? As for root, I’m considering luks+(zfs/btrfs) to be restorable to blank state.

  • BCsven@lemmy.ca
    link
    fedilink
    arrow-up
    20
    ·
    9 months ago

    Btrfs is default on OpenSUSE, has worked great for me for 7 years. No issues.

    • Sureito@feddit.de
      link
      fedilink
      arrow-up
      7
      ·
      9 months ago

      Same here, but for only 1 year on my main machine and 6 years on my laptop. I looove snapper. It saved my ass so many times

      • BCsven@lemmy.ca
        link
        fedilink
        arrow-up
        7
        ·
        9 months ago

        Yes it is great. For me snapper rollback was an awesome onboarding experience to linux. Being eager to try things I read online for tweaks and general explorarion it brought me back to a working system after some custom kernel compiling gone awry, or deleting the wrong file etc.

        • I’ve been on btrfs for so many years, with nightly backups with restic, so I’ve been dragging my feet on snapper. Finally installed it a couple weeks ago, and while I opened the config, I don’t think I changed anything. It’s worked so well, and the Arch package was so well done, that I’d forgotten I had it installed until a few days later I noticed that it was taking snapshots every time before I installed something. It’s shockingly good, and I don’t understand why btrfs+snapper(+grub-btrfs) isn’t the default on installs now.

  • Samueru@lemmy.world
    link
    fedilink
    arrow-up
    18
    ·
    9 months ago

    Been using Btrfs for a year, I once had an issue that my filesystem was read only, I went to the Btrfs reddit and after some troubleshooting it turned out that my ssd was dying, I couldn’t believe it at first because my SMART report was perfectly clean and the SSD was only 2 years old, then a few hours later SMART began reporting thousands of dead sectors.

    The bloody thing was better than smart at detecting a dying ssd lol.

  • deliriousn0mad@feddit.it
    link
    fedilink
    arrow-up
    8
    ·
    9 months ago

    After 4 years on btrfs I haven’t had a single issue, I never think about it really. Granted, I have a very basic setup. Snapper snapshots have saved me a couple of times, that aspect of it is really useful.

  • leds@feddit.dk
    link
    fedilink
    arrow-up
    8
    ·
    9 months ago

    At some, long ago, the Ubuntu installer was offering to use zfs for the boot and root partitions. That sounded like a good idea and worked great for a long time, automatic snapshots, options to restore state at boot etc.

    Until my generous boot partition started to run out if space with all the snapshots (which were setup automatically and no obvious way to configure) OK no big deal, write a bash script that finds the old snapshots and delete them manually whenever boot is full again.

    Then one day recently my laptop wouldn’t boot anymore, Grub could no longer read the zfs on boot. Managed to boot with USB installation image, read zsf and chroot. Tried alot of things but in the end killed zfs and replace with ext4. Then made it boot again.

    Apparently I’m not the only one with this issue.

  • MNByChoice@midwest.social
    link
    fedilink
    arrow-up
    4
    ·
    edit-2
    9 months ago

    I have had great luck with my users’ home directories on ZFS. No issues in years. Used to have issues, and on those days I was glad root was on ext3.

    I had issues with btrfs about 10 years ago. It is much better now.

    Both experiences with Linux.

    A different ZFS partition per user is really helpful for quota and migration.

  • 0x0@social.rocketsfall.net
    link
    fedilink
    arrow-up
    4
    ·
    9 months ago

    I did my first BTRFS setup over the weekend. I followed the Arch wiki to set up what I thought was RAID 1 only to find out nearly a TB of copying later that it was splitting the data between the drives, not mirroring them (only the metadata was in R1.) One command later and I’d converted the filesystem to true RAID 1. I feel like any other system would require a total redo of the entire FS, but BTRFS did it flawlessly.

    I’m still confused, however, as it seems RAID 1 only works with two drives from what I’ve read. Is that true? Why?

    • The Doctor@beehaw.org
      link
      fedilink
      English
      arrow-up
      5
      ·
      9 months ago

      That is not the case. In the context of btrfs, RAID-1 means “ensure that two copies of every data block are available in the running volume,” not “ensure that every bit of both of these drives is identical at all times.” For example, I have a btrfs volume in my server with six drives in it (14 TB each) set up as a RAID-1/1 (both data and metadata are mirrored). It doesn’t really matter which two drives of the six have copies of a given data block, only that two copies exist at all.

      Compare it to… three RAID-1 metadevices (mdadm), with LVM over top, and ext4 (let’s say) on top of that. When a file is created in the filesystem (ext4), LVM ensures that it doesn’t matter on which pair of drives it was written, and mdadm’s RAID-1 functionality ensures that there are always two identical copies of the file (on two identical copies of a drive).

  • pastermil@sh.itjust.works
    link
    fedilink
    arrow-up
    3
    ·
    9 months ago

    Can’t vouch for ZFS, but btrfs is great!

    You can mount root, log, and home on different subvolumes, they’d practically be on different partitions while still sharing the size limit.

    I would also take system snapshots while the system is still running with one command. No need to exclude the home or log directories, nor the pseudo fs (e.g. proc, sys, tmp, dev).

  • 0000@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    9 months ago

    Been using BTRFS on a couple NAS servers for 4+ years. Also did raid1 BTRFS over two USB hard drives connected to a Pi4 (yes this should be absolutely illegal).

    The USB raid1 had a couple checksum errors that were easily fixed via scrub last year and the other two servers have been running without any issues. I assume it’s been fine since they’re all connected to a UPS and since I run weekly scrubs.

    I enjoyed CoW and snapshots so much that I’ve been using it on my main Arch install’s (I use Arch btw) root drive and storage drives (in BTRFS raid1) for the last 4 months without issue.

  • @unhinge I run a simple 48TiB zpool, and I found it easier to set up than many suggest and trivial to work with. I don’t do anything funky with it though, outside of some playing with snapshots and send/receive when I first built it.

    I think I recall reading about some nuance around using LUKS vs ZFS’s own encryption back then. Might be worth having a read around comparing them for your use case.

  • rtxn@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    9 months ago

    My experience with btrfs is “oh shit I forgot to set up subvolumes”. Other than that, it just works. No issues whatsoever.

  • PenguinCoder@beehaw.org
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    9 months ago

    As a home user I’d recommend btrfs. It has main line kernel support and is way easier to get operational than zfs. I’d you don’t need the more advance raid types of zfs or deduplication, btrfs can do everything you want. Also btrfs is a lot more resource friendly. Zfs, especially with deduplication, takes a ton of RAM.

  • survivalmachine@beehaw.org
    link
    fedilink
    arrow-up
    1
    ·
    9 months ago

    I’ve been running ZFS in the form of FreeNAS/TrueNAS in production environments for the past 12 years or so. Started with around 5TB and currently have nearly 300TB across several servers. Mostly NFS nowadays, but have shared out SMB and iSCSI.

    No data loss. Drives have been easy to replace and re-silver. We have had a couple instances where a failing ZIL or L2ARC has crashed a storage server and taken storage offline, but removing/replacing the log device got us up and running without data loss.

    Btrfs I only have experience on home systems. It has reliably stored my data for several years now, but I’m about to put it to the test this weekend. I plan on adding 4x8TB disks to a 4TB mirror to turn it into a 20TB RAID10. Wish me luck!