Change zfs boot pool name

RealPjotr

New Member
May 31, 2023
5
1
3
Hi. I'm adding a new node to my Proxmox cluster where all earlier nodes use the boot disks for VM storage. I've setup HA syncing via the ZFS rpool.

Now I want to add another node, but I want to have rpool on separate data disks, not the boot media. I've managed to rename the boot disk rpool to spool ok, so now Promox fails to boot because /proc/cmdline looks like this:

initrd=\EFI\proxmox\6.8.4-2-pve\initrd.img-6.8.4-2-pve root=ZFS=rpool/ROOT/pve-1 boot=zfs

I get stuck in initramfs and have trouble editing this file. How can I do this?
 
You can't edit that file. It just gives you a read-only copy to show the command line that was passed to the kernel by the boot loader. At this point, even if you were able to modify it, it's already too late. The kernel has processed all that information.

You probably need to edit /etc/kernel/cmdline and then you have to rebuild all the boot loader files. Usually, this involves executing the proxmox-boot-tool from the running system.

You can in principle do this from the within the initramfs rescue shell. But it's a bit tedious. I am not sure how to walk you through the steps without having access to your computer to keep checking things.
 
Really weird that we can't just select the ZFS pool name at install. (BTW, this wouldn't be needed if we could name pools for HA replication on each node individually. https://bugzilla.proxmox.com/show_bug.cgi?id=2087)

I booted using Proxmox installer in debug mode, then mount the pool and set a mountpoint so I can edit files.
I changed "rpool" to "spool" in /etc/kernel/cmdline, /etc/default/grub.d/zfs.cfg, /etc/grub.d/10_linux and 20_linux_xen. Those are the only places I find the string "rpool" in /etc and /boot.
From the installer debug mode I also ran proxmox-boot-tool refresh, not sure it's needed or helps?

When booting, it's still missing rpool and I get stuck in initramfs, /proc/cmdline still contains "rpool" as above. I can't run proxmox-boot-tool in there. I can edit files on the "spool" after I mount it, though.

Is there something wrong or missing because of EFI? Any files or something else I've missed?
 
Last edited:
I've just spent troubleshooting this for 4 days, but finally realized where I went wrong. It was the order of things. I wanted to change the boot pool name from "rpool" to "spool":

1) Install proxmox, boot it
2) Login and edit most files containing "rpool" in /etc and /boot. I used "find /etc -type f -exec grep -H 'rpool' {} \;" and "find /boot -type f -exec grep -H 'rpool' {} \;". That lists all files (about 3-6 in each dir), edit each one, except the grub lock files.
3) proxmox-boot-tool refresh
4) Reboot, boot the proxmox installer in debug mode (advanced - graphical debug), press Ctrl-D once to skip first stage
5) "zpool import" lists all your pool including rpool. "zpool import -f rpool spool", "zfs list" to verify, then "zpool export spool".
6) Reboot into Proxmox and it now works running from "spool"!

(Thanks for info in https://forum.proxmox.com/threads/change-zfs-poolname.76683/)
 
  • Like
Reactions: zodiac

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!