Linux Raid?

Associate
Joined
15 Dec 2002
Posts
85
Location
Worcester
Hello, Merry Christmas and happy new year! :)

I’ve got a pc running Debian at the moment, it was setup through a need to run Perl on something for Uni, but I’ve started to use it for more and more. Now I’d like to setup up for a few different things but, I’d like a certain degree of reliability. Basically – what is the best way of setting up some sort of RAID using IDE disks? I’m using the server for the below at the moment:

• Slimserver – aprox. 100GB music library;
• Subversion;
• Apache / PHP / MySQL & FTP – testing only though;
• Samba .

The motherboard has no built on RAID so I’m guessing I either need to do it in software or use a PCI card. I’d like to run Debian – but would be swayed if there were some good reasons to use a different OS. This machine has no monitor / mouse or keyboard for normal use so no gui needed.

Btw – it’s a 850MHz Athalon with 512MB of RAM – and I’d like this project to be as cheap as possible – but with some reliability. I’ve also got one spare 250GB IDE disk, and a volume of this size would be good for now.
Any sugestions welcome!

Cheers,

Rich
 
There are millions of howtos on this topic, but basically it goes like this:

The easiest is to re install, and copy your data over but assuming you want to upgrade to RAID in situ:

Install second hard disk ON A SEPARATE CONTROLLER to the other hard disk (I presume that's a 250 gig aswell?)

Create a mirrored RAID array, but tell it that there is a disk missing, so you will have 1 2 disk raid-1 array with 1 disk missing.

The above depends on the setup you have at the moment, do you have one large partition + swap, or many smaller partitions for /var /usr /home /etc? Make the raid array match.

Copy the orginal disk over to the new disk.

Fdisk the old disk and declare it a RAID device.

Add it into the array.

edit lilo conf
Re run lilo i think will be needed

You now have a mirrored raid array.


It's a bit more compelx than that, and personally I would backup, reinstall from scratch rather then mess with live data - but it could be a learning experieince. Read everything you can.

You shouldn't have any problems with the boot process as it is a raid 1. Raid 5 can be tricky.
 
Cheers for the sugestions, I've ordered a second 250GB disk and I'm going to go with software RAID - starting from scratch. The Uni module with the need for perl has ended so I can take out the old disk and start again.
Would I be better running the OS off two seperate (RAID) disks to the data, from the point of view of a hardware failure? The reason I ask is any replacement hardware, say the motherboard fried, would most likely be completly different.
 
As for softwre raid vs hardware raid.

Most 'hardware raid' cards aren't. They are like winmodems, in that a driver will use the card to perform raid.

Real Hardware raid cards cost a lot. Too much as the OP said he wanted to go as cheap as possible.

Relying on a RAID card means another point of failure. If the raid card fails you better hope you can obtain an identical card or buy 2 at the outset. As the chances of using another card to read your array are almost nil.


Linux Software raid on the other hand:

doesn't rely on special cards, just a standard disk controller will do, indeed any block device can be raided.

If your disk controller goes bad you can use any other controller to fix it or change the mobo - no problems.

Gives just as good performance, in some case exceeds the performance of 'hardware' cards. Unless you spend a few hundred on a Raid card loaded with RAM and a fast processor you should get results just as good with software raid.


When you install (the debian installer is really freindly for raid set up)

create e.g partition for swap, partition for root, partition for home
on both disks, make each identical

mark all these partitions as type RAID

then go to Set up RAID option.

choose your settings (2 disks, raid 1, no spare) and match up each partition (2 swaps together, 2 roots together, 2 homes together)

Then you should have 3 new arrays, choose your FS and mount point for each one and install. Jobs a good one.
 
I just wanted to reply with thanks! As said above software raid in Debian is nice and simple - important to remember to leave the array to synchronize for a while. But, again, thanks for the pointers whitecrook, really helped! Now I've just got to get the subversion repository working with Apache.
 
NP. Make sure to setup RAID monitoring, so you are emailed when a disk goes down. Otherwise you may not know there's a problem until it's too late. Good Luck!
 
Also, RAID != backup.

BACKUP now, and set a cron job to backup regularly. Backups seem like a pain in the arse until you need one, at which point it is too late.

Do it, now.

'man rsync' does wonders... ;)
 
I'll vote for rsync. Got it setup to run 'rsync -av --delete / rsync://earth/Venus' via cron daily on my Debian server. Earth is my main rig running Windows XP - the rsync server on it is provided by DeltaCopy (http://www.aboutmyip.com/AboutMyXApp/DeltaCopy.jsp) which might be useful if anyone wanted to rsync to a Windows machine.

My insistance on backups is from experiencing several hard disk failures and nearly losing data - not a nice thing to happen when it's important (as the stuff on mine was).

Advantage of an rsync backup is it's in a seperate machine so immune from things like PSU failures or serious operating system crashes in the Linux box. Also means you can undo any bad config changes on the Linux box because you have an unmodified copy of the relevent config file on the backup machine (until the backup goes through) - though you can also have rsync do snapshots for you which would make it work even better.

Hope this helps, null :)
 
Back
Top Bottom