Guide: Successfully clone and upgrade a WHS system drive!

Status
Not open for further replies.

nitrobass24

[H]ard|DCer of the Month - December 2009
Joined
Apr 7, 2006
Messages
10,465
First off I want to give all the credit to ymboc over at MediaSmartServer.net.
He is the brains behind this and many other features that have been unlocked for WHS.
http://www.mediasmartserver.net/forums/viewtopic.php?f=3&t=6826


For some reason or another people have been led to believe that you cannot rebuild your WHS after cloning the system drive due to the "tombstones" that point the FS to your files across your various drives across the storage pool.

Definition below is slightly dated, but it gets the point across of what Tombstones are for.
Tombstone – When a file is copied to the server it will land into the data partition on your primary drive, and over time it will be moved out to make space for new files. After being moved out a special pointer ("tombstone") is created in the data partition, pointing to the actual file in the storage pool.
As you probably already know data does not go to the primary drive and then get moved. Since PP1, it goes to its final destination initially. Either way this tombstone file is created and is what allows DE to work like it does.

I have tested this myself 3 times and it has worked everytime. I performed it once in a VMware WHS with PP2, and Hyper-V WHS PP3, and on my production WHS with PP3.
Although i have had great luck using this process, I am not making any guarantee to your success and am not responsible for damage you may cause to your WHS.


Now with that out of the way, heres the part you came to read.

Background:
WHS uses Unique DiskID numbers found in the partition table of each disk to help identify them. The WHS Storage Manager stores these DiskIDs and other important information about its disks, folders and volumes in the windows registry.

When using disk imaging software to migrate an operating system from one disk to another disk, these DiskID numbers are typically not cloned during the disk imaging operation. When the destination disk is of a different size (typically larger) the volume geometry and as a result the volume identifier will also change.

A newly imaged WHS system disk with mismatched DiskID number, volume geometry and/or volume identifiers will still boot normally but the server will not be able perform its functions. The WHS console will exhibit a number of Critical Health Warnings the most easily identifiable of which is the "Backup Service is not Running" warning.

For WHS to function properly, the DiskIDs, volume geometry and volume identifiers saved in the registry must match that of the newly imaged system disk. These instructions show how to obtain and clone the DiskID when performing an imaging operation as well as update the windows registry with the system disk's description, new volume geometry and volume identifiers.

Tools Needed:
1) A 'Workstation' running Vista SP1 or newer OS.
2) Disk Imaging Software
3) Destination Disk (the disk you're upgrading to)
4) Appropriate hardware/cables/etc to connect harddrive(s) to your workstation.
(I recommend USB or eSATA connection for simplicity).
5) Either:
. a) Second set of hardware/cables/etc to connect a second hard drive to this system
or
. b) Enough free hard drive space to fit the entire contents of your WHS system disk
 
Last edited:
Part 1: Cloning the System Disk
1) Shutdown your WHS Server and remove the system harddrive.

2) Connect the system harddrive to your workstation.

If you're connecting the harddrive to your workstation's internal components (powersupply & sata) it's probably a good idea to do this with your workstation powered off.

3) Open up a Command Prompt window on your workstation and run "diskpart". You will see the following prompt.
Code:
Microsoft Windows [Version 6.0.6001]
Copyright (c) 2006 Microsoft Corporation.  All rights reserved.

C:\Users\user>diskpart

Microsoft DiskPart version 6.0.6001
Copyright (C) 1999-2007 Microsoft Corporation.
On computer: WORKSTATION

DISKPART>
4) Type "list disk" (and press enter)
Code:
DISKPART> list disk

  Disk ###  Status      Size     Free     Dyn  Gpt
  --------  ----------  -------  -------  ---  ---
  Disk 0    Online       149 GB      0 B
  Disk 1    Online       466 GB      0 B
In this case Disk 0 is the workstation's harddrive and Disk 1 is the WHS system disk. You may have more disks than this example so you may have to take a movement have to determine which disk is the WHS system disk you've just connected.

If you're having trouble identifying your WHS system disk, these disk numbers correspond to those shown in the "Disk Management" graphical interface.

5) Type "select disk #" where # is the disk number you identified from the list.
Code:
DISKPART> select disk 1

Disk 1 is now the selected disk.
This is your WHS System disk's DiskID number. Write it down and/or copy & paste it to a safe place. You'll need it later.

7) type "exit"
Code:
DISKPART> exit

