Article in progress!
Logical volume management provides a higher-level view of the disk space on a computer than the traditional view of disks and partitions. This gives the administrator more flexibility to allocate storage to applications or users.
Storage volumes created under the control of the Logical Volume Manager (LVM) can be resized and moved almost at will.
There are several types:
umount nameOfMount
.lvresize --size +<size>G /dev/<volume_group_name>/<vol>
WARNING: For the next step, do not forget to put the size at the end of the command, otherwise the system will be in error.
resize2fs /dev/<volume_group_name>/<volume> EndSize<M/G>
e2fsck -ff /dev/<volume_group_name>/<volume>
WARNING: If the destination size of the volume is smaller than the used size, then there is a risk of data loss. Although the tools can warn you if this is the case, this is not always the case and you should remain vigilant.
umount <mount point>
e2fsck -ff /dev/<volume_group_name>/<volume>
WARNING: For the next step, do not forget to put the size at the end of the command, otherwise the system will be in error.
resize2fs /dev/<volume_group_name>/<volume> Size<M/G>
lvreduce -L -<size>G /dev/<volume_group_name>/<volume>
The size here is the difference between the initial size and the target size. The calculation will therefore be initial_size-final_size.
resize2fs /dev/<volume_group_name>/<volume>