Switching between lvm and zfs

hjw

New Member
Mar 22, 2024
8
0
1
I installed proxmox on an nvme drive using the default (lvm) storage setup. I then created a vm running home assistant and have been happily using it.
I would now like to change my system to be zfs based but I do not want to have to manually set up / replicate my home assistant vm.
In order to do this my thought was to do a clean proxmox install (basing it on zfs this time) on a separate drive and then “copy” the old vm from the lvm formatted nvme to the new zfs based node.
Problems:
1- I don’t understand how to gain access to the old drive when booting from the new drive (booting on the zfs install, wanting access to lvm based drive) nor do I know how to do the reverse (booting from lvm based install and access the zfs based drive)
2- I don’t know the best way to xfer the vm from one drive to the other… I’ve seen suggestions to do a backup of the vm from the old install and then a restore from that backup on the new install, but this requires being able to access the other disk. is this the best way/ how do I do this?
 
What I would do in your case:

1. Do a Proxmox Backup (vzdump) of the VM to another (accessible) drive. You could use an external one. (You should anyway be doing this - regularly).
2. Remove the original install drive from the system. (I'd keep the original drive, until everything is working).
3. Install the new drive & fresh-install Proxmox.
4. Attach the other (accessible) drive (as in point 1 above) to the new installation.
5. Access & restore that backed up VM to the new installation.
 
  • Like
Reactions: Johannes S and UdoB
What I would do in your case:

1. Do a Proxmox Backup (vzdump) of the VM to another (accessible) drive. You could use an external one. (You should anyway be doing this - regularly).
this is what I do not know how to do: access an extra drive.
I have seen advice on manually mounting temporary drives from the command line using mount and then warnings about how that can leave things with a corrupted file system. I’ve seen other advice about using Spice and probably a few other strategies.
So, I am asking for explicit instructions on how to either access the default dump directory on the lvm proxmox install drive while booted from the zfs install proxmox drive, or how to save or copy the dump to the zfs proxmox drive while booted from the lvm proxmox install.
I had a third, spare drive, that I tried to experiment with as a transfer vehicle but it was a very old spinning hd and died after a few failed attempts. I just found a different external drive that I could wipe and use for this task but I still need explicit steps.
 
I can boot up from my lvm proxmox install and tell it to make a backup. It would go to wherever default backups are saved.
 
So on your existing (LVM) install, make that backup. Default location should be /var/lib/vz/dump/ but may depend on your exact setup.
It should produce 3 files in the following format:
Code:
vzdump-qemu-<vmid>-<date_time_stamp>.log
vzdump-qemu-<vmid>-<date_time_stamp>.vma.zst
vzdump-qemu-<vmid>-<date_time_stamp>.vma.zst.notes

You will then copy these file to some external storage for easy retrieving later as above.

Once you have freshly installed - you will copy these files back to the default backup location on your new setup, & then restore the VM from these in the GUI.