Gentoo Archives: gentoo-user

From: "Canek Peláez Valdés" <caneko@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] where did lvm installation guide go?
Date: Thu, 29 Aug 2013 17:29:42
In Reply to: [gentoo-user] where did lvm installation guide go? by
1 On Thu, Aug 29, 2013 at 10:47 AM, <gottlieb@×××.edu> wrote:
2 > I want to reinstall an old system to have combined root+usr.
3 >
4 > I have always used an lvm installation guide that was a "companion" to
5 > the handbook. That is it would tell you how to augment each handbook
6 > installation chapter for lvm (actually lvm2).
7 >
8 > I can't find this documentation now on There is a big wiki
9 > page, but that is different as are daniel's 2-volume "learning linux
10 > lvm".
11 >
12 > The closest I found is the raid+lvm quick install guide, but i would be
13 > happier with the one I have used often in the past.
14 >
15 > Any clues (I am emotionally prepared to learn that it is right there on
16 > the installation web page, but my eyes and search commands are
17 > deficient).
19 As James said, the docs are being reorganized. However, I did a
20 systemd+LVM installation (just because I was getting tired of not
21 knowing what the fuss was all about), and (in my experience) there are
22 almost no changes from the regular installation in the handbook.
24 I put everything in LVM (/, /boot, everything). From my notes, the
25 only changes are:
27 From the livecd:
28 1. Use partitions, not whole disks (GRUB2 got confused when I tried to
29 use whole disks).
30 2. Set the partition type as LVM (8e in fdisk).
31 3. Create the Physical Volume, the Volume Group, and the Logical
32 Volumes as desired.
33 4. Continue the normal installation, just using /dev/vg0/lvolX (or
34 whatever names you choose).
36 After the chroot and emerging the kernel package:
37 1. Se the LVM options in the kernel. Compile, install it.
38 2. Emerge systemd.
39 3. Emerge dracut (USE="device-mapper", DRACUT_MODULES="systemd lvm", at least).
40 4. Set add_dracutmodules="systemd" in /etc/dracut.conf.
41 5. Weirdly, set lvmconf="no" in /etc/dracut.conf. I didn't even
42 touched /etc/lvm/lvm.conf, so I think leaving it out makes dracut to
43 autoconfigure it. If I put lvmconf="yes", the boot hangs. Didn't
44 investigated why.
45 6. Emerge GRUB2 (USE="device-mapper mount"); I don't know if GRUB
46 works with LVM, but GRUB2 does, so I used that.
48 GRUB_CMDLINE_LINUX="init=/usr/lib/systemd/systemd", in
49 /etc/default/grub.
50 8. Generate initramfs, generate /boot/grub2/grub.cfg, install GRUB2
51 with grub2-install.
52 9. Reboot. Everything works.
54 GRUB2 handles LVM just fine, I believe, but my LVM setup was dead
55 simple (the VG was just the only partition of all my disks).
56 dracut+systemd takes care of everything else; I didn't even had to do
57 something special in fstab, since I used labels.
59 To extend/reduce your Logical Volumes you will need a livecd, or a
60 more complex initramfs, though.
62 Regards.
63 --
64 Canek Peláez Valdés
65 Posgrado en Ciencia e Ingeniería de la Computación
66 Universidad Nacional Autónoma de México


Subject Author
Re: [gentoo-user] where did lvm installation guide go? gottlieb@×××.edu
Re: [gentoo-user] where did lvm installation guide go? "J. Roeleveld" <joost@××××××××.org>
Re: [gentoo-user] where did lvm installation guide go? "J. Roeleveld" <joost@××××××××.org>