I run out of space in the / root folder, I need to upgrade to Debian 9. But because of this problem I can not.
My this partition structure:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 931,5G 0 disk
├─sda1 8:1 0 243M 0 part /boot
├─sda2 8:2 0 1K 0 part
└─sda5 8:5 0 931,3G 0 part
├─educacion--vg-root 254:0 0 9,3G 0 lvm /
├─educacion--vg-swap_1 254:1 0 7,8G 0 lvm [SWAP]
└─educacion--vg-home 254:2 0 914,2G 0 lvm /home
sr0 11:0 1 1024M 0 rom
The / root folder is mapped to educacion--vg-root
.
These are my logical partitions:
lvmdiskscan
/dev/educacion-vg/root [ 9,31 GiB]
/dev/sda1 [ 243,00 MiB]
/dev/educacion-vg/swap_1 [ 7,80 GiB]
/dev/educacion-vg/home [ 914,16 GiB]
/dev/sda5 [ 931,27 GiB] LVM physical volume
2 disks
2 partitions
0 LVM physical volume whole disks
1 LVM physical volume
If I do a df -h
you can see that the root (/dev/dm-0)
is full:
df -h
S.ficheros Tamaño Usados Disp Uso% Montado en
/dev/dm-0 9,1G 8,6G 46M 100% /
udev 10M 0 10M 0% /dev
tmpfs 773M 9,1M 764M 2% /run
tmpfs 1,9G 31M 1,9G 2% /dev/shm
tmpfs 5,0M 4,0K 5,0M 1% /run/lock
tmpfs 1,9G 0 1,9G 0% /sys/fs/cgroup
/dev/sda1 236M 49M 175M 22% /boot
/dev/mapper/educacion--vg-home 900G 8,1G 846G 1% /home
tmpfs 387M 4,0K 387M 1% /run/user/116
tmpfs 387M 8,0K 387M 1% /run/user/1000
If I see the volume of the logical partition, there is no space:
vgdisplay
--- Volume group ---
VG Name educacion-vg
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 6
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 3
Open LV 3
Max PV 0
Cur PV 1
Act PV 1
VG Size 931,27 GiB
PE Size 4,00 MiB
Total PE 238405
Alloc PE / Size 238405 / 931,27 GiB
Free PE / Size 0 / 0 /// aca muestra que hay espacio
VG UUID ttIQ4H-odre-GnH5-4x11-URPm-aVeK-mb0IW1
I see that the logical partition educacion--vg-home
has almost the entire physical space. How can you shrink it and move space to educacion--vg-root
?
Try using Gparted but the logical partition is blocked.
I tried with lvextend --resizefs -L 1.15T /dev/educacion-vg/root
but since the VG does not have space it can not.
Thank you very much.