Migrating from Dell 2850 to Dell 2950

We've all been there. You know what I mean, you've got some new(er) hardware and all you want to do is move that old data onto this new(er) machine. Unfortunately, if this old(er) machine is running Windows, you know you are going to get bit by the BSOD 0x0000007B when Windows doesn't recognize the new RAID controller. Yeah, there are packages out there that can make this transition work, but what if there was a free way to make it happen? Yeah, a free way!

Here are our players. There's a good chance this will work with other players, but these are the ones we used and had success with.

  • Dell 2850 with PERC4/i controller, running Windows 2008 R2, with a single partition
  • Dell 2950 with PERC5/i controller
  • Gparted Live CD
  • USB-attached storage to hold server image

Image Old Machine

The first step is to make an image of the old machine. The easiest way to do this is to place this image on some sort of USB-attached storage. Here's how we did it:

  1. Completely power off old server
  2. Attach USB storage to old server, make sure it does not contain data that you want to keep, as you'll be reformatting the drive
  3. Power on the old server, and boot off the Gparted Live CD (use boot menu, if necessary)
  4. Gparted Live will ask some simple questions as it comes up. Most people will be able to take the defaults
  5. When Gparted comes up, pay attention to the drives it is showing. In our scenario, /dev/sda was the drive we wanted to move and /dev/sdb was the USB storage. Great care must be taken, otherwise it is very easy to accidentally destroy data!
  6. Gparted Live has a Terminal icon on the desktop. Double-click to open a terminal.
  7. We used the following commands to save the image. Make sure you have the right disk devices for your particular scenario!

user@debian:~$ sudo -i
root@debian:~# cfdisk /dev/sdb

cfdisk is an easy-to-use program for modifying a disks partition table. We are using this on our USB storage, so we are going to delete any existing partitions, create a single Linux partition that utilizes the entire disk, and then Write the partition table to the disk. Once the new partition table is written, we will exit the program and then proceed to the next step, which is to create a filesystem on this new partition (which may take a while), mount this partition, and start copying the image.


root@debian:~# mkfs -t ext2 /dev/sdb1
root@debian:~# mount /dev/sdb1 /mnt
root@debian:~# dd if=/dev/sda of=/mnt/server.img bs=64k

This dd will likely take a while to run, as it is copying the entire disk. Our source image was less than the 2TB file size limit of the ext2 filesystem. If your image is larger, you might need to let dd send its output to stdout and pipe to the split command.

When the dd completes, we will need to need to unmount the USB storage:


root@debian:~# umount /mnt

The source server is now ready to shutdown for the last time. Double click Exit icon on the Gparted Live desktop. After a few seconds, it will present a window where you will be given the option to shutdown. Select the Shutdown radio button and click OK.

Now it's time to reverse the process and copy the image we just saved onto the new hardware. Similarly, we will attache the USB storage to the new hardware, boot off the Gparted Live cd, and figure out which drives are our system drive and our USB storage. In our case, the system drive was once again /dev/sda and the USB storage was once again /dev/sdb. We will launch a Terminal window and execute the following:


user@debian:~$ sudo -i
root@debian:~# mount /dev/sdb1 /mnt
root@debian:~# dd if=/mnt/server.img of=/dev/sda bs=64k

When the dd completes (which will likely take a while), we will want to shutdown the computer again, just like we did the last time.

Comparing Our Hardware

The old Dell 2850 utilized the mraid35x.sys driver for the Perc4/i RAID controller, whereas the new Dell 2950 will want the megasas.sys driver for the Perc5/i RAID controller. It is important to know what driver we are going to need. Fortunately, Windows 2008 R2 has a lot of drivers already installed, and the megasas.sys is one of them. Had it not been, we would have needed to have found a way to install that driver on the old hardware, before we took the image.

First Boot

It's time for the first boot. However, we won't fully be booting into Windows yet. Here are the steps we took:

  1. Press F8 during the boot and select "Repair Your Computer."
  2. If the "System Recovery Options" screen is presented, make sure the correct operating system is highlighted, and press next.
  3. At the "Choose a recovery tool" screen, select "Command Prompt."
  4. At the command prompt, enter regedit and press enter.
  5. From the registry editor, select HKEY_LOCAL_MACHINE, and then from the "File" menu, select "Load Hive."
  6. From the load hive dialog, browse to the %windir%\system32\config folder, taking note that our expected C: drive may actually be another letter (like D:) during this repair stage.
  7. Select the file named SYSTEM and click "Open."
  8. When asked for a key name, use "tempsys"
  9. Repeat this process, selecting the file named SOFTWARE and using the keyname "tempsoft"
  10. Navigate to the key HKEY_LOCAL_MACHINE\tempsys\ControlSet001\services\megasas
  11. Change the value of Start from 3 to 0.
  12. Now navigate to the key HKEY_LOCAL_MACHINE\tempsoft\Microsoft\Windows\CurrentVersion\Setup\PnPLockdownFiles and add a REG_DWORD key named %SystemPath%\system32\DRIVERS\megasas.sys and give it a value of 5
  13. Close the registry editor and restart the machine
  14. Let Windows boot normally. In our case, it was able to read the data from the Perc5/i RAID controller, boot up, update all of its drivers, and request another restart to apply those driver updates, and then run as if nothing had happened. Well, almost. The network cards had to be set appropriately, and Windows recognized the significant change in hardware and requested that it be activated again.

Epilog

We made some significant structure changes to our drives and actually added a GPT drive (keeping our MBR boot drive, as a 2950 cannot boot from GPT!) to allow for additional size. Many, many changes were possible, and there was some reassurance knowing that we had an image and could try again, or could even boot off the old hardware, if we needed to. The process was not too difficult once we figured it out, and it was the right price!