How to move a pve installation from a "normal" disk to a zfs pool?

proxwolfe

Active Member
Jun 20, 2020
448
38
33
49
Hi,

I installed a new pve just on one disk plain and simple.

Now I would like to give it a bit redundancy but moving the installation to a zfs pool from which it should also boot in future.

Is there a way to convert the current installation or do I have to reinstall and choose zfs pool during the installation?

Thanks!
 
Cheers,
I actually just went through this over the weekend. I was unable to find a way to move from one disk install to zfs pool with 3 disks. After spending many hours, I wiped the drives with fresh install. It was a pain getting somethings set back up. If there is a way to do what you are asking, it would be great if someone would share.
 
I want to avoid having to set up a few of the VMs/CTs again.

So - would it work, if I just copy the vm/ct folders to an external disk, reinstall proxmox on zfs and then simply copy the VM/CT folders back in there place in the new installation (obviously, I would need to set up networking again but that should not be too difficult)?
 
Cheers,
This is what I did. I had them on another set of drives. Reinstalled and then imported that set of drives with ZFS Import. You can also just copy to a portable drive. Make sure you grab the config file for the VM's. Not a must have but easier. If you lose them, then just create a new VM and attach the drives to the new VM. I forgot to get them so this is what I did to recover them. I did all of this last weekend.
 
Wondering whether it would be possible to just add three more disks to the server (I have four slots in total) and create a zfs pool on the three new disks. Then copy over everything from disk 1 to the zpool and then "somehow" tell grub to boot from the zpool going forward?
 
Somehow I was unable to figure out. Finally convinced myself the starting over was faster. migrating my Subscription was easy as well.
 
Haven't seen it in time, but a few additional ideas:
  • For me this situation is a good reason to use a small disk just for the PVE host and put the VMs on other disks.
  • The most important files of your PVE host are /etc/network/interfaces and everything in /etc/pve. The latter contains all configuration for VMs, for example. Therefore, copying those should make your migration a lot less work.
  • If you intend to use an external drive for your guest migration then Backup (using vzdump) from your old and restore to your new disk might be an easy option (generally for migrations)
 
But there is no way to "simply" convert the installation from ext4 to zpool and I will need to reinstall, right?
 
Everything is possible but you have to play with initramfs, which is probably not little of a hassle. It's usually a lot easier to just reinstall.
 
If your system boots properly with the rpool you should be able to import the other zfs pools from older installations. You probably have to export it there first, though.
Sorry, my post referred to another thread with another problem of mine. So I deleted it but your response and my deletion apparently crossed.

In the pve installation I am referring to here, I am not using zfs. Here, everything is on an ext4 formatted disk.
 
Haven't seen it in time, but a few additional ideas:
  • For me this situation is a good reason to use a small disk just for the PVE host and put the VMs on other disks.
  • The most important files of your PVE host are /etc/network/interfaces and everything in /etc/pve. The latter contains all configuration for VMs, for example. Therefore, copying those should make your migration a lot less work.
  • If you intend to use an external drive for your guest migration then Backup (using vzdump) from your old and restore to your new disk might be an easy option (generally for migrations)
Thanks Dominic!

Will backing up using vzdump (as suggested in your third bullet point) copy all of the data required to restore on another host (or on the new installation on the same host), i.e. the virtual disks and config files (and anything that might be needed)? And will restoring the backup there put all the data where it needs to go?

And how much storage is needed on a disk that is only supposed to hold pve, when everything else goes on a separate disk (as suggested in our first bullet point)? Could that also be a USB drive (or will constant writes destroy that quickly?)
 
16 GB should be enough. USB drives usually don't have wear levelling and thus shouldn't be used. The installer will most probably not show them as viable installation targets.
 
  • Like
Reactions: Dominic
I took the dive and it worked.

vzdump did not only backup the virtual disks but also the configurations. Restoring them in the new pve installation was easy this way.

So my issue is resolved (BTW: I did not migrate to ZFS in the end because another pve installation on ZFS was giving me trouble. When trying to resolve that issue, I found out that using ZFS for booting is not recommended on non-UEFI systems. So I merely reinstalled pve on another disk and added an additional disk for the VMs/CTs as suggested by Dominic.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!