[TUTORIAL] How to fix a ZFS mess on PVE 8.0

Leonardo Mercadante

New Member
Aug 28, 2023
29
1
3
Hello everybody,
I'm testing on my homelab some features on PVE 8.0 and i make a simple but non impossible misstake,
I was setting the RAM to zfs to 4GB on /etc/modprobe.d/zfs.conf with the argument :

options zfs zfs_arc_max=4294967296

and I run the command :

update-initramfs -u

and after that i rebooted....

I get a nice error on zfs pools on intramfs
and to make it work again I've done the following process:

#vi /etc/modprobe.d/zfs.conf (check the numbers and something)
# zpool import -f rpool
# zfs set mountpoint=/mnt rpool/ROOT/pve-1
# mount -t proc /proc /mnt/proc
# mount --rbind /dev /mnt/dev
# mount --rbind /sys /mnt/sys
# chroot /mnt /bin/bash
and I exit the intramfs
rebooted and ready 2 go

it worked pretty well
 
Normally you only need the zpool import if the pool is not imported and exit the initramfs. Everythin else will be done automatically. That is what the initramfs is for. This happens e.g. if your pool disks are very slow in detection and the initramfs tries to load the pool before the actual drives have been discovered. I just had it this week on an old iMac where I wanted to boot from an external firewire drive, which was not detected directly and it dropped to the initramfs. If you have a similar problem, you need to set rootdelay=10 (as an example) and update your initramfs.
 
  • Like
Reactions: Leonardo Mercadante

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!