[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Transferring system from old hd to new raid1

Thanks for your response, Josip.

I have been trying to follow your instructions but I'm hitting a brick wall at the 'cp -a /old/* /new/*' commands result.

A df shows all old and new partitions mounted as you directed.

It seems that its copying the entire hard drive to /new/var/!

The other thing that's troubling me but I haven't got to that stage yet is, what is going to happen to files like /old/etc/fstab? Will it overwrite the new raid fstab? Is the kernel 2.6.16 likely to be overwritten by the 2.4.18?


On 12/3/06, Josip Rodin <joy@entuzijast.net> wrote:
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
> idea)

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.

To UNSUBSCRIBE, email to debian-sparc-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Reply to: