LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   My first RAID - need advice (https://www.linuxquestions.org/questions/linux-server-73/my-first-raid-need-advice-562993/)

wfeather 06-19-2007 12:42 PM

My first RAID - need advice
 
I have an Intel 965 mobo with 3 hot-swappable 250gb SATA disks. I've promised the boss high reliability; performance and disk space are lesser issues. I'll be using Debian Etch with LVM to run a LAMP application. Should I set up the system with all 3 disks as RAID 5 (OK, with a RAID 1 boot partition) or with 2 disks as RAID 1 with the third partitioned as a spare? What problems do I face if there is a drive failure? Do step-by-step instructions exist anywhere? Am I doing this all wrong?

flashingcurser 06-19-2007 03:49 PM

First, if you can, get out of software raid. I don't know about your mother board, or its raid setup, but the HP/compaq ones I use email me when a mirrored drive fails and automatically repopulates a spare. Then all I have to do is (at my leisure) replace the spare. Raid 1 with a spare, for reliability, is pretty damned hard to beat. This will make a reasonably reliable (at least as far as disks go) webserver.

LVM? Raid 5? how much room do you need? 250gig is pretty big for a webserver, compare that to any hosting company. (Yes, yes there are exceptions...)

Are you going to do any file bulk file serving? For file serving, I would worry more about how to backup the content than the availability of the server serving it.

Raid increases uptime but is not replacement for backups.

wfeather 06-19-2007 05:47 PM

Nope, I'm stuck with either software RAID or the Intel Matrix fakeRAID on the motherboard. Yes, RAID 1 with a spare seems right for this box.

All the articles I've read assume there's a single root partition in addition to boot and swap - any recommendations for multiple partitions? We had a mail server go down because its root partition filled up and I'd prefer getting my data away from the OS.

Thanks!

Quakeboy02 06-19-2007 05:55 PM

If you're going to use a software RAID in a production environment, I suggest you spend some quality time with it. IOW, fail it in every way you can think of and know how to recover from the failures. If you don't know how to get the system running after the boot partition fails, then in reality it's just a bunch of disks hooked up to a motherboard. I haven't messed with RAID1 much, but even with software RAID you should be able to recover from a failed drive 1 if you have it setup properly and practice.

Good luck!

flashingcurser 06-19-2007 06:16 PM

Like I said, I don't know much about your mother board. Can you boot from the on board raid 1? and can it repopulate hot spares? If you answer yes. I would say you are in fantastic shape. Regardless, you have to buy a very expensive controller to out do the reliability of a mirror.

As for how to divide up your harddrive space, I guess I would want to know more about what all you plan to do with this server. If it is strictly a webserver, then what type of pages is it going to serve up? I know that's a little nit-picky, I would do different things in different circumstances.

wfeather 06-19-2007 06:52 PM

Quakeboy02: Thanks, we'll be using test data for a while and I'll have a chance to play with it.

flashingcurser: Supposedly, I can boot from outside the LVM. The app this box is being built for is webERP, an web-based accounting app that I'm customizing for this particular client. Mainly, we'll have a MySQL database to worry about. On my non-raid test machine those files go in /var/lib/mysql with php and html in var/www and logs in /var/log so it's only a /var partition that concerns me, I think.

ajg 06-21-2007 02:21 AM

I believe you'll find the on-board RAID won't work with Linux. They very rarely do. It will just appear to Linux as two separate drives, regardless as to how you've configured it in its tools.


Short answer:

RAID1 + HS is the way to go


Long Answer:

Soft RAID5 is a pain in the butt when one of the drives fails. You need access to a replacement drive immediately, otherwise you won't be able to successfully restart the system - it gets into a situation where you've had to hard-reset the box, leaving the filesystem in a dirty state, but it can't fix the filesystem as the RAID5 set is critical, so you're stuck until you have space to make the RAID5 fully functional again.

Soft RAID1 works quite happily if one of the drives is missing. If you want to use LVM, that's entirely up to you (personally, I don't because tinkering with server volumes isn't something I would recommend). If you want RAID5, I can only recommend a hardware approach, and only then with cards which have been properly qualified (most aren't).

wfeather 06-21-2007 09:23 AM

I've got RAID 1 running now. Here's what I did:

First, this Intel DQ965GF motherboard is giving me fits. It will only boot the Etch install disk with 'install generic.all_generic_ide=1 pci=nommconf irqpoll' and so far I haven't gotten x server to run. But anyway...

I disabled the Intel MATRIX RAID on the motherboard, then manually configured each disk with a 1GB primary partition used for RAID with the boot flag on and the balance of each disk a primary partition used for RAID with the boot flag off. I set up a RAID 1 device for both the small and the large partitions with 2 active and 1 spare in each. I configured the small RAID device as ext3 with a mount point of / and the large one as an LVM volume group. I then created 5 logical volumes within the volume group for usr(10GB), tmp(1GB), root(1GB), swap(1GB), and var(the balance of the space) and configured them all as used for ext3 at their named mount points (except for swap which gets swap space instead of ext3). Had to manually type in /root, BTW. It boots! Now if I can get the GUI working I'll be all set, I think - I've got redundancy and most of my space in /var which was my aim.

flashingcurser 06-21-2007 10:26 AM

Why? you don't need a gui for a webserver. Save the resources. In fact, run it headless without keyboard, mouse, or monitor. Have you tried ssh (on the *nix box) with winscp and putty on a windows box? Try it, you'll like it. Any windows box will become a nice terminal and gui file manager for your server. They both work great off of a flashdrive, so where ever you're at you have access to your servers.

winscp:
http://winscp.net/eng/download.php#download2

putty:
http://www.chiark.greenend.org.uk/~s.../download.html

Oh and congrats on getting it set up the way you wanted.

wfeather 06-22-2007 12:52 PM

A final note - apparently, this board's video and the current version of Debian do not coexist. I dropped in an old ATI 3D Rage Pro and everything is now fine, I think. Intel provides a program requiring x-windows,I think, called ei4l_gui.sh that's supposed to load required drivers but I couldn't get it to load. Oh well. I still need to test whether the RAID will recover from failure as I expect but for the moment I'm the hero once again. I think. Thanks all!


All times are GMT -5. The time now is 03:44 AM.