moving bootloader and partitions from 2 big vdevs to 1 new smaller vdev?

Dunuin

Distinguished Member
Jun 30, 2020
13,841
4,050
243
Germany
Hi,

In the past I used 2 vdevs per debian VM. One vdev on SSD pool for root mountpoint and one vdev on HDD pool for "/var" mountpoint. And I created really big vdevs because I thought that might not be a problem because of thin provisioning. I just realized later that it is easy possible to increase the size of a vdev and backuping takes way to long because all the big empty space needs to be read first. Right now it takes 2 hours to backup the VMs while they need to be stopped but all data is just 80GB.
And by now I'm just using one big endurable ssd pool for all the vdevs and no second hdd pool anymore.

I really would like to just add another smaller vdev to the VMs, boot from a live cd, mount the old vdevs to that live linux and copy the bootloader and resized ext4 partitions to the new vdev. So I don't need to setup all the VMs again.
Is that the right procedure? Can someone recommend a tutorial on how to do that?
 
You VM has two vdevs: root and var, and you want to merge it.
1. Grow size of root vdev as you need (in Proxpox VE gui)
2.1. Boot VM from live cd, expand filesystem on root vdev, and check them.
2.2. Mount both vdevs and copy var from second vdev to first
2.3. In fstab comment out mount record for second vdev
3. Reboot to VM
 

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!