Up until now, I have been using a standard partitioning scheme for my Ubuntu installation:
- 4GB /swap
- 30GB /
- Rest of the HDD /home
However, I am reinstalling the Ubuntu now and would like to use snapshots and the other things which LVM offers.
The Ubuntu installer has a checkbox to install Ubuntu and set up LVM for it automatically, but I don't want to use this option, since I like to set up my partitions manually. That way, I can select things like the size of the swap partition, or size of the root partition and such, but alas, in the Ubuntu installer's manual partition tool, I don't see any option to create any LVM partition scheme or anything like that.
Is it possible to set up the LVM manually like that, or is the only option to let Ubuntu do it on full auto, by ticking that LVM box?
Thank you.
I do this sort of thing all the time. Some tips:
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./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.)/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.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.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!
For those who still search for manual LVM partitioning while installing Ubuntu, you can watch this Manually Create LVM Partitions Videos from Youtube.
Done, Continue.