Guided partitioner with LVM leaves no free space for snapshots

Bug #240813 reported by JP Vossen
2
Affects Status Importance Assigned to Milestone
partman-auto-lvm (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

PROBLEM: The guided partitioner leaves no free space in the VG when using LVM, so LVM snapshots cannot be used out of the box.

DETAILS:

The Hardy alternate and server (maybe other?) installers provide choices like:
 Guided - use entire disk and set up LVM
 Guided - use entire disk and set up encrypted LVM

That is very cool(!!), but, it really means what it says and it uses the *entire* disk. There should be additional options like:
 Guided - use entire disk and set up LVM, with free space for snapshots
 Guided - use entire disk and set up encrypted LVM, with free space for snapshots

Having the VG (volume group) take up the entire disk is fine, the problem is that if the LV (logical volume) really uses all free space (extents) in the VG, then you can't create snapshots. This will not be obvious to a new user/administrator and the post-install error message about "Insufficient free extents in volume group" when you first try to create a snapshot isn't very useful either.

OK, technically, you can later re-size the partitions and LV to free up extents to allow for snapshots. But if you know how to do this and are comfortable with it, you probably didn't use the guided partitioner anyway.

POSSIBLE SOLUTIONS:

1) (preferred) Add options to the installer as noted above, and provide a way to set how much free space to leave, along with some notes about how much is "enough" and how to figure it out basked on extent size. Ideally provide a reasonable default (2G or so?).

2) Add options to the installer as noted above, but make it a fixed percentage of the VG left free (after taking into account extent size and doing the math). This is easier for the new user but less flexible for special needs.

3) (Worst case) Add text during the process to note that the guides installer will NOT leave free space and thus you will NOT be able to use snapshots (one of the best features of LVM IMO), and direct the user to do a manual partition if that's a problem.

See also:
 http://www.backupcentral.com/components/com_mambowiki/index.php/Backup_&_Recovery:_Ch.22_MySQL_Backup_&_Recovery

Revision history for this message
JP Vossen (jp-jpsdomain) wrote :
Revision history for this message
Colin Watson (cjwatson) wrote :

I agree, and rather like your first option.

Revision history for this message
Colin Watson (cjwatson) wrote :

This is essentially the same underlying problem as bug 160156.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.