* Replacing a RAID 1 array
@ 2002-04-24 12:07 Dovli X
2002-04-24 12:16 ` Ross Vandegrift
0 siblings, 1 reply; 3+ messages in thread
From: Dovli X @ 2002-04-24 12:07 UTC (permalink / raw)
To: linux-raid
Hello!
I intend to change the RAID configuration on a RedHat
Linux server(with kernel 2.4.9-6) that uses raidtools
0.90.
At this moment I have a RAID 1 array made up of two
devices /dev/hde2 and /dev/hdg2. The problem is these
are 20MB hard drives and they're almost full at this
moment. I have another 2 60GB drives that I intend to
use instead of those two disks. Another problem is
that I cannot keep the 20GB drives that are to be
moved on another server.
Here is my scenario for the move , I would like to
know whether this is possible:
1) install the two 60Gb hard-drives as /dev/hdf and
/dev/hdh (slaves on the two IDE buses used by the
current RAID installation)
2) initialize a new RAID 1 device /dev/md1 made up of
/dev/hdf2 and /dev/hdh2 format it.
3) copy the contents of the first RAID device
(/dev/md0/) to the new RAID(/dev/md1) device.
Now comes the hard part that I am not sure it will
work:
4) stop /dev/md0 and /dev/md1. Update /etc/raidtab to
leave only the second RAID installation with the 60Gb
hard disks repositioned as masters on the IDE buses (
I also want to physically move the new disks in the
position of the old disks)
5) turn off the computer and eject the old hard drives
and reposition the new hard-drives
6)Turn the computer on and pray to God it works
Will that work? Is there another way to do that? I
need your help
Thank you very much for your support
Dovli
__________________________________________________
Do You Yahoo!?
Yahoo! Games - play chess, backgammon, pool and more
http://games.yahoo.com/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Replacing a RAID 1 array
2002-04-24 12:07 Replacing a RAID 1 array Dovli X
@ 2002-04-24 12:16 ` Ross Vandegrift
0 siblings, 0 replies; 3+ messages in thread
From: Ross Vandegrift @ 2002-04-24 12:16 UTC (permalink / raw)
To: Dovli X; +Cc: linux-raid
On Wed, Apr 24, 2002 at 05:07:46AM -0700, Dovli X wrote:
> Will that work? Is there another way to do that? I
> need your help
What I would do is:
1) Backup
2) Remove current /dev/hdg
3) Install new 60G drive as /dev/hdg
4) Create new array with /dev/hde as failed disk
5) Copy everything from /dev/md0 to /dev/md1
6) replace /dev/hde
mdadm probably has some super-slick way of doing the above that I don't
know about because I haven't used it enough yet.
Ross
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Replacing a RAID 1 array
@ 2002-04-24 15:01 Michael Robinton
0 siblings, 0 replies; 3+ messages in thread
From: Michael Robinton @ 2002-04-24 15:01 UTC (permalink / raw)
To: linux-raid
On Wed, Apr 24, 2002 at 05:07:46AM -0700, Dovli X wrote:
> Will that work? Is there another way to do that? I
> need your help
Here's what I've done several times.
since raid 1 writes the super block at the end of the partition, by
changing the partition type to 83 (standard ext2) you can remount the
drive as an ext2 partition.
you need a boot diskette + rescue for your system that allows you
to manage the disks with raid tools. A regular rescue system with a raid
aware kernel and raidtools works fine.
1) use fdisk to remark the partitions as 83 instead of fd
2) change fstab to use /dev/hda1, /dev/hda2, etc.... instead of mdx
save a copy of the original
3) reboot and verify that all is well, that fstab, etc... is correct
4) remove the second drive /dev/hdb or /dev/hdc whatever....
and install the new 60 gig drive in it's place
5) create a new md0 with /dev/hda as a failed drive
6) create your new file system on /dev/md0
7) mount /dev/md0 on /mnt
8) from the root / use cpio and copy each subdirectory to /mnt, excluding
those which are unneeded or that must be manually created. i.e. /proc
/tmp?, etc...
cd /
find dirname | cpio -pamd /mnt
9) adjust fstab to again use /dev/md0, etc...
10) reboot the system with rescue pointing to /dev/md0 as root
11) if (10) worked fine (it should), adjust raidtab to change the failed
disk to raid disk. shut down the system, remove and replace the old hard
drive with the new.
12) reboot using rescue pointing to md0
13) partition and mark /dev/hda as 'fd'
14) raidhotadd /dev/md0 /dev/hda
done
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-04-24 15:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-24 12:07 Replacing a RAID 1 array Dovli X
2002-04-24 12:16 ` Ross Vandegrift
-- strict thread matches above, loose matches on Subject: below --
2002-04-24 15:01 Michael Robinton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.