Guide: GPT, 4K Sector & 3Tb Drives Work As Storage Pool Drives In WHS

cbutters

Gawd
Joined
Dec 30, 2005
Messages
514
Hello everyone, I recently have been looking into a workaround for 4k sector drives. I am happy to announce that I have been able to come up with a method that should work for anyone using WHS PP3 to do the following things:
Create and Realign 4k Sector Drives correctly
Utilize GPT Partitions in the Storage Pool
Fully Utilize Disks larger than 2.1TB (3TB HDD in WHS anyone?)


In my own testing I have been able to create two 4TB GPT Partitions as storage pool drives. I have added and removed drives with no problem using this guide.

This is obviously not something recommended by microsoft, but there are many people out there who want to use 4k sector drives and align them properly without the use of jumpers, use 3TB hdd in WHS, use raid arrays in WHS larger than 2.1TB. This guide should let you do just that... Just a disclaimer, you do this at your own risk and I will not be held liable for you losing data. This is a fairly complicated guide, so do this at your own risk.


Here is the Guide:

1) Create storage space in raid controller/ install 3tb/advanced format drive

2) Turn on whs (make sure that nobody is copy files to or from the server before you proceed.)

3) If you have other drives added; make note of existing mount points in C:\fs folder. (i.e c:\fs\1k) That way you will know which mount point is the new one that is added.

4) Use whs to add disk to storage pool normally. (at this point, it will be added with a maximum capacity of 2.1tb, MBR only, and not aligned correctly for 4k sector drives.)

5) Make note of where the disk is mounted in c:\fs (for example mine created C:\fs\1K)

6) We need to make note of the original DISK ID at this step. This will make your life much easier later!
Use the command prompt and type "diskpart"
Type "List Disk" to see all your disks
Choose the disk you would like to view by typing Select Disk X (i.e Select Disk 1)
Type "Detail Disk"
Look for the Disk ID: (for example mine was DISK ID: DB7CA365)
Write down this diskid so you have it later.

7) Enter services by going to Windows - Run - Type "services.msc" Stop the services "Drive Extender Migrator Service" and "Virtual Disk Service" (you will get a prompt here that this will also shut down additional services.. Thats fine.) It is important to stop these services almost immediately after adding the disk in step 4, we don't want any data copied to this drive if we can help it during this critical point.

8) Make a Copy of all files out of c:\fs\mount point that corresponds to your disk except the System Volume Information folder (you might need to change your windows explorer view settings to include view hidden files/system files/ protected operating system files)

9) OK here we go, time to delete the crappy partition that WHS created in step 4. Right click on my computer - manage - delete the partition whs created.

10) Recreate the partition as a GPT partition if your goal is to use a greater than 2.1TB volume, or realign the partition for advanced sectors if that is your goal. Once you are done creating your partition how you would like, Give it the label "DATA" and mount it back in the old mount point (c:\fs\*) (for example I mounted mine back in as C:\fs\1K) It is critical that you label it correctly and mount it correctly here in this step.

11) Copy your files back into the mount point that you copied out in step 7, copy them in as they were before you deleted the original partition.

OK now we have a good partition created! Now we need to trick WHS into accepting that drive as the old volume that we deleted.
WHS uses MBR volume ids (short) when it creates volumes, if you are using a GPT volume it uses a guid (long), but luckily the registry entries in whs support using long guids as well as the shorter MBR IDs. In this step we are going to make note of the DISK ID so we can trick WHS into using the new volume we created

12) Use the command prompt and type "diskpart"
Type "List Disk" to see all your disks
Choose the disk you would like to view by typing Select Disk X (i.e Select Disk 1)
Type "Detail Disk"
Look for the Disk ID: (for example mine was DISK ID: D67BAD45-F29E4FF49D69-3CE681DBA57B)
WRITE DOWN THAT DISK ID NUMBER! IT IS CRITICAL TO YOUR SUCCESS HERE.

Now that we have recreated the volume on our own terms, we have to tell WHS PP3 how to use it in the registry, many thanks to nitrobass24 on the HARDOCP forums for giving me tips on how this works, they were using these registry values for a different purpose, but his work helped here a lot. For Reference: http://hardforum.com/showthread.php?p=1035306055

11)The first step is to change the disk information values in the registry
Enter the registry (Start - Run - regedit)
Look in your registry under the following path: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Home Server\Storage Manager\Disks\
Find the registry folder that has a SystemName that matches the original DISKID you found in step 6. (for example mine was 1524393f-5fec-4dda-b108492f1ad342c6 with a SystemName of DB7CA365-0000-0000-0000-000000000000)
OK now you need to modify the SystemName to match the NEW GUID you discovered in Step 12. (for example I changed my system name to D67BAD45-F29E4FF49D69-3CE681DBA57B)
You will also need to change the Size Value to match the volume you created. To find the actual size value, go to the command prompt and type "WMIC", then type "partition get name, size, startingoffset" make note of these values and enter the correct size value into the registry (mine was 3999688294400)

