On Mon, Jan 10, 2011 at 10:42:43AM +1100, Kyle wrote:
>  My goal is to replace ALL the current 500GB disks with all new 1TB  
> disks into a new RAID 1 array and yet maintain the entire machine's  
> installation and configuration.

It's a common requirement. The hardest bit is getting the boot
sequence right as several components are involved: MBR, Grub/LILO,
initramfs and filesystem UUIDs.

> I.e. If it were as simple as;
>
> 1. as suggested by Menno - install disks separately; create new RAID 1  
> with appropriate /boot & /

If you're not using LVM then I suggest starting. The main benefits are
the ability to add/delete/resize logical volumes, often on the fly; it's
much more flexible than fixed partition tables.

When you want to upgrade in future you can add a new physical volume
(i.e. raid set) to an existing LVM volume group and move your filesystems
from one physical volume to another while the system is running.

> 2. Copy entire contents of old RAID1 /boot and / to new RAID

If /etc/fstab references filesystem UUIDs, then update the new copy to
new UUIDs.

> 3. remove old RAID, replace old for new.
> 4. Perhaps some bios fiddling and presto new disks.

I don't suppose you have an EFI bios?

PCs ... so primitive; we're still hobbled by 1980s era standards.

> But somewhere in there I've got to transfer the system onto the new  
> RAID. Just haven't figured out how yet. Plus any other gotchas I don't  
> yet know about.

At least if you drop it into single-user mode then a reliable copy of
the current root filesystem can be made. It's not necessary to boot from
a rescue disk (CD/USB) although that might have menus to help you with setup.

I found the most reliable transfer is a pair of tar commands:

        cd / && tar -c --one-file-system -f - . | (cd /new_rootdir && tar xpf - 
)

'cp' has problems copying sockets / named pipes and I almost always want
to limit any recursive operation to the same filesystem because I don't
want to copy /proc by mistake.

Nick.
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to