On Thu, Aug 29, 2013 at 10:47 AM,  <[email protected]> wrote:
> I want to reinstall an old system to have combined root+usr.
>
> I have always used an lvm installation guide that was a "companion" to
> the handbook.  That is it would tell you how to augment each handbook
> installation chapter for lvm (actually lvm2).
>
> I can't find this documentation now on gentoo.org.  There is a big wiki
> page, but that is different as are daniel's 2-volume "learning linux
> lvm".
>
> The closest I found is the raid+lvm quick install guide, but i would be
> happier with the one I have used often in the past.
>
> Any clues (I am emotionally prepared to learn that it is right there on
> the installation web page, but my eyes and search commands are
> deficient).

As James said, the docs are being reorganized. However, I did a
systemd+LVM installation (just because I was getting tired of not
knowing what the fuss was all about), and (in my experience) there are
almost no changes from the regular installation in the handbook.

I put everything in LVM (/, /boot, everything). From my notes, the
only changes are:

>From the livecd:
1. Use partitions, not whole disks (GRUB2 got confused when I tried to
use whole disks).
2. Set the partition type as LVM (8e in fdisk).
3. Create the Physical Volume, the Volume Group, and the Logical
Volumes as desired.
4. Continue the normal installation, just using /dev/vg0/lvolX (or
whatever names you choose).

After the chroot and emerging the kernel package:
1. Se the LVM options in the kernel. Compile, install it.
2. Emerge systemd.
3. Emerge dracut (USE="device-mapper", DRACUT_MODULES="systemd lvm", at least).
4. Set add_dracutmodules="systemd" in /etc/dracut.conf.
5. Weirdly, set lvmconf="no" in /etc/dracut.conf. I didn't even
touched /etc/lvm/lvm.conf, so I think leaving it out makes dracut to
autoconfigure it. If I put lvmconf="yes", the boot hangs. Didn't
investigated why.
6. Emerge GRUB2 (USE="device-mapper mount"); I don't know if GRUB
works with LVM, but GRUB2 does, so I used that.
7. Set GRUB_PRELOAD_MODULES="lvm",
GRUB_CMDLINE_LINUX="init=/usr/lib/systemd/systemd", in
/etc/default/grub.
8. Generate initramfs, generate /boot/grub2/grub.cfg, install GRUB2
with grub2-install.
9. Reboot. Everything works.

GRUB2 handles LVM just fine, I believe, but my LVM setup was dead
simple (the VG was just the only partition of all my disks).
dracut+systemd takes care of everything else; I didn't even had to do
something special in fstab, since I used labels.

To extend/reduce your Logical Volumes you will need a livecd, or a
more complex initramfs, though.

Regards.
-- 
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México

Reply via email to