

If you want to add new disks to an existing LVM volume to expand its size, you can easily do it, and below is the procedure on how to do – Configuration This flexibility partitioning allows you to manage storage space more efficiently as disk usage change from time to time. There is no limit of the physical disk boundary in LVM logical volumes, so you can create a large LVM volume that spans across multiple smaller physical disks. The filesystem on /dev/vg00/lv01 is now 25588736 (4k) blocks long.This article helps us to add a new disk to LVM ( Logical Volume Manager), the very best advantage of LVM over normal disk partitions is its support for “dynamic partitions” you can create and resize (expand or shrink) LVM volumes dynamically as we needed. Old_desc_blocks = 10, new_desc_blocks = 13 To resize the file system to the new size using resize2fs, enter the resize2fs command in the following ~]# resize2fs [PATH OF LOGICAL resize2fs /dev/vg00/lv01įilesystem at /dev/vg00/lv01 is mounted on / on-line resizing required Resize the file system to use the new space.

Logical volume vg00/lv01 successfully resized. Size of logical volume vg00/lv01 changed from 77.61 GiB (19869 extents) to 97.61 GiB (24989 extents). To increase the size of the logical volume with the lvresize program, type the lvresize command in the following ~]# lvresize -l +100%FREE # lvresize -l+100%FREE /dev/vg00/lv01 In this example, the path is /dev/vg00/lv01. Note the path of the logical volume that you want to enlarge.

LV UUID dB1lWB-1TBC-Sl6S-g09N-v2lk-kXOv-yFYuFf LV Creation host, time somehost, 16:43:12 +0000 To check the status of the logical volumes, type the following lvdisplay To increase the physical volume, enter the following ~]# pvresize /dev/sda2Īfter entering the command, the following information is ~]# pvresize /dev/sda2ġ physical volume(s) resized or updated / 0 physical volume(s) not resized PV UUID NseCRU-3JHj-Hwcq-BNpX-coVV-jBSy-l0EKWu To display the detailed information about the physical volumes, enter the following ~]# pvdisplayĪfter entering the command, the following information is displayed, for pvdisplay In the following example, the logical volume /dev/mapper/vg00-lv01 uses the ext4 file df -Th | grep "^/dev" To determine the file system, enter the following ~]# df -Th | grep "^/dev" In this example the partition sda2 is to be adjusted manually. I/O size (minimum/optimal): 512 bytes / 512 bytesĭevice Boot Start End Sectors Size Id Type Sector size (logical/physical): 512 bytes / 512 bytes To view the partitioning of the Logical Volume, type the command ~]# fdisk -lĪfter entering the command, the file system structure is fdisk -lĭisk /dev/sda: 100 GiB, 107374182400 bytes, 209715200 sectors In the above example, the logical volume is /dev/mapper/vg00-lv01. Note the logical volume that is to be expanded. To check the available space of the logical volume, enter the following ~]# df -hĪfter entering the command, the following partitioning is displayed, for example:įilesystem Size Used Avail Use% Mounted on
#UBUNTU VOLUME MANAGER INSTALL#
Ubuntu 18.04, Ubuntu 20.04 and Ubuntu ~]# apt-get install cloud-guest-utils After entering the appropriate command, follow the instructions displayed.ĭebian 10 and Debian ~]# apt-get install cloud-utils If this program is not installed on your server, you can install it using the commands below. If you have the distribution Debian 10 or Debian 11 installed on your server, you need to install the growpart program. If you have the distribution Ubuntu 18.04, Ubuntu 20.04 or Ubuntu 22.04 installed on your server, the growpart program is already installed by default.
