Change zfs boot pool name

RealPjotr

Member
May 31, 2023
32
15
13
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
You can of course do this, but unless you have a specific reason, it might not be such a good idea.
When you want to build a cluster, the pools must have the same name for migration to work.
 
You can of course do this, but unless you have a specific reason, it might not be such a good idea.
When you want to build a cluster, the pools must have the same name for migration to work.
That's the whole point! For my big server in the cluster I dont use the system drive pool as VM storage, I have other pools for that. To make replication work with other single disk systems in the cluster they must all be named rpool, but there is no easy way to rename the system pool to something else during installation.
 
You can of course do this, but unless you have a specific reason, it might not be such a good idea.
When you want to build a cluster, the pools must have the same name for migration to work.
Same situation as RealPjotr. And it's really annoying. Proxmox forces me to use 'rpool' as zpool name on the single disk system, while my big server doesn't use the system disk, but other storage with a different zpool name for ZFS.