Can I manually set up LVM?
Solution 1:
I do this sort of thing all the time. Some tips:
- You need to read the documentation, such as the sites Bujiraso referenced.
- A tool like
system-config-lvm
(which is available with Ubuntu, but IIRC is not installed by default) can help by providing a GUI that makes it less necessary to remember the dozens of LVM text-mode commands (or even the half-dozen you're likely to use frequently). See this page (for CentOS, but applicable to Ubuntu) for information on using this tool. - Remember to create a separate
/boot
partition -- that is, not in the LVM setup. Make it at least 500 MB in size. (Over 1 GB would be overkill, though.) If there's any chance you'll ever install multiple Linux distributions (including future Ubuntu versions installed side-by-side with your current installation), be sure you set aside at least one to-be-/boot
partition for each installation. (In theory, GRUB can boot from a kernel stored inside an LVM, but in practice this is rarely done, and I don't know how well Ubuntu would cope with this configuration. Some boot loaders don't enable booting in this way, so having a separate/boot
partition expands your boot loader options.) - If you're using an EFI-based computer, you'll need a non-LVM EFI System Partition (ESP). I recommend making this one 550 MiB in size.
- If you're booting from a GPT disk in BIOS/CSM/legacy mode, you'll need a ~1 MiB BIOS Boot Partition. On modern computers, I don't recommend this combination (BIOS-mode booting with GPT); most computers sold since late 2011 support EFI-mode booting, so I'd use that on such computers.
- You can (but do not need to) create multiple LVM partitions (physical volumes). This gives you some flexibility for reconfiguring the system for multi-booting with non-Linux OSes in the future (or to split off space for additional
/boot
partitions, ESPs, etc). There's little or no advantage to this if you want to have one big Ubuntu installation; but for a heavily multi-booted system, having multiple PVs means you won't need to resize your PV to make room for some non-Linux OS you add in the future; just be sure one PV is empty, remove it from the volume group (VG), adjust its partition type code, and create a new filesystem on it. - You can boot the Ubuntu installation medium in its "try before installing" mode to use GParted and the LVM tools of your choice, then launch
ubiquity
(the Ubuntu installer) from the same boot to do the installation. Use the "something else" partitioning option (as described here). If the partition type codes are set correctly, Ubiquity should detect the ESP automatically, if it's present, and show the existing LVs. You'll need to explicitly identify your/boot
partition and each LV you want to use.
Solution 2:
It's of course possible to set up your own partition schemes, including those that use LVM, and the installer should let you set up your mount-points and install onto them. That being said, it may take some time, reading and experimentation. The Ubuntu wiki on LVM or Arch Linux page are two great places to start learning.
Personally, I've found automated installers to work best when you don't surprise them, so expect some hiccups if you have a fancy partition set-up going!