View previous topic :: View next topic |
Author |
Message |
Muddy Tux's lil' helper
Joined: 02 Jan 2003 Posts: 144 Location: U.S.
|
Posted: Sat May 28, 2005 6:30 am Post subject: Setting up Raid0 AFTER install (can it be done?) |
|
|
Greetings all,
I've been at this for 3 days now, trying to move my install from an old ata100 ibm drive to 2x seagate sata drives setup in raid0.
It's so close I can taste it
Can this be done?? Every post I've seen on this covers a fresh install of gentoo with raid0.. well my install is current and works fantastic, except I'm trying to move the install to the raid0 setup.
Anyone found a How-To for us folks that are moving to sata w/raid0 post install? |
|
Back to top |
|
|
Apewall Apprentice
Joined: 01 Dec 2004 Posts: 248 Location: USA
|
Posted: Sat May 28, 2005 7:12 am Post subject: |
|
|
To my knowledge the only way to do it is to do a complete new install. _________________ Posting for dummies |
|
Back to top |
|
|
MrUlterior Guru
Joined: 22 Mar 2005 Posts: 511 Location: Switzerland
|
Posted: Tue May 31, 2005 2:13 pm Post subject: |
|
|
Apewall wrote: | To my knowledge the only way to do it is to do a complete new install. |
Total rubbish! From my experience it was easy as heck to do with a running system. Bear in mind that I had an existing system running off a 120GB SATA disk, I just wanted to add another identical SATA disk and turn them into a RAID-1 setup. I'm not infront of my boxes right now, but the process was something like this:
1. Create a grub boot disk containing current working grub.conf (see the grub docs) - this ensures you can still boot if you trash your MBR and/or grub.conf - test this diskette, you WILL need it.
2. Rebuild & test kernel using /proc/config.gz ensuring that all relevant RAID elements are built IN (and not modules) - if you go the module route you'll need to have an initrd image containing all these modules so that your kernel can use your root filesystem.
3. Partition the new drive identically to the existing one & create your new RAID-1 volume(s) (I used mdadm for software RAID, so I had to emerge mdadm first ... ) and add ONLY the new disk. For me I added sdb1, 2 & 3 -- giving me md1, 2 & 3. Running cat /proc/mdstat showed each of these as 2/1 (eg. only 1 disk present)
4. If you're in the same boat as I was (eg, new & existing disks of identical sizes), you can now just dd if=/dev/sda1 of=/dev/md1 for each of your partitions. Otherwise you'll need to mkfs.ext3 or whatever fs you use and then rsync -aPv across everything except /proc/*
6. Shutdown and remove or disconnect your 1st (existing non RAID, for me this was /dev/sda1) disk and configure your 2nd disk as master if you're using IDE - this is automatic for SATA
7. Boot with boot diskette, tell it (modify to reflect your system)
Code: |
root (hd0,0)
kernel /bzImage-2.6.11-blah.img root=/dev/md3
boot
|
This should now boot your system off your new (degraded, single disk) RAID
8. Modify your boot loaders config to reflect your new primary disk and install it on your new disk (now /dev/sda )
9. reboot without floppy verifying that your new boot loader config works
10. when satisfied, shutdown, add your old disk as secondary, boot, fdisk it identically to your RAID drive and hot add it to your RAID array.
11. Welcome to your new dual disk RAID-1 system >
The beauty of this is that until step 10, you've not adversely affected your working system, so you always have a working situation to revert to until you've ironed out the problems. _________________
Misanthropy 2.0 - enough hate to go around
|
|
Back to top |
|
|
Muddy Tux's lil' helper
Joined: 02 Jan 2003 Posts: 144 Location: U.S.
|
Posted: Thu Jun 02, 2005 3:46 am Post subject: |
|
|
MrUlterior wrote: | Apewall wrote: | To my knowledge the only way to do it is to do a complete new install. |
Total rubbish! From my experience it was easy as heck to do with a running system. Bear in mind that I had an existing system running off a 120GB SATA disk, I just wanted to add another identical SATA disk and turn them into a RAID-1 setup. I'm not infront of my boxes right now, but the process was something like this:
1. Create a grub boot disk containing current working grub.conf (see the grub docs) - this ensures you can still boot if you trash your MBR and/or grub.conf - test this diskette, you WILL need it.
2. Rebuild & test kernel using /proc/config.gz ensuring that all relevant RAID elements are built IN (and not modules) - if you go the module route you'll need to have an initrd image containing all these modules so that your kernel can use your root filesystem.
3. Partition the new drive identically to the existing one & create your new RAID-1 volume(s) (I used mdadm for software RAID, so I had to emerge mdadm first ... ) and add ONLY the new disk. For me I added sdb1, 2 & 3 -- giving me md1, 2 & 3. Running cat /proc/mdstat showed each of these as 2/1 (eg. only 1 disk present)
4. If you're in the same boat as I was (eg, new & existing disks of identical sizes), you can now just dd if=/dev/sda1 of=/dev/md1 for each of your partitions. Otherwise you'll need to mkfs.ext3 or whatever fs you use and then rsync -aPv across everything except /proc/*
6. Shutdown and remove or disconnect your 1st (existing non RAID, for me this was /dev/sda1) disk and configure your 2nd disk as master if you're using IDE - this is automatic for SATA
7. Boot with boot diskette, tell it (modify to reflect your system)
Code: |
root (hd0,0)
kernel /bzImage-2.6.11-blah.img root=/dev/md3
boot
|
This should now boot your system off your new (degraded, single disk) RAID
8. Modify your boot loaders config to reflect your new primary disk and install it on your new disk (now /dev/sda )
9. reboot without floppy verifying that your new boot loader config works
10. when satisfied, shutdown, add your old disk as secondary, boot, fdisk it identically to your RAID drive and hot add it to your RAID array.
11. Welcome to your new dual disk RAID-1 system >
The beauty of this is that until step 10, you've not adversely affected your working system, so you always have a working situation to revert to until you've ironed out the problems. |
Hmmm... how would this be altered for Raid0 ?? |
|
Back to top |
|
|
zieloo Veteran
Joined: 28 Mar 2004 Posts: 1337
|
Posted: Thu Jun 02, 2005 8:46 am Post subject: |
|
|
So you've got 3 disks, right? One ata - old one with a complete install of gentoo, and two more - sata?
If so, I can't see a point of asking such a question... |
|
Back to top |
|
|
Apewall Apprentice
Joined: 01 Dec 2004 Posts: 248 Location: USA
|
Posted: Thu Jun 02, 2005 9:30 am Post subject: |
|
|
My fault, i read the original question wrong, i thought he had it already reinstalled on one of the SATA drives.
I'd still recommend a fresh install to be clean, but thats a user preference:) _________________ Posting for dummies |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|