Leaving DiskPart...

C:\Users\user>
We're done with diskpart for now. Don't close the command prompt window just yet. You'll return to it later.

8) Connect your destination disk.

9) Using the disk imaging software of your choice, clone your WHS system disk to your destination disk (often a larger disk).

10) Safely disconnect your (source) WHS system disk.

11) Return to your Command Prompt and run "diskpart"
Code:
Microsoft DiskPart version 6.0.6001
Copyright (C) 1999-2007 Microsoft Corporation.
On computer: WORKSTATION

DISKPART>
12) Type "list disk" (and press enter)
Code:
DISKPART> list disk

  Disk ###  Status      Size     Free     Dyn  Gpt
  --------  ----------  -------  -------  ---  ---
  Disk 0    Online       149 GB      0 B
  Disk 1    Online       932 GB   466 GB
In this example you can see that the destination disk (disk 1) has 466GB of unused space after the cloning operation.

13) Type "select disk #" where # is the disk number you identified from the list.
Code:
DISKPART> select disk 1

Disk 1 is now the selected disk.
Optional) Type "uniqueid disk"
Code:
DISKPART> uniqueid disk

Disk ID: 31318FF5
You can see that despite the 'clone' operation your destination disk still has a different DiskID. Newer versions of popular disk imaging software may someday have the option of cloneing the DiskID when cloneing a drive.

14) Type "uniqueid disk id=%" where % is the Disk ID number you recorded earlier
Code:
DISKPART> uniqueid disk id=C83A8445
This command doesn't give you any feedback but you can verify that the operation completed successfully by querying the diskid again:
Code:
DISKPART> uniqueid disk

Disk ID: C83A8445
This concludes the main operation of cloning the system disk & its diskid.
 
Part 2: Extending the Data Partition
Depending on the disk imaging software used, you may have already been presented with the option to resize your partitions during/after the cloning operation. If so, skip ahead to step 19. If not, the following steps show how to extend the Data Volume to take advantage of your larger destination disk.

15) Type "list volume"
Code:
DISKPART> list volume

  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
  Volume 0     E                       DVD-ROM         0 B  No Media
  Volume 1     F                       DVD-ROM         0 B  No Media
  Volume 2     C   SYSTEM       NTFS   Partition     70 GB  Healthy    System
  Volume 3     D   DATA         NTFS   Partition     70 GB  Healthy
  Volume 4     G   SYS          NTFS   Partition     20 GB  Healthy
  Volume 5     H   DATA         NTFS   Partition    446 GB  Healthy
In this case volume #5 is the WHS Data Volume.

16) Type "select volume #" where # is the volume number you identified in the list.
Code:
DISKPART> select volume 5

Volume 5 is the selected volume.
17) Type "extend"
Code:
DISKPART> extend

DiskPart successfully extended the volume.
18) Type "list volume" to see the new size of your data volume
Code:
DISKPART> list volume

  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
  Volume 0     E                       DVD-ROM         0 B  No Media
  Volume 1     F                       DVD-ROM         0 B  No Media
  Volume 2     C   SYSTEM       NTFS   Partition     70 GB  Healthy    System
  Volume 3     D   DATA         NTFS   Partition     70 GB  Healthy
  Volume 4     G   SYS          NTFS   Partition     20 GB  Healthy
* Volume 5     H   DATA         NTFS   Partition    912 GB  Healthy
Close the command Prompt Window.

19) In Windows, Navigate to the \Windows\System32\ Folder on the WHS system drive. Select the Config Folder and make a backup copy of it to your workstation or elsewhere on the WHS system drive. This backs up your WHS Server's registry in case something goes wrong when you're editing it in the next part of the instructions.

20) Safely disconnect your destination disk from your workstation.

21) Insert your newly cloned disk into your WHS Server. While not required, you may wish to remove/disconnect your data drives from your Server until all the remaining operations are complete.
 
Part 3: Updating the WHS Registry
22) Turn on your WHS Server. Your WHS Client Connector Software (and WHS Console) will alert you to Critical Health Warnings -- don't be alarmed.

23) Connect to your WHS Server with the Remote Desktop Client on your Workstation.

Alternatively, if you have console/VGA access to your WHS Server you can carry out the following operations directly on the Server.

24) Go to the Start Menu. Select Run. Type "regedit". Press OK.

