Saturday, July 31, 2010

Migrating Ubuntu 10.4 to larger drive

Summary: don't be fooled by all the 'use DD' posts on the internet - migrating & resizing Linux drives is as easy with Ubuntu as with Windows. For example, SeaGate's free Drive Wizard (which is actually Acronis's Drive Clone tool) happily took an 80GB Ubuntu 10.4 drive and copied/resized it up onto a 320GB drive. Of course the tool runs under Windows, but I have no shame and can handle that - I just temporarily added both drives to a Win7 machine.

Although the tool warned me that I might need to boot a Linux floppy or CD to repair the boot loader, I didn't have to. The first time Ubuntu 10.4 booted, it warned me that the expected drive id (a big long hex code) was missing and I could wait or manually repair the issue. I pressed "M" to repair it, which I assume just meant that Ubuntu changed the id of its expected boot drive.

If one searches the internet for how to migrate Linux between hard-drives, you'll see the famous (infamous?) one-liners of:
dd if=/dev/hdb3 of=/dev/sde3

Of course, what most of these posters don't mention is the need to create the new swap partition, etc, etc. Plus below these posts will be the comments of the dozen kids who trashed their disks because they typed the wrong dev names. Then all the others chime in about needing to manually edit fstab and grub etc. Then of course to 'grow' an EXT filesystem on a bigger drive, there are other commands to run.

Anyway, I am pleased that I 'risked' my experiment to use a standard, run-of-the-mill Windows drive cloning tools and it very smoothly cloned and resized my Ubuntu image.

Why am I doing this?
I have been playing musical-hard drives this past week. I will be installing striped RAID 0 drives in my 2 main Windows 7 systems, so have been putting older, larger drives into my Ubuntu systems to free up their smaller drives ... make sense? :-)

Let me step back - so the drive design I've migrated to over the past year is to use 1 modest sized drive C: (say 160GB) for the OS and applications, then use a second 1TB or larger drive for my personal and miscellaneous data. I do this because my backup strategy is VERY different for the two styles of data.

The only way I trust to backup Windows 7 in a recovery form is to create a full drive image, which tends to be perhaps 30-40GB ... if I don't have 750GB of personal data clogging up drive C! Since I'll probably never need a single file from these images, having them highly compressed and slumbering on an external USB drive in one of those $40 department store fire-safes is just fine.

Most of my personal data (my writing, my 3D graphics, my ripped media) is instead backed up by echoing (one-way mirrored) onto one of several external USB drives. I don't ZIP these because I often need to look for individual files. The only down-side is that the backup slowly grows larger than the original as I move, rename or delete things from my original working set.

So I have not yet started the RAID 0 process, but from what I read migrating a drive C: from a single drive to RAID 0 is easiest by using 3 drives. Both of my motherboards have RAID controllers built in and supported at a BIOS level, so I assume this will go smoothly.

So for example, to migrate my single 160GB drive C: I need two more 80GB or 160GB drives. I get these working as RAID 0 as say drive F:, then do a full drive image of C: with a tool designed for a complete recovery - I use Acronis's "True Image". Then I remove the old Drive C: from the system, get the RAID 0 starting as the first drive, and finally use the Acronis recovery CD to restore my Windows 7 image to the new drive C. Hopefully it goes just like that.

Plus another nice reason to have all my personal data on my second drive is that I can disconnect it during all of these trials and tribulations. Better, there is literally nothing important on my drive C! Worst case, the OS and applications can always be reinstalled at a cost of a wasted afternoon (or three).

Labels: , , ,


Post a Comment

Subscribe to Post Comments [Atom]

<< Home