a simpler software RAID/partition suggestions?

a simpler software RAID/partition suggestions?

Post by Robert Nag » Fri, 06 Feb 2004 03:08:57



Hi, I've had numeous problems with software RAID on my gentoo linux
1.2 athlon box.  I'll be using the server for apache, mysql, zope cms
and a local samba share.  I use this as my home web server, but so
it's not mission-critical, but I want to minimize downtime and have
some redundancy. My goal is not performance but redundancy (and less
time spent troubleshooting).

(As an aside, let me mention that I've spent two weeks on-and-off
trying to troubleshoot the original RAID problem. First goal after
setting up the server under the new partition/RAID scheme is setting
up a backup server and replicating data (mysql, etc) onto this second
server).

Answers/feedback I want:
1)Do you agree with my diagnosis of the original RAID problem? (Also,
why is software RAID so hard?)
2)Will the proposed partition scheme with RAID1 be easier to
maintain/manage?
3)Given the fact that all my user data (mysql, httpd, zope, samba
shares) will go on the RAIDed drive, is the other nonraided partition
just useless? What can I do with/put on the unraided drive?

*****************************************************************************
Original problem.
(you don't need more detail than what you see here, but if you are
interested
http://groups.google.com/groups?hl=en&lr=lang_en&ie=UTF-8&oe=utf-8&sa...
)

3 hard drives, 60 gigs each
/dev/md1  /boot ext3, raid 1
/dev/md3 /  raid5
/dev/md4 /home raid 5

I experienced several problems. First, it continuously showed that md3
and md4 had one failed drive and I had one "extra drive." That meant
to me that the RAID was operating continuously in degraded mode. Which
is bad. (By the way, does anyone disagree about this?).

I initially thought the problem was that it was reading the RAID
superblock from previous RAIDs. But when I ran mdadm --zero-superblock
and even dd'ed all three drives, I eliminated that as a possibility.

Second problem was  a grub problem. I replaced one hard drive with
another, and then it wouldn't boot. That was because the drive I
replaced was from the primary controller, and the other two came from
the unbootable PCI IDE controller. That was stupid. Reading the
how-to, I see now that I should have used lilo if I wanted to put boot
on a RAID partition. This problem does not seem related to my main
problem.

Third problem (or maybe this is just a symptom of a problem). When
using cfdisk to create partitions on all 3 drives, I created boot as
100mb, swap as 1.5gigs, / as 25 gigs and /home as the remainder (on
all three drives). When I tried to create the first array, it gave me
an error message that the disk size was more than 1% off and do I
still want to proceed? I said yes, knowing that this would truncate
the difference. (But since the drives were all 60gigs and all by
Western Digital, I thought that this was something software raid could
handle). My guess is that this partition size discrepency produced the
problem with failed disks/reconstructing the array.

******************************************************
PROPOSED SOLUTION (MUCH SIMPLER)

What I have now is 2 hard drives with exact identical hard drive size,
and 1 hard drive with about the same size, but is off. So instead of
doing a heterogenous group of  arrays: I want to try something
simpler:

/hda1 /boot 100mb
/dev/hda2 1.5 gigs, swap
/dev/hda3 / the rest
dev/hde1 /dev/hdg1 = /dev/md1 = /home RAID1

Ok, this machine should have a webserver, a database or two, and
plone/zope content management system (with its object database). Also,
home I'll have a samba share somewhere, probably on /dev/md1, and I'll
be having to have automatic replication of my  mysql database onto a
separate server

How does this sound as a layout? My web content (php, html) is
important and will reside on /home, but it sounds as if locks me into
putting mysql, zope, my web server and my samba share all on the same
/dev/md1 (/home) drive as well. . I'm running just a home server with
1.2 gig athlon and 1024mb ram . It sounds as if I'm just going to
waste that 60 gig hda2 partition, and in fact, I'll probably have to
do automatic backups of /etc/ onto my RAIDed partition anyway.

I spent about 2 weeks troubleshooting the RAID problem and want an
easy solution with some redundancy.

Robert Nagle
www.idiotprogrammer.com