[SOLVED] Questions about LVM

dragonauta

Member
Jan 20, 2014
29
0
21
Hi, I installed Proxmox 4.2 on a PC.
As I have 1 disk, I choosed ext4 on install options.

I found that 1TB disk was partitioned
Code:
Device      Start        End    Sectors   Size Type
/dev/sda1      34       2047       2014  1007K BIOS boot
/dev/sda2    2048     262143     260096   127M EFI System
/dev/sda3  262144 1953525134 1953262991 931.4G Linux LVM

Code:
# pvs
  PV         VG   Fmt  Attr PSize   PFree 
  /dev/sda3  pve  lvm2 a--  931.39g 15.79g
# lvs
  LV                        VG   Attr       LSize   Pool Origin        Data%  Meta%  Move Log Cpy%Sync Convert
  data                      pve  twi-aotz-- 811.39g                    14.54  8.41                            
  root                      pve  -wi-ao----  96.00g                                                          
  snap_vm-101-disk-1_prueba pve  Vri---tz-k  60.00g data vm-101-disk-1                                        
  swap                      pve  -wi-ao----   8.00g                                                          
  vm-100-disk-1             pve  Vwi-aotz--  50.00g data               44.03                                  
  vm-101-disk-1             pve  Vwi-aotz--  60.00g data               96.04                                  
  vm-102-disk-1             pve  Vwi-aotz--  32.00g data               72.71                                  
  vm-103-disk-1             pve  Vwi-a-tz--  32.00g data               31.39                                  
  vm-108-disk-1             pve  Vwi-aotz--   4.00g data               17.25                                  
  vm-109-disk-1             pve  Vwi-aotz--   4.00g data               82.78

But problem is that root ( / ) is only 96G and lvm-thin is 811G
Backups only can be stored on root.

Is there a way to shrink pve/data and extend pve/root ??
I start searching documentation but I'm in the dark...
I'm not really an expert on LVM, these are my first steps with it.
Thanks
 
I can't figure out how it works... I need to read A LOT more about LVM.

I made this test on a VM: installed proxmox as default on a 16GB disk.
So root was 7GB. I ran then:
Code:
# lvresize -L+3G pve/root
# touch /forcefsck && reboot
... then ...
# resize2fs /dev/pve/root
and / grew up to 10GB.

Is simple as that?
 
AFIK you can't reduce the size of a lvm-thin pool.
To extent the root pool is possible, but the problem you will over commit you disk.
So if you do that you have to be very carefully with the usage of the disk.
In casework (disk is full) you will lose data.