Cloud Articles and Resources

FInd Misaligned LUNs

Get-WmiObject Win32_DiskPartition | FT Name, @{Label="Aligned"; Expression={if($_.StartingOffset%4096 -eq 0){$True} else {$False}}} –auto

Returns

Name                  Aligned
----                  -------
Disk #0, Partition #0    True
Disk #0, Partition #1    True
Disk #2, Partition #0   False
Disk #1, Partition #0    True

Or run against a WinRM enabled remote computer

Get-WmiObject Win32_DiskPartition -ComputerName "MyLaptop" | FT Name, @{Label="Aligned"; Expression={if($_.StartingOffset%4096 -eq 0){$True} else {$False}}} –auto

Returns

Name                  Aligned
----                  -------
Disk #0, Partition #0    True
Disk #0, Partition #1    True
Disk #2, Partition #0   False
Disk #1, Partition #0    True

Please Note:

All content posted on the NetApp Community is publicly searchable and viewable. Participation in the NetApp Community is voluntary.

In accordance with our Code of Conduct and Community Terms of Use, DO NOT post or attach the following:

  • Software files (compressed or uncompressed)
  • Files that require an End User License Agreement (EULA)
  • Confidential information
  • Personal data you do not want publicly available
  • Another’s personally identifiable information (PII)
  • Copyrighted materials without the permission of the copyright owner

Continued non-compliance may result in NetApp Community account restrictions or termination.

Replies

I have also created similar script for my Infra...

http://gallery.technet.microsoft.com/scriptcenter/Disk-Alignment-70c03f75

All Community Forums
Public