Rename Rpool

belrpr

Member
Aug 9, 2017
48
7
6
41
Hi,

I've create a ZFS mirror. The default name for this pool is rpool.
Is there a way that I can rename it or enter it during installation?
 
Not during installation. You can rename a pool by exporting and importing it again. For the rpool you need to also change grub, update your initramfs, change the storage.cfg. The general convention on the pool that holds the system is the name rpool. Best you try this in a VM.
 
  • Like
Reactions: semanticbeeng
Sorry to necro an old thread, but this came up in my Googling about just this issue. I also had to change /etc/kernel/cmdline
From: root=ZFS=rpool/ROOT/pve-1 boot=zfs
To: root=ZFS=NEWNAME/ROOT/pve-1 boot=zfs

That's apparently where proxmox-boot-tool pulls info from.
 
Sorry to necro an old thread, but this came up in my Googling about just this issue. I also had to change /etc/kernel/cmdline
From: root=ZFS=rpool/ROOT/pve-1 boot=zfs
To: root=ZFS=NEWNAME/ROOT/pve-1 boot=zfs

That's apparently where proxmox-boot-tool pulls info from.
Thank you! This was the secret sauce I needed to fix a problem i was having in my system due to having two zpools with the same name, and using the by-ID matching "fixes" I found on the forum worked to no avail.

I was getting an error: [I]Cannot import 'rpool' : more than one matching pool. Import by numeric ID instead[/I]
I fixed it by following these steps:
  1. At the error prompt type zpool import to get the ID# of the correct pool you want to import. Make note of it.
  2. Boot into proxmox by using zpool import -N <insert ID# here> then type exit.
  3. Open a terminal for PVE and edit nano /etc/kernel/cmdline, change rpool to a unique name like prxpool then save.
  4. edit nano /etc/pve/storage.conf, change pool rpool/data to reflect your new pool name, in my case I changed it to pool prxpool/data.
  5. update initramfs update-initramfs -u.
  6. Reboot proxmox reboot.
  7. initramfs should drop you to console again with a similar error [I]cannot import 'prxpool'[/I], this is expected. We're going to rename the 'rpool' now to the new name we chose/set in step #3, in my case prxpool. zpool import -f <insert ID# here> prxpool.
  8. Now simply exit to continue booting into proxmox, then I recommend you reboot one last time to verify the fix. It should boot up without any errors now.
  9. Enjoy! Hoping this helps others
 
Last edited:
You can solve the problem of having multiple pools called rpool without renaming anything.
1. Find you pool guid by using zpool import and looking for the guid of the wanted pool that will be listed as id:. If the pool is already imported you can get the guid using zpool get guid rpool
2. Edit /etc/kernel/cmdline and when you find root=ZFS=rpool/ROOT/pve-1, replace rpool with the guid of the wanted pool. It should look something like this root=ZFS=4235925043159929004/ROOT/pve-1
3. Update the existing initramfs using update-initramfs -u -k all
4. Reboot and check