[vox-tech] I'm over my head - need a cookbook for transfering system to new disks

Ted Deppner ted at psyber.com
Tue Aug 21 07:14:46 PDT 2007


On Mon, Aug 20, 2007 at 01:56:28PM -0700, David Spencer, Internet Handyman wrote:
> I'm hoping that somebody can help me by directing me to a step-by-step
> cookbook of some sort for what I'm trying to do. Here's the summary:

The big issue here is probably how you did your initial partioning.  If
you have more than two or three partitions, and say that you want to grow
a partition in the middle of the disk, then you're at the most complex
issue.  

The way to do that "point and click" is with Partion Magic.  Sure, it's no
open source and it'll cost you some pennies, but it's the only thing I
trust my disks to when I need it's capabilities.  $70 and all this issue
goes away for you.  What's your time worth?  Are you making money with
this server?  You'd basically do your clone like you already did once, and
then use PM on the target disk to grow it.  PM knows linux partions and
does the right thing.

A second way to accomplish that, if it's a linux partition, is to use
rsync.  Boot the system up using a rescue CD, partition the target, mke2fs
-j on the new larger partition, mount the source and target, and then
"rsync -avrPSx /source/ /target/" (trailing slashes there are important,
and yes those options are somewhat redundant for any of you
"argumenatative" people.  :)  Repeat that for any other partions involved.
Swap partions can be deleted entirely and then readded later.  Use "mkswap
/dev/sd??" after re-creating the partition. 

If, on the other hand, you simple want to grow the last partition, you can
do that with fdisk (delete the partition, add it back in making sure it
has the same starting point, and make it fill up the disk) then resize2fs
and you're done... again doing this from a rescue CD.  I usually try to
put the partition I'd most like to grow in the future as the second to the
last parition.  The last partition would be the swap partition which can
easily be deleted as already mentioned (Ie I add more memory later and
need less swap, or I add a scratch disk for swap and don't need swap on
this disk later).

Lastly, I'll mention that you may wish to convert this system to using
LVM, which makes growing partitions (volumes in LVM parlance) and moving
things (like physical disks) very very easy.  It's complex, so I'll leave
you to Google to dig deeper on that.

-- 
Ted Deppner
http://www.deppner.us/


More information about the vox-tech mailing list