Move LVM storage

Kaya

Member
Jun 20, 2012
111
2
18
Hi,
I need to move kvm disk between LVM disk.
Actually, I have 4 physical volume (each made by 2 600gb SAS disk in MIRROR mode).
For disk space I need to move, for example, vm-126-disk-1 from VM4 to VM.
I didn't find anything on wiki useful.
Can someone show me the right way?

(OMG I'm really tired and my english is terrible, I hope it's understandable enought)

My configuration
Code:
 pveversion  -v
proxmox-ve-2.6.32: 3.2-126 (running kernel: 2.6.32-29-pve)
pve-manager: 3.2-4 (running version: 3.2-4/e24a91c1)
pve-kernel-2.6.32-19-pve: 2.6.32-96
pve-kernel-2.6.32-16-pve: 2.6.32-82
pve-kernel-2.6.32-29-pve: 2.6.32-126
pve-kernel-2.6.32-14-pve: 2.6.32-74
pve-kernel-2.6.32-26-pve: 2.6.32-114
lvm2: 2.02.98-pve4
clvm: 2.02.98-pve4
corosync-pve: 1.4.5-1
openais-pve: 1.1.4-3
libqb0: 0.11.1-2
redhat-cluster-pve: 3.2.0-2
resource-agents-pve: 3.9.2-4
fence-agents-pve: 4.0.5-1
pve-cluster: 3.0-12
qemu-server: 3.1-16
pve-firmware: 1.1-3
libpve-common-perl: 3.0-18
libpve-access-control: 3.0-11
libpve-storage-perl: 3.0-19
pve-libspice-server1: 0.12.4-3
vncterm: 1.1-6
vzctl: 4.0-1pve5
vzprocps: 2.0.11-2
vzquota: 3.1-2
pve-qemu-kvm: 1.7-8
ksm-control-daemon: 1.1-1
glusterfs-client: 3.4.2-1

Yeah I know it's quite old but I plan to upgrade next month.
vgs:
Code:
  VG   #PV #LV #SN Attr   VSize   VFree
  VM     1  14   0 wz--n- 500.00g  89.00g
  VM2    1   3   0 wz--n- 557.86g 307.86g
  VM3    1   1   0 wz--n- 557.86g 157.86g
  VM4    1   4   0 wz--n- 557.86g 275.86g


pvs
Code:
PV                                  VG   Fmt  Attr PSize   PFree
  /dev/mapper/222310001555f77ef-part1 VM   lvm2 a--  500.00g  89.00g
  /dev/mapper/VM2_multipath           VM2  lvm2 a--  557.86g 307.86g
  /dev/mapper/VM3_multipath           VM3  lvm2 a--  557.86g 157.86g
  /dev/mapper/VM4_multipath           VM4  lvm2 a--  557.86g 275.86g


lvs
Code:
LV            VG   Attr      LSize   Pool Origin Data%  Move Log Copy%  Convert
  vm-100-disk-1 VM   -wi-ao---  16.00g
  vm-101-disk-1 VM   -wi-ao---  20.00g
  vm-101-disk-2 VM   -wi-ao---   8.00g
  vm-103-disk-1 VM   -wi-ao---  32.00g
  vm-105-disk-2 VM   -wi-ao---  22.00g
  vm-106-disk-1 VM   -wi-ao---  32.00g
  vm-106-disk-2 VM   -wi-ao--- 100.00g
  vm-111-disk-1 VM   -wi-ao---  24.00g
  vm-111-disk-2 VM   -wi-a----   1.00g
  vm-112-disk-1 VM   -wi-ao---  20.00g
  vm-112-disk-2 VM   -wi-ao---   1.00g
  vm-113-disk-1 VM   -wi-a---- 100.00g
  vm-114-disk-1 VM   -wi-a----  15.00g
  vm-128-disk-1 VM   -wi------  20.00g
  vm-119-disk-1 VM2  -wi-ao---  50.00g
  vm-122-disk-1 VM2  -wi-ao--- 100.00g
  vm-124-disk-1 VM2  -wi-ao--- 100.00g
  vm-120-disk-1 VM3  -wi-ao--- 400.00g
  vm-120-disk-1 VM4  -wi-ao--- 100.00g
  vm-123-disk-1 VM4  -wi-ao--- 100.00g
  vm-125-disk-1 VM4  -wi-ao---  50.00g
  vm-126-disk-1 VM4  -wi-ao---  32.00g
 
Hi,
are VM and VM4 seen as two separate storages by pve datacenter storage?

If yes, you simply can live migrate each VM disk with the gui.
select the disk and use "move disk" option...

Marco
 
select a VM,
move to the hardware tab
select a disk to be moved => the "move disk" button becomes available
click "move disk" button, you are shown a little form
choose target storage and maybe check "delete source" (after it's been moved, if move fails, nothing is deleted)

Marco
 
Last edited:
YEah, you're right. I havent't seen that button.
Now I try to move.
Questione: better if I shut down the VM or is not necessary?
 
Questione: better if I shut down the VM or is not necessary?

Not necessary. Going live (VM running) sometimes it fails: I usually just retry and it works.
If it fails again, retrying after stopping the VM has never failed to me...
anyway, it' so easy :)

Marco
 
Yeah, now I'm trying with small (32gb) disk with live mode but I see IOWait to grow too much(till 20% ).
I will try in offline mode next time to see if IOWait will be lover.
 

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!