Gentoo Archives: gentoo-user

From: "Nuno Magalhães" <nunomagalhaes@××××××.pt>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
Date: Sun, 17 May 2015 11:49:28
1 Hello Gentoo World,
4 TL;DR warning
6 I've tested Gentoo and liked it, tried to tune it a bit and borked it. :)
8 I want to use mdadm to create a RAID1 with 2 SATA disks. From what i
9 gather, i'll need (bootable) 0xFD partitions, i'll use full disk for
10 them and no separate /boot (unless required). Is GPT required or can i
11 stick to MBR? Is fdisk safe? Seems usable to me.
13 Is 0.90 metadata mandatory for RAID1? What's the recommended version?
15 I've seen manuals that use mknode, but discovered that mdadm --create
16 will create a /dev/md for me. (Later i want to get rid of systemd-udev
17 and use eudev instead.)
18 Also, why so many tty* and similar in /dev? Is there a way to make it
19 less crowded? Just a whim...
21 Does GRUB2 (rather grub2-install) handle well RAID1 stuff or does it
22 get confused?
24 What's the difference between dodmraid and domdadm? I don't want to
25 use fakeraid, so is it safe to just use domdadm?
27 Then i want to use LVM on the /dev/md and setup my / in an LV. This
28 seems straightforward (as far as creation goes). Any tips here? I
29 remember you could tune LVM LVs to the underlying RAID stripe.
31 I intend to use XFS for /. Incidentally, if i later decide to "fork
32 out" /usr (or some other subdirectory) into it's own LV, is it "just"
33 a mater of copying its contents and updating /etc/fstab? Or should i
34 just do it now and expand the LVs if later required (especially if i
35 want to use different filesystems)?
37 The problem will be (has been) getting it to boot.
39 If i have 2 kernels in /boot, shouldn't grub2-mkconfig generate 2
40 entries in the GRUB boot menu (not counting the recovery entries)?
42 I read somewhere that genkernel is a bad choice for creating the
43 kernel because it un/sets a CONFIG_ flag that interferes with RAID/LVM
44 (sorry, i should've noted where/what). I use make menuconfig anyway,
45 it's fun. I do use genkernel to create the initramfs, i'm assuming
46 "genkernel --lvm --mdadm --bootloader=grub --install initramfs" would
47 suffice?
49 I'm assuming the key will be to make sure /etc/mdadm.conf has the
50 ARRAY= line and that GRUB has the right parameters in
51 /etc/default/grub, like
53 Or mdraid09? Where do these come from, /etc/grub/i386pc? Mine's an
54 amd64 but that's the only directory i could find.
55 GRUB_CMDLINE_LINUX_DEFAULT="domdadm dolvm rootfstype=xfs"
57 Are there any USE flags i should be aware of? Currently i'm gonna go
58 with USE="bindist 3dnow 3dnowext mmx mmxext popcnt sse sse2 sse3 sse4a
59 smp ssl unicode -avahi -pulseaudio -selinux -gnome -kde -systemd
60 -bluetooth -ieee1394 -networkmanager -fortran"
61 Plus CPU_FLAGS_X86 based on an emerge news item about processor flags.
62 Neither RAID nor LVM should have an impact, application-wise.
64 While the Handbook is awesome, it doesn't cover this and all the
65 information i find is either outdated or conflicting. I had a similar
66 setup with Debian Wheezy on this same hardware, but that was done
67 through the debian installer, nifty and under the hood.
70 Incidentally, the hardware's an Asus M2NPV-VM with 4 SATA II disks.
71 It's my desktop, not mission-critical, but i want to make the most of
72 it.
74 Thanks for the patience and feedback (and the distro!) :)
76 Cheers,
77 Nuno


Subject Author
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2 Peter Humphrey <peter@××××××××××××.uk>
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2 Neil Bothwick <neil@××××××××××.uk>