The nice folks over at ubuntuusers.de have put together a guide including pictures. Unfortunately it's written in German and for servers, but you should be able to figure out what's going on there, as technical terms are quite similar anyway. Google translate might come in handy too.
There is no magic involved, it's quite simple in fact:
- create the Physical Volumes
- create the Volume Groups
- create the Logical Volumes
- declare filesystems on Logical Volumes (for each LV, use ext4)
- set mount points
You should make a decision about which mount points you are going to use for what reason. It is convenient to separate the home
directory from the root
directory for example, so you need to create the LVs and mount points accordingly.
I mostly used LVM on servers, where I separated root
from home
, usr
, var
, srv
, and opt
. There are as many opinions as there are choices, so that point is up to you. If you for example want to keep the data of your home directory untouched during an upgrade from 21.04 to 21.10, then it's a good choice. Same goes for applications that store their data in the opt
directory. It might even be a good option to keep home
and opt
in a separate Volume Group, if you keep the data in place during a system upgrade, as handling this within one VG can become a pain in the neck.