Brandon Carl wrote:
> ----- Original Message ----- From: "Joe Morris (NTM)"
> <[EMAIL PROTECTED]>
> To: <opensuse@opensuse.org>
> Sent: Saturday, July 07, 2007 5:40 PM
> Subject: Re: [opensuse] Software RAID with existing drive
>
>
>> On 07/08/2007 07:49 AM, Brandon Carl wrote:
>>> Device: /dev/hda
>>> Size: 232.8 Gb
>>> F:
>>> Type: ST3250623A
>>> Mount:
>>> Mount By:
>>> Start: 0
>>> End: 30400
>>> Used By: RAID sli_ahahafdeeibj
>>> Label:
>>> Device ID: ata-ST3250623A_4ND4WY67
>>> Device Path: pci-0000:00:0f.0-ide-0:0
>>>
>>> Device: /dev/hdb
>>> Size: 232.8 Gb
>>> F:
>>> Type: WDC-WD2500jB-00REA0
>>> Mount:
>>> Mount By:
>>> Start: 0
>>> End: 30400
>>> Used By: RAID sli_ahahafdeeibj
>>> Label:
>>> Device ID: ata-WDC_WD2500jB-00REA0_WD-WMANK5725185
>>> Device Path: pci-0000:00:0f.0-ide-0:1
>>>
>>>
>>> The /dev/hda is the hard drive that openSUSE is currently installed on.
>>> The /dev/hdb is the new hard drive I would like to use as a mirror.
>>> I would like to have the entire system mirrored, but I only require
>>> the /home to be mirrored, because it contains all of my important data.
>> I am not too familiar with the DM RAID, which I think is the fake raid
>> driver for your motherboard (or raid card IIRC from your first post).
>> Assuming that is correct, I wouldn't use it.  Software raid now uses the
>> mdadm program instead of raidtools.  You could do this, which I am sure
>> would work but will take time.  You will need two drives with matching
>> partition sizes for each raid 1 partition.  At the point you are at, I
>> don't think it really matters.  If you like the partitioning scheme you
>> have on /dev/hda, match it on /dev/hdb.  each partition will need to be
>> marked as Linux Raid.  Then, you could create a raid 1 for each
>> partition on /dev/hdb with mdadm with only one disk initially, then
>> format the new raid 1 partitions, then copy from /dev/hda.  After
>> copying, you will need to change the partition type of each raided
>> partition on /dev/hda to Linux raid.  Then use mdadm to add those
>> partition to your raid 1 partitions from /dev/hdb.  This will sync each
>> one in turn.  You will then need to edit /etc/fstab to correct your
>> partitions, i.e /dev/hda2 / to /dev/md0 /, etc.  You should also edit
>> /boot/grub/menu.lst and correct as necessary (root=/dev/md0, etc), then
>> I would double check everything and reboot.  You may or may not need to
>> reinstall Grub, though I probably would via the grub command prompt to
>> triple check it can find everything it needs BEFORE I am booting and it
>> tells me it cannot find.....  I have done the above, and it will work.
>> It is a bit of work, and depending on data size will take a while.
>> ALSO, one other thing I just thought about, you would need to add raid1
>> module to your initrd modules and run mkinitrd to create the raid
>> bootable image.  Check out
>> http://lists.opensuse.org/opensuse-amd64/2006-09/msg00034.html for
>> additional info.
>>
>> -- 
>> Joe Morris
>> Registered Linux user 231871 running openSUSE 10.2 x86_64
>>
>>
>>
>>
>>
>> -- 
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>
> Ok, I got as far as creating a raid 1 array for each partition on
> /dev/hdb.
>
> I created these:
> /dev/md0  /dev/hdb1  /
> /dev/md1  /dev/hdb3  /home
> /dev/md2  /dev/hdb5  swap
>
> Those were the three partitions on the /dev/hda, and they are the
> exact same size as the ones on /dev/hda, and even start and end at the
> same cylinders.
> I didn't know what to do about the extended partition on /dev/hda
> which was used for the swap space, I assume.  I created the exact same
> things on /dev/hdb, including extended partition.
>
> Now, I don't know what to do.  I mount the /dev/md0 as /mnt/raid0, and
> I can see all the files on it that must have been copied over when I
> tried the hardware RAID card.  It is the exact same thing as my "/"
> directory.  I created a new folder under "/" just to make sure, and it
> didn't show up in the /dev/md0, so that's good.
> When I tried to mount /dev/md1 as /mnt/raid1, it gives me an error:
> "mount: Operation not supported".  So I don't know what that means.
> Also, it won't let me mount the /dev/md2 because it says it looks like
> swap space, which it is.
>
> Now, I don't know how to format the new raid 1 partitions on /dev/hdb
> so i can copy my data over.
>
> And thanks for your help, Joe.
>
> -Brandon
The way I did it is
Using Yast
1) Partition disks, leaving 3 cylinders for /boot
2) Create one large RAID array over all disks
3) Used LVM to create desired partition structure, including SWAP
4) Finished installation of SUSE.

In a RAID 5 array, you want SWAP included, as if it fails without RAID
your system will die anyway.  So, in my system, everything except /boot
is on RAID.  And while I haven't done it yet, I could replicate /boot
across all 4 drives, so that I can always reboot, with any drive down.


-- 
Use OpenOffice.org <http://www.openoffice.org>
-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to