Linux + extend VM disk and procedure to use the extra size after DISK extended
by jusy from LinuxQuestions.org on (#5AAMX)
We have VM linux server with disk of 100G ( LVM )
We want to extend the OS disk from The Vcenter from 100G to 500G ,
and using the extra size for new partition with 400G
So the plan is like this
Increasing the disk from Vcenter to 500G Re-scan the disk as
echo 1>/sys/class/block/sdd/device/rescan
create space for new partition with fdisk , for example if the default PV is /dev/sda2 ,
then we create new partition as
/dev/sda3
so
sda1 is for boot sda2 is for / and /var and the new one that we create is sda3
then we perform the following
pvcreate /dev/sda3
vgextend VOLG /dev/sda3
finally we should get like this from pvs
pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 VOLG lvm2 a-- 100.51g 9.00m
/dev/sda3 VOLG lvm2 a-- 400.00g 400.00g
Until now I explain the approach how to use extra disk size after increasing the OS disk from 100G to 500G
Now , we want to know what the other option to have extra disk space after increasing the OS disk from 100G to 500G
Any other approach that we can use?


We want to extend the OS disk from The Vcenter from 100G to 500G ,
and using the extra size for new partition with 400G
So the plan is like this
Increasing the disk from Vcenter to 500G Re-scan the disk as
echo 1>/sys/class/block/sdd/device/rescan
create space for new partition with fdisk , for example if the default PV is /dev/sda2 ,
then we create new partition as
/dev/sda3
so
sda1 is for boot sda2 is for / and /var and the new one that we create is sda3
then we perform the following
pvcreate /dev/sda3
vgextend VOLG /dev/sda3
finally we should get like this from pvs
pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 VOLG lvm2 a-- 100.51g 9.00m
/dev/sda3 VOLG lvm2 a-- 400.00g 400.00g
Until now I explain the approach how to use extra disk size after increasing the OS disk from 100G to 500G
Now , we want to know what the other option to have extra disk space after increasing the OS disk from 100G to 500G
Any other approach that we can use?