Gentoo Archives: gentoo-amd64

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-amd64@l.g.o
Subject: [gentoo-amd64] Re: New install of amd64 with raid
Date: Wed, 13 Sep 2006 23:02:44
Message-Id: eea2g7$slq$3@sea.gmane.org
In Reply to: Re: [gentoo-amd64] New install of amd64 with raid by Sebastian Redl
1 "Sebastian Redl" <sebastian.redl@×××××××××××.at> posted
2 49368.64.8.26.185.1158161574.squirrel@××××××××××××××××××××××××××××××××××.at,
3 excerpted below, on Wed, 13 Sep 2006 11:32:54 -0400:
4
5 > On Wed, September 13, 2006 8:35 am, David Klaftenegger wrote:
6 >> Additionally you can use both raid-1 and raid-0 with different
7 >> partitions on the same two disks.
8 >
9 > Be *extremely* careful with that!
10 > Yes, it works. Yes, it provides data safety for your RAID-1 partitions.
11 >
12 > But it can also kill your system if you have anything that's essential for
13 > booting on RAID-0. (Like /usr.)
14 >
15 > Don't put anything except perhaps /var/tmp/portage on a RAID-0 if you care
16 > about system stability. I've had a very bad experience with this just
17 > three weeks ago.
18
19 I'm running a 4-SATA disk Linux kernel software RAID here.
20
21 RAID-1 for /boot only (it has to be RAID-1 since the BIOS and bootloader
22 only see the separate hardware disks, reasonable since the kernel is doing
23 the RAID)
24
25 RAID-6 for most of the system.
26
27 RAID-0 for stuff that's either temporary or easily redownloadable, so /tmp,
28 the portage (minus the portage packages dir, I have FEATURES=buildpkg
29 enabled) and kernel-sources trees, and ccache.
30
31 Interestingly enough, that works very well, since the temporary stuff also
32 tends to be the most speed sensitive.
33
34 On the RAID-6, I have multiple partitions (partitioned RAID, md_dX instead
35 of mdX, a root partition and backup image directly as RAID-6 partitions,
36 and everything else in LVM2 for easier management. Keeping root on its
37 own non-LVM partition means no initrd/initramfs required, since unlike
38 LVM, RAID, partitioned or not, requires only the kernel, no userspace.
39
40 The root partition (and its backup) contain /var (minus /var/log, which
41 is under lvm2 management), /usr (minus /usr/src, which is under RAID-0,
42 and /usr/local, which is LVM2 managed), and /opt (which is empty), in
43 addition to the usual /etc and /root dirs and the various mount-points
44 under /mnt. This works very well as all the stuff installed by portage is
45 kept together. I had a bad experience with a previous installation with
46 separate /usr and /var partitions, where the portage database in /var got
47 out of sync with /usr and /, due to having them on three separate
48 partitions, so keeping everything portage installs on the same partition
49 and therefore in sync with what it thinks is installed is a lesson I
50 learned the hard way.
51
52 My LVM2 managed third RAID-6 partition then contains /home, /usr/local,
53 the portage binpkg tree, /var/log, and my local data partitions such as
54 mail, news, and media partitions. Some of these (like /home) have backup
55 copies as well, others (like /var/log) don't, as I consider the data
56 important enough to keep on RAID-6 but not important enough to need a
57 backup copy of as well.
58
59 For swap, I have individual partitions on each disk. By specifying the
60 same priority for them in fstab, Linux automatically stripes them, so they
61 don't need to be RAID-managed. (If I was afraid of reboots even in the
62 case of drive failure however, I'd keep swap on RAID-6, but it's only a
63 private home system not a mission critical server, so if a drive fails,
64 causing a reboot due to loss of swap integrity, that's fine, and the
65 striped swap is faster and less hassle so why not?)
66
67 The only thing I'd do differently now would be to have three roots, a
68 working copy and a first and second backup copy, and I'd alternate backup
69 copies, so I'd always have a complete and verified working system backup
70 even if the system went down after I'd wiped the one backup and was in the
71 process of writing a new backup image.
72
73 --
74 Duncan - List replies preferred. No HTML msgs.
75 "Every nonfree program has a lord, a master --
76 and if you use the program, he is your master." Richard Stallman
77
78 --
79 gentoo-amd64@g.o mailing list