Question
The free disk space is exceeded on the server.
Disk size for the server has been extended from the hardware node side of the virtualization, however these changes are not being reflected from the inside of the virtual machine.
Virtual hard disk was increased on the hypervisor, but this has not translated across to Plesk.
How to extend disk size inside of the virtual machine that uses LVM?
Answer
Warning: The following article is applicable only for the systems that use
Note: The name of the new partition may vary, in this case it is sda3. It will be used in the further steps
Run partprobe
to load partition changes in userspace:
# partprobe
Once new partition table is loaded, it is possible to add a new volume to the logical group using its name:
# vgextend centos /dev/sda3
Physical volume “/dev/sda3” successfully created
Volume group “centos” successfully extended
Note: Volume and logical group names may vary, in this case it is centos and sda3. Refer to step 6 and command cfdisk
to get volume name and to step 2 and command vgdisplay
to get volume group name
Then it is possible to extend logical volume of root directory to add all unused space available in the volume group:
# lvdisplay | grep ‘LV Path’
LV Path /dev/centos/root
LV Path /dev/centos/swap
# ls -la /dev/centos/root
lrwxrwxrwx…