#1  
Old 16th February 2006, 11:21
mphayesuk mphayesuk is offline
Senior Member
 
Join Date: Sep 2005
Location: UK, East Midlands
Posts: 517
Thanks: 1
Thanked 3 Times in 3 Posts
Send a message via MSN to mphayesuk
Default SATA Software RAID 1 on Linux

Ok this is a small guide to show what I did to make Software Raid 1 work on my Suse Server this should work on other versions of Linux.

1) Tip from Ryoken... make sure that your motherboard has had the latest bios patch applied this will help correct any syncing errors that you may get. Dont configure onboard raid

2) Start the install I am using Suse 9.3 as a 2.6 kernel will not work so using suse 10 32/64bit is a none starter unless you are a techie and decide to re-build the kernel to a 2.4. (I'm not that good with linux)

3) When it comes to partitioning the harddrives what you need to do is make them on your first hard drive but select "do not format" and select Linux Raid from the drop down list. So what I have is 2 x 200GB SATA Drives:

/sda1 = 199GB /sda2 = 1GB - both partitions set to do not format and file type is linux raid.

So I re-create that setup on the second hard drive.

3) Go to the Raid Option and select Create Raid, then select mirroring and then for the first raid put the two largest partitions in and make it / (root) and then create another raid and put the 2 1gb partitions in and make it a swap raid partition.

So what you should have is /mb0 as a 199GB Partition and /mb1 as a 1GB Swap Partition.

What you also need to do is install grub on both harddrives which is done (in suse) by clicking on the expert options on the summary screen and then clicking the relevent option button.

4) Complete the install using falkos excellent install guide or finish off the install as you planned to ect....

5) Now what you should be able to do to test is when the machine is off unplug one of the hard drives and then turn back on, you should find that Linux will boot as normal and when the hard drive is plugged back in raid will copy any data that is missing.

6) The fun begins when one hard drive fails and you put in a new one, if its the second hard drive you will be able to boot stright into linux but if its the first hard drive that fails you will get the grub boot command line, as I dont know how to tell grub to boot from the second hard drive, I opened the machine and put the second hard drive in the first SATA socket, and this makes linux boot as normal.

7) After linux has booted what you need to do is partition the new hard drive either via this command (Which I did not use or test)

root. fdisk -d /dev/<good disk> | sfdisk /dev/<new disk>

What I did was start the partitioner gui and then make the partitions and apply them "as above". What I did then was delete the raid for the swap partition and then recreate it and add in the two partitions as you did the first time round, BUT I DID NOT DO ANYTHING WITH THE BIG /ROOT PARTITION/RAID.

Restart the computer.

8) After the reboot go to a terminal and type cat /proc/mdstat

which will tell you what drives are currently in what partition, you should find that the swap partition /md1 is first and has both /sda? hard drives listed.

And below that the /md0 partition which will only have one hard drive listed.

9) run this command raidhotadd /dev/md0 /dev/sd?? (the hard drive that is not in the list)

The command will look as though it has been run as you are returned to the shell quickly but what you will notice is that the hard drives will then have activity as the data is copied to the new hard drive. Dont know how long this will take I did it and left it over night.

*****************

I hope this guide helps someone, it took me a week or so to work it out, also a big thankyou to Ryoken for his tips that helped me and of course Falko and Till. ** Forum Moderators... you can do what you want with this guide... move it and/or edit it if you think you can add something to it.

Thanks
Reply With Quote
Sponsored Links
  #2  
Old 19th February 2006, 02:35
ryoken ryoken is offline
Member
 
Join Date: Feb 2006
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
Lightbulb quick tip!

Quote:
Originally Posted by mphayesuk
9) run this command raidhotadd /dev/md0 /dev/sd?? (the hard drive that is not in the list)

The command will look as though it has been run as you are returned to the shell quickly but what you will notice is that the hard drives will then have activity as the data is copied to the new hard drive. Dont know how long this will take I did it and left it over night.

*****************

I hope this guide helps someone, it took me a week or so to work it out, also a big thankyou to Ryoken for his tips that helped me and of course Falko and Till. ** Forum Moderators... you can do what you want with this guide... move it and/or edit it if you think you can add something to it.

Thanks
thanks mphayesuk for writing up this excellent guide on software raid for suse 9.3. i am confident that it will of great help to many people here

in relation to step 9 above, you can easily check the status of the synchronisation (after raidhotadd is run) by typing this:

cat /proc/mdstat

this will give you a nice graphical view of the raid rebuilding process, including percentage completed and estimated time remaining. you could also combine the above command with "watch" to periodically monitor the status of the rebuilding process.
Reply With Quote
  #3  
Old 21st February 2006, 11:31
mphayesuk mphayesuk is offline
Senior Member
 
Join Date: Sep 2005
Location: UK, East Midlands
Posts: 517
Thanks: 1
Thanked 3 Times in 3 Posts
Send a message via MSN to mphayesuk
Default

Thanks for the added comments.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to setup Debian linux on a Dell server with RAID 1 Hans HOWTO-Related Questions 7 11th May 2006 00:10
SSL related problems senzapaura Installation/Configuration 45 25th March 2006 14:15
Linux File System rippner Installation/Configuration 12 21st February 2006 11:08
Suse 10 RAID 1 How To mphayesuk Installation/Configuration 2 11th February 2006 04:56
Debian linux and RAID 1 Hans Installation/Configuration 1 28th December 2005 22:26


All times are GMT +2. The time now is 13:16.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.