Manjaro booting on ZFS raid

Proxmox (Debian based) has this amazing ability to boot directly from a ZFS raid set of drives and also installs the kernel and the main OS on each drive in the boot pool so if any one drive dies you can still boot up without requiring a separate boot disk. I would love to emulate this on my Manjaro desktop systems for OS and storage pool redundancy and also to be able to use send/recv for super efficient backup to ZFS based backup servers, and optionally Proxmox Backup Server as well.

I’m wondering if anyone else here is already doing something like this? Is anyone else interested in this approach for their desktop systems?

Hello @markc :wink:

Please use the search function next time:

Anyway… I would not recommend ZFS on a rolling release like Manjaro due DKMS and fast changes. Debian and any fixed release has a better base because it doesn’t change that fast.

Also ZFS is not made for desktop computers, but for data centers where the kernel keeps a long time the same. Keep that in mind.

1 Like

I have read that post before, but the number of steps involved is daunting and the likelihood of failure is pretty high. I’ve been waiting until I get a spare laptop/desktop before attempting that procedure. I was also interested in how many folks are already successfully using ZFS, particularly the concept of having the kernel and OS on each drive. That post barely mentions the possibility.

Sure, ZFS is often used in data centers, but it’s also a favourite among home labbers, particularly if using Proxmox like myself, so having local ZFS based backup destinations is already a given.

I love ZFS.

However, I second what @megavolt said.

I would never use it to install my Linux OS, let alone boot from it. It’s too convoluted; it requires more advanced upkeep as you update your system; it’s not part of mainline kernel development (this is a big deal); and there’s a legal grey area that will always lurk around the corner, thanks to Oracle.

An OS or boot partition can always be re-installed or recovered. It does not contain any sensitive nor irreplaceable data.

You can make a case for a ZFS “home” and ZFS “user data”, to leverage send/recv. But for the “root” system and “boot”? Not worth it in my opinion.

I have to disagree. I’ve had a small Promox cluster for the last year, and I am super impressed how well the application of their ZFS boot system works. Admittedly, they have a 16K shell script called proxmox-boot-tool that manages it all. About 6 months ago, I pulled out two SSDs that were a part of a Raidz-1 (3 drive) pool on an older machine and put them into a new Minisforum and turned it on to see what would happen. Sure enough, it booted up, albeit in degraded mode. If I wanted to add a new 3rd SSD and let it resilver then I could have regained the original Raidz-1 pool in a new host with very little downtime. No OS reinstall from ISO and no data reinstall from external backup. I really want that functionality for my daily workstation.

They are notorious for filing lawsuits, but I would argue that it’s due to the restriction of GPL. It is simply not compatible with CDDL because CDDL allows the use of proprietary development, which conflicts with GPL policy.

Manjaro is a primarily an end-user, rolling-release desktop OS. It’s completely different than a dedicated server or Proxmox.

If you really want to setup a ZFS boot/root on Manjaro (or an Arch-based distro), then the instructions linked by @megavolt is a good place to start.

Yes, it’s more work, prone to failure, and will require more diligence on your part to maintain it, especially throughout system updates.

It goes way beyond the scope of a typical Manjaro setup.

There are other quirks and nuances, such as how Grub does not fully support ZFS, and you’ll either have to use systemd-boot or place the kernel and boot files on a non-ZFS partition. Both “solutions” negate the whole purpose of your aim: a ZFS-redundant boot drive

1 Like

You can try BTRFS if you prefer a more automatic setup procedure.

Proxmox, for example, creates 3 partitions. One for BIOS boot, the second for UEFI boot, then everything else on the 3rd partition including the kernel and the OS + pool/datasets and the same for each drive in whatever raid config. It can boot up via either grub or systemd-boot. If ANY drive fails, for whatever reason, the system can still boot up on ANY other drive in the raid array and continue, albeit in degraded mode, but with OS tools on the same system to deal with repairs.

I don’t see how that negates my aim of a resilient bootable ZFS based system. Besides that point, there are many other compelling reasons to use ZFS… send/recv being one of the most important because it is highly likely that any backup target will also be running ZFS (rather than BTRFS.)

Believe me. I’m with you in regards to ZFS.

But Manjaro is primarily a rolling-release desktop user OS. It’s scope is completely different to Proxmox.

However, it’s still possible to implement your idea, and there are instructions above on how to do so. It’s really a guide for Arch Linux, but has been adapted to (supposedly) work with Manjaro.

proxmox is not free , and any distribution linux will not by default install or work on it.
so if you want zfs with archlinux see this
https://wiki.archlinux.org/title/ZFS

Proxmox is absolutely free to use. It has some nagware to encourage folks to pay for support and the use of their enterprise repositories but other than that it is 100% free. In the context of this thread, my reference to “Proxmox” mainly revolves around how to embed the kernel and OS on each drive in a ZFS raid array using the same strategy as their proxmox-boot-tool (a 16K bash script.) My workstation OS of choice is Manjaro/KDE so I am either going to work out how to “port” proxmox-boot-tool to Manjaro/Arch OR get GPU passthrough working with my mongrel optimus GPU and run Manjaro/KDE in a VM on top of Proxmox installed directly on this laptop. I would prefer the later but I suspect I may have to use different hardware with a kinder Intel GPU.

USAGE: /usr/sbin/proxmox-boot-tool <commands> [ARGS]

  /usr/sbin/proxmox-boot-tool format <partition> [--force]
  /usr/sbin/proxmox-boot-tool init <partition>
  /usr/sbin/proxmox-boot-tool reinit
  /usr/sbin/proxmox-boot-tool clean [--dry-run]
  /usr/sbin/proxmox-boot-tool refresh [--hook <name>]
  /usr/sbin/proxmox-boot-tool kernel <add|remove> <kernel-version>
  /usr/sbin/proxmox-boot-tool kernel pin <kernel-version> [--next-boot]
  /usr/sbin/proxmox-boot-tool kernel unpin [--next-boot]
  /usr/sbin/proxmox-boot-tool kernel list
  /usr/sbin/proxmox-boot-tool status [--quiet]
  /usr/sbin/proxmox-boot-tool help

you need cephs and drivers GPU passthrough working
good luck , it same as create a community iso
and no modules zfs by manjaro

cephs (or CephFS) has nothing to do with booting from any drive in a ZFS raid array and we already have ZFS in the extra/ repo, linux60-zfs and zfs-utils, so I’m not sure what all the scary “oracle will sue anyone using zfs” rubbish is about. Ubuntu, Debian, Redhat and Arch all have ZFS enable kernels in their standard repos. If need be there is even a zfs-dkms package to build the kernel modules from source.

then try and create iso community proxmox you will see …
good luck with all drivers ( videos / wifi / eth / USB and others )
just forget optimus …

I’m not sure why I need Proxmox as a virtualization platform when I do not need to run multiple systems.

In my system I use Btrfs, Ext4, ZFS and XFS.

  • Btrfs with the DUP profile (Self-healing is enabled) for my root system and a part of home data with simple automatic creation of snapshot.
  • Ext4 is for games, Downloads, VM images and data (it exists everywhere in Internet), they mounts with Home in Btrfs. (I do not care if they are lost, I can re-download them again)
  • ZFS mirror on my other dual disks (via SATA connection) for automatic increment backup from Btrfs and some valuable rare data (e.g. my photos…).
  • XFS for backup and the valuable rare data on my external HDD via USB connection.