I have two 35 GB hard-drives with Ubuntu installed. How to set up RAID?
Hi everyone,
I have Ubuntu Linux 5.10 i386 (server edition) installed on one 35 GB hard-drive and the other drive is empty. I'm working to build a file server with possible email capabilities down the road. What would be the best way to set up RAID? Do I need to do this through the CD I first installed Linux with? I'm thinking RAID 1 would be good with the two hard-drives? Are any specific drives needed, or is everything I'd need on the installation CD? While I've worked with Linux a little before, I'm pretty new to RAID and setting it up, so any specifics would be very much appreciated. Thanks much! - Matt. |
personally i'd say raid1 is pointless to most new users, instead do an LVM setup, as you'll have all the benefits of raid1 with much better flexibility too.
|
Would LVM (http://www.tldp.org/HOWTO/LVM-HOWTO/whatisvolman.html) offer protection if we lose one of the hard-drives? That's my main concern. I thought RAID was pretty standard for servers.
Or would a setup where we simply do daily backups to the second hard-drive be a better idea? Thanks for your reply! |
sorry, i prove myself to be an idiot again, by getting my raid levels wrong :-s
|
anyway.. this should suit you down to the ground... http://www.debian-administration.org/articles/238
|
You're probably thinking RAID 0 instead of RAID 1? I know better RAID setups require more than just two hard-drives.
Thanks for the link. Will try that out. I know Ubuntu came from Debian, so the two should be fairly similar. |
Ok, I just began going over the link you gave and had some success, although I ran into a problem in that the new drive has different looking partition sizes than the old. Now it doesn't want to make /dev/md1 because the size is too small or something. Here's what I'm seeing:
Code:
Disk /dev/sda: 4427 cylinders, 255 heads, 63 sectors/track Code:
Disk /dev/sdb: 34732 cylinders, 64 heads, 32 sectors/track Code:
mbaerbock@Shepherd:~$ sudo mdadm --create /dev/md0 --level 1 --raid-devices=2 missing /dev/sdb1 Any ideas? Please go easy on me if this sounds dumb. I'm pretty new at this RAID stuff and partitions. :-) |
I'm pretty positive both hard-drives are the same size. Is there a good way to check this in Linux?
Anyone have any other comments or suggestions? Thanks, - Matt. |
Hi,
I wonder this works anyway. As far as I'm concerned this will only work correctly if both drives have the same geometry. Lets take your drives as example: Disk /dev/sda: 4427 cylinders, 255 heads, 63 sectors/track Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0 Disk /dev/sdb: 34732 cylinders, 64 heads, 32 sectors/track Units = cylinders of 1048576 bytes, blocks of 1024 bytes, counting from 0 I marked the 'spots' - as you can see the Cyl-Head-Sec/Track values of your drives are different so the OS gets different results when calculating the Units. 1st of all make them equal by using fdisk. 2nd don't try to 'mdadm' your extended partition /dev/sdb2 because it can not be 'mdadm'ed - it is simply neither possible nor is it necessary. |
Yes, I noticed those differences too. How would I make them equal with fdisk? Is sfdisk different than fdisk? I had used sfdisk in the following way according to the linked article posted above:
Code:
sudo sfdisk -d /dev/sda | sudo sfdisk /dev/sdb I guess right now I'm hoping for a list of instructions similar to that article on how to proceed. Thanks for your help. - Matt. P.S. - Should I undo what I've already done according to that article? If so, how would I remove the md0 RAID thing I already created? |
Well - let's have a look.
Please answer me one question: This 35GB hard drives, are they SCSI, SATA or ATA |
They are both SCSI on channel 1.
|
A combination of RAID-1 and either LVM or EVMS will work. RAID-1 will give you some reduntancy while either LVM or EVMS will sometimes give you RAID-0. For every addition to the LVM or EVMS device, you need to make a new RAID-1. This means you will have several RAID-1. To some people it may seem to be expensive, but a RAID-1 and LVM or EVMS will be cheaper than RAID-5 which uses a fixed space setup that needs to be backed up before increasing its space.
It is better to use a drive for the OS and use seperate drive(s) for storing e-mail or for a file server. |
@Mateo1041:
Wonderful - so it should be easy but you mentioned that you already made some efforts in creating a running md-Raid, right? And your system is running fine with that ?? The ignore the 1st-Step thing I mentioned above. Better use: Never touch a running system. I read this article myself and find it very useful. Just continue with your partitions /dev/sda5 - /dev/sdb5 /dev/sda7 - /dev/sdb7 /dev/sda8 - /dev/sdb8 and all will be fine. Only if your system is NOT running well then tell me and I will try to help. |
Well, my system is still running, although I found I could only go partway through the instructions at: http://www.debian-administration.org/articles/238 as I mentioned in a previous post.
Somehow both hard-drives are not formatted or partitioned equally and that is the problem I'm having. How do you format a drive in Linux anyway? If this article won't work, I want to undo what I did and forget the RAID thing. It is way too complex and there are just too many roadblocks. I absolutely don't want to be left with a partial RAID setup which is what I have now because the article didn't work for me. :-( Quote:
|
All times are GMT -5. The time now is 02:54 PM. |