Migrating to a RAID 1 setup (hardware RAID)

Migrating to a RAID 1 setup (hardware RAID)

Post by Doug.Bagg.. » Tue, 25 Apr 2006 00:18:56



I have a Slackware 10.2 system (but this question really apples to any
distribution).

I picked up a used 3ware 7500-4LP RAID card and would like to use it
with my current LINUX system which is currently configured on a 30GB
drive.

What is the proper way to migrate the system? I've never migrated a
non-raid installed system to a RAID setup.

I'd like to avoid doing a fresh install and then copying over config
files and filesystems

Searching the forums comes up with several questions regaurding
software RAID and/or adding a non-system fileystem s(other than root)
RAID enabled, but nothing that I can find explains how to do what I'm
contemplating.

thanks for any help (in advance)

Doug

 
 
 

Migrating to a RAID 1 setup (hardware RAID)

Post by John-Paul Stewar » Tue, 25 Apr 2006 02:41:58



> I have a Slackware 10.2 system (but this question really apples to any
> distribution).

> I picked up a used 3ware 7500-4LP RAID card and would like to use it
> with my current LINUX system which is currently configured on a 30GB
> drive.

> What is the proper way to migrate the system?

The easiest is to buy two identical disks for your RAID-1 array, create
the array using 3ware's configuration methods, and then copy your
existing stuff over to the array using 'cp -a' or 'tar' or 'rsync' or
whatever method you prefer.  Then edit /etc/lilo.conf (or grub's
configuration file, if that's what you use) to point to the array and
re-run LILO.  Shutdown, remove the old hard drive, and then boot from
the new array.

If you must use your existing disk as part of the new array, you'll need
to find a reasonably close match (exact match is best) for the other
half of the RAID-1 mirror.  Then create a degraded array with only the
new disk and proceed as above.  Instead of removing the old disk when
you're done, attach it to the RAID controller and add it to the RAID-1
array.

You'll have to copy the data over to the array at some point.

 
 
 

Migrating to a RAID 1 setup (hardware RAID)

Post by AZ Noma » Tue, 25 Apr 2006 07:25:57




>> I have a Slackware 10.2 system (but this question really apples to any
>> distribution).

>> I picked up a used 3ware 7500-4LP RAID card and would like to use it
>> with my current LINUX system which is currently configured on a 30GB
>> drive.

>> What is the proper way to migrate the system?
>The easiest is to buy two identical disks for your RAID-1 array, create
>the array using 3ware's configuration methods, and then copy your
>existing stuff over to the array using 'cp -a' or 'tar' or 'rsync' or
>whatever method you prefer.  Then edit /etc/lilo.conf (or grub's
>configuration file, if that's what you use) to point to the array and
>re-run LILO.  Shutdown, remove the old hard drive, and then boot from
>the new array.

Have you ever actually tried that?  You do NOT use the file system to
mirror a drive!  You MUST do an exact mirror.  With a software raid
card, you use it's toolset, or with a hardware raid, you use it's
BIOS software.

With a software raid, you'll have to create a raid volume where you're
file system(s) will live.

With hardware raid, evereything will be done transparently to the OS.  You
don't need to change a single configuration file.  Linux will only see
one drive.

 
 
 

Migrating to a RAID 1 setup (hardware RAID)

Post by John-Paul Stewar » Tue, 25 Apr 2006 10:03:40





>>>I have a Slackware 10.2 system (but this question really apples to any
>>>distribution).

>>>I picked up a used 3ware 7500-4LP RAID card and would like to use it
>>>with my current LINUX system which is currently configured on a 30GB
>>>drive.

>>>What is the proper way to migrate the system?

>>The easiest is to buy two identical disks for your RAID-1 array, create
>>the array using 3ware's configuration methods, and then copy your
>>existing stuff over to the array using 'cp -a' or 'tar' or 'rsync' or
>>whatever method you prefer.  Then edit /etc/lilo.conf (or grub's
>>configuration file, if that's what you use) to point to the array and
>>re-run LILO.  Shutdown, remove the old hard drive, and then boot from
>>the new array.

> Have you ever actually tried that?  You do NOT use the file system to
> mirror a drive!  

I didn't say to use the filesystem to mirror it.  I said to "create the
array" and "then copy your existing stuff over" (instead of having to
re-install everything).

In fact, once the array is created, it can be treated like any other new
hard drive, and the Hard Disk Upgrade HOWTO at http://www.tldp.org/ can
be followed.

 
 
 

Migrating to a RAID 1 setup (hardware RAID)

Post by Doug.Bagg.. » Tue, 25 Apr 2006 21:48:14


Thanks for the response. Your solution is close to the answer on
linuxquestions.org.

I don't have an identical drive handy unfortunately, but drives are
cheap so I'll pick up a couple.

---
I don't know anything about 3ware RAID cards, but the first thing you
need to do is make sure the linux kernel supports them.

1 - Check for support. If supported continue...
2 - Recompile kernel with support for your card
3 - Configure your boot loader to add the new kernel so you can boot it
(take care NOT to wipe out your existing kernel!!)
4 - Power off system. Install card. Hookup your existing drive to it.
5 - Turn on system. Boot new kernel. If all goes well it should boot
fine. If you recieve a kernel panic it will most likely be due to the
hard drive device name changing (because of the RAID card) and your
/etc/fstab will need to be edited. If this is the case you will need to
boot from your distros cd, mount your root fs and edit the fstab to
reflect the device name change. Reboot once again.

Once you can succesfully boot the new kernel with the ONE drive hooked
up to the card:

- Shutdown system. Power off.
- Hook up second drive to RAID card.
- Turn on system. Press whatever key combo it is to enter your cards
config utility. Follow instructions to mirror one drive to another.
Basically mirror your existing drive to the new drive. You SHOULD be
using exact same drives btw!
- Some RAID utilities will allow the system to mirror while you
continue to work. Others don't. The process could take a while.
- When it's done you now have a working hardware RAID setup.

--

 
 
 

Migrating to a RAID 1 setup (hardware RAID)

Post by dnoye » Wed, 26 Apr 2006 11:04:08



> Thanks for the response. Your solution is close to the answer on
> linuxquestions.org.

> I don't have an identical drive handy unfortunately, but drives are
> cheap so I'll pick up a couple.

> ---
> I don't know anything about 3ware RAID cards, but the first thing you
> need to do is make sure the linux kernel supports them.

> 1 - Check for support. If supported continue...
> 2 - Recompile kernel with support for your card
> 3 - Configure your boot loader to add the new kernel so you can boot it
> (take care NOT to wipe out your existing kernel!!)
> 4 - Power off system. Install card. Hookup your existing drive to it.
> 5 - Turn on system. Boot new kernel. If all goes well it should boot
> fine. If you recieve a kernel panic it will most likely be due to the
> hard drive device name changing (because of the RAID card) and your
> /etc/fstab will need to be edited. If this is the case you will need to
> boot from your distros cd, mount your root fs and edit the fstab to
> reflect the device name change. Reboot once again.

> Once you can succesfully boot the new kernel with the ONE drive hooked
> up to the card:

> - Shutdown system. Power off.
> - Hook up second drive to RAID card.
> - Turn on system. Press whatever key combo it is to enter your cards
> config utility. Follow instructions to mirror one drive to another.
> Basically mirror your existing drive to the new drive. You SHOULD be
> using exact same drives btw!
> - Some RAID utilities will allow the system to mirror while you
> continue to work. Others don't. The process could take a while.
> - When it's done you now have a working hardware RAID setup.

> --

3ware has a great utility for their raid.  I just bought one.  when you
add the 2nd drive you wil lhave to go into the bios to tell the card its
part of the array.  after that boot as normal.  The arry will begin to
build after 10 minutes.  Im not sure if thats only if you have the tools
installed or if it will happen either way.  I suspect it happens even
without the tools installed.

im sure the 3ware site has info but you seem to hve it worked out.  I
just installed FC5 and mandrake and both handled the 3ware raid card by
installing a driver when the install kernel was loading.  So I'd say new
kernels support it, but this card is a bit old anyway and so your
probably supported in existing kernels as well.

--
Thank you,

"Then said I, Wisdom [is] better than strength: nevertheless the poor
man's wisdom [is] despised, and his words are not heard." Ecclesiastes 9:16

 
 
 

Migrating to a RAID 1 setup (hardware RAID)

Post by AZ Noma » Wed, 26 Apr 2006 11:11:16






>>>>I have a Slackware 10.2 system (but this question really apples to any
>>>>distribution).

>>>>I picked up a used 3ware 7500-4LP RAID card and would like to use it
>>>>with my current LINUX system which is currently configured on a 30GB
>>>>drive.

>>>>What is the proper way to migrate the system?

>>>The easiest is to buy two identical disks for your RAID-1 array, create
>>>the array using 3ware's configuration methods, and then copy your
>>>existing stuff over to the array using 'cp -a' or 'tar' or 'rsync' or
>>>whatever method you prefer.  Then edit /etc/lilo.conf (or grub's
>>>configuration file, if that's what you use) to point to the array and
>>>re-run LILO.  Shutdown, remove the old hard drive, and then boot from
>>>the new array.

>> Have you ever actually tried that?  You do NOT use the file system to
>> mirror a drive!  
>I didn't say to use the filesystem to mirror it.  I said to "create the
>array" and "then copy your existing stuff over" (instead of having to
>re-install everything).

'cp -a', 'tar', 'rsync' all use the file system.  They will all create
nonidentical mirrors which will be destroyed the first time the
raid s/w or h/w writes the same sectors from the nonidentical first
drive.
 
 
 

Migrating to a RAID 1 setup (hardware RAID)

Post by John-Paul Stewar » Thu, 27 Apr 2006 00:14:45







>>>>>I have a Slackware 10.2 system (but this question really apples to any
>>>>>distribution).

>>>>>I picked up a used 3ware 7500-4LP RAID card and would like to use it
>>>>>with my current LINUX system which is currently configured on a 30GB
>>>>>drive.

>>>>>What is the proper way to migrate the system?

>>>>The easiest is to buy two identical disks for your RAID-1 array, create
>>>>the array using 3ware's configuration methods, and then copy your
>>>>existing stuff over to the array using 'cp -a' or 'tar' or 'rsync' or
>>>>whatever method you prefer.  Then edit /etc/lilo.conf (or grub's
>>>>configuration file, if that's what you use) to point to the array and
>>>>re-run LILO.  Shutdown, remove the old hard drive, and then boot from
>>>>the new array.

>>>Have you ever actually tried that?  You do NOT use the file system to
>>>mirror a drive!  

>>I didn't say to use the filesystem to mirror it.  I said to "create the
>>array" and "then copy your existing stuff over" (instead of having to
>>re-install everything).

> 'cp -a', 'tar', 'rsync' all use the file system.  They will all create
> nonidentical mirrors which will be destroyed the first time the
> raid s/w or h/w writes the same sectors from the nonidentical first
> drive.

Once again:  I have suggested the OP create the array on two new disks
using the array manufacturers utilities and copy his existing stuff to
the *array* (not to one of the array component drives, but to the mirror
set), treating the (whole) array as any other hard drive.

Let's put it this way:  his existing hard drive should be /dev/hda.  He
would create an array using 3ware's configuration utilities that will
then be seen as /dev/sda.  The individual component disks will *not* be
accesible behind a 3ware controller, /dev/sda is the pair of mirrored
disks in the RAID-1 array.  I have simply suggested that he can copy
(partition by partition, filesystem by filesystem) the contents of
/dev/hda to /dev/sda where the 3ware controller will handle the
mirroring to the two component disks of the array at /dev/sda.  After
that's done, I've told him to *remove the old hard drive* since it won't
be part of the array.

I don't understand where you get the impression that I'm saying that cp,
tar, or rsync will create the mirror.  I have simply said they are the
way to copy an exsting drive to a RAID array.  How would *you* propose
he copy his existing data and configuration files to the RAID array,
given the OP said he wants to avoid having to do a fresh install?  The
*only* way is to copy filesystems from the old hard drive to the RAID set.

 
 
 

1. How to move from software-RAID to hardware-RAID?

Right now I am using software RAID-1 to mirror several disks (120GB drives x
4) for two separate mirror partitions (md0 and md1).

I would like to install a hardware-based RAID card to handle this (instead
of the Linux kernel).  Is there a fairly safe way to do this without having
to copy all the data on these drives to someplace else?  The drives are
pretty much full, so I have 120GB x 2 worth of data that I would need to put
somewhere.

I don't know that much about RAID itself, but is it a standard like "IDE" is
a standard (i.e. an IDE drive will work in practically any IDE controller)?

Any suggestions welcome...

BTW I am running RH 8.0.

Thanks,

2. KDE2, Kedit v. 1.3

3. RAID RAID RAID

4. Going to Linux

5. Linux software RAID vs. hardware RAID

6. Will DTrace be GPL'd too?

7. Raid performace issues (Raid 5 vs. Raid 0+1) with database files

8. Kylix - Desktop Edition how is it different from the server edition?

9. Rescuing data from a hardware RAID, using Linux software RAID.

10. How to setup IDE hardware RAID?

11. migrating RH 7.2 to Promise Raid controller

12. Migrate SSA Raid Disks

13. migrating SSA RAID-5 arrays from a G40 to p-series