Linux partition alignment

kb8190 describes using partitions and proper alignment for best performance.   We are using LVM exclusively without partitioning the device before hand.  Does running pvcreate on a whole device (in this case an mpath lun) fullfill this note:

"Note that this problem will not occur if partitions are not used on the LUNs (for example, if a filesystem is created directly on the LUN without partitioning).

Re: Linux partition alignment

A similar discussion has come up on the LVM mailing list.

Am I safe to assume that a device without any partitions at all, by definition, cannot be "mis-aligned" ?

Re: Linux partition alignment

An authoritative answer on this would be VERY helpful. I'm in good shape when working with customers on both Windows and Netware (NSS is aligned by default which is quite nice) but I haven't been able to nail down the Linux side (which encompasses ext3, reiserfs, LVM, swap, etc.).

Re: Linux partition alignment

Some Red Hat developers have clarified this for me.

Summary as I understand it:

  • No paritions means no parition alignment necessary
  • the alignment of lvm physical volumes should be a multiple of 4k.  The default is 64kb which will work fine for wafl.

Netapp folk:  Could you update kb8190 with this information even though it's specific to LVM2?  I think it would be helpful.

Re: Linux partition alignment

Ok....if I'm following this correctly we don't need to do anything when putting LVM on a disk?

However, we do need to do something when creating the individual LV's? If so, the steps would be....?

(Pardon the request for cookbook stuff....but want to make sure I'm following)

Re: Linux partition alignment

Hi Andrew,

You can find a great collection of cook-book stuff for LVM is here.  Red Hat has excellent documentation on their site.

The takeaway to this thread for me has been the alignment issue; NetApp couldn't answer if the lack of a partition on a physical volume using Red Hat 4.6, meant that the device was aligned for WAFLs 4k boundary.  Red Hat's unofficial answer is that it was using the default properties found in their volume management stack.



Re: Linux partition alignment

Just coming back to this official reply from NetApp would be fantastic.