Proxmox Disk Migration

Michael19

New Member
Apr 14, 2019
8
0
1
43
Hello to all!

I would kindly ask for advice.

I migrated via binary copy my old 120 GB SSD (with a running proxmox installation) to a new 1TB SSD.
Every thing worked fine.

After the copy I started from my new disk, all VMs are running. As expected, the partitions remain as they are.

Currently it looks like this:

root@srv0001:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 1M 0 part
├─sda2 8:2 0 256M 0 part /boot/efi
└─sda3 8:3 0 111.6G 0 part
├─pve-root 251:0 0 27.8G 0 lvm /
├─pve-swap 251:1 0 7G 0 lvm [SWAP]
├─pve-data_tmeta 251:2 0 64M 0 lvm
│ └─pve-data-tpool 251:4 0 62.9G 0 lvm
│ ├─pve-data 251:5 0 62.9G 0 lvm
│ ├─pve-vm--301--disk--1 251:6 0 8G 0 lvm
│ ├─pve-vm--401--disk--1 251:7 0 32G 0 lvm
│ ├─pve-vm--601--disk--1 251:8 0 16G 0 lvm
│ ├─pve-vm--401--state--OracleVM_V1 251:9 0 8.5G 0 lvm
│ ├─pve-vm--601--state--Stable_01 251:10 0 4.5G 0 lvm
│ ├─pve-vm--401--state--Stable_01 251:11 0 8.5G 0 lvm
│ └─pve-vm--601--state--unstabil 251:12 0 4.5G 0 lvm
└─pve-data_tdata 251:3 0 62.9G 0 lvm
└─pve-data-tpool 251:4 0 62.9G 0 lvm
├─pve-data 251:5 0 62.9G 0 lvm
├─pve-vm--301--disk--1 251:6 0 8G 0 lvm
├─pve-vm--401--disk--1 251:7 0 32G 0 lvm
├─pve-vm--601--disk--1 251:8 0 16G 0 lvm
├─pve-vm--401--state--OracleVM_V1 251:9 0 8.5G 0 lvm
├─pve-vm--601--state--Stable_01 251:10 0 4.5G 0 lvm
├─pve-vm--401--state--Stable_01 251:11 0 8.5G 0 lvm
└─pve-vm--601--state--unstabil 251:12 0 4.5G 0 lvm


I am bloody new to the Linux OS environments and I dont want to kill my system by changing partitions.

Please advice me by warning for pitfalls and telling me the preferred commands (+switches) to use.

I want to use the additional space only for new VMs and creating backups. I guess i will have to increase my sda3 partition.
* Will the new space automatically be available after changing the partition?
* Do I have to power down all VMs in the meanwhile?

I am using Proxmox 4.4 on Linux 8 Debian Jessie (Kernel 4.4.35-1-pve)

BR Michael
 
Hi,

The easiest way is to create a new partition with the rest of the disk.
Then extend the lv data with the new partition.
It is very important that you also extend the metadata pool because if the metadata pool gets full you can't use the lv anymore.
The metadata pool is only seized for the current lv size and not the extended.
 
Hi Wolfgang,

thank you for your answer. I researched and found this guide I will follow on.
https://pve.proxmox.com/wiki/LVM2

I will do those two steps.
Create a extra LV for /var/lib/vz
Resize metadata pool

Any other things to consider?
BR and thank you again, Michael



 
I guess this is not what you want.

create a new partition
Code:
partprobe
sgdisk -N4 /dev/sda
partprobe

extend the vg pve with this new partition
Code:
vgextend pve /dev/sda4

extend the lv "data"
Code:
lvextend -L +870G  /dev/pve/data

resize your metadatapool
Code:
lvresize --poolmetadatasize +1G /dev/pve/data
 
Hello Wolfgang!

You are right! I am not very experienced on this.

Many thanks to you again for your answer and guide you provided. It sounds very promising.
I going to check exactly what those commands will do.

:)

Thank you!
Michael
 
Hallo zusammen!

Die Erweiterung der Partition hat schlussendlich funktioniert.

Hier zur Dokumentation meiner Anfrage noch ein paar Anmerkungen.

1) partprobe war bei Debian Jessie nicht standardmäßig verfügbar und musste mit "parted" nach installiert werden.
2) sgdisk -N4 /dev/sda hat die Partition als Linux Filestorage angelegt. Das darauffolgende vgextent hat damit aber nicht funktioniert.
ich musst die partition mit dem tool cfdisk /dev/sda von linux storage auf lvm ändern
3) mit lvextend -L +870 GB gab es ein Problem mit der Umrechnung zwischen bits und Bytes ich konnte nur 810 GB angeben, bewirkte dann aber dass ~870 GB zugewiesen wurden.

Danke, LG Michael
 

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!