"Sebastian Redl" <[EMAIL PROTECTED]> posted
[EMAIL PROTECTED],
excerpted below, on  Wed, 13 Sep 2006 11:32:54 -0400:

> On Wed, September 13, 2006 8:35 am, David Klaftenegger wrote:
>> Additionally you can use both raid-1 and raid-0 with different
>> partitions on the same two disks.
> 
> Be *extremely* careful with that!
> Yes, it works. Yes, it provides data safety for your RAID-1 partitions.
> 
> But it can also kill your system if you have anything that's essential for
> booting on RAID-0. (Like /usr.)
> 
> Don't put anything except perhaps /var/tmp/portage on a RAID-0 if you care
> about system stability. I've had a very bad experience with this just
> three weeks ago.

I'm running a 4-SATA disk Linux kernel software RAID here.

RAID-1 for /boot only (it has to be RAID-1 since the BIOS and bootloader
only see the separate hardware disks, reasonable since the kernel is doing
the RAID)

RAID-6 for most of the system.

RAID-0 for stuff that's either temporary or easily redownloadable, so /tmp,
the portage (minus the portage packages dir, I have FEATURES=buildpkg
enabled) and kernel-sources trees, and ccache.

Interestingly enough, that works very well, since the temporary stuff also
tends to be the most speed sensitive.

On the RAID-6, I have multiple partitions (partitioned RAID, md_dX instead
of mdX, a root partition and backup image directly as RAID-6 partitions,
and everything else in LVM2 for easier management.  Keeping root on its
own non-LVM partition means no initrd/initramfs required, since unlike
LVM, RAID, partitioned or not, requires only the kernel, no userspace.

The root partition (and its backup) contain /var (minus /var/log, which
is under lvm2 management), /usr (minus /usr/src, which is under RAID-0,
and /usr/local, which is LVM2 managed), and /opt (which is empty), in
addition to the usual /etc and /root dirs and the various mount-points
under /mnt. This works very well as all the stuff installed by portage is
kept together.  I had a bad experience with a previous installation with
separate /usr and /var partitions, where the portage database in /var got
out of sync with /usr and /, due to having them on three separate
partitions, so keeping everything portage installs on the same partition
and therefore in sync with what it thinks is installed is a lesson I
learned the hard way.

My LVM2 managed third RAID-6 partition then contains /home, /usr/local,
the portage binpkg tree, /var/log, and my local data partitions such as
mail, news, and media partitions.  Some of these (like /home) have backup
copies as well, others (like /var/log) don't, as I consider the data
important enough to keep on RAID-6 but not important enough to need a
backup copy of as well.

For swap, I have individual partitions on each disk.  By specifying the
same priority for them in fstab, Linux automatically stripes them, so they
don't need to be RAID-managed.  (If I was afraid of reboots even in the
case of drive failure however, I'd keep swap on RAID-6, but it's only a
private home system not a mission critical server, so if a drive fails,
causing a reboot due to loss of swap integrity, that's fine, and the
striped swap is faster and less hassle so why not?)

The only thing I'd do differently now would be to have three roots, a
working copy and a first and second backup copy, and I'd alternate backup
copies, so I'd always have a complete and verified working system backup
even if the system went down after I'd wiped the one backup and was in the
process of writing a new backup image.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman

-- 
[email protected] mailing list

Reply via email to