dijous, 27 de setembre del 2018

WARNING: Sum of all thin volume sizes (932.00 GiB) exceeds the size of thin pool pve/data and the size of whole volume group (931.26 GiB)!

fent una migració de màquines entre dos proxmox, em trobo amb aquest missatge d'alerta en una de les restauracions.

WARNING: Sum of all thin volume sizes (932.00 GiB) exceeds the size of thin pool pve/data and the size of whole volume group (931.26 GiB)!

alegrement he anat traspassant màquines pero em trobo que m'he quedat sense espai?
la suma dels espais em dona per sobre del límit que tinc

root@ies:~# lvscan
 ACTIVE            '/dev/pve/swap' [8.00 GiB] inherit
 ACTIVE            '/dev/pve/root' [96.00 GiB] inherit
 ACTIVE            '/dev/pve/data' [811.26 GiB] inherit
 ACTIVE            '/dev/pve/vm-330-disk-1' [64.00 GiB] inherit
 ACTIVE            '/dev/pve/vm-330-disk-2' [64.00 GiB] inherit
 ACTIVE            '/dev/pve/vm-403-disk-1' [100.00 GiB] inherit
 ACTIVE            '/dev/pve/vm-402-disk-1' [108.00 GiB] inherit
 ACTIVE            '/dev/pve/vm-108-disk-1' [21.00 GiB] inherit
 ACTIVE            '/dev/pve/vm-118-disk-1' [4.00 GiB] inherit
 ACTIVE            '/dev/pve/vm-116-disk-1' [4.00 GiB] inherit
 ACTIVE            '/dev/pve/vm-120-disk-1' [16.00 GiB] inherit
 ACTIVE            '/dev/pve/vm-104-disk-1' [20.00 GiB] inherit
 ACTIVE            '/dev/pve/vm-101-disk-1' [13.00 GiB] inherit
 ACTIVE            '/dev/pve/vm-106-disk-1' [4.00 GiB] inherit
 ACTIVE            '/dev/pve/vm-400-disk-1' [208.00 GiB] inherit
 ACTIVE            '/dev/pve/vm-206-disk-1' [202.00 GiB] inherit
 ACTIVE            '/dev/pve/vm-510-disk-1' [8.00 GiB] inherit
 ACTIVE            '/dev/pve/vm-520-disk-1' [32.00 GiB] inherit
 ACTIVE            '/dev/pve/vm-502-disk-1' [32.00 GiB] inherit
 ACTIVE            '/dev/pve/vm-211-disk-1' [32.00 GiB] inherit

la suma de tots els termes em dona

64
64
100
108
21
4
4
16
20
13
4
208
202
8
32
32
32
932

Em miro la màquina 400
root@ies:~# pct enter 400
root@moodle:~# df -h
Filesystem                                          Size  Used Avail Use% Mounted on
/dev/mapper/pve-vm--400--disk--1  204G  144G   50G  75% /

on puc veure que tinc disponible 50 GB, miraré si puc reduir el tamany del disc amb el proxmox?

en alguna cerca de google trobo

 i tried with "pct resize 106 rootfs 80gb" (from 200gb)

But i get: "unable to shrink disk size"

de fet l'aplicatiu web de proxmox invalida posar valors negatius per decrementar

FINALMENT OPTO PER L'OPCIÓ MÉS LENTA, FER UNA BACKUP I RESTAURAR AMB UN TAMANY MÉS PETIT, aquestes imatges que hi han son només per manternir-se encesses pero no han de creixer ja, donat que son consultives només.

You probably figured it out already, but that seems to be a limitation of LXC containers, at least for now. From the pct man page :
  \+?\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.
If you truly want to shrink a container, I guess you'd have to perform a backup, then restore it with the --rootfs local: option, like so :
pct stop 
vzdump  -storage local -compress lzo
pct destroy 
pct restore  /var/lib/lxc/vzdump-lxc--....tar.lzo --rootfs local:

funciona fins ara per reduir i recuperar almenys 100GB de 4 màquines.

Of course, you can't perform this sort of resizing online, so I wouldn't call it a great solution, but it works if you have no other choice.
Good luck,
 
https://serverfault.com/questions/784890/how-to-shrink-the-disk-of-a-lxc-container-on-proxmox-4