Re: Transferring system from old hd to new raid1
On Tue, Nov 28, 2006 at 05:19:19PM +1100, John wrote:
> hda4 swap
> hdb4 swap
BTW, you probably want to have hda4+hdb4 joined into a RAID1 md device, too,
because you probably don't need twice as much swap in the machine, and yet
you could benefit from the machine not going I/O-crazy for too long if bad
sectors develop on one of those two.
> hda1 /boot
> hdb1 /boot2 (A spare boot partition. I read somwhere that it was a good
I would also join the two hd*1 partitions into a RAID1 md device, because it
can't really hurt (if you need them small because of the bootloader, they'll
still both be small, yet they'll contain the same data).
> Q. How do I transfer the daemons/servers from the old drive to the new raid1
> array. (I've read numerous howtos and tried a number of times by setting the
> old drive up as hdc but all have failed and I'm getting nervous about how
> long the old drive will last.
Are you able to plug in both new drives, the old drive, and a CD drive all
at the same time in the machine? Order doesn't really matter, as long as you
can have PROM boot from the CD (with 'boot cdrom').
If so, you could boot off a Debian netinst CD, go through the installation
process up to the point where it starts the partitioning program. Then you
select manual partitioning, and enter the RAID setup portion (saying that
you want to continue with the partition tables intact). After that, exit the
RAID setup and exit partitioning, keep the installer on hold (at the main
menu), and switch to the second console.
There you can mkdir a directory (e.g. /old) and mount the old drive
partitions on it in sequence - hdX2 as /old, hdX4 as /old/var, etc.
After that, mkdir another directory (e.g. /new) and mount the new RAID1
array over there, as well as the boot/ partition directory under that
After all that is in place, simply cp -a /old/* to /new/* to copy all files,
with permissions, timestamps and all.
After that, shut down and unplug the old drive, and make sure the new drives
are set as 1st channel master ("hda") and 2nd channel master ("hdc").
I'm saying this merely to make sure that the layout is optimal (as much as
an IDE layout could ever be optimal...) and that the old disk won't
interfere with boot order.
Then boot off the CD, repeat the procedure I described initially up to the
point where you switch to the second console. Mount the new RAID1 array(s)
under a /new directory, and then run chroot /mnt. At this point, run silo to
make sure the boot loader will be all right. (On an Intel machine, you'd run
grub-install or lilo or whatever.)
When that is all done, try rebooting into the new machine.
It should Just Work(TM).
2. That which causes joy or happiness.