[PVE-User] version 4.4. typo and shrinking

Lari Tanase larieu at gmail.com
Tue Feb 14 16:24:55 CET 2017


Hi,

I've installed the 4.4. for some tests and learning activities on a 
spare machine I have found some issues

1. typo error in code 
https://github.com/proxmox/qemu-server/blob/master/PVE/API2/Qemu.pm line 
2767
> die "unable to skrinkdisk size\n" if $newsize < $size; 
I believe skrink should be shrink

2. even on the wiki is presented as an option in manual of qm it seems 
that shrinking is not supported any more

https://pve.proxmox.com/wiki/Resize_disks
> If you reduce(shrink) the hard disk, of course removing the last disk 
> plate will probably destroyyour file system and remove the data in it! 
> So in this case is paramount to act in the VM in advance, reducing the 
> file system and the partition size. SystemRescueCD comes very handy 
> for it, just add its iso as cdrom of your VM and set boot priority to 
> CD-ROM. 
from man qm

> qm resize <vmid> <disk> <size> [OPTIONS]
>
> Extend volume size.
>
> <vmid>: <integer> (1 - N)
>     The (unique) ID of the VM.
>
>     <disk>: <efidisk0 | ide0 | ide1 | ide2 | ide3 | sata0 | sata1 | 
> sata2 | sata3 | sata4 | sata5 | scsi0 | scsi1 | scsi10 | scsi11 | 
> scsi12 | scsi13 | scsi2 | scsi3 | scsi4 | scsi5 | scsi6 | scsi7 | 
> scsi8 | scsi9 | virtio0 | virtio1 | virtio10 | virtio11 | virtio12 | 
> virtio13 | virtio14 | virtio15 | virtio2 | virtio3 | virtio4 | virtio5 
> | virtio6 | virtio7 | virtio8 | virtio9>
>     The disk you want to resize.
>
>     <size>: \+?\d+(\.\d+)?[KMGT]?
>         The new size. With the + sign the value is added to the actual 
> size of the volume and without it, the value is taken as an absolute one.*
>         Shrinking disk size is not supported.*

3. as long in 4.4 VM are in separate lvm's what is wrong doing this?

3.1. backup your vm
3.2. boot your VM machine with an GParted iso and shrink whatever you 
want there
3.3. check that VM is sound after that step ( you can make another backup )
3.4. stop your machine and issue

lvreduce -L zzzG /dev/pve/vm-xxxx-disx-y

with zzz > size needed for your partitions after gpart shrink

I have checked onto 10-15 VM's in various scenarios and none of them broken

Thank you
Laurențiu Tănase



More information about the pve-user mailing list