Proxmox VE 8 Root Pool Settings

There are two things I wanted to change with the root ZFS pool that the Proxmox VE 8 installer creates:

  1. the root pool name
    Proxmox uses the conventional ‘rpool‘ name. I have 3 different sets of drives for different purposes and have named them ‘baby-bear‘, ‘mama-bear‘ and ‘papa-bear‘.
  2. how the VDEV disks are identified
    In the Proxmox installer UI, you select drives from a list of device names (and size, manufacturer, and model). During the installation, a symlink for each selected device name is searched for in /dev/disk/by-id and the first match found is used when creating the ZFS root pool. On my system, the EUI (Extended Unique Identifier), e.g. ‘nvme-eui.5cd2e41234560100‘, was used instead of the easier-to-read ‘nvme-INTEL_SSDPEK1A058GA_BTOC1A2B3CYK058A‘.

The pool can be renamed after installation but it is slightly complicated. I do not know of a way to change the identity of the disks used in the VDEV after the pool is created.

The solution is to modify the Proxmox VE installation scripts during installation.

  1. Boot the Proxmox VE 8 ISO. My favorite way to do this is with a USB drive with Ventoy on it.
  2. Select “Advanced Option” and then select “Install Proxmox VE (Graphical Debug Mode)”.
  3. When the boot process stops for the first time, press CTRL-D to continue.
  4. When the boot process stops for the second time, you will be in a shell.
    • nano /usr/share/perl5/Proxmox/Install/StorageConfig.pm
      In the get_zfs_pool_name() function, change ‘rpool‘ to whatever name you would like to use.
    • nano /usr/share/perl5/Proxmox/Sys/Block.pm
      In the find_stable_path() function, add the following line at the beginning of the foreach loop.
      next if (substr($path, 0, 25) eq '/dev/disk/by-id/nvme-eui.');
  5. ll /dev/disk/by-id/
    Look for the drives you want to use for the root pool and note the device names, e.g. nvme8n1. You will need to know the device names in the Proxmox installer and they change with each reboot.
  6. Resume graphical installer.
    xinit

Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.