Comment 2 for bug 1785321

Revision history for this message
TJ (tj) wrote :

LVM is using the entire disk - it has allocated the 19GiB partition 3 to the LVM Volume Group and 1GiB to the separate /boot/ partition 2.

The reason only 4GiB is allocated to the root file-system is that the remaining space is there to be allocated for other purposes by the system administrator.

E.g. The administrator may want to allocated separate block devices to host virtual machine or container images, and so on.

To view the free space in the parent Volume Group (VG) look at the Free PE: (Physical Extents):

$ sudo vgdisplay

To grow an existing Logical Volume (LV) and the (ext*) file-system within it to use 25% of the Free PE:

$ sudo lvextend -l 25%FREE VG_NAME/LV_NAME
$ sudo resize2fs /dev/mapper/VG_NAME-LV_NAME

See "man lvextend" for more options.

To create additional LVs do e.g:

$ sudo lvcreate -L 6G -n LV_NEW_NAME VG_NAME
$ sudo mkfs.ext /dev/mapper/VG_NAME-LV_NEW_NAME
$ sudo mkdir /mnt/more_storage
$ sudo mount /dev/mapper/VG_NAME-LV_NEW_NAME /mnt/more_storage

See "man lvcreate" for more options.