NetApp LUN Alignment

This is just a quick post about how to check and manually set the LUN alignment offset on the NetApp Platform. Traditionally you can only do this using the wizards in the VSC Console but in some cases you may want to create a LUN with a specific offset without using the wizard which forces you to migrate VM’s onto the newly created LUN at the time of creation.

For me this was especially useful when attempting to fix alignment issues on Linux VM’s which use LVM and are not correctly identified as being mis-aligned in the VSC tool.

Identifying the LUN offset

The following commands will allow you to see the offset of a LUN or manually set the offset if you are trying to manually overcome disk alignment issues.

If a LUN has a manually set offset (or a custom offset defined by the use of the VMWare Plugin) it will show up in the output of the following command:

The output will look like:

If a LUN does not have a custom offset, meaning the offset is defined by one of the built in OS Types, it will show up like this:

The prefix size is in bytes so a little bit of math must be used to figure out the actual offset in sectors.

1 sector on the NetApp platform is 512 bytes, so the offset in the above example is 3584/512 which equals a 7 sector offset.

Setting the Offset Manually

On an existing LUN (preferably a fresh, unused LUN) you can set the offset as follows:

This operation is not officially supported by NetApp and they did not tell us how to do this. If you don’t know what or why you are doing here go away now!

The above should be a number in bytes. A sector on the NetApp platform is 512 bytes so if you want an offset of “7” you would do 512*7 = 3584 bytes for the prefix size.

Leave a Reply