I am confused and i am lost, I need some help, It is a centos7 virtual machine
I need more hard disk space, as my current hard drive space is 6.2gb,
I want to increase it to 50gb, which i successfully did on the virtual machine, and it shows 50gb,
but inside it shows as 50gb the total size, but the sda size is still 6.2
and i am unsure on how to make it use the rest of the space
advice?
How can i increae my disk space lvm
-
- Posts: 2019
- Joined: 2015/02/17 15:14:33
- Location: Bulgaria
- Contact:
Re: How can i increae my disk space lvm
It seems that /dev/sda2 is larger but you are not utilizing it.
Could you post the output /as text,there is no need of screenshots/ of the following just for verification.
Could you post the output /as text,there is no need of screenshots/ of the following just for verification.
Code: Select all
pvs && vgs && lvs
Re: How can i increae my disk space lvm
Here is the output:
Code: Select all
PV VG Fmt Attr PSize PFree
/dev/sda2 cl lvm2 a-- 49.00g 42.00g
VG #PV #LV #SN Attr VSize VFree
cl 1 2 0 wz--n- 49.00g 42.00g
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
root cl -wi-ao---- 6.20g
swap cl -wi-ao---- 820.00m
-
- Posts: 2019
- Joined: 2015/02/17 15:14:33
- Location: Bulgaria
- Contact:
Re: How can i increae my disk space lvm
WARNING:CREATE A BACKUP OF IMPORTANT DATA BEFORE PROCEEDING
As the partition is encreased, we need to inform the LVM that we changed the size.
1.Run the following
2.Verify the size of the volume group:
3.Grow the root partition:
or you can use the following:
4.Check the available space:
As the partition is encreased, we need to inform the LVM that we changed the size.
1.Run the following
Code: Select all
pvresize /dev/sda2
Code: Select all
vgdisplay cl
Code: Select all
lvextend -r -L +42GB /dev/cl/root
or you can use the following:
Code: Select all
lvextend -r -l 100%FREE /dev/cl/root
Code: Select all
df -h
Re: How can i increae my disk space lvm
I used options 1, 2 & 3
and it worked! simple as that
it's a shame i was not able to do it alone,
i need to read more linux books,
thanks for the help
and it worked! simple as that
it's a shame i was not able to do it alone,
i need to read more linux books,
thanks for the help