How to successfully clone and upgrade a WHS system drive.Special thanks to Yakuza for his help in developing & testing the procedure.
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
*If cloning to an Advanced Format (AF) drive, use AF-aware Disk Imaging Software.
If you use AF-unaware tools you will have to perform an addition alignment step after cloning the disk before continuing with the procedure. Please be aware, some AF drives (Seagates) have '
SmartAlign' features that require no further action even if the partitions appear to be out of alignment.
Instructions:Part 1: Cloning the System Disk1) 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 moment 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.
6) Type
"uniqueid disk"Code:
DISKPART> uniqueid disk
Disk ID: C83A8445
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).
Optional) If your destination disk is an AF Disk and you used AF-unaware disk imaging software, this is the point where you should use partition (re)alignment software such as those typically available from the support section of your hard drive manufacturer's website.
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 PartitionDepending 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 Registry22) 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'.Attachment:
Step25.PNG [ 35.64 KiB | Viewed 204741 times ]
26) Updating the WHS Volume Information:
- Open up a Command Prompt window on your WHS and run "wmic".
- 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>
- 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.
- 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.
- 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.Attachment:
Step26b.PNG [ 39.95 KiB | Viewed 204741 times ]
- 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".
- 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.
- 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 partitionAttachment:
Step26a.PNG [ 39.94 KiB | Viewed 204741 times ]
Close the Command Prompt Window, but keep regedit open.
27) Updating the System MountedDevices Information:
- In Regedit, navigate to HKEY_Local_Machine\SOFTWARE\Microsoft\Windows Home Server\Storage Manager\Volumes
- Return to the key that has "C:\" as its MountPoint. Write down or record the value of SystemName into a temporary notepad window.
Attachment:
step27a.PNG [ 46.02 KiB | Viewed 204741 times ]
- Return to the key that has "D:\" as its MountPoint. Write down or record the value of SystemName into a temporary notepad window
- Navigate to HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices.
- Double-Click on the \DosDevices\C: Entry. Highlight and copy all the data into the clipboard.
- Find and Double-Click on the entry that matches the SystemName value recorded in Step 27.2.
Highlight and replace all the data with the contents of the clipboard (paste).Attachment:
step27b.PNG [ 32.52 KiB | Viewed 204741 times ]
- Double-Click on the \DosDevices\D: Entry. Highlight and copy all the data into the clipboard.
- 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...
(Done)
Edits: Errors, typos, tweaked formatting etc...
Edits: Replaced references to
"SYS" and
"Primary Volume" FriendlyNames with
"C:\" &
"D:\" MountPointsEdits: Added information about Advanced Format (AF) drives, AF-aware Disk Imaging Software, (Re)Alignment options for when using AF-unaware Disk Imaging Software. Added an additional optional step to perform (Re)Alignment of partitions (if required).