Migrating Proxmox Boot Device

John Wu

2023/12/02

Tags: tech

Table of Contents

My current boot drive for proxmox is a single NVMe M.2 512GB device using the ext4 with LVM filesystem. The problem with this are:

  1. It is not redundant
  2. It is not enough to store a git server on
  3. It’s boring So, I will document my process in replacing this boot drive with x2 1TB NVMe drives.

Plan

Hardware

For the new boot drives, I’m going to use two P5 Plus 1TB drives.

Plan B

In case things go wrong, I need a plan B first. All of my LXC and VM data are stored in my current ZFS under TrueNAS, so I can recover all of that if necessary. The backups for Proxmox are under /etc/pve, and the manually configured files I have are only in /etc/nut.

My first step is to save everything in /etc/pve and /etc/nut into an external hard drive. Then, I can begin the process.

Actual Plan

  1. Back everything up
  2. Create a proxmox bootable USB
  3. Shutdown proxmox and replace current boot drive with the new drives
  4. Power on the machine and boot into the USB
  5. Reinstall proxmox using ZFS RAIDZ1 between the 2 new 1TB NVMe drives
  6. OPTIONAL: Cross fingers and pray
  7. Update and reboot
  8. Delete /etc/pve and /etc/nut on the newly installed machine, replace with the old directories
  9. Recreate users from before reinstallation if needed
  10. Restore to previous state

Backing Up Everything

Create a Proxmox bootable USB

Shutdown PVE and Replace Current Boot Drive With New Drives

Reinstalling PVE

Installation Hiccups

Since I had a GT720, Xorg couldn’t render the GUI installer. To remedy this, I had to press ’e’ in GRUB and add nomodeset to the end of the line starting with the word Linux. Finally, boot into the terminal UI version of the installer. The only downside is that you won’t be able to use your mouse.

Recover From Backup

Restore Users and Storage Devices

useradd -m -s /usr/bin/bash username
passwd username

Restore to Previous State

If your VMs had NFS or SMB shares before, you need to change the IP of your NAS (or not, if it’s the same configuration).

If your backups were stored on another path, change them to new ones.

Finish

You have migrated PVE to ZFS, nice.

>> Home