How to Safely Align a Misaligned Partition on an Advanced Format (4K Sector) Data Disk in WHS v1Update - 2/10/2011If you are adding a brand new disk to your WHS that you know to be an AFD, I have an alternate procedure posted below as a reply to this note (or you can click here: viewtopic.php?f=3&t=10097&p=79525#p79525). The alternate procedure does not require you to purchase the Paragon Alignment Tool and is a much, much faster process. The alternate procedure can be performed on disks that have been in the server for awhile, but they're much more likely to contain a lot of data and, depending on how large they are, the backup and restore steps can take a significant amount of time. It's up to you how you want to proceed. I just wanted to let you know there's a faster way to do the alignment, and you don't have to shell out 30 bucks! This DOES NOT APPLY to WHS 2011! WHS 2011 properly recognizes AFDs. DisclaimerThese instructions are not for the faint of heart. The steps listed here involve modifying the partitions on your WHS disks and making changes to the Registry. Great care must be taken at all points in the instructions. If you are not careful, you could wipe out a disk with live data or render your entire WHS inoperative. These instructions are provided “as is” without any warranty. PrerequisiteRead and understand ymboc’s post “How to successfully clone and upgrade a WHS system drive.” viewtopic.php?f=3&t=6826 Read it. Understand it. It is the guidepost upon which these instructions are based. If you have a Western Digital disk and you installed the special offset jumper before installing the disk in your server, STOP. No further action is required. BackgroundThis article is written for folks who have installed an Advanced Format disk (AFD) in their WHS box, whether they’ve done so knowingly or unwittingly. Even if the AFD came pre-partitioned from the factory, the WHS disk import process repartitions the disk. The partition offset used is the legacy 63 sector offset, so your AFD is guaranteed to have a misaligned partition. I won’t go into the details of why misaligned partitions are bad. Microsoft has said you shouldn’t use AFDs in a WHS (v1), and plenty of other posts on this site, and elsewhere, have talked this issue to death. This article will help you determine if you have any AFDs in your WHS, particularly if you aren’t sure. In my case, I bought an external 2TB Seagate drive that had no indications of being an AFD, neither on the packaging nor on Seagate’s website. This process should work equally well for SATA/eSATA, USB and FireWire attached disks. Also note that you can theoretically run the partition alignment tool directly on the WHS, but these instructions have you run the process elsewhere. Tools Needed- Computer running Windows 7 or Windows Vista (SP-1 or later).
- HD Sentinel Pro (http://www.hdsentinel.com) – you do not need to register it unless you want to continue using it more than 30 days.
- Paragon Software’s Paragon Alignment Tool DEMO (http://www.paragon-software.com/technol ... alignment/)
- If it is determined you have AFDs in need of alignment, you can purchase the full version of the software for $29.95 USD.
- External drive case if the AFD in question is not an external disk already in a case. The drive case can be eSATA (fastest), USB or FireWire.
- Make sure you have read the aforementioned article by ymboc in the Prerequisite section above.
Part I - Identifying Potential AFDs- Log into your WHS via Remote Desktop, or if you have a console connection available, via your server’s console.
- Download and install HD Sentinel Pro, version 3.50 or later, from http://www.hdsentinel.com. You will probably get warnings that content from the site is blocked. You can either add this site to the trusted sites, or disable IE Enhanced Security Configuration. If you have HD Sentinel installed, make sure it is, at a minimum, version 3.40 or later. Versions earlier than 3.40 will not identify AFDs.
- Launch HD Sentinel Pro.
- Select the first disk in the list of disks, and then click the Information tab.
- You’ll see a field named Bytes Per Sector in the list of information fields. This field will show either “512” or “4096 [Advanced Format].” The below image shows a detected AFD at disk 6.
Attachment:
File comment: HD Sentinel Report
HDSentinel - AFD Disk 6.JPG [ 170.94 KiB | Viewed 79148 times ]
- For each AFD that you find, write down the following information. This is critical to your success, and helps ensure you don’t select the wrong disk! I’m using my disk as example data here.
- Disk Number: 6
- Disk Model: ST2000DL001-9VT156
- NTFS Mount Point: C:\fs\1JR
- If you don’t have any AFDs, good for you! You can stop here, and no further action is required.
- Open a command prompt window.
- Run wmic (this launches a WMI command line interface). If you’ve never run this before, you’ll see a message stating that WMIC is being installed. This should only take a few seconds.
- Run the command volume get DeviceID, Capacity, Caption
Code: wmic:root\cli>Volume get DeviceID, Capacity, Caption Capacity Caption DeviceID 21476171776 C:\ \\?\Volume{7656a73b-9e50-11de-846f-806e6f6e6963}\ 978717839360 D:\ \\?\Volume{55024369-f20a-11de-84f2-00262d006d9b}\ 1000194015232 C:\fs\1IE\ \\?\Volume{5502436d-f20a-11de-84f2-00262d006d9b}\ 1000194015232 C:\fs\1J9\ \\?\Volume{b235d763-0257-11df-a313-00262d006d9b}\ 1000194015232 C:\fs\1J5\ \\?\Volume{ab83338b-f6ef-11de-a5d2-00262d006d9b}\ 320062062592 C:\fs\1JT\ \\?\Volume{cea3a52a-1482-11e0-92e9-00262d006d9b}\ 400077586432 C:\fs\1JE\ \\?\Volume{d0d5577c-0c8d-11df-88c7-00262d006d9b}\ 2000388354048 C:\fs\1JR\ \\?\Volume{1f2bf6ab-298c-11e0-aebf-00262d006d9b}\ 1000194015232 C:\fs\1JN\ \\?\Volume{8ba23a56-b0be-11df-84da-00262d006d9b}\
- Run the command partition get Name, StartingOffset, Size
Code: wmic:root\cli>partition get Name, StartingOffset, Size Name Size StartingOffset Disk #3, Partition #0 1000194015744 32256 Disk #0, Partition #0 21476173824 32256 Disk #0, Partition #1 978717841920 21476206080 Disk #2, Partition #0 1000194015744 32256 Disk #1, Partition #0 1000194015744 32256 Disk #6, Partition #0 2000388338122 32256 Disk #4, Partition #0 320062063104 32256 Disk #5, Partition #0 400077586944 32256 Disk #7, Partition #0 1000194015744 32256
- These two commands provide crucial data that corresponds back to the data you collected in HD Sentinel. Write these values down, screen cap them, print them, etc. You will need these values so don’t lose them! These values are especially important when re-importing your disk after the partition is realigned!
Part II - Identifying the Misaligned Partitions- Download and install the Paragon Alignment Tool (PAT) Demo on your WHS.
- Run the PAT Demo and allow it to enumerate all of your drives.
- The PAT Demo will likely yield a result that looks like this, with every partition colored yellow, which indicates a misalignment condition.
Attachment:
File comment: Paragon Alignment Tool analysis
ParagonAlignmentTool_EX490.JPG [ 77.8 KiB | Viewed 79148 times ]
- BEFORE YOU PANIC, you can safely ignore the yellow for all non-AFDs! On non-AFDs, all partitions will begin at a valid sector boundary, because they’re 512 byte sectors. The only ones you need to be concerned about are the AFDs.
- I don’t have any AFD Western Digital drives, so I don’t know how the tool will report AFD Western Digital drives. If you installed the jumper before installing the drive in your server and the partition is still yellow, ignore the result. Do not attempt to align the partition!
- If the partition is colored green on an AFD, no action is required for it.
- Make a note of which AFDs, identified in the previous section, are showing as being misaligned.
- Close the PAT Demo tool.
KEEP IT SIMPLE! If you have multiple disks requiring alignment, process them one at a time. That means detach, align, reattach and import. Make sure all is well, then proceed with the next one. If you try to align multiples at once, you’re going to get confused and probably lose data.Part III - Detaching the AFDs from Your WHSIt is possible to detach the disk without shutting down the server, if the disk in question is attached via USB or FireWire. If you go this route, you need to stop the Virtual Disk Service (which stops a bunch of others), and you may later get prompts about Data Execution Prevention and the VDS service was terminated as a result. That said, for best results, shut down your WHS completely! Do NOT run the full PAT tool on the WHS box. It is possible to do so, but the results are unpredictable. You should run this tool on a separate computer, preferably one running Windows Vista SP-1 or later. - Ask people in your household to disconnect from any WHS shared folders, and make sure you’re not streaming any media to receivers. They will be interrupted when you shut down the server.
- Also verify that no backups are currently running, and that the weekly database maintenance (i.e. cleanup) is not running. If any of these are running, you can cancel them, but it is recommended that you wait for them to complete.
- Make sure you’ve printed or written down the information collected from WMIC.
- Shut down your WHS box.
- Remove the disk from the server that need to be aligned. If necessary, install the disk in an external eSATA, USB or FireWire drive case.
Part IV - Align the Partition- Purchase the Paragon Alignment Tool and install the full version on the computer that will be running the alignment. At your option, use an alignment tool of your choice. These steps were written using PAT but an alternate tool may be used.
- Connect the WHS disk to the computer upon which the alignment will be run. You may be prompted to run CHKDSK to scan for problems. Do NOT run this.
- For maximum safety and recoverability, make a backup of all files on your disk. Note for a very large disk with lots of data, this may not be practical.
- If possible, ensure the computer running PAT and the disk being aligned are plugged into a UPS. If there is a power blip or outage, the process may continue. Note that PAT is designed to allow for an unexpected interruption, and it will recover and resume where it left off.
- Launch the Paragon Alignment Tool and allow it to enumerate your drives.
- PAT may detect more than one misaligned partition. However, we’re only interested in aligning the WHS disk. Uncheck all others, and make sure only the WHS disk is selected.
- Click the Align button. The alignment process will begin immediately, with no further confirmation or intervention.
- On my Seagate FreeAgent Desk 2 TB drive connected via USB 2.0, which was approximately 50% full, this process took 21 hours to complete. Do not rely on PAT’s estimated time remaining. It’s far from reliable. It updates every 15 minutes or so, and will continue counting upward. When you see it counting downward, you’re more than halfway home. For me, the progress bar shot to about 50% right out of the gate, and then crept the remaining 50%.
- If the disk is connected via eSATA or USB 3.0, it’ll probably run a lot faster.
- At the very end of the process, Windows will try to remount the partition, and you’ll see Windows Explorer ask you what you want to do (i.e. view files). This may cause PAT to say an error occurred. Just click Ignore All, and the process will complete just fine.
- You can re-run PAT and it’ll show the partition to be aligned.
- If you want, you can run CHKDSK (without the /F option) in read-only mode to see if there are any problems. I didn’t have any.
Part V - Reattach and Import- Reinstall the disk back into your WHS, or if an external drive, reconnect it to the USB or FireWire cable where it resided previously. Ensure your drive is powered on.
- Power on your WHS.
- Your WHS is going to show Critical status, announce that the backup service isn’t running, that you have file conflicts, etc. If you have Alex’s Remote Notification add-in installed, expect to get a bunch of email.
- The first thing you need to do is remove the drive letter that Windows has given to your freshly aligned disk. As far as Windows is concerned, you’ve installed a new disk, and it has a different device ID than before. Your disk will no longer be assigned to the mount point it was assigned to previously.
- In my case, the disk was assigned drive letter E:.
- Launch Computer Management. Click the Start button, then right-click My Computer and select Manage.
- In Computer Management, expand Storage and select Disk Management.
- You should have one or more partitions showing in Disk Management, all named DATA. Your aligned disk, however, will have a drive letter associated with it. We don’t want this.
- Right-click the DATA partition with the drive letter (do not select drive D!) and select Change Drive Letter and Paths.
- Remove the drive letter associated with this partition.
Attachment:
File comment: Removing the unwanted drive letter
RemoveLetter.JPG [ 28.08 KiB | Viewed 79148 times ]
- Your old NTFS mount point (i.e. C:\fs\1JR) may still exist, but as far as Windows is concerned, it’s not an “empty” NTFS folder and thus you cannot simply mount the partition to it. It won’t work in Disk Management, and it won’t work in DiskPart either.
- Open a command prompt window and run wmic again (you ran this previously).
- Run these two commands again, and you’ll get output like you see below.
- volume get DeviceID, Capacity, Caption
Code: wmic:root\cli>Volume get DeviceID, Capacity, Caption Capacity Caption DeviceID 21476171776 C:\ \\?\Volume{7656a73b-9e50-11de-846f-806e6f6e6963}\ 978717839360 D:\ \\?\Volume{55024369-f20a-11de-84f2-00262d006d9b}\ 1000194015232 C:\fs\1IE\ \\?\Volume{5502436d-f20a-11de-84f2-00262d006d9b}\ 1000194015232 C:\fs\1J9\ \\?\Volume{b235d763-0257-11df-a313-00262d006d9b}\ 1000194015232 C:\fs\1J5\ \\?\Volume{ab83338b-f6ef-11de-a5d2-00262d006d9b}\ 320062062592 C:\fs\1JT\ \\?\Volume{cea3a52a-1482-11e0-92e9-00262d006d9b}\ 400077586432 C:\fs\1JE\ \\?\Volume{d0d5577c-0c8d-11df-88c7-00262d006d9b}\ 2000388354048 \\?\Volume{799e2e3f-2b0d-11e0-97d9-806e6f6e6963}\ \\?\Volume{799e2e3f-2b0d-11e0-97d9-806e6f6e6963}\ 1000194015232 C:\fs\1JN\ \\?\Volume{8ba23a56-b0be-11df-84da-00262d006d9b}\
- partition get Name, StartingOffset, Size
Code: wmic:root\cli>partition get Name, StartingOffset, Size Name Size StartingOffset Disk #3, Partition #0 1000194015744 32256 Disk #0, Partition #0 21476173824 32256 Disk #0, Partition #1 978717841920 21476206080 Disk #2, Partition #0 1000194015744 32256 Disk #1, Partition #0 1000194015744 32256 Disk #6, Partition #0 2000388358144 2097152 Disk #4, Partition #0 320062063104 32256 Disk #5, Partition #0 400077586944 32256 Disk #7, Partition #0 1000194015744 32256
- Notice in the first set of results, the DeviceID is repeated in the Caption field on your newly aligned disk! This is because the volume is not mounted at its old mount point. Also notice in the second set of results your partition’s offset is different, and the size may be a little different than what it was previously.
- Recall ymboc’s article I asked you to read? Here are some important steps, taken right from his article. Follow them carefully—they are critical to your success here! Specifically, you will be focused on Part 3, updating the WHS Registry. Obviously you’re not importing the C and D volumes, but his steps are nonetheless valid. I’ll summarize here what you need to do.
- Launch Registry Editor (regedt32).
- Expand the key HKLM\SOFTWARE\Microsoft\Windows Home Server\Storage Manager\Volumes.
- Under Volumes, you’ll see a bunch of keys that have GUIDs as their names. Click on each one of these until you find the one that for the value named MountPoint, the Data shows the NTFS mount point you’re looking to restore (i.e. C:\fs\1JR).
Attachment:
File comment: Mount point
MountPoint.JPG [ 169.94 KiB | Viewed 79148 times ]
- Expand the GUID that corresponds to the mount point you want to restore. You’ll see another key with a GUID for its name, and one named Attributes. Click on the GUID.
- Now you should see two values, both of type REG_SZ (string). One is named (Default) and the other has a number for its Name and another number for its Data. The Name is the sector offset where the partition begins, and the Data is the size of the partition. Most likely the Name is 32256.
- Go back to the partition output you just generated from WMIC and find your newly offset partition. It should be the same physical disk number (i.e. #6) as it was before you removed it from the server. Notice the offset is no longer 32256, but rather something larger. In my case it was 2097152, which is an offset of 512 x 4096 byte sectors, or 2MB. This is a correctly aligned partition.
- Right-click the Name (i.e. 32256) and select Rename. Rename it to the new offset (i.e. 2097152).
- Double-click on your renamed value and update the size (most likely the partition size is slightly different than what it was previously). In my case the new size is 2000388358144. Click OK to save the value.
Attachment:
File comment: Updating the offset and volume size
UpdatedOffsetSize.JPG [ 60.69 KiB | Viewed 79148 times ]
- Return to your command prompt window, and copy the GUID data of your volume to the clipboard. Capture only the text starting at the left curly brace and ending at the right curly brace.
- Back in Registry Editor, return to the Volumes\GUID subkey of your disk.
- Verify that you selected the correct one by double-checking the MountPoint value—it should be the mount point you’re looking to restore (i.e. C:\fs\1JR).
- Double-click on the value named SystemName. You need to edit this value because this is the OLD GUID value for your disk. In the string editor dialogue, select the GUID starting with the left curly brace and ending with the right curly brace, and press Ctrl-V. This should replace the old GUID with the new one captured from the command prompt window. Click OK to save.
Attachment:
File comment: Updated mount point
MountPointUpdated.JPG [ 81.87 KiB | Viewed 79148 times ]
- Now select the Volumes\GUID\Attributes subkey. You should see a value named DevicePath that also contains the old GUID. Double-click DevicePath and replace the old GUID with the new one just like you did in the preceding step.
The old...
Attachment:
File comment: Mount point attributes
MountPointAttributes.JPG [ 154.06 KiB | Viewed 79148 times ]
And the updated...
Attachment:
File comment: Mount point attributes updated
MountPointAttributesUpdated.JPG [ 75.41 KiB | Viewed 79148 times ]
- Now select the Registry Key HKLM\SYSTEM\MountedDevices.
- Here you will see a bunch of REG_BINARY values, many of which are named in the format \?\Volume{some_guid_here}. In particular, there are two in which you are interested:
- The old GUID from when you ran WMIC commands before removing the disk from WHS.
- The new GUID from when you ran WMIC commands after putting your disk back in WHS.
- Double-click on the OLD GUID to bring up its data.
- Highlight and copy all of the data there to the clipboard. Click Cancel to close the open dialogue.
- Double-click on the NEW GUID to bring up its data.
- Highlight all of the data and press Ctrl-V. This will replace the data with that copied from the old GUID.
- Click OK to save the changes.
Attachment:
File comment: List of mounted devices
MountedDevices.JPG [ 223.58 KiB | Viewed 79148 times ]
- Close Registry Editor and reboot your WHS.
- If all goes well, your disk will be accepted and your server will no longer be Critical.
Part VI – If Things Don’t Go as PlannedUnfortunately, things did not work out for me. Instead of mounting the volume at C:\fs\1JR, Windows deleted the old mount point entirely! And, to add insult to injury, it changed the DeviceID GUID of my volume again! Fortunately, there is a way to get around this, but more steps are involved. - Launch Disk Manager.
- Right-click on the partition you’ve been working with and select Change Drive Letter and Paths.
- Click Add.
- Select “Mount in the following empty NTFS folder.”
- Click Browse…
- Create a new folder under C:\fs with the same name as your old mount point. In my case, since the old mount point was C:\fs\1JR, I created a folder named 1JR under C:\fs.
Attachment:
File comment: Mount path
MountPath.JPG [ 32.1 KiB | Viewed 79148 times ]
- Click OK to select the folder, verify that’s the path showing in the Add Drive Letter or Path dialogue and then click OK. Your path should now appear in the Change Drive Letter and Paths for DATA dialogue. Click OK to commit the change.
- Open a command prompt window and run wmic again.
- Run the command volume get DeviceID, Capacity, Caption.
- Find your volume based on the Caption field (i.e. C:\fs\1JR) and then copy the corresponding GUID from the DeviceID column, starting at the left curly brace to the right curly brace.
- Open Registry Editor and expand HKLM\SOFTWARE\Microsoft\Windows Home Server\Storage Manager\Volumes.
- Click on the GUID of your volume you worked with in the previous section.
- Update the GUID in the SystemName value.
- Select the Attributes subkey.
- Update the GUID in the DevicePath value.
- Launch the Services control panel, and restart the Windows Home Server Storage Manager service, which will restart all of the WHS services.
- Your newly aligned disk should now import correctly, and the Critical status will go away.
- Reboot your WHS box.
WMIC output should look like this once everything is imported and configured correctly: Code: wmic:root\cli>Volume get DeviceID, Capacity, Caption Capacity Caption DeviceID 21476171776 C:\ \\?\Volume{7656a73b-9e50-11de-846f-806e6f6e6963}\ 978717839360 D:\ \\?\Volume{55024369-f20a-11de-84f2-00262d006d9b}\ 1000194015232 C:\fs\1IE\ \\?\Volume{5502436d-f20a-11de-84f2-00262d006d9b}\ 1000194015232 C:\fs\1J9\ \\?\Volume{b235d763-0257-11df-a313-00262d006d9b}\ 1000194015232 C:\fs\1J5\ \\?\Volume{ab83338b-f6ef-11de-a5d2-00262d006d9b}\ 320062062592 C:\fs\1JT\ \\?\Volume{cea3a52a-1482-11e0-92e9-00262d006d9b}\ 400077586432 C:\fs\1JE\ \\?\Volume{d0d5577c-0c8d-11df-88c7-00262d006d9b}\ 2000388354048 C:\fs\1JR\ \\?\Volume{799e2e3f-2b0d-11e0-97d9-806e6f6e6963}\ 1000194015232 C:\fs\1JN\ \\?\Volume{8ba23a56-b0be-11df-84da-00262d006d9b}\
I hope this helps partition alignment activities for anyone wishing to align partitions on their AFDs. Danke, Matt
_________________ Matt Sawyer Owner, Dojo North Software, LLC
HP EX490, 4GB, E5300, 15TB - Server 2012 - Sharing and Streaming HP EX487, 4GB, E5300, 13TB - Server 2012 Essentials - Backups
Last edited by msawyer91 on Thu Sep 08, 2011 10:02 pm, edited 2 times in total.
|