Gentoo Archives: gentoo-amd64

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-amd64@l.g.o
Subject: [gentoo-amd64] Re: Re: Root on Raid and LVM
Date: Wed, 02 Nov 2005 22:16:49
Message-Id: pan.2005.11.02.22.12.35.849434@cox.net
In Reply to: Re: [gentoo-amd64] Re: Root on Raid and LVM by "Florian D."
Florian D. posted <4368B219.1070903@×××.at>, excerpted below,  on Wed, 02
Nov 2005 13:33:29 +0100:

>> ... As some may guess, I've been studying this stuff recently! =8^) I >> don't have my own RAID setup yet, but probably will by late this week. (I >> plan to go pickup the drives probably Tue or Wed.) > good luck. when there is no email from you for some days, then we know > sth. went wrong ;-)
=8^) I have the drives... four Seagate SATA 300 gigs. I got them yesterday and installed them this AM. I haven't done anything with them yet, so they're just empty unconfigured drives still, but the BIOS and kernel see them, so I've gotten a good start! =8^) I've now got this full tower case stuffed to the gills! =8^) The four SATA drives, my current main drive, a 250 gig Maxtor PATA, on PATA primary master, a DVD writer on PATA primary slave, an old 36 gig Maxtor on PATA secondary master, and a CD writer on PATA secondary slave. Round that out with a legacy 3.5" floppy, and I've got 9 drives in this thing, with > 1.4 TB of hard drive capacity (pre-raid mirror/parity discounting)! The 250 gig still has ~100 gig not even formatted yet, but my AC went out this summer and it got hot and developed some bad blocks. With them all marked and one 4 gig partition written off entirely, it has proved decently stable, but I've been worried about it, thus the current upgrade job. I've been considering RAID and drives are now cheap enough to do it, so I decided to go for it! I'll be setting up three RAID sets on the four SATAs, and will be using the Maxtors as emergency boot and backups. A small 4-way raid1 will have /boot. The majority of the disks, 200+ gig of each of the four, will be a raid6 (raid5 but with two parity copies... any two drives can go down, one out is supposed to maintain speed fairly well, two out will drop speed substantially but will still function) carrying root, /usr, /var, /home, and my dedicated mail, news, and media LVs. A medium size raid0 will complete the roundup, containing /tmp (which is $PORTAGE_TMPDIR) and a dedicated ccache LV. I'm currently running 1G memory and no swap, but I think I'll reactivate swap as well while I'm at it, with a small non-raid swap partition on each of the four. The kernel stripes swap on its own, so there's little reason for me to put it on raid, and one of the reasons I'm reactivating swap is to try out the developing kernel SMP suspend features. =8^) Having swap on raid isn't likely to work too well, when I'm trying to load memory images out of swap coming out of suspend! I'll use my existing Maxtor PATAs, as I said, for an emergency boot installation and off-RAID online backups, and plan on using LVM2's snapshotting capacities to maintain probably up to two working snapshots (yes, I'm aware of the write penalty of doing so) of root and /usr, taken before any major upgrades, such as to a new baselayout or a new version of KDE. Once I verify functionality of the new upgrades, I'll make necessary config changes (like switching fstabs), then write off the snapshot to the non-raid emergency backup, so I can remove it and avoid the write penalty of the COW (copy on write) snapshot. Currently, I have a working copy and a backup copy of both root and /usr on each of my Maxtors, therefore, four OS area snapshots total. That has proven to be a good strategy, when I got those badblocks due to the bad A/C and consequent overheating, but after having used it, I decided it needed a bit of modification, mainly in that I needed a better way to keep the snapshots updated so they didn't get massively outdated. The RAID gives me better reliability on the one side (and the Seagates with their 5 year warrantee are nice in that department as well), and lvm2's snapshotting should come in handy as an intermediate stage from the other angle. As I mentioned, I still have ~100 gig unpartitioned on the 250 gig. I'll maintain that practice on the raid, but the dynamic expansion capabilities of lvm2 will provide significant additional flexibility in that area. Well, I've got a quite a bit of work to do still, soo... -- 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 in http://www.linuxdevcenter.com/pub/a/linux/2004/12/22/rms_interview.html -- gentoo-amd64@g.o mailing list