12) Now we need to change the Volume information values in the registry
Enter the registry (Start - Run - regedit)
Look in your registry under the following path: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Home Server\Storage Manager\Volumes\
Find the Registry folder that has a MountPoint value that matches yours (for example, I found the folder that had a mount point of C:\fs\1K\)
OK now you need to change the Size to match the volume you created. To find the actual size value, go to the command prompt and type "WMIC", then type "partition get name, size, startingoffset" make note of these values and enter the correct size value into the registry (mine was 3999688294400)
Now you need to change the SystemName here to match your new volume..... to do this go to the command prompt and type "mountvol" this will give you a list of volume names and current mount points... Find your mount point and make note of the Volume Name (for example mine was \\?\Volume{23e552b6-d0b4-452b-b19c-5071e8c06a76}\) Change the systemname in the registry to match this.
Now, expand the registry of the volume you are currently looking at in regedit. It will expand down to an Attributes folder and another guid folder underneath. In attributes, make sure DevicePath matches the volume name that we just put in in the previous step.
Go to the guid folder next to the attributes folder, we need to set the size and offset here. The name is the offset value, and the Data is the size of the volume, you need to change these to match your setup; so to find the actual size value and offset value, go to the command prompt and type "WMIC", then type "partition get name, size, startingoffset" make note of these values (for example, my key was named 134235136 and my value was 3999554042368)

OK, you should now be good to go! reboot your server and it should come back up with a fancy GPT partition or properly aligned 4k sector drive ready to be used.
 
Last edited:
Also to note, the GPT portion of the above is also what lets you use RAID volumes >2TB in WHS storage pools. The question in that case though is whether you want to. 3TB drives make more of a compelling case for the above.
 
I use mine in WHS, but i turn off duplication.
Secondly, Vail will nullify all of this as the storage pool natively accepts GPT disks.

Good guide :)
 
Secondly, Vail will nullify all of this as the storage pool natively accepts GPT disks.

Yes but in vail if you have duplication turned off for a share, and you loose any disk in the system, you are more than likely going to loose everything that isn't duplicated.. that coupled with just how buggy vail is in it's current state make me want to stretch v1 that much longer..

Thanks for the guide!
 
Last edited:
I haven't had a chance to try this yet. I will be upgrading my WHS tonight and will definitely have to give this a shot.

Thanks very much for putting this together.
 
Yes but in vail if you have duplication turned off for a share, and you loose any disk in the system, you are more than likely going to loose everything that isn't duplicated.. that coupled with just how buggy vail is in it's current state make me want to stretch v1 that much longer..

I was referring specifically to my RAID setup on WHS. Therefore, I dont need duplication ;)

BTW, this point in the beta process WHSv1 DE was much more buggy. I have a lot of hope for Vail.
 
Fixed the links...

Screenshot of GPT Volumes working:
whsgpt.jpg


So my setup is a 2TB OS Drive, a 2x2TB Raid 0 drive, and another 2x2TB Raid 0 drive. So you might be wondering... why didnt you just break up your Raid 0 into two volumes that are smaller than the 2.1TB limit? Why not break it up into two volumes and add them both in instead of going through the trouble of making a GPT volume work?

Here is the reason:
If you create a RAID 0 volume out of two drives and break them up to appear as two different volumes to WHS, you have compromised your duplication. If you use duplication and rely on it, you should never break up your raid space and let it appear as different volumes in WHS. WHS places a copy of each file on two hard drives. If you have a raid array (especially raid 0) and it goes down, you may have lost two hard drives as far as WHS is concerned. and your data would be lost. By keeping my raid 0 volumes consolidated as a single volume, if I lose a hdd in that raid set, it will be as if I lost one hard drive to WHS. which I can easily recover from :) I hope that last paragraph makes sense.
 
Last edited:
Much thanks for this guide. I originally found it over at We Got served and was directed to your thread here. This guide is a lifesaver for me since I have 6 of these drives I wanted to add to my WHS. Added 2 last night and all seems well with them. Thanks again.
 
Finally got around to doing this. It looks like it worked fine to add and alight my F4EG to the pool. I did get a DEP error for Virtual Disk Service after the reboot though. Aside from that, it seems to be good.
 
I'm no programmer, but it would seem that it would be possible to write an add-in that would do this pretty easily.
 
I tried the above procedure last night, adding my Samsung HD204UI to the pool as a GPT partition and it worked perfectly, just
a little time consuming. It helps on some of the commands to redirect them to a .txt file so you can copy + paste them into the registry.

I'm still not sure its aligned properly, and if it is, I am not really seeing an immediate speed improvement.

BlockSize Index Name StartingOffset
512 0 Disk #0, Partition #0 32256 (Seagate 250G System Drive)
512 1 Disk #0, Partition #1 21482496000
512 0 Disk #1, Partition #0 134235136 (Manually Added Samsung HD204UI GPT)
512 0 Disk #2, Partition #0 32256 (Auto Added Samsung HD204UI MBR)

So the block size is still set to the default 512, anybody know if this is correct for a 4k disk?



Maybe I'm not running the right tests?
 
This guide becomes all the more important now that drive extender has been removed out of future versions, rendering V2 of WHS pretty much worthless. At least with this we should be able to use any drive into the future even on WHS V1.

Even though I wrote the guide, I don't have the technical capability to write an add in to make this work easily without all the manual registry edits, but it could be done..... hopefully the community works it out.
 
Back
Top