Jump to content

  •  

  • Photo

    Add-in for GPT and 4K Drives in V1


    • Please log in to reply
    10 replies to this topic

    #1 tojoski

    tojoski

      HSS Pro

    • Members
    • 235 posts
    • LocationMcRae, Arkansas

    Posted 16 November 2010 - 01:57 PM

    I found this on another site I frequent, I'm curious how hard it would be for you code gurus to write an add-in to take the work out of this:


    Originally posted by: cbutters

    Link to the thread: [url="http://hardforum.com...1559559"]Guide: GPT, 4K Sector & 3Tb Drives Work As Storage Pool Drives In WHS [/url]


    Guide: GPT, 4K Sector & 3Tb Drives Work As Storage Pool Drives In WHS
    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...hp?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.
    • 0

    #2 diehard

    diehard

      HSS Elite

    • Moderators
    • 1,632 posts
    • LocationMontreal

    Posted 16 November 2010 - 02:10 PM

    Wow, excellent stuff. We will have to discuss this on the podcast and see if TheWiz can come up with an add-in.
    • 0

    EX470 modified BIOS BE-2300 CPU 4Gig ram, 4 2TB HDD. DX4000 with 4 2TB HDD Storage Server2008 R2 Essentials.
    Microsoft MVP - Windows Home Server


    #3 Daleo1

    Daleo1

      HSS Pro

    • BYOB Podcasters
    • 104 posts

    Posted 16 November 2010 - 10:50 PM

    If I insert the 3TB drive, and it is already partitioned as a GPT disk, will it accept it as such or MBR it?
    • 0

    #4 tojoski

    tojoski

      HSS Pro

    • Members
    • 235 posts
    • LocationMcRae, Arkansas

    Posted 19 November 2010 - 10:52 AM

    [quote name='Daleo1' timestamp='1289969435' post='13361']
    If I insert the 3TB drive, and it is already partitioned as a GPT disk, will it accept it as such or MBR it?
    [/quote]

    It will MBR it, you then will have to manually create the GPT Partition and make the changes in the registry.

    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?
    • 0

    #5 tojoski

    tojoski

      HSS Pro

    • Members
    • 235 posts
    • LocationMcRae, Arkansas

    Posted 23 November 2010 - 07:00 PM

    Finally i figured out how to create an aligned partition with Diskpart, and I did see about a 10% speed improvement.

    However, apparently the GPT drives breaks WHS's ability to recover from a sys drive failure, as "new installation" is the only option upon simulating this.

    This could be due to my pre pp1 install DVD..
    • 0

    #6 TheWiz

    TheWiz

      HSS Member

    • Members
    • 43 posts
    • LocationUS

    Posted 29 November 2010 - 12:44 PM

    I've never had the system restore option work on my CD< I think it has simething to do with the Power Packs.

    Anyways, this addin is going live, so if anyone is interested in testing down the road lemme know.

    Christian
    • 0

    #7 tojoski

    tojoski

      HSS Pro

    • Members
    • 235 posts
    • LocationMcRae, Arkansas

    Posted 30 November 2010 - 06:56 PM

    I'm definitely willing to help you test it.
    • 0

    #8 TheWiz

    TheWiz

      HSS Member

    • Members
    • 43 posts
    • LocationUS

    Posted 01 December 2010 - 09:32 AM

    Hey tojoski,

    I got a lot coming out towards the end of December so anything you are willing to test will be MUCH appreciated.

    Christian
    • 0

    #9 tojoski

    tojoski

      HSS Pro

    • Members
    • 235 posts
    • LocationMcRae, Arkansas

    Posted 08 December 2010 - 02:23 AM

    So I setup another test for this..

    I created a Raid0 on my test box, consisting of 4x Samsung HD204UI 2TB Drives. The Raid Controller is a Dell SAS 6 I/R, and reports an available 7449.99GB drive to the OS.

    You can see in this pic the expected split at 2048GB, the limit for an MBR Disk.

    [img]http://img149.imageshack.us/img149/4788/23427629.jpg[/img]

    Prior to adding it to the pool:
    [img]http://img502.imageshack.us/img502/1937/10263325.jpg[/img]

    After adding it to the pool, WHS thinks the missing 5TB is just being used:
    [img]http://img694.imageshack.us/img694/3987/24678716.jpg[/img]

    While following the instructions, you convert the disk to GPT:
    [img]http://img703.imageshack.us/img703/8908/61825804.jpg[/img]

    After is all said and done, the entire disk is available to the pool:
    [img]http://img33.imageshack.us/img33/4179/62578352.jpg[/img]

    Obviously this is just a test scenario, I would never run RAID0 for any of my important data.
    The goal was just to create a huge disk to test adding it to the array.

    I plan to reconfigure the drives, to individually added, aligned drives in the pool.

    I did encounter a couple of issues that weren't too serious, but are worth noting none the less.

    1) In step 12 [code]"In attributes, make sure DevicePath matches the volume name that we just put in in the previous step"[/code]
    "DevicePath" is was missing from my setup, I simply added this and continued

    2) After rebooting the first time, I got a DEP error, as well as the "Virtual Disk Service" crashed..
    This was do to the fact that windows had assigned a drive letter "E:\" to the disk in addition to the mount point "C:\fs\D"
    After removing the "E:\" mount and rebooting, all was well.
    • 0

    #10 pcdoc

    pcdoc

      HSS Legend

    • Moderators
    • 3,957 posts
    • LocationLos Angeles, California

    Posted 10 December 2010 - 12:05 AM

    If I I interpret this correctly, you are killing/bypassing DE and using a RAID controller. This really does not provide direct support in WHS as in the storage pool but rather adds one huge drive to your to your storage.
    • 0

    Main Server - WHS 2011, Core I5-2500, 12T RAID 5 (5x3T) + 2T of Mirror + 2T of backup
    Second Server - 2012, Core I5-2500, 12T RAID 5
    Main Systems - Core I5-4770, 16 Gigs DDR3-1600, 180 Gig Intel 330 SSD. 240 Gig Intel 520, 3T Seagate - Other systems - Core I7-2600, 2 x Core I5-2500, Core I5-4570S, Core I3-2100, and G620

    My Blog - The Doc's World
    Tablet Resource - BYOB Videos - TheBYOBPodcast

    For More Information:

    Computer Systems

    Home Network


    #11 tojoski

    tojoski

      HSS Pro

    • Members
    • 235 posts
    • LocationMcRae, Arkansas

    Posted 10 December 2010 - 02:24 AM

    [quote name='pcdoc' timestamp='1291961156' post='14653']
    If I I interpret this correctly, you are killing/bypassing DE and using a RAID controller. This really does not provide direct support in WHS as in the storage pool but rather adds one huge drive to your to your storage.
    [/quote]

    The sole purpose of the last post was just to see if I could add a drive that was larger than 2TB to the pool. Which worked without a hitch..

    The drives have now been re-configured as individual 2TB, GPT, 4k aligned disks..
    • 0


    Skins By Invisioneers