- Plesk for Linux
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. How to extend disk size inside of the virtual machine that uses LVM?
WARNING: The following article is applicable only for the systems that use LVM. Before applying the steps below, create a backup of the virtual machine.
Note: That such task is not-Plesk related and is not covered by Plesk Technical Support. If you are not familiar with Linux system administering and would like our professionals to handle this task, contact Professional Service team using the following link:
Connect to the server using SSH.
# yum install system-storage-manager
# apt-get install system-storage-manager
This tool allows to get information about devices, pools and volumes and manage them easily.
List information about all detected, devices, pools, volumes and snapshots in the system:
If there are only old devices listed (/dev/sda, /dev/sda1, /dev/sda2) and no new devices, it means that added free space is unallocated. There are various tools to create a partition, such as parted, fdisk, cfdisk. cfdisk has text user interface and easy to use:
unallocated disk space will have Free Space FS Type
select unallocated disk space and create a new partition by clicking on
[ New ]button. Follow the wizard to set primary/logical partition, partition size. When partition is created, file system type can be changed in
[ Type ]menu item (Linux type can be used as default one)
[ Write ]and
[ Quit ]to confirm changes. Run
partprobeto apply changes:
- Check that new device is added:
- Once new device is configured, it is possible to add a new device to logical group:
# vgextend centos /dev/sda4
Physical volume "/dev/sda4" successfully created
Volume group "centos" successfully extended
- Then extend logical volume of root directory to +10GB added free space:
# ssm resize -s+9.99G /dev/centos/root
- Check that the disk space has extended:
# df -h
Alternatively, it is possible to decrease the
partition and increase the
partition using the utilities
( https://linux.die.net/man/8/lvreduce ) and
( https://linux.die.net/man/8/lvextend ). This may be required on a default CentOS installations where only 50 GB are allocated for the
partition and all Plesk domains, mail, backups, and databases are stored in the
directory, which in this case is located inside the