Debian – Creating custom sized LVM partitions during installation (Debian)

debiandebian-installerlvmpartition

Is there a simple way to be able to create custom sized LVM partitions when installing Debian (using Debian 8, jessie)?

If you use the guided partitioner, and even accept its helpful options to create the extra partitions that you often would like (ie, /home, /var, /tmp) it then doesn't seem to be possible (as far as I can tell) to change the sizes of those partitions in the installation process from that which they were created as before finally continuing to go on and partition the disk for real, other than by deleting and then re-creating each partition that you need to change? That would seem to defeat the purpose of both LVM (which I thought was supposed to help make disk partitioning more flexible?) and in having a "helpful" guided partitioning tool?

Is there no other way to create a "fine tuned" partitioning setup other than to set up the disk and LVM entirely from scratch ("Manual partitioning" option) and create each partition that you want individually (which unfortunately does seem rather laborious)?

Best Answer

LVM does make partitioning more flexible, but the Debian installer simply doesn't have the functionality you're looking for. But, you can always resize the LVM volumes post-installation.

For example, lets say you want the /, /home, /var, /tmp, and swap partitioning scheme but with a larger /home filesystem. What you can do is take the scheme as-is to complete the installation, then once you've confirmed all is OK:

  1. Log out all users except root
  2. Run umount /home
  3. Run lvresize -L<SIZE IN GB>G -r /dev/path/to/home/volume
  4. Run mount /home
Related Question