You are not logged in.

#1 2025-05-19 08:12:28

rep_movsd
Member
Registered: 2013-08-24
Posts: 148

ZFS root FS - Have I painted myself into a corner?

A few months back, I decided to get my system running on ZFS with RAID config - My root is across 3 partitions on 3 disks with 33% redundancy
It was triggered by a massive corruption I encountered with BTRFS, I had to roll back to a backup from two weeks before and lost some important work.

It was a bit of a head-scratcher to get the root partition ZFS to work - I finally make it work by getting the zfs-utils-poscat from the archlinuxcn repository.
I never had any issues with ZFS, the dedup works extremely well for my docker folders and I'm able to distribute my disk loads across my old and new SSDs

However I found that upgrading beyond Linux 6.12 was impossible because the zfs stuff didn't support it (then). I decided to live with that.
I set it up to take backups with 7 daily, 4 weekly and 3 monthly snapshots retained and rotated.
I installed ZFS boot menu and added a mkinitcpio hook that copies the /boot contents to the EFI partition so that my root partition always has the corresponding kernel in it


Recently I had some issues after upgrading the nvidia driver and I decided to try rolling back.

I guess my understanding of snapshots and clones was not 100% correct
I assumed one could just boot off a snapshot and continue as if nothing happened, and maybe unlink the original "root"
Then I realized this wasn't how it worked

I cloned my snapshot with ZBootmenu and tried booting, but I got some error that the root user could not be accessed.
I tried the same from the command line and I still got the same issue

I think my setup somehow is not able to switch to a different root partition

$ sudo zfs list
NAME                 USED  AVAIL  REFER  MOUNTPOINT
ZDOCKER             12.1G   116G    96K  legacy
ZDOCKER/containerd  11.2G   116G  11.2G  /var/lib/containerd
ZDOCKER/docker       692M   116G   692M  /var/lib/docker
ZEPHYR               339G   820G    96K  legacy
ZEPHYR/rollback     1.80M   820G   193G  /
ZEPHYR/root          338G   820G   197G  /

It seems like ZFS cant have / as the mount point for two data sets

I wanted to try setting the / for ZEPHYR/rollback and remove it from /
But I am afraid that if I do that and ZEPHYR/rollback doesn't boot, I will be stuck with no option to go back to ZEPHYR/root

How can I set it up a way so I can quickly switch to a certain snapshot and boot from that?

I have root=zfs:ZEPHYR/root on my primary boot commandline and options root=zfs:ZEPHYR/rollback on my test boot

Thanks in advance

Offline

#2 2025-05-19 08:43:09

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 12,798
Website

Re: ZFS root FS - Have I painted myself into a corner?

Mod note: moving to AUR Issues as zfs is not officially supported by Arch.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2025-05-19 20:10:37

topcat01
Member
Registered: 2019-09-17
Posts: 182

Re: ZFS root FS - Have I painted myself into a corner?

Were you using btrfs in raid5?

On my machines I use both btrfs and zfs, and mostly btrfs in raid < 5 where it's very stable. However, I don't use these FSs for the OS install disk, which is mostly "disposable" for me. Especially on Arch it is easy to recover. I do keep a live usb taped to the machine in case it does not boot (rare).

Last edited by topcat01 (2025-05-19 20:13:47)

Offline

#4 2025-05-20 05:53:56

rep_movsd
Member
Registered: 2013-08-24
Posts: 148

Re: ZFS root FS - Have I painted myself into a corner?

topcat01 wrote:

Were you using btrfs in raid5?

On my machines I use both btrfs and zfs, and mostly btrfs in raid < 5 where it's very stable. However, I don't use these FSs for the OS install disk, which is mostly "disposable" for me. Especially on Arch it is easy to recover. I do keep a live usb taped to the machine in case it does not boot (rare).

I was using a single partition BTRFS.
The GPU driver hung when some heavy disk activity was ongoing (building docker images), and had to force power off. The system became unbootable.

Booted from my few weeks old cloned system and and I found lots of errors on the original system. I fixed the errors on that partition so I could grab my work files and continued using my month old backup.

Offline

Board footer

Powered by FluxBB