ZFS Pool Import - Proxmox Single Host Reinstall Without Full Backup - Thomas-Krenn-Wiki-en
ZFS Pool Import - Proxmox Single Host Reinstall Without Full Backup - Thomas-Krenn-Wiki-en
Contents
Baseline scenario
Backup of VM/LXC configurations
Other backups (optional)
Shutdown of all resources (VMs / containers)
New installation of Proxmox VE via ISO / USB
ZFS Pool Import of the data pool
Recovery of VM/LCX configurations
Set ZFS as datastore via GUI
Conclusion
Baseline scenario
Proxmox ZFS Singlehost with VMs and containers
1x ZFS Mirror Pool for Proxmox OS (2x SSD)
1x ZFS RAIDZ2 Pool "zfs-data" for the VMs und containers (resources) (4x NVMe)
Please backup all configuration files in these paths. These files represent the configuration files of the resources. They contain the
names of the VMs / containers, what virtual hardware they use and what the virtual hard disks are called etc. If you do not backup
these configuration files, all "shells" of the VMs and containers are missing - this is an essential step.
root@pmx02:/etc/pve/qemu-server# ls
100.conf 101.conf 102.conf 104.conf 106.conf 119.conf 132.conf
root@pmx02:/etc/pve/lxc# ls
103.conf
/etc/network/interfaces
/etc/hosts
/etc/pve/storage.cfg
Before reinstallation, all resources should be shut down so that the data is persistent and consistent.
After the VMs are shut down, the host can be shut down and reinstalled. For this one must note that one may in no case select the
disks of the ZFS DATA pool. Thus, when selecting the disk(s), make sure that you select the correct disk(s) for the ZFS mirror (in our
case 2x SSD). If you select the wrong disks here, it can lead to data loss, because Proxmox deletes the disks that are selected here
and overwrites them with PVE 7.X.
After installing Proxmox VE you can import the old ZFS pool by entering the following command:
root@pmx02:~# zpool import -f zfs-data
Now you have to use a tool (SCP, WINSCP...) to put the configuration files back into the directories accordingly. For VMs:
/etc/pve/qemu-server For containers: /etc/pve/lcx
The pool is now imported, but the VMs cannot yet be started because the storage definition is still missing. Therefore the imported
ZFS pool zfs-data has to be added as datastore via GUI. Alternatively, you can add the definition part from
/etc/pve/storage.cfg again, if you have backed up this in the previous step (optional).
Conclusion
Now the VMs should be executable again and can be restarted (right click on the host --> Bulk Start helps here for a quick start of all
VMs on the host).
Jonas Sterr has been working for Thomas-Krenn for several years. Originally employed as a trainee in
technical support and then in hosting (formerly Filoo), Mr. Sterr now mainly deals with the topics of storage
(SDS / Huawei / Netapp), virtualization (VMware, Proxmox, HyperV) and network (switches, firewalls) in
product management at Thomas-Krenn.AG in Freyung.