The transition to NetApp MS Azure AD B2C is complete. If you missed the pre-registration, you will be invited to reigister at next log in.
Please note that access to your NetApp data may take up to 1 hour.
To learn more, read the FAQ and watch the video.
Need assistance? Complete this form and select “Registration Issue” as the Feedback Category.

Cloud Articles and Resources

Data ONTAP PowerShell Toolkit - About Disk Alignment


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.


One thing to note is if you create a LUN using the CLI, Filer View, System Manager, or Provisioning Manager (basically anything accept SnapDrive) as long as you choose "Windows" as the LUN type your disk will be aligned to the OS even though the OS will report it as being not aligned.  The reason for this is NetApp adjusts the offset on the array side so it matches the alignment in Windows.


Yeah, but then you have to online it, give it a type (GPT or MBR), create the partition, then format the partition and give it a drive letter (unless you created it with SDCLI that is).  I do have a sample of how to do this, but it's just so much easier with SDCLI.



Not disagreeing with you there!  Just stating that something like this:

Connect-VIServer yourVCsystem

$fileHeader = "System Name" + ";" + "Drive Info" + ";" + "Status"

$outFile = "diskAlignment.csv"

New-Item $outFile -Force -ItemType File

Add-Content $outFile $fileHeader

$allvms = Get-VM | where {$_.PowerState -eq "PoweredOn"} | Get-VMGuest | where {$_.OSFullName -like "*Microsoft*"}


($computer in $allvms) {

write-host $computer.hostname  

$driveInfo = Get-WmiObject Win32_DiskPartition -ComputerName $computer.HostName

If ($driveInfo -eq $null) { Add-Content $outFile ($computer.HostName + ", NA, Could Not Connect") }

Foreach ($drive in $driveInfo) {

If (($drive.StartingOffset%4096 -eq 0) -eq $true) {

Add-Content $outFile ($computer.HostName + ", " + ($drive.Name.split(","))[0] + ", Aligned Drive")


Else {

Add-Content $outFile ($computer.HostName + ", " + ($drive.Name.split(","))[0] + ", Mis-Aligned Drive")




Could result in false positives since Windows sees the drive as not being alligned when in fact it is alligned on the NetApp array.


Yes, its modulus division.  Divide by 4096 and if there's no remainder it's assumed aligned.  I have no error checking in the sample, so if you can't get the info it could return a false positive.  It's always a good practice to trap errors, and I have left that out of my samples for brevity.  Something to look at going forward.



There are two things to consider here.

First, a physical host connecting to a LUN, or a VM with an RDM will use the underlying LUN alignment specified in ONTAP when you create the LUN and will be aligned from that point (well, depending on OS, see below link). This does make me curious though, if I did try to align the LUN would I then cause the file system to have unaligned I/O? I'll have to test that in my spare time

For VMs, partitions on VMFS LUNs or NFS volumes still must be aligned. For the VMFS LUN, you specify VMFS to align VMFS to the array, but XP/2003/Linux will still put it's starting partition offset out of alignment with that. For RDMs (as well as physical), the answer evidently is, it depends on the OS type, see here ->