25) Updating the Name of the System Drive as it appears in the WHS Console "Server Storage" Tab:
In Regedit, navigate to HKEY_Local_Machine\SOFTWARE\Microsoft\Windows Home Server\Storage Manager\Disks.

There you will see a key (looks like a folder) for each drive that's normally a part of your WHS system. Find the key that has "System" as its FriendlyName (in the right-hand pane). You can identify it by the key's name which will begin with the same DiskID you set in part 2 of the instructions.

Navigate to the Attributes sub-key of the key you just identified.

Double-Click on ManufactureName in the right-hand pane and Enter the name of your new System Drive as it appears in the WHS Server's Device Manager under the disks heading.

FYI: You can quickly access the Device Manager by going to the Start Menu, Right-Clicking on 'My Computer' and selecting 'Manage'.
file.png

26) Updating the WHS Volume Information:
  1. Open up a Command Prompt window on your WHS and run "wmic".
  2. At the WMIC Prompt type "partition get Name, StartingOffset, Size" and press Enter. Keep this command prompt window open and return to regedit.
    Code:
    Microsoft Windows [Version 5.2.3790]
    (C) Copyright 1985-2003 Microsoft Corp.
    
    C:\Documents and Settings\Administrator>WMIC
    wmic:root\cli>partition get Name, StartingOffset, Size
    Name                   Size           StartingOffset
    Disk #3, Partition #0  500096991744   32256
    Disk #4, Partition #0  500096991744   32256
    Disk #0, Partition #0  21476173824    32256
    Disk #0, Partition #1  978727631360   21476206080
    Disk #1, Partition #0  1000194015744  32256
    Disk #2, Partition #0  1000194015744  32256
    
    wmic:root\cli>
  3. In Regedit, navigate to HKEY_Local_Machine\SOFTWARE\Microsoft\Windows Home Server\Storage Manager\Volumes.

    There you will see a key for each volume in your WHS system. Find the two keys that have "C:\" and "D:\" as their MountPoint.

  4. Find the key that has "D:\" as its MountPoint and navigate to the first sub-key that isn't "Attributes". Like before, this key's name will begin with your system drive's DiskID.

    In the right hand pane there should be the default entry and another entry with a peculiar number as its name and a peculiar number as its value.

    Move your Command Prompt Window somewhere visible where it doesn't obscure regedit so you can compare these peculiar numbers to the output from WMIC.

  5. If necessary, change the name of the entry so that it matches the value shown in the "StartingOffset" column of the WMIC output for "Disk #0, Partition #1".

    The name will probably already match the StartingOffset if your cloning software didn't prompt you to resize the system partition.

    file-1.png

  6. Change the value of the entry so that it matches the value shown in the "Size" column of the WMIC output for "Disk #0, Partition #1".

  7. Find the key that has "C:\" as its MountPoint and navigate to the first sub-key that isn't "Attributes". Like before, this key's name will begin with your system drive's DiskID.

  8. If necessary, change the name and value of the entry so that they match their respective values shown in the "StartingOffset" and "Size" columns of the WMIC output for "Disk #0, Partition #0".

    The name and value should already match the WMIC values if your cloning software didn't prompt you to resize the system partition
file-2.png

Close the Command Prompt Window, but keep regedit open.

27) Updating the System MountedDevices Information:

  1. In Regedit, navigate to HKEY_Local_Machine\SOFTWARE\Microsoft\Windows Home Server\Storage Manager\Volumes

  2. Return to the key that has "C:\" as its MountPoint. Write down or record the value of SystemName into a temporary notepad window.
    file-3.png


  3. Return to the key that has "D:\" as its MountPoint. Write down or record the value of SystemName into a temporary notepad window

  4. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices.

  5. Double-Click on the \DosDevices\C: Entry. Highlight and copy all the data into the clipboard.

  6. Find and Double-Click on the entry that matches the SystemName value recorded in Step 27.2.

  7. Highlight and replace all the data with the contents of the clipboard (paste).

    file-4.png


  8. Double-Click on the \DosDevices\D: Entry. Highlight and copy all the data into the clipboard.

  9. Find and Double-Click on the entry that matches the SystemName value recorded in Step 27.3.

    Highlight and replace all the data with the contents of the clipboard (paste).

28) Close Regedit. Shutdown your WHS System.

29) Reconnect your data drives if you disconnected them earlier and Start up your WHS Server.

30) Open your WHS Console and check your WHS Network Health for (new) errors and health warnings.

