LVM Entire Disk option does not use entire disk

Bug #1785321 reported by Joshua Powers on 2018-08-03
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
subiquity
Medium
Unassigned

Bug Description

Summary:
When using the "Use An Entire Disk And Set Up LVM" option during an install the partitioner will create a 4GB partition for / and leave the rest of the disk unused. Ideally, since we are choosing to use "An Entire Disk" we should be using *the entire disk*.

Expected Behavior:
/ uses the entire disk

Actual Behavior:
4GB volume for /

Steps to Reproduce:
1. Download the 18.04.1 server ISO (md5sum: 9b15b331455c0f7cb5dac53bbe050f61)
2. Accept all default, until File system setup: choose "Use An Entire Disk And Set Up LVM"
3. On the File system summary page observe that / is only given 4GB and in available devices, the rest of the disk is shown as free space.

Joshua Powers (powersj) wrote :
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.

Michael Hudson-Doyle (mwhudson) wrote :

tj is right, there's not really any point using LVM if you then create a LV that fills your vg completely. I can see how it's surprising but I'm not sure how to make it less so.

Joshua Powers (powersj) wrote :

> I can see how it's surprising but I'm not sure how to make it less so.

This is a solved problem: follow how the d-i based installer does it and ask the user for the amount of the disk they wish to use.

Timlukas Bloch (timlukas) wrote :

When choosing the option "Entire Disk" it should, imo, use the "Entire Disk". This is also the behaviour users expect, as the desktop installer and the old "alternative installer" do it this way.

On Mon, 3 Dec 2018 at 02:55, Timlukas Bloch <email address hidden>
wrote:

> When choosing the option "Entire Disk" it should, imo, use the "Entire
> Disk". This is also the behaviour users expect, as the desktop installer
> and the old "alternative installer" do it this way.
>

Well we are using the entire disk as part of the vg. Having your LV take up
100% of the VG would make it mostly pointless to be using LVM at all.

That said, we should do what Josh says and ask how much to use.

Changed in subiquity:
status: New → Triaged
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers