Linux – Howto align partitions in Linux + NetApp

linuxnetapppartedstorage

NetApp support has suggested us to align partitions to improve I/O performance, in short: starting sector must be divisible by 8. How can I move the starting point in a misaligned partition -in production, with ext3- under Linux?

A screenshot with a misaligned (start=63s) and aligned (start=64s) partition is available at:

http://filesocial.com/lkwvvn2

(If anyone is interested in this topic, NetApp has a good document explaining performance issues in misaligned partitions, search for "tr-3747": Best Practices for File System Alignment in Virtual Environments.)

I have tried using parted with "resize + move" commands, but when moving the starting point I get this error:

(parted) resize
Partition number? 1
Start?  [64s]?
End?  [419425019s]? 419425018
(parted) move
Partition number? 1
Start? 65
End?  [419425019s]? 419425019
Error: Can't move a partition onto itself.  Try using resize, perhaps?

Using fdisk's 'b' command in expert mode ('move beginning of data in a partition') works, but it doesn't move the file system.. thanks!!

Best Answer

You have two options: move all the misaligned VMs into a datastore created specifically for that misalignment, or fix all the VMs.

If you decide to fix the VMs, my understanding is that you will need to reboot the servers. Here's a Netapp link you can start research on if you decide to take an outage. mbrscan and mbralign are the tools needed.

If you can't take an outage yet and decide to create a new datastore, you'll need to read this. You will end up with a separate LUN for every type of offset, but you can take your time and schedule outages for realignment when it's less disruptive. Remember, once you put a live VM into a specially offset LUN, you can't VMotion it around until you fix it, unless you're willing to live with the bad performance.