If you see a "Backup Service is not running" Health Warning in the WHS Console (possibly among other critical warnings), some aspect of cloning the diskid and/or updating the registry has failed...
 
Yikes! Knew it would be involved but was expecting something easier. I think it might be simpler and safer just to pop the new disk in and do a server reinstall and let it rebuild everything, then reinstall all the addons. I think there's an easier guide to restore pc backups.
 
Well you dont have to do the registry edits if its pre PP3, but its better to just be safe.

Also its really not as hard as it looks, its just a long post because of all the pics and breaking the code out step by step.
 
interesting... now I just need a job (hopefully will have 1 offer on the table within the next few hours) and a drive larger than 1TB to move to for the system drive, to try this out. Excellent guide, man. Good work.
 
Background:
WHS uses Unique DiskID numbers found in the partition table of each disk to help identify them. The WHS Storage Manager stores these DiskIDs and other important information about its disks, folders and volumes in the windows registry.


hm... if they had used serial numbers instead of DiskIDs to identify hard disks from the beginning, then cloning and upgrading system drive will be much easier since serial numbers never change.
 
hm... if they had used serial numbers instead of DiskIDs to identify hard disks from the beginning, then cloning and upgrading system drive will be much easier since serial numbers never change.

This is how all windows OS work and allows disks to be managed.
 
Wow, very long process just to clone a system drive. Hopefully WHS2 will offer some sort of system drive redundancy or atleast an easier method to replace the system drive.

Im assuming the partition expanding part doesnt apply if you are cloning to a drive that is of the same size? So the only thing you would have to do is clone the DiskID.

Does this process also work if you want to move from a large disk to a small disk? Assuming the existing space taken up on the drive being cloned will fit on the new, smaller drive.
 
Wow, very long process just to clone a system drive. Hopefully WHS2 will offer some sort of system drive redundancy or atleast an easier method to replace the system drive.

Im assuming the partition expanding part doesnt apply if you are cloning to a drive that is of the same size? So the only thing you would have to do is clone the DiskID.

Does this process also work if you want to move from a large disk to a small disk? Assuming the existing space taken up on the drive being cloned will fit on the new, smaller drive.

Yea and part 2 is really not even needed with most cloning software because most software will do that for your during the clone process.
Yes you can go to a smaller disk, but i would imagine most people are not moving to smaller disk.
 
Hi nitobass24,

I'm doing some research for a print article (btw, not on cloning WHS) and found your post/article. Great post/article! lots of time there I can tell.

In "Part 1: Cloning the System Disk", you omitted the beginning of step #6. You do have the end of there with "We're done with diskpart for now....". As you probably know, the diskpart command for step#6 would be "Detail Disk", or alternately just "Uniqueid".

Regards,
Brcobrem

P.S. With the "Acronis Backup & Recovery 10 Workstation" product, in the "Where to recover" section of creating a recovery task, it does have a checkbox for "NT Signature". Here's the Help:

NT signature:
When the MBR is selected along with the disk backup, you need to retain operating system bootability on the target disk volume. The operating system must have the system volume information (e.g. volume letter) matched with the disk NT signature, which is kept in the MBR disk record. But two disks with the same NT signature cannot work properly under one operating system.

If there are two disks having the same NT signature and comprising of a system volume on a machine, at the startup the operating system runs from the first disk, discovers the same signature on the second one, automatically generates a new unique NT signature and assigns it to the second disk. As a result, all the volumes on the second disk will lose their letters, all paths will be invalid on the disk, and programs won't find their files. The operating system on that disk will be unbootable.To retain system bootability on the target disk volume, choose one of the following:

Select automatically:
A new NT signature will be created only if the existing one differs from the one in the backup. Otherwise, the existing NT signature will be kept.

Create new:
The program will generate a new NT signature for the target hard disk drive.

Recover from backup:
The program will replace the NT signature of the target hard disk with one from the disk backup.
Recovering the disk signature may be desirable due to the following reasons:
Acronis Backup & Recovery 10 creates scheduled tasks using the signature of the source hard disk. If you recover the same disk signature, you don't need to re-create or edit the tasks created previously
Some installed applications use disk signature for licensing and other purposes
This enables to keep all the Windows Restore Points on the recovered disk
To recover VSS snapshots used by Windows Vista's "Previous Versions" feature

Keep existing:
The program will leave the existing NT signature of the target hard disk as is.
 
Status
Not open for further replies.
Back
Top