Gentoo Archives: gentoo-user

From: Peter Humphrey <peter@××××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2
Date: Sun, 17 May 2015 13:24:36
Message-Id: 1512794.C4Cbul46Ps@wstn
In Reply to: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2 by "Nuno Magalhães"
1 On Sunday 17 May 2015 12:48:58 Nuno Magalhães wrote:
2
3 > I want to use mdadm to create a RAID1 with 2 SATA disks. From what i
4 > gather, i'll need (bootable) 0xFD partitions, i'll use full disk for
5 > them and no separate /boot (unless required). Is GPT required or can i
6 > stick to MBR? Is fdisk safe? Seems usable to me.
7
8 Use this guide:
9
10 https://wwwold.gentoo.org/doc/en/gentoo-x86+raid+lvm2-quickinstall.xml
11
12 > Is 0.90 metadata mandatory for RAID1? What's the recommended version?
13
14 You need 0.90 metadata for any volume that needs to be bootable, unless you
15 use what Dale calls an init thingy. I don't do that, and this is my setup:
16
17 /boot on /dev/md1 = /dev/sd[ab]1 in RAID1 with metadata 0.90.
18 / on /dev/md5 = /dev/sd[ab]5 in RAID1 with metadata 0.90.
19 [the rest] on /dev/md7 = /dev/sd[ab]7 in RAID1 with metadata > 1.0.
20
21 > I've seen manuals that use mknode, but discovered that mdadm --create
22 > will create a /dev/md for me.
23
24 I didn't know that. Interesting.
25
26 > (Later i want to get rid of systemd-udev and use eudev instead.)
27
28 I use openrc, not systemd. It still works well and has less complication - and
29 less typing!
30
31 > Also, why so many tty* and similar in /dev? Is there a way to make it
32 > less crowded? Just a whim...
33
34 I tried removing them but found they'd been re-created after the next boot. Ho
35 hum.
36
37 > Does GRUB2 (rather grub2-install) handle well RAID1 stuff or does it
38 > get confused?
39
40 Don't know. I use legacy-grub. The last I looked, grub-2 couldn't handle the
41 choice of kernels I have.
42
43 > What's the difference between dodmraid and domdadm? I don't want to
44 > use fakeraid, so is it safe to just use domdadm?
45
46 I think so, yes. As far as I know, dmraid is fake raid.
47
48 > Then i want to use LVM on the /dev/md and setup my / in an LV. This
49 > seems straightforward (as far as creation goes). Any tips here? I
50 > remember you could tune LVM LVs to the underlying RAID stripe.
51
52 I just followed the quick-installation guide.
53
54 > I intend to use XFS for /. Incidentally, if i later decide to "fork
55 > out" /usr (or some other subdirectory) into it's own LV, is it "just"
56 > a mater of copying its contents and updating /etc/fstab? Or should i
57 > just do it now and expand the LVs if later required (especially if i
58 > want to use different filesystems)?
59
60 I can't help you with XFS. I know that ext4 in an LV in a VG in a PV on RAID1
61 works reliably, even though it does look complex when I write it like that.
62
63 > The problem will be (has been) getting it to boot.
64 >
65 > If i have 2 kernels in /boot, shouldn't grub2-mkconfig generate 2
66 > entries in the GRUB boot menu (not counting the recovery entries)?
67 >
68 > I read somewhere that genkernel is a bad choice for creating the
69 > kernel because it un/sets a CONFIG_ flag that interferes with RAID/LVM
70 > (sorry, i should've noted where/what). I use make menuconfig anyway,
71 > it's fun. I do use genkernel to create the initramfs, i'm assuming
72 > "genkernel --lvm --mdadm --bootloader=grub --install initramfs" would
73 > suffice?
74
75 Again, legacy grub here. But if you're using an initramfs, from what I've seen
76 you don't need to specify metadata 0.90.
77
78 --->8
79
80 > While the Handbook is awesome, it doesn't cover this and all the
81 > information i find is either outdated or conflicting.
82
83 I reinstalled yesterday while following the guide I cited.
84
85 Damn. I've just checked and something has renamed my /dev/md7 to
86 /dev/md127. Again. It's just too bad. I shall have to stop it when I get a
87 quiet moment and reassemble it into /dev/md7. Actually, I know what caused
88 it but I didn't notice at the time.
89
90 HTH.
91
92 --
93 Rgds
94 Peter

Replies

Subject Author
Re: [gentoo-user] Tips for fresh install with GRUB2+RAID1+LVM2 Rich Freeman <rich0@g.o>